diff options
author | unknown <kostja@bodhi.local> | 2006-08-02 14:13:01 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-08-02 14:13:01 +0400 |
commit | f3919e928468ebd4906fd310f9032a9c3cf87a71 (patch) | |
tree | ea898f8f24b260b3a08d72dd19588e5815d47e74 /libmysql | |
parent | ed19079caa192e368a1b82e7e35e43c59dc23c34 (diff) | |
parent | d57c41b79d972012ae76fe0b36ee31b1e97989ef (diff) | |
download | mariadb-git-f3919e928468ebd4906fd310f9032a9c3cf87a71.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
include/mysql.h:
Auto merged
include/sql_common.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/ps.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/sql_prepare.cc:
Manual merge.
sql/table.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
Diffstat (limited to 'libmysql')
-rw-r--r-- | libmysql/libmysql.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 4efc3c2fd1c..21fb84fb19a 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -645,7 +645,7 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd) NET *net= &mysql->net; ulong pkt_length; - pkt_length= net_safe_read(mysql); + pkt_length= cli_safe_read(mysql); if (pkt_length == packet_error) return 1; @@ -666,7 +666,7 @@ int cli_read_change_user_result(MYSQL *mysql, char *buff, const char *passwd) return 1; } /* Read what server thinks about out new auth message report */ - if (net_safe_read(mysql) == packet_error) + if (cli_safe_read(mysql) == packet_error) return 1; } return 0; @@ -1887,7 +1887,7 @@ my_bool cli_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt) DBUG_ENTER("cli_read_prepare_result"); mysql= mysql->last_used_con; - if ((packet_length= net_safe_read(mysql)) == packet_error) + if ((packet_length= cli_safe_read(mysql)) == packet_error) DBUG_RETURN(1); mysql->warning_count= 0; @@ -2505,7 +2505,8 @@ int cli_stmt_execute(MYSQL_STMT *stmt) if (stmt->param_count) { - NET *net= &stmt->mysql->net; + MYSQL *mysql= stmt->mysql; + NET *net= &mysql->net; MYSQL_BIND *param, *param_end; char *param_data; ulong length; @@ -2517,7 +2518,8 @@ int cli_stmt_execute(MYSQL_STMT *stmt) set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate); DBUG_RETURN(1); } - if (stmt->mysql->status != MYSQL_STATUS_READY) + if (mysql->status != MYSQL_STATUS_READY || + mysql->server_status & SERVER_MORE_RESULTS_EXISTS) { set_stmt_error(stmt, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); DBUG_RETURN(1); @@ -4532,7 +4534,7 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row) int cli_unbuffered_fetch(MYSQL *mysql, char **row) { - if (packet_error == net_safe_read(mysql)) + if (packet_error == cli_safe_read(mysql)) return 1; *row= ((mysql->net.read_pos[0] == 254) ? NULL : @@ -4641,7 +4643,7 @@ int cli_read_binary_rows(MYSQL_STMT *stmt) mysql= mysql->last_used_con; - while ((pkt_len= net_safe_read(mysql)) != packet_error) + while ((pkt_len= cli_safe_read(mysql)) != packet_error) { cp= net->read_pos; if (cp[0] != 254 || pkt_len >= 8) |