diff options
author | unknown <rburnett@bk-internal.mysql.com> | 2006-05-26 15:08:24 +0200 |
---|---|---|
committer | unknown <rburnett@bk-internal.mysql.com> | 2006-05-26 15:08:24 +0200 |
commit | 60fab5af5bedb9a09c6ec5736679940185ab3451 (patch) | |
tree | 69c8be250c1f5e9f18b338957242c801b6336250 /sql | |
parent | 20334ba61e153605cfb2b38580cd748927b7dde7 (diff) | |
parent | 53949a266f8ea408a0ba4bd3068a67f93452c7d1 (diff) | |
download | mariadb-git-60fab5af5bedb9a09c6ec5736679940185ab3451.tar.gz |
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-new
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_ndbcluster.cc | 5 | ||||
-rw-r--r-- | sql/sql_lex.cc | 31 |
2 files changed, 9 insertions, 27 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 3239c154478..3425c638005 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3546,14 +3546,17 @@ void ha_ndbcluster::info(uint flag) Ndb *ndb= get_ndb(); Ndb_tuple_id_range_guard g(m_share); + Uint64 auto_increment_value64; if (ndb->readAutoIncrementValue(m_table, g.range, - auto_increment_value) == -1) + auto_increment_value64) == -1) { const NdbError err= ndb->getNdbError(); sql_print_error("Error %lu in readAutoIncrementValue(): %s", (ulong) err.code, err.message); auto_increment_value= ~(Uint64)0; } + else + auto_increment_value= (ulonglong)auto_increment_value64; } } DBUG_VOID_RETURN; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 562224201e7..02711ed8f48 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -319,18 +319,7 @@ static char *get_text(LEX *lex) found_escape=1; if (lex->ptr == lex->end_of_query) return 0; -#ifdef USE_MB - int l; - if (use_mb(cs) && - (l = my_ismbchar(cs, - (const char *)lex->ptr, - (const char *)lex->end_of_query))) { - lex->ptr += l; - continue; - } - else -#endif - yySkip(); + yySkip(); } else if (c == sep) { @@ -360,9 +349,6 @@ static char *get_text(LEX *lex) { uchar *to; - /* Re-use found_escape for tracking state of escapes */ - found_escape= 0; - for (to=start ; str != end ; str++) { #ifdef USE_MB @@ -376,8 +362,7 @@ static char *get_text(LEX *lex) continue; } #endif - if (!found_escape && - !(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && + if (!(lex->thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) && *str == '\\' && str+1 != end) { switch(*++str) { @@ -404,20 +389,14 @@ static char *get_text(LEX *lex) *to++= '\\'; // remember prefix for wildcard /* Fall through */ default: - found_escape= 1; - str--; + *to++= *str; break; } } - else if (!found_escape && *str == sep) - { - found_escape= 1; - } + else if (*str == sep) + *to++= *str++; // Two ' or " else - { *to++ = *str; - found_escape= 0; - } } *to=0; lex->yytoklen=(uint) (to-start); |