Modified:
branches/guffert/
branches/guffert/driver/cursor.c
Log:
Use my_isspace() when scanning for 'WHERE CURRENT OF' to avoid system isspace()
issues
Property changes on: branches/guffert
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-709
+ /trunk:1-713
Modified: branches/guffert/driver/cursor.c
===================================================================
--- branches/guffert/driver/cursor.c 2007-08-29 22:07:22 UTC (rev 714)
+++ branches/guffert/driver/cursor.c 2007-08-29 22:09:04 UTC (rev 715)
@@ -100,18 +100,20 @@
if we found the start of the string, return it
*/
-static const char *mystr_get_prev_token( const char **query, const char *start )
+static const char *mystr_get_prev_token(CHARSET_INFO *charset,
+ const char **query, const char *start)
{
- const char *pos = *query;
+ const char *pos= *query;
- do
- {
- if ( pos == start )
- return ( *query = start ); /* Return start of string */
- } while ( !isspace( *(--pos) ) ) ;
- *query = pos; /* Remember pos to space */
+ do
+ {
+ if (pos == start)
+ return (*query = start); /* Return start of string */
+ } while (!my_isspace(charset, *(--pos))) ;
- return ( pos + 1 ); /* Return found token */
+ *query= pos; /* Remember pos to space */
+
+ return pos + 1; /* Return found token */
}
@@ -129,14 +131,18 @@
if (pStmt->query && pStmt->query_end)
{
const char *pszQueryTokenPos= pStmt->query_end;
- const char *pszCursor= mystr_get_prev_token((const char**)&pszQueryTokenPos,
+ const char *pszCursor= mystr_get_prev_token(pStmt->dbc->ansi_charset_info,
+ (const char**)&pszQueryTokenPos,
pStmt->query);
- if (!myodbc_casecmp(mystr_get_prev_token(&pszQueryTokenPos,
+ if (!myodbc_casecmp(mystr_get_prev_token(pStmt->dbc->ansi_charset_info,
+ &pszQueryTokenPos,
pStmt->query),"OF",2) &&
- !myodbc_casecmp(mystr_get_prev_token(&pszQueryTokenPos,
+ !myodbc_casecmp(mystr_get_prev_token(pStmt->dbc->ansi_charset_info,
+ &pszQueryTokenPos,
pStmt->query),"CURRENT",7) &&
- !myodbc_casecmp(mystr_get_prev_token(&pszQueryTokenPos,
+ !myodbc_casecmp(mystr_get_prev_token(pStmt->dbc->ansi_charset_info,
+ &pszQueryTokenPos,
pStmt->query),"WHERE",5) )
{
LIST *list_element;
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r715 - in branches/guffert: . driver | jwinstead | 30 Aug |