Commit 5cd86661 authored by serg@serg.mylan's avatar serg@serg.mylan

after merge fix

parent e1e5b97d
......@@ -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
......@@ -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;
......@@ -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, &not_used) != len) {
ljam();
terrorCode = ZINVALID_CHAR_FORMAT;
return false;
......
......@@ -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;
}
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment