Commit b70c486e authored by unknown's avatar unknown

Merge bk@192.168.21.1:mysql-5.1-opt

into  mysql.com:/home/hf/work/29247/my51-29247


sql-common/client.c:
  Auto merged
sql/handler.h:
  Auto merged
parents 26bed2a6 3e7f28ed
...@@ -2459,6 +2459,7 @@ my_bool mysql_reconnect(MYSQL *mysql) ...@@ -2459,6 +2459,7 @@ my_bool mysql_reconnect(MYSQL *mysql)
} }
mysql_init(&tmp_mysql); mysql_init(&tmp_mysql);
tmp_mysql.options= mysql->options; tmp_mysql.options= mysql->options;
tmp_mysql.options.my_cnf_file= tmp_mysql.options.my_cnf_group= 0;
tmp_mysql.rpl_pivot= mysql->rpl_pivot; tmp_mysql.rpl_pivot= mysql->rpl_pivot;
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
......
...@@ -1130,10 +1130,12 @@ class handler :public Sql_alloc ...@@ -1130,10 +1130,12 @@ class handler :public Sql_alloc
int ha_index_init(uint idx, bool sorted) int ha_index_init(uint idx, bool sorted)
{ {
int result;
DBUG_ENTER("ha_index_init"); DBUG_ENTER("ha_index_init");
DBUG_ASSERT(inited==NONE); DBUG_ASSERT(inited==NONE);
inited=INDEX; if (!(result= index_init(idx, sorted)))
DBUG_RETURN(index_init(idx, sorted)); inited=INDEX;
DBUG_RETURN(result);
} }
int ha_index_end() int ha_index_end()
{ {
...@@ -1144,10 +1146,11 @@ class handler :public Sql_alloc ...@@ -1144,10 +1146,11 @@ class handler :public Sql_alloc
} }
int ha_rnd_init(bool scan) int ha_rnd_init(bool scan)
{ {
int result;
DBUG_ENTER("ha_rnd_init"); DBUG_ENTER("ha_rnd_init");
DBUG_ASSERT(inited==NONE || (inited==RND && scan)); DBUG_ASSERT(inited==NONE || (inited==RND && scan));
inited=RND; inited= (result= rnd_init(scan)) ? NONE: RND;
DBUG_RETURN(rnd_init(scan)); DBUG_RETURN(result);
} }
int ha_rnd_end() int ha_rnd_end()
{ {
......
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