mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
eb25e83ee4
produce a sensible error when that limit is exceeded. (Bug #11602) client/mysqltest.c: Increase query buffer size, and explain why mysql-test/r/system_mysql_db.result: Update results scripts/mysql_create_system_tables.sh: Increase size of proc.body scripts/mysql_fix_privilege_tables.sql: Increase size of proc.body sql/share/errmsg.txt: Add error for SP routines that are too long sql/sp.cc: Raise an error when the SP body is too long. sql/sp.h: Add error for SP body being too long. sql/sql_parse.cc: Handle SP_BODY_TOO_LONG error. mysql-test/r/sp-big.result: New BitKeeper file ``mysql-test/r/sp-big.result'' mysql-test/t/sp-big.test: New BitKeeper file ``mysql-test/t/sp-big.test''
33 lines
844 B
Text
33 lines
844 B
Text
#
|
|
# Bug #11602: SP with very large body not handled well
|
|
#
|
|
|
|
--disable_warnings
|
|
drop procedure if exists test.longprocedure;
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
create table t1 (a int);
|
|
insert into t1 values (1),(2),(3);
|
|
|
|
let $body=`select repeat('select count(*) into out1 from t1;\n', 3072)`;
|
|
|
|
delimiter //;
|
|
--disable_query_log
|
|
eval select length('$body') as length//
|
|
eval create procedure test.longprocedure (out out1 int) deterministic
|
|
begin
|
|
$body
|
|
end//
|
|
--enable_query_log
|
|
|
|
delimiter ;//
|
|
|
|
# this is larger than the length above, because it includes the 'begin' and
|
|
# 'end' bits and some whitespace
|
|
select length(routine_definition) from information_schema.routines where routine_schema = 'test' and routine_name = 'longprocedure';
|
|
|
|
call test.longprocedure(@value); select @value;
|
|
|
|
drop procedure test.longprocedure;
|
|
drop table t1;
|