Bug #11731 mysqltest in multi-statement queries ignores errors in non-1st queries
Submitted: 4 Jul 2005 19:24 Modified: 5 Dec 2005 9:38
Reporter: Sergey Petrunya Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0-bk OS:
Assigned to: Magnus Blåudd CPU Architecture:Any

[4 Jul 2005 19:24] Sergey Petrunya
Description:
mysql-test-run in multi-statement queries ignores errors in non-first statement(s). 
 

How to repeat:
Create a test file:
-------a.test-----------
--disable_ps_protocol

--disable_warnings
drop table if exists t1;
--enable_warnings

delimiter ||||;

create table t1 (a int primary key);
insert into t1 values (1);
select 'select-me';
insertz "this isnt a valid query" into t1 values(1)||||

delimiter ;||||
------a.test ends----
run ./mysql-test-run --record t/a.test
the test will succeed and in result one will find:
------a.result-----
drop table if exists t1;
create table t1 (a int primary key);
insert into t1 values (1);
select 'select-me';
insertz "this isnt a valid query" into t1 values(1)||||
select-me
select-me
------a.result ends-----
Which is very misleading.

Suggested fix:
Make mysql-test-run detect and print all errors and warnings (and make --error directive to mask all of the errors )
[2 Dec 2005 17:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/32966
[5 Dec 2005 9:38] Magnus Blåudd
Test cases pushed to 5.0.17. Closing bug report now.