Commit b3d194f2 authored by unknown's avatar unknown

Merge mysql.com:/home/hf/work/mysql-5.0.clean

into mysql.com:/home/hf/work/mysql-5.0.emb

parents d6f7a337 59f6cf25
...@@ -199,6 +199,14 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -199,6 +199,14 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
unix_socket=0; unix_socket=0;
db_name = db ? my_strdup(db,MYF(MY_WME)) : NULL; db_name = db ? my_strdup(db,MYF(MY_WME)) : NULL;
/* Send client information for access check */
client_flag|=CLIENT_CAPABILITIES;
if (client_flag & CLIENT_MULTI_STATEMENTS)
client_flag|= CLIENT_MULTI_RESULTS;
client_flag&= ~CLIENT_COMPRESS;
if (db)
client_flag|=CLIENT_CONNECT_WITH_DB;
mysql->thd= create_embedded_thd(client_flag, db_name); mysql->thd= create_embedded_thd(client_flag, db_name);
init_embedded_mysql(mysql, client_flag, db_name); init_embedded_mysql(mysql, client_flag, db_name);
...@@ -209,11 +217,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -209,11 +217,6 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
if (mysql_init_charset(mysql)) if (mysql_init_charset(mysql))
goto error; goto error;
/* Send client information for access check */
client_flag|=CLIENT_CAPABILITIES;
client_flag&= ~CLIENT_COMPRESS;
if (db)
client_flag|=CLIENT_CONNECT_WITH_DB;
mysql->server_status= SERVER_STATUS_AUTOCOMMIT; mysql->server_status= SERVER_STATUS_AUTOCOMMIT;
if (mysql->options.init_commands) if (mysql->options.init_commands)
......
...@@ -1433,9 +1433,6 @@ bool do_command(THD *thd) ...@@ -1433,9 +1433,6 @@ bool do_command(THD *thd)
} }
else else
{ {
if (thd->killed == THD::KILL_QUERY || thd->killed == THD::KILL_BAD_DATA)
thd->killed= THD::NOT_KILLED;
packet=(char*) net->read_pos; packet=(char*) net->read_pos;
command = (enum enum_server_command) (uchar) packet[0]; command = (enum enum_server_command) (uchar) packet[0];
if (command >= COM_END) if (command >= COM_END)
...@@ -1482,6 +1479,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1482,6 +1479,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
bool error= 0; bool error= 0;
DBUG_ENTER("dispatch_command"); DBUG_ENTER("dispatch_command");
if (thd->killed == THD::KILL_QUERY || thd->killed == THD::KILL_BAD_DATA)
thd->killed= THD::NOT_KILLED;
thd->command=command; thd->command=command;
/* /*
Commands which will always take a long time should be marked with Commands which will always take a long time should be marked with
......
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