limit DEFAULT_CTX_ID of tenant_500 from 4G to 2G

This commit is contained in:
tushicheng
2023-09-28 02:09:45 +00:00
committed by ob-robot
parent 58a8ac5edc
commit 42f577e33d
96 changed files with 9489 additions and 9477 deletions

View File

@ -1892,7 +1892,7 @@ create function f(x int) returns int
begin
if x>1 then
return x;
else
else
signal SQLSTATE '01000';
end if;
end//
@ -1943,7 +1943,7 @@ ERROR 02000: Unhandled user-defined not found condition
drop function f;
### need has return in mysql function
###
###
DROP FUNCTION IF EXISTS `fun6`//
CREATE FUNCTION fun6 ( p1 INT) RETURNS VARCHAR(20)
@ -1980,8 +1980,8 @@ SELECT @num//
DROP FUNCTION IF EXISTS `fun6`//
### label dup
###
### label dup
###
DROP TABLE IF EXISTS result1//
CREATE TABLE result1(
id INT,
@ -2042,34 +2042,34 @@ DROP PROCEDURE IF EXISTS `pro_1`//
DROP PROCEDURE IF EXISTS `pro_2`//
DROP PROCEDURE IF EXISTS `pro_3`//
### ### varchar
### ###
### ### varchar
### ###
### DROP TABLE IF EXISTS t2//
### --error 1074
### CREATE TABLE t2 (
### id INT,
### res1 VARCHAR(128),
### d1 VARCHAR(16384)
### )//
### DROP TABLE IF EXISTS t3//
### CREATE TABLE t2 (
### id INT,
### res1 VARCHAR(128),
### d1 VARCHAR(16384)
### )//
### DROP TABLE IF EXISTS t3//
### --error 1074
### CREATE TABLE t3 (
### id INT,
### res1 VARCHAR(128),
### d1 VARCHAR(262145)
### CREATE TABLE t3 (
### id INT,
### res1 VARCHAR(128),
### d1 VARCHAR(262145)
### )//
### DROP FUNCTION IF EXISTS fun_l//
### --error 1074
### CREATE FUNCTION fun_l() RETURNS VARCHAR(262144)
### BEGIN
### DECLARE d1 VARCHAR(262144123456);
### DECLARE d1 VARCHAR(262144123456);
### SET d1='123456789012345678901234567890';
### RETURN '定义长度262144123456的VARCHAR(262144123456)类型的变量';
### END//
### --error 1305
### SELECT fun_l()//
### char
###
### END//
### --error 1305
### SELECT fun_l()//
### char
###
DROP TABLE IF EXISTS t1//
DROP TABLE IF EXISTS t2//
CREATE TABLE t1 (
@ -2078,7 +2078,7 @@ CREATE TABLE t1 (
d1 CHAR(255)
)//
### --error 1074
### TODO:
### TODO:
### CREATE TABLE t2 (
### id INT,
### res1 VARCHAR(128),
@ -2108,7 +2108,7 @@ SELECT * FROM t1//
+------+------+------+
### varbinary
###
###
DROP TABLE IF EXISTS t1//
CREATE TABLE t1 (
d1 VARBINARY(65536)
@ -2121,10 +2121,10 @@ ERROR 42000: Column length too big for column 'd1' (max = 1048576)
DROP FUNCTION IF EXISTS `fun_l`//
CREATE FUNCTION fun_l() RETURNS VARBINARY(65535)
BEGIN
BEGIN
DECLARE d1 VARBINARY(65536);
SET d1='123456789012345678901234567890';
RETURN '定义长度65536的VARCHAR类型的变量';
RETURN '定义长度65536的VARCHAR类型的变量';
END//
ERROR 42000: Column length too big for column '(null)' (max = 65535)
@ -2132,30 +2132,30 @@ SELECT fun_l()//
ERROR 42000: FUNCTION fun_l does not exist
### number
###
###
DROP FUNCTION IF EXISTS `fun_l`//
CREATE FUNCTION fun_l() RETURNS DEC(65,30)
BEGIN
DECLARE a DEC(66,30);
BEGIN
DECLARE a DEC(66,30);
SET a=123450.1415;
RETURN a;
RETURN a;
END//
ERROR 42000: Too big precision 66 specified for column '(null)'. Maximum is 65.
SELECT fun_l()//
ERROR 42000: FUNCTION fun_l does not exist
DROP FUNCTION IF EXISTS `fun_2`//
CREATE FUNCTION fun_2() RETURNS DEC(65,30)
BEGIN
DECLARE a DEC(65,31);
BEGIN
DECLARE a DEC(65,31);
SET a=50.1;
RETURN a;
RETURN a;
END//
ERROR 42000: Too big scale 31 specified for column '(null)'. Maximum is 30.
SELECT fun_2()//
ERROR 42000: FUNCTION fun_2 does not exist
### datetime
###
###
DROP TABLE IF EXISTS t2//
CREATE TABLE t2 (
id INT,
@ -2174,7 +2174,7 @@ SELECT fun_l()//
ERROR 42000: FUNCTION fun_l does not exist
### datetime max value insert fail
###
###
DROP TABLE IF EXISTS t2//
CREATE TABLE t2 (
id INT,
@ -2186,7 +2186,7 @@ CREATE TABLE t2 (
INSERT INTO t2 VALUES(1,'插入DATETIME类型数据','1000-01-01 00:00:00.123','2000-01-01 00:00:00.123','9999-12-31 23:59:59.999999')//
DROP PROCEDURE IF EXISTS `pro_1`//
CREATE PROCEDURE pro_1()
BEGIN
BEGIN
DECLARE d1 DATETIME DEFAULT '1000-01-01 00:00:00.000000';
DECLARE d2 DATETIME(0) DEFAULT '2021-07-02 23:59:59.999999';
DECLARE d3 DATETIME(6) DEFAULT '9999-12-31 23:59:59.999999';
@ -2204,7 +2204,7 @@ SELECT * FROM t2//
+------+----------------------------------------+---------------------+---------------------+----------------------------+
### int
###
###
DROP TABLE IF EXISTS t1//
CREATE TABLE t1 (
id INT,
@ -2229,7 +2229,7 @@ SELECT * FROM t1//
### commit
### rollback
###
###
DROP TABLE IF EXISTS t1//
CREATE TABLE t1
( a INT
@ -2326,19 +2326,19 @@ END//
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
### BIT
###
###
DROP TABLE IF EXISTS t1;//
DROP PROCEDURE IF EXISTS `pro_2`;//
CREATE PROCEDURE pro_2()
BEGIN
CREATE TABLE t1 (id INT,a BIT(65));
INSERT INTO t1 VALUES(1,b'0');
CREATE TABLE t1 (id INT,a BIT(65));
INSERT INTO t1 VALUES(1,b'0');
END;
//
ERROR 42000: Display width out of range for column 'CREATE TABLE t1 (id INT,a BIT(65))' (max = 64)
### load data
###
###
DROP TABLE IF EXISTS t1//
CREATE TABLE t1 (a INT)//
INSERT INTO t1 VALUES (1),(2),(3)//
@ -2351,7 +2351,7 @@ END//
ERROR HY000: 'LOAD DATA' is not allowed in stored procedure.
### lock
###
###
DROP TABLE IF EXISTS t1//
CREATE TABLE t1 (a INT)//
INSERT INTO t1 VALUES (1),(2),(3)//

View File

@ -539,7 +539,7 @@ BEGIN
IF tmp_i_price > 0 THEN
SET tmp_ol_amount = tmp_i_price * tmp_ol_quantity;
call new_order_2(tmp_w_id, tmp_d_id, tmp_i_id,
tmp_ol_quantity, tmp_i_price,
tmp_ol_quantity, tmp_i_price,
tmp_i_name, tmp_i_data,
out_d_next_o_id, tmp_ol_amount,
tmp_ol_supply_w_id, 4, tmp_s_quantity);
@ -584,7 +584,7 @@ BEGIN
THEN
SET tmp_ol_amount = tmp_i_price * tmp_ol_quantity;
call new_order_2(tmp_w_id, tmp_d_id, tmp_i_id,
tmp_ol_quantity, tmp_i_price,
tmp_ol_quantity, tmp_i_price,
tmp_i_name, tmp_i_data,
out_d_next_o_id, tmp_ol_amount,
tmp_ol_supply_w_id, 6, tmp_s_quantity);
@ -699,7 +699,7 @@ BEGIN
THEN
SET tmp_ol_amount = tmp_i_price * tmp_ol_quantity;
call new_order_2(tmp_w_id, tmp_d_id, tmp_i_id,
tmp_ol_quantity, tmp_i_price,
tmp_ol_quantity, tmp_i_price,
tmp_i_name, tmp_i_data,
out_d_next_o_id, tmp_ol_amount,
tmp_ol_supply_w_id, 11, tmp_s_quantity);
@ -722,7 +722,7 @@ BEGIN
THEN
SET tmp_ol_amount = tmp_i_price * tmp_ol_quantity;
call new_order_2(tmp_w_id, tmp_d_id, tmp_i_id,
tmp_ol_quantity, tmp_i_price,
tmp_ol_quantity, tmp_i_price,
tmp_i_name, tmp_i_data,
out_d_next_o_id, tmp_ol_amount,
tmp_ol_supply_w_id, 12, tmp_s_quantity);
@ -802,7 +802,7 @@ BEGIN
END//
CREATE PROCEDURE order_status (in_c_id INT,
in_c_w_id INT,
in_c_w_id INT,
in_c_d_id INT,
in_c_last VARCHAR(16))
BEGIN
@ -1019,7 +1019,7 @@ BEGIN
DECLARE out_w_state VARCHAR(2);
DECLARE out_w_zip VARCHAR(9);
DECLARE out_w_ytd INTEGER;
DECLARE out_d_name VARCHAR(10);
DECLARE out_d_street_1 VARCHAR(20);
DECLARE out_d_street_2 VARCHAR(20);
@ -1027,7 +1027,7 @@ BEGIN
DECLARE out_d_state VARCHAR(2);
DECLARE out_d_zip VARCHAR(9);
DECLARE out_d_ytd INTEGER;
DECLARE out_c_id INTEGER;
DECLARE out_c_first VARCHAR(16);
DECLARE out_c_middle VARCHAR(2);
@ -1412,3 +1412,5 @@ DROP PROCEDURE new_order;
DROP PROCEDURE order_status;
DROP PROCEDURE payment;
DROP PROCEDURE stock_level;

View File

@ -1557,3 +1557,4 @@ select * from b;
drop table a;
drop table b;
drop procedure p;

View File

@ -277,8 +277,8 @@ begin
DECLARE continue HANDLER FOR sqlexception insert into a values(-1);
begin
DECLARE aaa CONDITION FOR SQLSTATE '42S02';
DECLARE continue HANDLER FOR sqlexception
begin
DECLARE continue HANDLER FOR sqlexception
begin
insert into a values(0);
insert into t values(1);
insert into a values(6);

View File

@ -17,7 +17,7 @@ BEGIN
CALL p_not_exists();
END|
# should not return valgrind warnings
### TODO : --error 1305
### TODO : --error 1305
CALL p3(f2());
ERROR 2F005: FUNCTION ended without RETURN
@ -36,7 +36,7 @@ BEGIN
CALL p_not_exists();
END|
# should not return valgrind warnings
### TODO : --error 1305
### TODO : --error 1305
CALL p3(f2());
ERROR 2F005: FUNCTION ended without RETURN
@ -51,7 +51,7 @@ BEGIN
RETURN f_not_exists () ;
END|
# should not return valgrind warnings
### TODO : --error 1305
### TODO : --error 1305
SELECT f2();
ERROR 2F005: FUNCTION ended without RETURN
@ -68,36 +68,36 @@ USE test;
## DROP TRIGGER IF EXISTS tr1;
## DROP PROCEDURE IF EXISTS p1;
## --enable_warnings
##
##
## CREATE TABLE t1 (f1 INTEGER);
## CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
## CREATE PROCEDURE p1 () DROP TRIGGER tr1;
##
##
## CALL p1 ();
## --error ER_TRG_DOES_NOT_EXIST
## CALL p1 ();
##
##
## DROP TABLE t1;
## DROP PROCEDURE p1;
##
##
## --echo #
## --echo # Bug#50423: Crash on second call of a procedure dropping a trigger
## --echo #
##
##
## --disable_warnings
## DROP TABLE IF EXISTS t1;
## DROP TRIGGER IF EXISTS tr1;
## DROP PROCEDURE IF EXISTS p1;
## --enable_warnings
##
##
## CREATE TABLE t1 (f1 INTEGER);
## CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET @aux = 1;
## CREATE PROCEDURE p1 () DROP TRIGGER tr1;
##
##
## CALL p1 ();
## --error ER_TRG_DOES_NOT_EXIST
## CALL p1 ();
##
##
## DROP TABLE t1;
## DROP PROCEDURE p1;
#
@ -145,8 +145,8 @@ DROP DATABASE db1;
DROP DATABASE db2;
#
# Bug#13105873:valgrind warning:possible crash in foreign
# key handling on subsequent create table if not exists
# Bug#13105873:valgrind warning:possible crash in foreign
# key handling on subsequent create table if not exists
#
## oceanbase not support foreign key yet!
## --disable_warnings
@ -164,7 +164,7 @@ DROP DATABASE db2;
## DELIMITER ;$
## CALL p1();
## --echo # below stmt should not return valgrind warnings
## CALL p1();
## CALL p1();
## DROP DATABASE testdb;
## USE test;
End of 5.1 tests

View File

@ -42,3 +42,4 @@ select * from t3 order by f asc|
drop table t3|
drop procedure fib|
set @@max_sp_recursion_depth= 0|

View File

@ -62,33 +62,33 @@ BEGIN
DECLARE i1, i2, i3, i4 TINYINT;
DECLARE u1, u2, u3, u4 TINYINT UNSIGNED;
DECLARE d1, d2, d3 DECIMAL(64, 2);
SET i1 = 1e200;
SET i2 = -1e200;
SET i3 = 300;
SET i4 = -300;
SELECT i1, i2, i3, i4;
SET i1 = 10 * 10 * 10;
SET i2 = -10 * 10 * 10;
SET i3 = sign(10 * 10) * 10 * 20;
SET i4 = sign(-10 * 10) * -10 * 20;
SELECT i1, i2, i3, i4;
SET u1 = 1e200;
SET u2 = -1e200;
SET u3 = 300;
SET u4 = -300;
SELECT u1, u2, u3, u4;
SET u1 = 10 * 10 * 10;
SET u2 = -10 * 10 * 10;
SET u3 = sign(10 * 10) * 10 * 20;
SET u4 = sign(-10 * 10) * -10 * 20;
SELECT u1, u2, u3, u4;
SET d1 = 1234;
@ -376,33 +376,33 @@ BEGIN
DECLARE i1, i2, i3, i4 TINYINT;
DECLARE u1, u2, u3, u4 TINYINT UNSIGNED;
DECLARE d1, d2, d3 DECIMAL(64, 2);
SET i1 = 1e200;
SET i2 = -1e200;
SET i3 = 300;
SET i4 = -300;
SELECT i1, i2, i3, i4;
SET i1 = 10 * 10 * 10;
SET i2 = -10 * 10 * 10;
SET i3 = sign(10 * 10) * 10 * 20;
SET i4 = sign(-10 * 10) * -10 * 20;
SELECT i1, i2, i3, i4;
SET u1 = 1e200;
SET u2 = -1e200;
SET u3 = 300;
SET u4 = -300;
SELECT u1, u2, u3, u4;
SET u1 = 10 * 10 * 10;
SET u2 = -10 * 10 * 10;
SET u3 = sign(10 * 10) * 10 * 20;
SET u4 = sign(-10 * 10) * -10 * 20;
SELECT u1, u2, u3, u4;
SET d1 = 1234;
@ -615,7 +615,7 @@ BEGIN
WHILE i > 0 DO
INSERT INTO t1(log_msg) VALUES(CONCAT('p1: case1: case2: loop: i: ', i));
CASE MOD(i, 2)
WHEN 0 THEN
INSERT INTO t1(log_msg) VALUES('p1: case1: case2: loop: i is even');
@ -624,7 +624,7 @@ BEGIN
ELSE
INSERT INTO t1(log_msg) VALUES('p1: case1: case2: loop: ERROR');
END CASE;
SET i = i - 1;
END WHILE;
END;
@ -659,7 +659,7 @@ BEGIN
WHILE i > 0 DO
INSERT INTO t1(log_msg) VALUES(CONCAT('p1: case4: case5: loop: i: ', i));
CASE MOD(i, 2)
WHEN 0 THEN
INSERT INTO t1(log_msg) VALUES('p1: case4: case5: loop: i is even');
@ -668,7 +668,7 @@ BEGIN
ELSE
INSERT INTO t1(log_msg) VALUES('p1: case4: case5: loop: ERROR');
END CASE;
SET i = i - 1;
END WHILE;
END;
@ -867,7 +867,7 @@ BUG#13675
## DROP TABLE t1;
## END|
## delimiter ;|
##
##
## CALL p1(NOW());
## CALL p1('test');
## DROP PROCEDURE p1;
@ -1304,30 +1304,30 @@ DROP TABLE t1;
## DROP FUNCTION IF EXISTS f1;
## --enable_warnings
## delimiter |;
##
##
## CREATE PROCEDURE p1(arg ENUM('a', 'b'))
## BEGIN
## SELECT arg;
## END|
##
##
## CREATE PROCEDURE p2(arg ENUM('a', 'b'))
## BEGIN
## DECLARE var ENUM('c', 'd') DEFAULT arg;
##
##
## SELECT arg, var;
## END|
##
##
## CREATE FUNCTION f1(arg ENUM('a', 'b')) RETURNS ENUM('c', 'd')
## BEGIN
## RETURN arg;
## END|
##
##
## delimiter ;|
##
##
## CALL p1('c');
##
##
## CALL p2('a');
##
##
## SELECT f1('a');
## DROP PROCEDURE p1;
## DROP PROCEDURE p2;
@ -1548,7 +1548,7 @@ CREATE PROCEDURE bug27415_text_test2(entity_id_str_in VARCHAR(255))
BEGIN
DECLARE str_remainder VARCHAR(255);
DECLARE str_remainder2 VARCHAR(255);
SET str_remainder2 = entity_id_str_in;
select 'before substr', str_remainder2;
SET str_remainder = SUBSTRING(str_remainder2, 3);
@ -1606,7 +1606,7 @@ DROP PROCEDURE bug27415_text_test2|
drop function if exists f1;
drop table if exists t1;
create function f1() returns int
create function f1() returns int
begin
if @a=1 then set @b='abc';
else set @b=1;

View File

@ -962,7 +962,7 @@ select id, f1(), f3() from t1 order by id|
id f1() f3()
a 3 1
b 3 1
create function f4() returns double
create function f4() returns double
return (select d from t1, t2 where t1.data = t2.i and t1.id= "b")|
select f4()|
f4()
@ -1450,7 +1450,7 @@ create procedure h_se()
deterministic
begin
-- integrity constraint violation
declare continue handler for sqlstate '23000'
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_se';
begin
declare continue handler for 1062 -- ER_DUP_ENTRY
@ -1462,11 +1462,11 @@ create procedure h_ss()
deterministic
begin
-- integrity constraint violation
declare continue handler for sqlstate '23000'
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_ss';
begin
-- integrity constraint violation
declare continue handler for sqlstate '23000'
declare continue handler for sqlstate '23000'
select 'Inner (good)' as 'h_ss';
insert into t3 values (1);
end;
@ -1475,7 +1475,7 @@ create procedure h_sn()
deterministic
begin
-- Note: '02000' is more specific than NOT FOUND ;
-- there might be other not found states
-- there might be other not found states
declare continue handler for sqlstate '02000' -- no data
select 'Outer (bad)' as 'h_sn';
begin
@ -1503,7 +1503,7 @@ create procedure h_sx()
deterministic
begin
-- integrity constraint violation
declare continue handler for sqlstate '23000'
declare continue handler for sqlstate '23000'
select 'Outer (bad)' as 'h_sx';
begin
declare continue handler for sqlexception
@ -1768,7 +1768,7 @@ create table t3(a int)|
drop procedure if exists bug1862|
create procedure bug1862()
begin
insert into t3 values(2);
insert into t3 values(2);
flush tables;
end|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'flush tables' at line 4
@ -1929,7 +1929,7 @@ insert into t3 values (123456789012)|
drop procedure if exists bug2780|
create procedure bug2780()
begin
declare exit handler for sqlwarning set @x = 1;
declare exit handler for sqlwarning set @x = 1;
set @x = 0;
insert into t3 values (123456789012);
insert into t3 values (0);
@ -1945,12 +1945,12 @@ s1
0
drop procedure bug2780|
drop table t3|
create table t3 (
create table t3 (
OrderID int not null,
MarketID int,
primary key (OrderID)
)|
create table t4 (
create table t4 (
MarketID int not null,
Market varchar(60),
Status char(1),
@ -1962,20 +1962,20 @@ insert t4 (MarketID,Market,Status) values (1,"MarketID One","A")|
insert t4 (MarketID,Market,Status) values (2,"MarketID Two","A")|
drop procedure if exists bug2656_1|
create procedure bug2656_1()
begin
begin
select
m.Market
from t4 m JOIN t3 o
from t4 m JOIN t3 o
ON o.MarketID != 1 and o.MarketID = m.MarketID;
end |
drop procedure if exists bug2656_2|
create procedure bug2656_2()
begin
begin
select
m.Market
from
from
t4 m, t3 o
where
where
m.MarketID != 1 and m.MarketID = o.MarketID;
end |
call bug2656_1()|
@ -2213,7 +2213,7 @@ drop procedure if exists bug4904|
create procedure bug4904 ()
begin
declare continue handler for sqlstate 'HY000' begin end;
select s1 from t3 union select s2 from t3;
select s1 from t3 union select s2 from t3;
end|
call bug4904()|
s1
@ -2645,20 +2645,20 @@ end|
create procedure bug9074()
begin
declare x1, x2, x3, x4, x5, x6 int default 0;
begin
declare continue handler for sqlstate '23000' set x5 = 1;
insert into t3 values ('a', 'b');
set x6 = 1;
begin
declare continue handler for sqlstate '23000' set x5 = 1;
insert into t3 values ('a', 'b');
set x6 = 1;
end;
begin1_label:
begin
declare continue handler for sqlstate '23000' set x1 = 1;
insert into t3 values ('a', 'b');
set x2 = 1;
declare continue handler for sqlstate '23000' set x1 = 1;
insert into t3 values ('a', 'b');
set x2 = 1;
begin2_label:
begin
declare exit handler for sqlstate '23000' set x3 = 1;
set x4= 1;
begin
declare exit handler for sqlstate '23000' set x3 = 1;
set x4= 1;
insert into t3 values ('a','b');
set x4= 0;
end begin2_label;
@ -2822,22 +2822,22 @@ drop function if exists bug9775|
create function bug9775(v1 char(1)) returns enum('a','b') return v1|
select bug9775('a'),bug9775('b'),bug9775('c')|
bug9775('a') bug9775('b') bug9775('c')
a b
a b
drop function bug9775|
create function bug9775(v1 int) returns enum('a','b') return v1|
select bug9775(1),bug9775(2),bug9775(3)|
bug9775(1) bug9775(2) bug9775(3)
a b
a b
drop function bug9775|
create function bug9775(v1 char(1)) returns set('a','b') return v1|
select bug9775('a'),bug9775('b'),bug9775('a,b'),bug9775('c')|
bug9775('a') bug9775('b') bug9775('a,b') bug9775('c')
a b a
a b a
drop function bug9775|
create function bug9775(v1 int) returns set('a','b') return v1|
select bug9775(1),bug9775(2),bug9775(3),bug9775(4)|
bug9775(1) bug9775(2) bug9775(3) bug9775(4)
a b a,b
a b a,b
drop function bug9775|
drop function if exists bug8861|
create function bug8861(v1 int) returns year return v1|
@ -2900,12 +2900,12 @@ v
5
drop procedure bug5963_1|
drop table t3|
create procedure bug5963_2 (cfk_value int)
begin
if cfk_value in (select cpk from t3) then
set @x = 5;
end if;
end;
create procedure bug5963_2 (cfk_value int)
begin
if cfk_value in (select cpk from t3) then
set @x = 5;
end if;
end;
|
create table t3 (cpk int)|
insert into t3 values (1)|
@ -3140,16 +3140,16 @@ drop procedure if exists bug8692|
create table t3 (c1 varchar(5), c2 char(5), c3 enum('one','two'), c4 text, c5 blob, c6 char(5), c7 varchar(5))|
insert into t3 values ('', '', '', '', '', '', NULL)|
create procedure bug8692()
begin
declare v1 VARCHAR(10);
declare v2 VARCHAR(10);
declare v3 VARCHAR(10);
declare v4 VARCHAR(10);
declare v5 VARCHAR(10);
declare v6 VARCHAR(10);
declare v7 VARCHAR(10);
declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3;
open c8692;
begin
declare v1 VARCHAR(10);
declare v2 VARCHAR(10);
declare v3 VARCHAR(10);
declare v4 VARCHAR(10);
declare v5 VARCHAR(10);
declare v6 VARCHAR(10);
declare v7 VARCHAR(10);
declare c8692 cursor for select c1,c2,c3,c4,c5,c6,c7 from t3;
open c8692;
fetch c8692 into v1,v2,v3,v4,v5,v6,v7;
select v1, v2, v3, v4, v5, v6, v7;
end|
@ -3265,7 +3265,7 @@ drop procedure if exists bug12168|
drop table if exists t3|
drop procedure if exists bug11333|
create table t3 (c1 char(128))|
insert into t3 values
insert into t3 values
('AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')|
create procedure bug11333(i int)
begin
@ -3651,7 +3651,7 @@ create procedure bug10100p(prm int, inout res int)
begin
set res = res * prm;
if prm > 1 then
call bug10100p(prm - 1, res);
call bug10100p(prm - 1, res);
end if;
end|
create procedure bug10100t(prm int)
@ -4192,7 +4192,7 @@ insert into t3 values
( '2005-01-04' ), ( '2005-02-01' ), ( '2005-02-02' )|
create procedure bug17476(pDateFormat varchar(10))
select date_format(t3.d, pDateFormat), count(*)
from t3
from t3
group by date_format(t3.d, pDateFormat)|
call bug17476('%Y-%m')|
date_format(t3.d, pDateFormat) count(*)
@ -4340,7 +4340,7 @@ use bug18344_0123456789012|
create procedure bug18344() begin end|
create procedure bug18344_2() begin end|
use test|
select schema_name from information_schema.schemata where
select schema_name from information_schema.schemata where
schema_name like 'bug18344%'|
schema_name
bug18344_012345678901
@ -4354,7 +4354,7 @@ bug18344 bug18344_0123456789012
bug18344_2 bug18344_0123456789012
drop database bug18344_012345678901|
drop database bug18344_0123456789012|
select schema_name from information_schema.schemata where
select schema_name from information_schema.schemata where
schema_name like 'bug18344%'|
schema_name
select routine_name,routine_schema from information_schema.routines where
@ -4465,7 +4465,7 @@ create database mysqltest1 charset=utf8|
create database mysqltest2 charset=utf8|
create procedure mysqltest1.p1()
begin
-- alters the default collation of database test
-- alters the default collation of database test
alter database character set koi8r;
end|
use mysqltest1|
@ -4941,7 +4941,7 @@ CREATE FUNCTION bug21493(paramMember VARCHAR(15)) RETURNS varchar(45)
BEGIN
DECLARE tracks VARCHAR(45);
SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t4
WHERE Member_ID=paramMember AND Action='Enrolled' AND
WHERE Member_ID=paramMember AND Action='Enrolled' AND
(Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t4
WHERE Member_ID=paramMember GROUP BY Track) INTO tracks;
RETURN tracks;
@ -5264,13 +5264,13 @@ DROP FUNCTION IF EXISTS bug23760_rc_test|
CREATE TABLE bug23760 (
id INT NOT NULL AUTO_INCREMENT ,
num INT NOT NULL ,
PRIMARY KEY ( id )
PRIMARY KEY ( id )
)|
CREATE TABLE bug23760_log (
id INT NOT NULL AUTO_INCREMENT ,
reason VARCHAR(50)NULL ,
ammount INT NOT NULL ,
PRIMARY KEY ( id )
PRIMARY KEY ( id )
)|
CREATE PROCEDURE bug23760_update_log(r Varchar(50), a INT)
BEGIN
@ -5634,14 +5634,14 @@ select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1';
ERROR 22003: Out of range value for column
select bug20777(-1) as 'lower bounds unsigned bigint - 1';
ERROR 22003: Out of range value for column
create table examplebug20777 as select
create table examplebug20777 as select
0 as 'i',
bug20777(9223372036854775806) as '2**63-2',
bug20777(9223372036854775807) as '2**63-1',
bug20777(9223372036854775808) as '2**63',
bug20777(9223372036854775809) as '2**63+1',
bug20777(18446744073709551614) as '2**64-2',
bug20777(18446744073709551615) as '2**64-1',
bug20777(18446744073709551615) as '2**64-1',
bug20777(18446744073709551616) as '2**64';
ERROR 22003: Out of range value for column
select bug20777(18446744073709551613)+1;
@ -5873,7 +5873,7 @@ select 3;
/*!00000 select 4; */
/*!99999 select 5; */
end
proc_25411_b
proc_25411_b
/* real comment */
/*! p1 int, */
/*!00000 p2 int */
@ -6606,7 +6606,7 @@ DROP FUNCTION f3;
DROP FUNCTION f4;
DROP TABLE t1;
#
# Bug#34197: CREATE PROCEDURE fails when COMMENT truncated in non
# Bug#34197: CREATE PROCEDURE fails when COMMENT truncated in non
# strict SQL mode
#
DROP PROCEDURE IF EXISTS p1;
@ -6657,7 +6657,7 @@ select * from t1 limit a, b;
Warnings:
Warning 5002 Resolve error
#
# Try to use data types not allowed in LIMIT
# Try to use data types not allowed in LIMIT
#
drop procedure p1;
create procedure p1(p1 date, p2 date) select * from t1 limit p1, p2;
@ -6727,7 +6727,7 @@ f1()
NULL
drop function f1;
#
# Try to use data types not allowed in LIMIT
# Try to use data types not allowed in LIMIT
#
create function f1(p1 date, p2 date)
returns int
@ -6815,10 +6815,10 @@ f1(3, 2)
drop table t1;
drop procedure p1;
drop function f1;
#
# BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW)
#
# BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW)
# FAILS IN SET_FIELD_ITERATOR
#
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
CREATE VIEW v1 AS SELECT a FROM t2;
@ -6838,7 +6838,7 @@ DROP PROCEDURE proc;
# --
# -- Bug 11765684 - 58674: SP-cache does not detect changes in
# -- pre-locking list caused by triggers
# ---
# ---
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
@ -6868,7 +6868,7 @@ DROP PROCEDURE p1;
# --
# -- Bug#12652769 - 61470: case operator in stored routine retains old
# -- value of input parameter
# ---
# ---
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
CREATE TABLE t1 (s1 CHAR(5) CHARACTER SET utf8);
@ -6945,10 +6945,10 @@ DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
CREATE TABLE t1 (c1 INT);
INSERT INTO t1 VALUES (1);
CREATE PROCEDURE p1()
BEGIN
DECLARE foo, cnt INT UNSIGNED DEFAULT 1;
SET foo = (SELECT MIN(c1) FROM t1 LIMIT cnt);
CREATE PROCEDURE p1()
BEGIN
DECLARE foo, cnt INT UNSIGNED DEFAULT 1;
SET foo = (SELECT MIN(c1) FROM t1 LIMIT cnt);
END|
CREATE PROCEDURE p2()
BEGIN