Commit f1fb5aa2 authored by Alexey Kopytov's avatar Alexey Kopytov

Automerge

parents b0eb222a 90939fc5
...@@ -1979,7 +1979,7 @@ static COMMANDS *find_command(char *name,char cmd_char) ...@@ -1979,7 +1979,7 @@ static COMMANDS *find_command(char *name,char cmd_char)
*/ */
if (strstr(name, "\\g") || (strstr(name, delimiter) && if (strstr(name, "\\g") || (strstr(name, delimiter) &&
!(strlen(name) >= 9 && !(strlen(name) >= 9 &&
!my_strnncoll(charset_info, !my_strnncoll(&my_charset_latin1,
(uchar*) name, 9, (uchar*) name, 9,
(const uchar*) "delimiter", (const uchar*) "delimiter",
9)))) 9))))
...@@ -2000,7 +2000,7 @@ static COMMANDS *find_command(char *name,char cmd_char) ...@@ -2000,7 +2000,7 @@ static COMMANDS *find_command(char *name,char cmd_char)
{ {
if (commands[i].func && if (commands[i].func &&
((name && ((name &&
!my_strnncoll(charset_info,(uchar*)name,len, !my_strnncoll(&my_charset_latin1, (uchar*)name, len,
(uchar*)commands[i].name,len) && (uchar*)commands[i].name,len) &&
!commands[i].name[len] && !commands[i].name[len] &&
(!end || (end && commands[i].takes_params))) || (!end || (end && commands[i].takes_params))) ||
......
...@@ -198,6 +198,7 @@ COUNT (*) ...@@ -198,6 +198,7 @@ COUNT (*)
1 1
COUNT (*) COUNT (*)
1 1
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
End of 5.0 tests End of 5.0 tests
WARNING: --server-arg option not supported in this configuration. WARNING: --server-arg option not supported in this configuration.
Warning (Code 1286): Unknown table engine 'nonexistent' Warning (Code 1286): Unknown table engine 'nonexistent'
......
...@@ -349,6 +349,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql; ...@@ -349,6 +349,14 @@ remove_file $MYSQLTEST_VARDIR/tmp/bug31060.sql;
--exec $MYSQL --ignore-spaces -e "SELECT COUNT (*)" --exec $MYSQL --ignore-spaces -e "SELECT COUNT (*)"
--exec $MYSQL -b -i -e "SELECT COUNT (*)" --exec $MYSQL -b -i -e "SELECT COUNT (*)"
#
# Bug#37268 'binary' character set makes CLI-internal commands case sensitive
#
--replace_regex /\([0-9]*\)/(errno)/
--error 1
--exec $MYSQL --default-character-set=binary test -e "CONNECT test invalid_hostname" 2>&1
--exec $MYSQL --default-character-set=binary test -e "DELIMITER //" 2>&1
--echo End of 5.0 tests --echo End of 5.0 tests
# #
......
...@@ -1085,7 +1085,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char ...@@ -1085,7 +1085,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char
if (bytesToStore) if (bytesToStore)
memcpy(db2Buf, dataToStore, bytesToStore); memcpy(db2Buf, dataToStore, bytesToStore);
if (bytesToPad) if (bytesToPad)
wmemset((wchar_t*)(db2Buf + bytesToStore), 0x0020, bytesToPad/2); memset16((db2Buf + bytesToStore), 0x0020, bytesToPad/2);
} }
else else
{ {
...@@ -1108,7 +1108,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char ...@@ -1108,7 +1108,7 @@ int32 ha_ibmdb2i::convertMySQLtoDB2(Field* field, const DB2Field& db2Field, char
bytesToStore = db2BytesToStore; bytesToStore = db2BytesToStore;
} }
if (db2BytesToStore < maxDb2BytesToStore) // If need to pad if (db2BytesToStore < maxDb2BytesToStore) // If need to pad
wmemset((wchar_t*)(db2Buf + db2BytesToStore), 0x0020, (maxDb2BytesToStore - db2BytesToStore)/2); memset16((db2Buf + db2BytesToStore), 0x0020, (maxDb2BytesToStore - db2BytesToStore)/2);
} }
if (db2FieldType == QMY_VARGRAPHIC) if (db2FieldType == QMY_VARGRAPHIC)
......
...@@ -109,5 +109,21 @@ bool isOrdinaryIdentifier(const char* s) ...@@ -109,5 +109,21 @@ bool isOrdinaryIdentifier(const char* s)
} }
return true; return true;
} }
/**
Fill memory with a 16-bit word.
@param p Pointer to space to fill.
@param v Value to fill
@param l Length of space (in 16-bit words)
*/
void memset16(void* p, uint16 v, size_t l)
{
uint16* p2=(uint16*)p;
while (l--)
{
*(p2++) = v;
}
}
#endif #endif
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