diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index d36dca86e39..68eae111111 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -180,6 +180,5 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4) 2 2 2 2 set session @honk=99; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@honk=99' at line 1 set one_shot @honk=99; -ERROR HY000: The SET ONE_SHOT syntax is reserved for purposes internal to the MySQL server +ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 49941bc81f3..ef360f2231d 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -116,7 +116,6 @@ select coercibility(@v1),coercibility(@v2),coercibility(@v3),coercibility(@v4); # # Bug #9286 SESSION/GLOBAL should be disallowed for user variables # ---error 1064 set session @honk=99; ---error 1105 +--error 1382 set one_shot @honk=99; diff --git a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp index c3f85cdebd5..3170d23499a 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp @@ -813,6 +813,7 @@ Dbtup::updateFixedSizeTHManyWordNotNULL(Uint32* inBuffer, ndbrequire(i < regTabPtr->noOfCharsets); // not const in MySQL CHARSET_INFO* cs = regTabPtr->charsetArray[i]; + int not_used; const char* ssrc = (const char*)&inBuffer[tInBufIndex + 1]; Uint32 lb, len; if (! NdbSqlUtil::get_var_length(typeId, ssrc, bytes, lb, len)) { @@ -822,7 +823,7 @@ Dbtup::updateFixedSizeTHManyWordNotNULL(Uint32* inBuffer, } // fast fix bug#7340 if (typeId != NDB_TYPE_TEXT && - (*cs->cset->well_formed_len)(cs, ssrc + lb, ssrc + lb + len, ZNIL) != len) { + (*cs->cset->well_formed_len)(cs, ssrc + lb, ssrc + lb + len, ZNIL, ¬_used) != len) { ljam(); terrorCode = ZINVALID_CHAR_FORMAT; return false; diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c index c47f2c2d8ce..47bf1167c8c 100644 --- a/strings/ctype-cp932.c +++ b/strings/ctype-cp932.c @@ -5413,9 +5413,10 @@ uint my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), */ static uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)), - const char *b, const char *e, uint pos) + const char *b, const char *e, uint pos, int *error) { const char *b0= b; + *error= 0; while (pos && b < e) { /* @@ -5441,6 +5442,7 @@ uint my_well_formed_len_cp932(CHARSET_INFO *cs __attribute__((unused)), else { /* Wrong byte sequence */ + *error= 1; break; } } diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c index 8c8d237cf48..346b5ecdf6b 100644 --- a/strings/ctype-eucjpms.c +++ b/strings/ctype-eucjpms.c @@ -8380,17 +8380,18 @@ my_jisx0212_uni_onechar(int code){ /* EUC-JP encoding subcomponents: - [x00-x7F] # ASCII/JIS-Roman (one-byte/character) - [x8E][xA0-xDF] # half-width katakana (two bytes/char) - [x8F][xA1-xFE][xA1-xFE] # JIS X 0212-1990 (three bytes/char) + [x00-x7F] # ASCII/JIS-Roman (one-byte/character) + [x8E][xA0-xDF] # half-width katakana (two bytes/char) + [x8F][xA1-xFE][xA1-xFE] # JIS X 0212-1990 (three bytes/char) [xA1-xFE][xA1-xFE] # JIS X 0208:1997 (two bytes/char) */ static uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)), - const char *beg, const char *end, uint pos) + const char *beg, const char *end, uint pos, int *error) { const uchar *b= (uchar *) beg; + *error=0; for ( ; pos && b < (uchar*) end; pos--, b++) { @@ -8408,6 +8409,7 @@ uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)), { if (*b >= 0xA0 && *b <= 0xDF) continue; + *error=1; return chbeg - beg; /* invalid sequence */ } @@ -8421,6 +8423,7 @@ uint my_well_formed_len_eucjpms(CHARSET_INFO *cs __attribute__((unused)), if (ch >= 0xA1 && ch <= 0xFE && *b >= 0xA1 && *b <= 0xFE) /* [xA1-xFE][xA1-xFE] */ continue; + *error=1; return chbeg - beg; /* invalid sequence */ } return b - (uchar *) beg;