diff options
author | unknown <pem@mysql.com> | 2003-04-23 09:22:54 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2003-04-23 09:22:54 +0200 |
commit | f525047d1eb2d1bad50cf453210939ceb15d7282 (patch) | |
tree | 9fbeeb35b26b022c208e85d02e688a47350e8cb5 /libmysql/libmysql.c | |
parent | 4ed94fcd8ec8afc11e4208a5a3e83bd90b5fc644 (diff) | |
download | mariadb-git-f525047d1eb2d1bad50cf453210939ceb15d7282.tar.gz |
Made multiple queries (SELECT without INTO) work in SPs.
This included bug fixes in the 4.1 protocol (actually send and receive the
server_status flags).
libmysql/libmysql.c:
Pick up the server_status (with the 4.1 protocol) as well.
mysql-test/r/sp-error.result:
Test for "bad selects" in non-CLIENT_MULTI_QUERIES clients (as mysqltest for the
momen; this test will have to go away eventually).
mysql-test/t/sp-error.test:
Test for "bad selects" in non-CLIENT_MULTI_QUERIES clients (as mysqltest for the
momen; this test will have to go away eventually).
sql/protocol.cc:
Actually send the server_status flags in send_eof() (4.1 protocol), not just zero.
sql/sp_head.cc:
Made multiple queries (SELECT without INTO) work in SPs.
sql/sp_head.h:
Made multiple queries (SELECT without INTO) work in SPs.
sql/sql_parse.cc:
Made multiple queries (SELECT without INTO) work in SPs.
sql/sql_yacc.yy:
Made multiple queries (SELECT without INTO) work in SPs.
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index cc268101d38..f9df6445749 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1370,6 +1370,7 @@ static MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, if (pkt_len > 1) /* MySQL 4.1 protocol */ { mysql->warning_count= uint2korr(cp+1); + mysql->server_status= uint2korr(cp+3); DBUG_PRINT("info",("warning_count: %ld", mysql->warning_count)); } DBUG_PRINT("exit",("Got %d rows",result->rows)); @@ -1395,7 +1396,10 @@ read_one_row(MYSQL *mysql,uint fields,MYSQL_ROW row, ulong *lengths) if (pkt_len <= 8 && mysql->net.read_pos[0] == 254) { if (pkt_len > 1) /* MySQL 4.1 protocol */ + { mysql->warning_count= uint2korr(mysql->net.read_pos+1); + mysql->server_status= uint2korr(mysql->net.read_pos+3); + } return 1; /* End of data */ } prev_pos= 0; /* allowed to write at packet[-1] */ @@ -5370,6 +5374,7 @@ static MYSQL_DATA *read_binary_rows(MYSQL_STMT *stmt) if (pkt_len > 1) { mysql->warning_count= uint2korr(cp+1); + mysql->server_status= uint2korr(cp+3); DBUG_PRINT("info",("warning_count: %ld", mysql->warning_count)); } DBUG_PRINT("exit",("Got %d rows",result->rows)); |