Bug #36724 Test funcs_1.<engine>_storedproc_02 needs to be updated
Submitted: 14 May 2008 20:16 Modified: 28 Jul 2008 18:15
Reporter: Patrick Crews Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Patrick Crews CPU Architecture:Any
Tags: funcs_1, SQLSTATE, stored procedure, test

[14 May 2008 20:16] Patrick Crews
Description:
Test funcs1.<engine>_storedproc_02 failing.

Changes made for Bug #8759	Stored Procedures: SQLSTATE '00000' should be illegal
Have caused this test to start failing.  Can no longer declare sqlstate '00000' in a handler.

Test results need to be updated to reflect this change in behavior.

CREATE PROCEDURE sp1()
   begin1_label:BEGIN
      declare exit handler for sqlstate '00000' set @var1 = 5;
      set @var2 = 6;
      begin2_label:BEGIN
         declare continue handler for sqlstate '00000' set @var3 = 7;
         set @var4 = 8;
         SELECT @var3, @var4;
      END begin2_label;
      SELECT @var1, @var2;
   END begin1_label//
delimiter ;//

How to repeat:
Run the test on the latest 5.1 build.

./mysql-test-run --suite=funcs_1 --do-test storedproc_02.

You will see the following error:  +ERROR 42000: Bad SQLSTATE: '00000'
is now being issued.

Suggested fix:
Update the test to expect the the error to be issued and re-record the .result files for the various engines.
[28 Jul 2008 16:50] Bugs System
Pushed into 5.1.27  (revid:joerg@mysql.com-20080626161101-h5hsaluwtf05xdr2) (version source revid:joerg@mysql.com-20080626161101-h5hsaluwtf05xdr2) (pib:3)
[28 Jul 2008 17:55] Paul DuBois
Test case change. No 5.1.x changelog entry needed.

Setting report to Patch Queued pending push of fix into 6.0.x.
[28 Jul 2008 18:01] Patrick Crews
pushed into 5.1.25-rc
pushed in 6.0.6-alpha
[28 Jul 2008 18:15] Paul DuBois
Test case change. No 6.0.x changelog entry needed.