2006-02-24 17:34:15 +01:00
|
|
|
# Can't test with embedded server
|
|
|
|
-- source include/not_embedded.inc
|
2008-03-13 18:54:29 +01:00
|
|
|
# Disable concurrent inserts to avoid test failures
|
|
|
|
set @old_concurrent_insert= @@global.concurrent_insert;
|
|
|
|
set @@global.concurrent_insert= 0;
|
2006-02-24 17:34:15 +01:00
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
# Save the initial number of concurrent sessions
|
|
|
|
--source include/count_sessions.inc
|
|
|
|
|
2006-04-05 14:41:40 +02:00
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1,t3;
|
|
|
|
--enable_warnings
|
2006-02-24 17:34:15 +01:00
|
|
|
delimiter |;
|
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
2009-03-06 15:56:17 +01:00
|
|
|
# Bug#4902 Stored procedure with SHOW WARNINGS leads to packet error
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
|
|
|
# Added tests for show grants command
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug4902|
|
|
|
|
--enable_warnings
|
|
|
|
create procedure bug4902()
|
|
|
|
begin
|
|
|
|
show grants for 'root'@'localhost';
|
|
|
|
end|
|
|
|
|
--disable_parsing
|
2006-07-29 19:38:46 +02:00
|
|
|
show binlog events|
|
|
|
|
show storage engines|
|
|
|
|
show master status|
|
|
|
|
show slave hosts|
|
|
|
|
show slave status|
|
2006-02-24 17:34:15 +01:00
|
|
|
--enable_parsing
|
|
|
|
|
|
|
|
call bug4902()|
|
|
|
|
call bug4902()|
|
|
|
|
|
|
|
|
drop procedure bug4902|
|
|
|
|
|
|
|
|
# We need separate SP for SHOW PROCESSLIST since we want use replace_column
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug4902_2|
|
|
|
|
--enable_warnings
|
|
|
|
create procedure bug4902_2()
|
|
|
|
begin
|
|
|
|
show processlist;
|
|
|
|
end|
|
2008-03-13 18:54:29 +01:00
|
|
|
--disable_result_log
|
2006-02-24 17:34:15 +01:00
|
|
|
call bug4902_2()|
|
2008-03-13 18:54:29 +01:00
|
|
|
--enable_result_log
|
|
|
|
show warnings|
|
|
|
|
--disable_result_log
|
2006-02-24 17:34:15 +01:00
|
|
|
call bug4902_2()|
|
2008-03-13 18:54:29 +01:00
|
|
|
--enable_result_log
|
|
|
|
show warnings|
|
2006-02-24 17:34:15 +01:00
|
|
|
drop procedure bug4902_2|
|
|
|
|
|
|
|
|
#
|
2009-03-06 15:56:17 +01:00
|
|
|
# Bug#3583 query cache doesn't work for stored procedures
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1|
|
|
|
|
--enable_warnings
|
|
|
|
create table t1 (
|
2009-03-06 15:56:17 +01:00
|
|
|
id char(16) not null default '',
|
|
|
|
data int not null
|
2006-02-24 17:34:15 +01:00
|
|
|
)|
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug3583|
|
|
|
|
--enable_warnings
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug3583|
|
|
|
|
--enable_warnings
|
|
|
|
create procedure bug3583()
|
|
|
|
begin
|
|
|
|
declare c int;
|
|
|
|
|
|
|
|
select * from t1;
|
|
|
|
select count(*) into c from t1;
|
|
|
|
select c;
|
|
|
|
end|
|
|
|
|
|
|
|
|
insert into t1 values ("x", 3), ("y", 5)|
|
|
|
|
set @x = @@query_cache_size|
|
|
|
|
set global query_cache_size = 10*1024*1024|
|
|
|
|
|
|
|
|
flush status|
|
|
|
|
flush query cache|
|
|
|
|
show status like 'Qcache_hits'|
|
|
|
|
call bug3583()|
|
|
|
|
show status like 'Qcache_hits'|
|
|
|
|
call bug3583()|
|
|
|
|
call bug3583()|
|
|
|
|
show status like 'Qcache_hits'|
|
|
|
|
|
|
|
|
set global query_cache_size = @x|
|
|
|
|
flush status|
|
|
|
|
flush query cache|
|
|
|
|
delete from t1|
|
|
|
|
drop procedure bug3583|
|
2006-07-29 19:38:46 +02:00
|
|
|
drop table t1|
|
2006-02-24 17:34:15 +01:00
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
2009-03-06 15:56:17 +01:00
|
|
|
# Bug#6807 Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug6807|
|
|
|
|
--enable_warnings
|
|
|
|
create procedure bug6807()
|
|
|
|
begin
|
|
|
|
declare id int;
|
|
|
|
|
|
|
|
set id = connection_id();
|
|
|
|
kill query id;
|
|
|
|
select 'Not reached';
|
|
|
|
end|
|
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
--error ER_QUERY_INTERRUPTED
|
2006-02-24 17:34:15 +01:00
|
|
|
call bug6807()|
|
2009-03-03 21:34:18 +01:00
|
|
|
--error ER_QUERY_INTERRUPTED
|
2006-02-24 17:34:15 +01:00
|
|
|
call bug6807()|
|
|
|
|
|
|
|
|
drop procedure bug6807|
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2009-03-06 15:56:17 +01:00
|
|
|
# Bug#10100 function (and stored procedure?) recursivity problem
|
2006-02-24 17:34:15 +01:00
|
|
|
#
|
|
|
|
--disable_warnings
|
|
|
|
drop function if exists bug10100f|
|
|
|
|
drop procedure if exists bug10100p|
|
|
|
|
drop procedure if exists bug10100t|
|
|
|
|
drop procedure if exists bug10100pt|
|
|
|
|
drop procedure if exists bug10100pv|
|
|
|
|
drop procedure if exists bug10100pd|
|
|
|
|
drop procedure if exists bug10100pc|
|
|
|
|
--enable_warnings
|
|
|
|
# routines with simple recursion
|
|
|
|
create function bug10100f(prm int) returns int
|
|
|
|
begin
|
|
|
|
if prm > 1 then
|
|
|
|
return prm * bug10100f(prm - 1);
|
|
|
|
end if;
|
|
|
|
return 1;
|
|
|
|
end|
|
|
|
|
create procedure bug10100p(prm int, inout res int)
|
|
|
|
begin
|
|
|
|
set res = res * prm;
|
|
|
|
if prm > 1 then
|
|
|
|
call bug10100p(prm - 1, res);
|
|
|
|
end if;
|
|
|
|
end|
|
|
|
|
create procedure bug10100t(prm int)
|
|
|
|
begin
|
|
|
|
declare res int;
|
|
|
|
set res = 1;
|
|
|
|
call bug10100p(prm, res);
|
|
|
|
select res;
|
|
|
|
end|
|
|
|
|
|
|
|
|
# a procedure which use tables and recursion
|
|
|
|
create table t3 (a int)|
|
|
|
|
insert into t3 values (0)|
|
|
|
|
create view v1 as select a from t3;
|
|
|
|
create procedure bug10100pt(level int, lim int)
|
|
|
|
begin
|
|
|
|
if level < lim then
|
|
|
|
update t3 set a=level;
|
|
|
|
FLUSH TABLES;
|
|
|
|
call bug10100pt(level+1, lim);
|
|
|
|
else
|
|
|
|
select * from t3;
|
|
|
|
end if;
|
|
|
|
end|
|
|
|
|
# view & recursion
|
|
|
|
create procedure bug10100pv(level int, lim int)
|
|
|
|
begin
|
|
|
|
if level < lim then
|
|
|
|
update v1 set a=level;
|
|
|
|
FLUSH TABLES;
|
|
|
|
call bug10100pv(level+1, lim);
|
|
|
|
else
|
|
|
|
select * from v1;
|
|
|
|
end if;
|
|
|
|
end|
|
|
|
|
# dynamic sql & recursion
|
|
|
|
prepare stmt2 from "select * from t3;";
|
|
|
|
create procedure bug10100pd(level int, lim int)
|
|
|
|
begin
|
|
|
|
if level < lim then
|
|
|
|
select level;
|
|
|
|
prepare stmt1 from "update t3 set a=a+2";
|
|
|
|
execute stmt1;
|
|
|
|
FLUSH TABLES;
|
|
|
|
execute stmt1;
|
|
|
|
FLUSH TABLES;
|
|
|
|
execute stmt1;
|
|
|
|
FLUSH TABLES;
|
|
|
|
deallocate prepare stmt1;
|
|
|
|
execute stmt2;
|
|
|
|
select * from t3;
|
|
|
|
call bug10100pd(level+1, lim);
|
|
|
|
else
|
|
|
|
execute stmt2;
|
|
|
|
end if;
|
|
|
|
end|
|
|
|
|
# cursor & recursion
|
|
|
|
create procedure bug10100pc(level int, lim int)
|
|
|
|
begin
|
|
|
|
declare lv int;
|
|
|
|
declare c cursor for select a from t3;
|
|
|
|
open c;
|
|
|
|
if level < lim then
|
|
|
|
select level;
|
|
|
|
fetch c into lv;
|
|
|
|
select lv;
|
|
|
|
update t3 set a=level+lv;
|
|
|
|
FLUSH TABLES;
|
|
|
|
call bug10100pc(level+1, lim);
|
|
|
|
else
|
|
|
|
select * from t3;
|
|
|
|
end if;
|
|
|
|
close c;
|
|
|
|
end|
|
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
# end of the stack checking
|
2006-02-24 17:34:15 +01:00
|
|
|
set @@max_sp_recursion_depth=255|
|
|
|
|
set @var=1|
|
2009-03-03 21:34:18 +01:00
|
|
|
# disable log because error about stack overrun contains numbers which
|
|
|
|
# depend on a system
|
2006-02-24 17:34:15 +01:00
|
|
|
-- disable_result_log
|
|
|
|
-- error ER_STACK_OVERRUN_NEED_MORE
|
|
|
|
call bug10100p(255, @var)|
|
|
|
|
-- error ER_STACK_OVERRUN_NEED_MORE
|
|
|
|
call bug10100pt(1,255)|
|
|
|
|
-- error ER_STACK_OVERRUN_NEED_MORE
|
|
|
|
call bug10100pv(1,255)|
|
|
|
|
-- error ER_STACK_OVERRUN_NEED_MORE
|
|
|
|
call bug10100pd(1,255)|
|
|
|
|
-- error ER_STACK_OVERRUN_NEED_MORE
|
|
|
|
call bug10100pc(1,255)|
|
|
|
|
-- enable_result_log
|
|
|
|
set @@max_sp_recursion_depth=0|
|
|
|
|
|
|
|
|
deallocate prepare stmt2|
|
|
|
|
|
|
|
|
drop function bug10100f|
|
|
|
|
drop procedure bug10100p|
|
|
|
|
drop procedure bug10100t|
|
|
|
|
drop procedure bug10100pt|
|
|
|
|
drop procedure bug10100pv|
|
|
|
|
drop procedure bug10100pd|
|
|
|
|
drop procedure bug10100pc|
|
|
|
|
drop view v1|
|
2006-04-18 18:10:47 +02:00
|
|
|
drop table t3|
|
2006-02-24 17:34:15 +01:00
|
|
|
|
|
|
|
delimiter ;|
|
2006-06-29 12:50:44 +02:00
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
|
2006-06-29 12:50:44 +02:00
|
|
|
#
|
|
|
|
# Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
|
|
|
|
#
|
|
|
|
--disable_warnings
|
|
|
|
drop procedure if exists bug15298_1;
|
|
|
|
drop procedure if exists bug15298_2;
|
|
|
|
--enable_warnings
|
|
|
|
grant all privileges on test.* to 'mysqltest_1'@'localhost';
|
|
|
|
create procedure 15298_1 () sql security definer show grants for current_user;
|
|
|
|
create procedure 15298_2 () sql security definer show grants;
|
|
|
|
|
|
|
|
connect (con1,localhost,mysqltest_1,,test);
|
|
|
|
call 15298_1();
|
|
|
|
call 15298_2();
|
|
|
|
|
|
|
|
connection default;
|
2009-03-03 21:34:18 +01:00
|
|
|
disconnect con1;
|
2006-06-29 12:50:44 +02:00
|
|
|
drop user mysqltest_1@localhost;
|
|
|
|
drop procedure 15298_1;
|
|
|
|
drop procedure 15298_2;
|
2007-09-05 20:03:02 +02:00
|
|
|
|
|
|
|
#
|
2008-03-13 18:54:29 +01:00
|
|
|
# Bug#29936 Stored Procedure DML ignores low_priority_updates setting
|
2007-09-05 20:03:02 +02:00
|
|
|
#
|
2008-03-13 18:54:29 +01:00
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
drop table if exists t1;
|
|
|
|
drop procedure if exists p1;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
create table t1 (value varchar(15));
|
|
|
|
create procedure p1() update t1 set value='updated' where value='old';
|
|
|
|
|
|
|
|
# load the procedure into sp cache and execute once
|
|
|
|
call p1();
|
|
|
|
|
|
|
|
insert into t1 (value) values ("old");
|
|
|
|
|
|
|
|
connect (rl_holder, localhost, root,,);
|
|
|
|
connect (rl_acquirer, localhost, root,,);
|
|
|
|
connect (rl_contender, localhost, root,,);
|
|
|
|
connect (rl_wait, localhost, root,,);
|
|
|
|
|
|
|
|
connection rl_holder;
|
|
|
|
select get_lock('b26162',120);
|
|
|
|
|
|
|
|
connection rl_acquirer;
|
|
|
|
--send select 'rl_acquirer', value from t1 where get_lock('b26162',120);
|
|
|
|
|
|
|
|
# we must wait till this select opens and locks the tables
|
|
|
|
connection rl_wait;
|
|
|
|
let $wait_condition=
|
|
|
|
select count(*) = 1 from information_schema.processlist
|
|
|
|
where state = "User lock" and
|
|
|
|
info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)";
|
|
|
|
--source include/wait_condition.inc
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
set session low_priority_updates=on;
|
|
|
|
--send call p1();
|
|
|
|
|
|
|
|
connection rl_wait;
|
|
|
|
let $wait_condition=
|
|
|
|
select count(*) = 1 from information_schema.processlist
|
|
|
|
where state = "Locked" and
|
|
|
|
info = "update t1 set value='updated' where value='old'";
|
|
|
|
--source include/wait_condition.inc
|
|
|
|
|
|
|
|
connection rl_contender;
|
|
|
|
select 'rl_contender', value from t1;
|
|
|
|
|
|
|
|
connection rl_holder;
|
|
|
|
select release_lock('b26162');
|
|
|
|
|
|
|
|
connection rl_acquirer;
|
|
|
|
--reap
|
|
|
|
connection default;
|
|
|
|
--reap
|
|
|
|
|
|
|
|
disconnect rl_holder;
|
|
|
|
disconnect rl_acquirer;
|
|
|
|
disconnect rl_wait;
|
2009-03-06 15:56:17 +01:00
|
|
|
disconnect rl_contender;
|
2008-03-13 18:54:29 +01:00
|
|
|
drop procedure p1;
|
|
|
|
drop table t1;
|
|
|
|
set session low_priority_updates=default;
|
|
|
|
|
2009-06-04 07:28:45 +02:00
|
|
|
#
|
|
|
|
# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N
|
|
|
|
#
|
2009-06-04 07:54:23 +02:00
|
|
|
INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
|
|
|
|
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
|
|
|
|
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
|
|
|
|
Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv,
|
|
|
|
Create_view_priv, Show_view_priv, Create_routine_priv, Alter_routine_priv,
|
|
|
|
Create_user_priv, ssl_type, ssl_cipher, x509_issuer, x509_subject, max_questions,
|
|
|
|
max_updates, max_connections, max_user_connections)
|
|
|
|
VALUES('%', 'mysqltest_1', password(''), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N',
|
|
|
|
'N', 'N', 'N', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'Y', 'Y', 'N', '',
|
|
|
|
'', '', '', '0', '0', '0', '0');
|
2009-06-04 07:28:45 +02:00
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
|
|
|
|
connect (con1, localhost, mysqltest_1,,);
|
|
|
|
connection con1;
|
|
|
|
CREATE PROCEDURE p1(i INT) BEGIN END;
|
|
|
|
disconnect con1;
|
|
|
|
connection default;
|
|
|
|
DROP PROCEDURE p1;
|
|
|
|
|
|
|
|
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
|
|
|
FLUSH PRIVILEGES;
|
|
|
|
|
2009-06-04 07:54:23 +02:00
|
|
|
|
2008-02-28 15:28:33 +01:00
|
|
|
#
|
2008-03-13 18:54:29 +01:00
|
|
|
# Restore global concurrent_insert value. Keep in the end of the test file.
|
2008-02-28 15:28:33 +01:00
|
|
|
#
|
2008-03-13 18:54:29 +01:00
|
|
|
|
|
|
|
set @@global.concurrent_insert= @old_concurrent_insert;
|
2009-03-06 15:56:17 +01:00
|
|
|
|
2009-03-03 21:34:18 +01:00
|
|
|
# Wait till all disconnects are completed
|
|
|
|
--source include/wait_until_count_sessions.inc
|
|
|
|
|
Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause
an assertion in a debug build.
The reason is that the C API doesn't support multiple result sets for prepared
statements and attempting to execute a stored routine which returns multiple result
sets sometimes lead to a network error. The network error sets the diagnostic area
prematurely which later leads to the assert when an attempt is made to set a second
server state.
This patch fixes the issue by changing the scope of the error code returned by
sp_instr_stmt::execute() to include any error which happened during the execution.
To assure that Diagnostic_area::is_sent really mean that the message was sent all
network related functions are checked for return status.
libmysqld/lib_sql.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
mysql-test/r/sp_notembedded.result:
* Added test case for bug 44521
mysql-test/t/sp_notembedded.test:
* Added test case for bug 44521
sql/protocol.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/protocol.h:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/sp_head.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
2009-07-29 22:07:08 +02:00
|
|
|
|
|
|
|
--echo #
|
|
|
|
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
|
|
|
--echo #
|
|
|
|
SELECT GET_LOCK('Bug44521', 0);
|
|
|
|
--connect (con1,localhost,root,,)
|
|
|
|
--echo ** Connection con1
|
|
|
|
delimiter $;
|
|
|
|
CREATE PROCEDURE p()
|
|
|
|
BEGIN
|
|
|
|
SELECT 1;
|
|
|
|
SELECT GET_LOCK('Bug44521', 100);
|
|
|
|
SELECT 2;
|
|
|
|
END$
|
|
|
|
delimiter ;$
|
|
|
|
--send CALL p();
|
|
|
|
--connection default
|
|
|
|
--echo ** Default connection
|
|
|
|
let $wait_condition=
|
|
|
|
SELECT count(*) = 1 FROM information_schema.processlist
|
|
|
|
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)";
|
|
|
|
--source include/wait_condition.inc
|
|
|
|
let $conid =
|
|
|
|
`SELECT id FROM information_schema.processlist
|
|
|
|
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)"`;
|
|
|
|
dirty_close con1;
|
|
|
|
SELECT RELEASE_LOCK('Bug44521');
|
|
|
|
let $wait_condition=
|
|
|
|
SELECT count(*) = 0 FROM information_schema.processlist
|
|
|
|
WHERE id = $conid;
|
|
|
|
--source include/wait_condition.inc
|
|
|
|
DROP PROCEDURE p;
|
|
|
|
|
2010-02-05 10:39:46 +01:00
|
|
|
#
|
|
|
|
# Bug#47736 killing a select from a view when the view is processing a function, asserts
|
|
|
|
#
|
|
|
|
CREATE TABLE t1(a int);
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
|
|
CREATE FUNCTION f1 (inp TEXT) RETURNS INT NO SQL RETURN sleep(60);
|
|
|
|
CREATE VIEW v1 AS SELECT f1('a') FROM t1;
|
|
|
|
|
|
|
|
--connect (con1, localhost, root,,)
|
|
|
|
--let $ID_1= `SELECT connection_id()`
|
|
|
|
--send SELECT * FROM v1;
|
|
|
|
|
|
|
|
--connect (con2, localhost, root,,)
|
|
|
|
--let $ID_2= `SELECT connection_id()`
|
|
|
|
--send SELECT * FROM v1
|
|
|
|
|
|
|
|
--connection default
|
|
|
|
--disable_query_log
|
|
|
|
--eval KILL QUERY $ID_2
|
|
|
|
--eval KILL QUERY $ID_1
|
|
|
|
--enable_query_log
|
|
|
|
|
|
|
|
--connection con1
|
|
|
|
--error ER_QUERY_INTERRUPTED
|
|
|
|
--reap
|
|
|
|
--connection con2
|
|
|
|
--error ER_QUERY_INTERRUPTED
|
|
|
|
--reap
|
|
|
|
|
|
|
|
--connection default
|
|
|
|
DROP VIEW v1;
|
|
|
|
DROP TABLE t1;
|
|
|
|
DROP FUNCTION f1;
|
|
|
|
--disconnect con1
|
|
|
|
--disconnect con2
|
|
|
|
|
|
|
|
|
Bug#44521 Executing a stored procedure as a prepared statement can sometimes cause
an assertion in a debug build.
The reason is that the C API doesn't support multiple result sets for prepared
statements and attempting to execute a stored routine which returns multiple result
sets sometimes lead to a network error. The network error sets the diagnostic area
prematurely which later leads to the assert when an attempt is made to set a second
server state.
This patch fixes the issue by changing the scope of the error code returned by
sp_instr_stmt::execute() to include any error which happened during the execution.
To assure that Diagnostic_area::is_sent really mean that the message was sent all
network related functions are checked for return status.
libmysqld/lib_sql.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
mysql-test/r/sp_notembedded.result:
* Added test case for bug 44521
mysql-test/t/sp_notembedded.test:
* Added test case for bug 44521
sql/protocol.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/protocol.h:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
sql/sp_head.cc:
* Changed prototype to return success/failure status on net_send_error_packet(),
net_send_ok(), net_send_eof(), write_eof_packet().
2009-07-29 22:07:08 +02:00
|
|
|
--echo # ------------------------------------------------------------------
|
|
|
|
--echo # -- End of 5.1 tests
|
|
|
|
--echo # ------------------------------------------------------------------
|