Commit ab5b0a47 authored by Andrei Elkin's avatar Andrei Elkin

merge from 5.5 repo.

parents ca2baa0f 3dd7dd83
...@@ -372,11 +372,11 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQ ...@@ -372,11 +372,11 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN -n --datadir=$MYSQL_DATADIR --basedir=$MYSQ
--echo # Show the help. --echo # Show the help.
--echo # --echo #
replace_result $MYSQL_PLUGIN mysql_plugin; replace_result $MYSQL_PLUGIN mysql_plugin;
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ --replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
--exec $MYSQL_PLUGIN --help --exec $MYSQL_PLUGIN --help
replace_result $MYSQL_PLUGIN mysql_plugin; replace_result $MYSQL_PLUGIN mysql_plugin;
--replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ --replace_regex /Ver [0-9.]+ Distrib [0-9.]+/Ver V.V.VV Distrib XX.XX.XX/ /XX-m[0-9]+/XX/ /XX[a-z]/XX/
--exec $MYSQL_PLUGIN --version --exec $MYSQL_PLUGIN --version
# #
......
...@@ -148,7 +148,8 @@ static char reserved_map[256]= ...@@ -148,7 +148,8 @@ static char reserved_map[256]=
int check_if_legal_tablename(const char *name) int check_if_legal_tablename(const char *name)
{ {
DBUG_ENTER("check_if_legal_tablename"); DBUG_ENTER("check_if_legal_tablename");
DBUG_RETURN((reserved_map[(uchar) name[0]] & 1) && DBUG_RETURN(name[0] != 0 && name[1] != 0 &&
(reserved_map[(uchar) name[0]] & 1) &&
(reserved_map[(uchar) name[1]] & 2) && (reserved_map[(uchar) name[1]] & 2) &&
(reserved_map[(uchar) name[2]] & 4) && (reserved_map[(uchar) name[2]] & 4) &&
str_list_find(&reserved_names[1], name)); str_list_find(&reserved_names[1], name));
......
...@@ -3415,6 +3415,12 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, ...@@ -3415,6 +3415,12 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
mysql->server_status=uint2korr(end+3); mysql->server_status=uint2korr(end+3);
mysql->server_capabilities|= uint2korr(end+5) << 16; mysql->server_capabilities|= uint2korr(end+5) << 16;
pkt_scramble_len= end[7]; pkt_scramble_len= end[7];
if (pkt_scramble_len < 0)
{
set_mysql_error(mysql, CR_MALFORMED_PACKET,
unknown_sqlstate); /* purecov: inspected */
goto error;
}
} }
end+= 18; end+= 18;
......
...@@ -8032,6 +8032,7 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio, ...@@ -8032,6 +8032,7 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio,
int2store(end + 3, mpvio->server_status[0]); int2store(end + 3, mpvio->server_status[0]);
int2store(end + 5, mpvio->client_capabilities >> 16); int2store(end + 5, mpvio->client_capabilities >> 16);
end[7]= data_len; end[7]= data_len;
DBUG_EXECUTE_IF("poison_srv_handshake_scramble_len", end[7]= -100;);
bzero(end + 8, 10); bzero(end + 8, 10);
end+= 18; end+= 18;
/* write scramble tail */ /* write scramble tail */
......
...@@ -4421,6 +4421,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), ...@@ -4421,6 +4421,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
{ {
int code; int code;
char hex[]= "0123456789abcdef"; char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc]) if (wc < 128 && filename_safe_char[wc])
{ {
*s= (uchar) wc; *s= (uchar) wc;
......
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