Below is the list of changes that have just been committed into a local
5.0 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2048 05/12/02 22:59:45 serg@stripped +5 -0
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
sql/sp_head.cc
1.197 05/12/02 22:59:29 serg@stripped +3 -0
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
mysql-test/t/sp.test
1.165 05/12/02 22:59:29 serg@stripped +21 -0
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
mysql-test/t/sp-error.test
1.98 05/12/02 22:59:28 serg@stripped +38 -1
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
mysql-test/r/sp.result
1.172 05/12/02 22:59:28 serg@stripped +20 -2
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
mysql-test/r/sp-error.result
1.94 05/12/02 22:59:28 serg@stripped +33 -0
Bug#13012: REPAIR/BACKUP/RESTORE TABLE cause "packet out of order" in SP.
Mark them properly as result-returning statements
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-5.0
--- 1.93/mysql-test/r/sp-error.result Wed Nov 23 00:12:33 2005
+++ 1.94/mysql-test/r/sp-error.result Fri Dec 2 22:59:28 2005
@@ -981,6 +981,8 @@ END |
drop table t1|
drop function bug_13627_f|
drop function if exists bug12329;
+Warnings:
+Note 1305 FUNCTION bug12329 does not exist
create table t1 as select 1 a;
create table t2 as select 1 a;
create function bug12329() returns int return (select a from t1);
@@ -1055,3 +1057,34 @@ Db Name Type Definer Modified Created Se
mysqltest2 p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
drop database mysqltest2;
use test;
+DROP FUNCTION IF EXISTS bug13012|
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+REPAIR TABLE t1;
+RETURN 1;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+BACKUP TABLE t1 TO '/tmp';
+RETURN 1;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+RESTORE TABLE t1 FROM '/tmp';
+RETURN 1;
+END|
+ERROR 0A000: Not allowed to return a result set from a function
+create table t1 (a int)|
+CREATE PROCEDURE bug13012_1() REPAIR TABLE t1|
+CREATE FUNCTION bug13012_2() RETURNS INT
+BEGIN
+CALL bug13012_1();
+RETURN 1;
+END|
+SELECT bug13012_2()|
+ERROR 0A000: Not allowed to return a result set from a function
+drop table t1|
+drop procedure bug13012_1|
+drop function bug13012_2|
--- 1.171/mysql-test/r/sp.result Fri Dec 2 20:43:46 2005
+++ 1.172/mysql-test/r/sp.result Fri Dec 2 22:59:28 2005
@@ -4100,8 +4100,6 @@ x
4711
drop procedure bug14376|
drop procedure if exists p1|
-Warnings:
-Note 1305 PROCEDURE p1 does not exist
drop table if exists t1|
create table t1 (a varchar(255))|
insert into t1 (a) values ("a - table column")|
@@ -4153,4 +4151,24 @@ A local variable in a nested compound st
a - local variable in a nested compound statement
A local variable in a nested compound statement takes precedence over table column in
cursors
a - local variable in a nested compound statement
+drop procedure p1|
+drop procedure if exists bug13012|
+create procedure bug13012()
+BEGIN
+REPAIR TABLE t1;
+BACKUP TABLE t1 to '../tmp';
+DROP TABLE t1;
+RESTORE TABLE t1 FROM '../tmp';
+END|
+call bug13012()|
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+Table Op Msg_type Msg_text
+test.t1 backup status OK
+Table Op Msg_type Msg_text
+test.t1 restore status OK
+drop procedure bug13012|
+select * from t1|
+a
+a - table column
drop table t1,t2;
--- 1.97/mysql-test/t/sp-error.test Wed Nov 23 00:12:33 2005
+++ 1.98/mysql-test/t/sp-error.test Fri Dec 2 22:59:28 2005
@@ -1410,7 +1410,6 @@ delimiter ;|
# BUG#12329: "Bogus error msg when executing PS with stored procedure after
# SP was re-created". See also test for related bug#13399 in trigger.test
---disable_warnings
drop function if exists bug12329;
--enable_warnings
create table t1 as select 1 a;
@@ -1518,6 +1517,44 @@ show procedure status;
drop database mysqltest2;
use test;
+#
+# Bug#13012 "SP: REPAIR/BACKUP/RESTORE TABLE crashes the server"
+#
+delimiter |;
+--disable_warnings
+DROP FUNCTION IF EXISTS bug13012|
+--enable_warnings
+--error ER_SP_NO_RETSET
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+ REPAIR TABLE t1;
+ RETURN 1;
+END|
+--error ER_SP_NO_RETSET
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+ BACKUP TABLE t1 TO '/tmp';
+ RETURN 1;
+END|
+--error ER_SP_NO_RETSET
+CREATE FUNCTION bug13012() RETURNS INT
+BEGIN
+ RESTORE TABLE t1 FROM '/tmp';
+ RETURN 1;
+END|
+create table t1 (a int)|
+CREATE PROCEDURE bug13012_1() REPAIR TABLE t1|
+CREATE FUNCTION bug13012_2() RETURNS INT
+BEGIN
+ CALL bug13012_1();
+ RETURN 1;
+END|
+--error ER_SP_NO_RETSET
+SELECT bug13012_2()|
+drop table t1|
+drop procedure bug13012_1|
+drop function bug13012_2|
+delimiter ;|
# BUG#NNNN: New bug synopsis
#
--- 1.164/mysql-test/t/sp.test Fri Dec 2 20:43:46 2005
+++ 1.165/mysql-test/t/sp.test Fri Dec 2 22:59:29 2005
@@ -4908,8 +4908,10 @@ drop procedure bug14376|
# variable declarations. In MySQL 5.0 it's vice versa.
#
+--disable_warnings
drop procedure if exists p1|
drop table if exists t1|
+--enable_warnings
create table t1 (a varchar(255))|
insert into t1 (a) values ("a - table column")|
create procedure p1(a varchar(255))
@@ -4944,6 +4946,25 @@ begin
end;
end|
call p1("a - stored procedure parameter")|
+drop procedure p1|
+
+#
+# Bug#13012 "SP: REPAIR/BACKUP/RESTORE TABLE crashes the server"
+#
+--disable_warnings
+drop procedure if exists bug13012|
+--enable_warnings
+create procedure bug13012()
+BEGIN
+ REPAIR TABLE t1;
+ BACKUP TABLE t1 to '../tmp';
+ DROP TABLE t1;
+ RESTORE TABLE t1 FROM '../tmp';
+END|
+--replace_result ": 7" ": X" ": 17" ": X" $MYSQL_TEST_DIR MYSQL_TEST_DIR
+call bug13012()|
+drop procedure bug13012|
+select * from t1|
#
# BUG#NNNN: New bug synopsis
--- 1.196/sql/sp_head.cc Thu Dec 1 11:26:28 2005
+++ 1.197/sql/sp_head.cc Fri Dec 2 22:59:29 2005
@@ -107,6 +107,9 @@ sp_get_flags_for_command(LEX *lex)
case SQLCOM_SHOW_WARNS:
case SQLCOM_SHOW_PROC_CODE:
case SQLCOM_SHOW_FUNC_CODE:
+ case SQLCOM_REPAIR:
+ case SQLCOM_BACKUP_TABLE:
+ case SQLCOM_RESTORE_TABLE:
flags= sp_head::MULTI_RESULTS;
break;
/*
| Thread |
|---|
| • bk commit into 5.0 tree (serg:1.2048) BUG#13012 | Sergei Golubchik | 2 Dec |