diff options
author | unknown <msvensson@neptunus.(none)> | 2005-09-21 15:28:28 +0200 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2005-09-21 15:28:28 +0200 |
commit | 83016f148bc2655ab6e5ccf00a7196926d6795d9 (patch) | |
tree | f535db4d6c5fc06bfea751c89631aa6286b97857 /mysql-test | |
parent | 268b309dc0eb1f53281766b4ff5c85eac84b6605 (diff) | |
download | mariadb-git-83016f148bc2655ab6e5ccf00a7196926d6795d9.tar.gz |
Bug #13231 mysqltest: fails to dectect when mysql_next_result fails
- Added functionality to check errors returned from mysql_next_result
- Exit from mysqltest when and unexpected error occurs.
- The above fixes reveal problems with rpl000009, sp-error and query_cache-
- Fix sp-error by adding an expected error
- Fix rpl000009 by not sending "ok" from mysql_create_db when called with silent flag from load_master_data
- Fix query_cache in separate patch
client/mysqltest.c:
Check and handle error after mysql_next_result
Change several verbose_msg to die so that the error is properly reported
Clean up of error handling code in run_query_stmt, check all errors and use common
function handle_error.
mysql-test/r/mysqltest.result:
mysqltest now dies when a query fails with wrong errno
mysql-test/r/sp-error.result:
Update test result to match the expected error from calling the sp closing a cursor that is not open.
mysql-test/t/sp-error.test:
Add missing --error 1326 before call to sp that closes a already closed cursor.
Add test for bug9367
sql/sql_db.cc:
Don't send ok in mysql_create_db if silent flag is set.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysqltest.result | 2 | ||||
-rw-r--r-- | mysql-test/r/sp-error.result | 1 | ||||
-rw-r--r-- | mysql-test/t/sp-error.test | 26 |
3 files changed, 26 insertions, 3 deletions
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index c643a5ae647..36618140306 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -134,7 +134,6 @@ select 1146 as "after_!errno_masked_error" ; after_!errno_masked_error 1146 mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1000... -mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1000... garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 select 1064 as "after_--enable_abort_on_error" ; @@ -143,7 +142,6 @@ after_--enable_abort_on_error select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1064... -mysqltest: At line 1: query 'select 3 from t1' failed: 1146: Table 'test.t1' doesn't exist hello hello ;;;;;;;; diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 17a2050437f..05b6a2788ea 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -692,6 +692,7 @@ END P1| call SP001(); TEMP_SUM 0 +ERROR 24000: Cursor is not open drop procedure SP001; drop table t1, t2; drop function if exists bug11394| diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 40f59f3f124..fa74c318db3 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -991,6 +991,7 @@ P1: BEGIN SELECT 'end of proc'; END P1| delimiter ;| +--error 1326 call SP001(); drop procedure SP001; drop table t1, t2; @@ -1187,7 +1188,30 @@ delimiter ;| create trigger bug12712 before insert on t1 for each row set session autocommit = 0; - +# +# BUG#9367: Stored procedures: client hang after "show warnings" +# +--disable_parsing +--disable_warnings +drop procedure if exists bug9367; +--enable_warnings +create table t1 (s1 int); +select s1 from t1; +delimiter |; +create procedure bug9367() +begin + declare v int; + declare c cursor for select s1 from t1; + open c; + show warnings; + fetch c into v; + select v; +end| +delimiter ;| +call bug9367(); +drop procedure bug9367; +drop table t1; +--enable_parsing # # BUG#NNNN: New bug synopsis # |