mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for
Bug#35335 funcs_1: Some tests fail within load_file during pushbuild runs Solution: 1. Move files with input data used in load_file, load data etc. from suite/funcs_1/<whatever> to std_data 2. Use for testsuite funcs_1 the server option --secure-file-priv=<MYSQLTEST_VARDIR> 3. Outfiles have to be stored under MYSQLTEST_VARDIR + changes according to WL#4304 Cleanup in funcs_1 tests - backport of fixes/improvements made in 5.1 to 5.0 The differences between scripts in 5.0 and 5.1 cause much additional and annoying work during any upmerge. - replace error numbers with names - improved comments - improved formatting - Unify storage engine names so that result files for storage engine variants do not differ (some tests) - remove a script no more used (tests are done in other scripts)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.2 - Syntax checks for the stored procedure-specific
|
||||
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
|
||||
@ -164,7 +172,7 @@ declare y integer default 1;
|
||||
set @x = x;
|
||||
set @y = y;
|
||||
set @z = 234;
|
||||
SELECT f1, f2 into @x, @y from t2 limit 1;
|
||||
SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
|
||||
SELECT @x, @y, @z, invar;
|
||||
BEGIN
|
||||
set @x = 2;
|
||||
@ -207,7 +215,7 @@ BEGIN
|
||||
declare x integer; declare y integer;
|
||||
set @x=x;
|
||||
set @y=y;
|
||||
SELECT f4, f3 into @x, @y from t2 limit 1;
|
||||
SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
|
||||
SELECT @x, @y;
|
||||
END//
|
||||
CALL sp1();
|
||||
@ -695,7 +703,7 @@ Testcase 3.1.2.54:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
01 is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -794,7 +802,7 @@ Testcase 3.1.2.56:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
02 is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -902,7 +910,7 @@ Testcase 3.1.2.58:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a
|
||||
anything other that 01 or 02 is always exactly equivalent in action to a
|
||||
handler with an SQLEXCEPTION condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -1082,7 +1090,8 @@ declare f2_value char(20);
|
||||
declare f5_value char(20);
|
||||
declare f4_value integer;
|
||||
declare f6_value integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
|
||||
where f4 >=-5000 order by f4 limit 3;
|
||||
open cur1;
|
||||
while proceed do
|
||||
SELECT count AS 'loop';
|
||||
@ -1165,7 +1174,7 @@ of a compound statement ends.
|
||||
DROP TABLE IF EXISTS temp1;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
|
||||
SELECT f1, f2, f4, f5 from t2;
|
||||
SELECT f1, f2, f4, f5 from t2 order by f4;
|
||||
f1 f2 f4 f5
|
||||
a` a` -5000 a`
|
||||
aaa aaa -4999 aaa
|
||||
@ -1185,8 +1194,8 @@ declare newf1 char(20);
|
||||
declare newf2 char(20);
|
||||
declare newf5 char(20);
|
||||
declare newf4 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
open cur1;
|
||||
open cur2;
|
||||
BEGIN
|
||||
@ -1268,8 +1277,10 @@ declare i_newf11 char(20);
|
||||
declare i_newf12 char(20);
|
||||
declare i_newf13 date;
|
||||
declare i_newf14 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 3;
|
||||
declare continue handler for sqlstate '02000' set proceed=0;
|
||||
open cur1;
|
||||
open cur2;
|
||||
@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20);
|
||||
DECLARE o_newf12 CHAR(20);
|
||||
DECLARE o_newf13 DATE;
|
||||
DECLARE o_newf14 INTEGER;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
|
||||
OPEN cur1;
|
||||
OPEN cur2;
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
|
||||
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.6 - Privilege Checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -79,6 +87,7 @@ BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP USER 'user_1'@'localhost';
|
||||
@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
||||
BEGIN
|
||||
return v1;
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
drop user 'user_1'@'localhost';
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.7 - SQL mode checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.8 - SHOW statement checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.10 - CALL checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -78,7 +86,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
user_1@localhost db_storedproc
|
||||
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * FROM db_storedproc.t1 LIMIT 1;
|
||||
SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
|
||||
END//
|
||||
CREATE FUNCTION fn31105(n INT) RETURNS INT
|
||||
BEGIN
|
||||
@ -93,6 +101,8 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||
@ -129,6 +141,7 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
DROP PROCEDURE sp31102;
|
||||
@ -176,6 +189,8 @@ DROP PROCEDURE IF EXISTS sp_ins_1;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_3;
|
||||
DROP PROCEDURE IF EXISTS sp_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_del;
|
||||
DROP PROCEDURE IF EXISTS sp_with_rowcount;
|
||||
CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
|
||||
INSERT INTO temp SELECT * FROM t10;
|
||||
CREATE PROCEDURE sp_ins_1()
|
||||
@ -203,49 +218,72 @@ END;
|
||||
SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
|
||||
END//
|
||||
CREATE PROCEDURE sp_del()
|
||||
BEGIN
|
||||
DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
|
||||
END//
|
||||
CREATE PROCEDURE sp_with_rowcount()
|
||||
BEGIN
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
|
||||
('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
|
||||
END;
|
||||
SELECT row_count() AS 'row_count() after insert';
|
||||
SELECT row_count() AS 'row_count() after select row_count()';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
|
||||
SELECT row_count() AS 'row_count() after update';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
DELETE FROM temp WHERE temp.f1 = 'updated_2';
|
||||
SELECT row_count() AS 'row_count() after delete';
|
||||
END//
|
||||
CALL sp_ins_1();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
CALL sp_ins_3();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_upd();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -254,8 +292,6 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
@ -279,6 +315,8 @@ row_count()
|
||||
3
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -287,26 +325,73 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
updated_2 abc 1989-11-09 100 uvw 1000
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated_2 abc 2000-11-09 100 uvw 1000
|
||||
updated_2 abc 2005-11-07 100 uvw 1000
|
||||
CALL sp_del();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
DELETE FROM temp;
|
||||
CALL sp_with_rowcount();
|
||||
row_count() after insert
|
||||
4
|
||||
row_count() after select row_count()
|
||||
-1
|
||||
f1 f2 f3
|
||||
qwe abc 1989-11-09
|
||||
qwe abc 2000-11-09
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
row_count() after update
|
||||
2
|
||||
f1 f2 f3
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
updated_2 abc 1989-11-09
|
||||
updated_2 abc 2000-11-09
|
||||
row_count() after delete
|
||||
2
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
-1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
qwe xyz 2005-11-07 100 uvw 1000
|
||||
DROP PROCEDURE sp_ins_1;
|
||||
DROP PROCEDURE sp_ins_3;
|
||||
DROP PROCEDURE sp_upd;
|
||||
DROP PROCEDURE sp_ins_upd;
|
||||
DROP PROCEDURE sp_del;
|
||||
DROP PROCEDURE sp_with_rowcount;
|
||||
DROP TABLE temp;
|
||||
|
||||
Testcase 3.1.10.8:
|
||||
------------------
|
||||
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
number of rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,96 +1,97 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5.1.1:
|
||||
------------------
|
||||
use test;
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
on tb3 for each row set @test_before = 2, new.f142 = @test_before;
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
on tb3 for each row set @test_after = 6;
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
new.f122 = 'Before Update Trigger';
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
on tb3 for each row set @test_after = '15';
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
set @test_before = 1;
|
||||
set @test_after = 5;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
1 5
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -103,9 +104,9 @@ set @test_after = 8;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
18 8
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
where tb3.f121 = 'Test 3.5.1.1';
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -113,7 +114,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
27 15
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
|
||||
set @test_before = 0;
|
||||
set @test_after = 0;
|
||||
@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1';
|
||||
|
||||
Testcase: 3.5.1.2:
|
||||
------------------
|
||||
Create trigger trg_1 after insert
|
||||
Create trigger trg_1 after insert
|
||||
on tb3 for each statement set @x= 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
|
||||
drop trigger trg_1;
|
||||
@ -194,7 +195,7 @@ drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int, f2 char(25),f3 int) engine=innodb;
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
for each row set new.f3 = '14';
|
||||
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
|
||||
@ -206,7 +207,7 @@ update t1 set f2='update 3.5.1.7';
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL update 3.5.1.7 42
|
||||
select trigger_name from information_schema.triggers;
|
||||
select trigger_name from information_schema.triggers order by trigger_name;
|
||||
trigger_name
|
||||
trg5_1
|
||||
trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
|
||||
@ -226,7 +227,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
for each row set new.f120 ='X';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
drop database if exists trig_db;
|
||||
@ -234,11 +235,11 @@ create database trig_db;
|
||||
use trig_db;
|
||||
create table t1 (f1 integer) engine = innodb;
|
||||
use test;
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
ERROR 42S02: Table 'trig_db.tb3' doesn't exist
|
||||
use trig_db;
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
for each row set @ret_trg6_3 = 18;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use test;
|
||||
@ -262,9 +263,9 @@ drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create table t2 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig t1';
|
||||
create trigger trig before update on t2
|
||||
create trigger trig before update on t2
|
||||
for each row set new.f1 ='trig t2';
|
||||
ERROR HY000: Trigger already exists
|
||||
insert into t1 value ('insert to t1',1);
|
||||
@ -294,15 +295,15 @@ create database trig_db2;
|
||||
create database trig_db3;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig1', @test_var1='trig1';
|
||||
use trig_db2;
|
||||
create table t2 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t2
|
||||
create trigger trig before insert on t2
|
||||
for each row set new.f1 ='trig2', @test_var2='trig2';
|
||||
use trig_db3;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig3', @test_var3='trig3';
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
use trig_db1;
|
||||
@ -313,7 +314,7 @@ insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1 trig2 trig3
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -323,7 +324,7 @@ trig2 3
|
||||
select * from trig_db3.t1;
|
||||
f1 f2
|
||||
trig3 4
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -341,17 +342,17 @@ create database trig_db2;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb;
|
||||
create trigger trig1_b before insert on t1
|
||||
create trigger trig1_b before insert on t1
|
||||
for each row set @test_var1='trig1_b';
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
for each row set @test_var2='trig1_a';
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
for each row set @test_var3='trig2';
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
trig_db1 trig1_b t1
|
||||
trig_db1 trig1_a t1
|
||||
trig_db1 trig1_b t1
|
||||
trig_db2 trig2 t1
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
@ -106,7 +107,7 @@ set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
@ -121,15 +122,12 @@ root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
|
||||
note: once 15166 is fixed a similar case for SELECT needs to be added
|
||||
---------------------------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -141,7 +139,7 @@ drop trigger trg1_2;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -150,12 +148,12 @@ use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
@ -180,23 +178,22 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
create trigger trg4a_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
@ -207,18 +204,13 @@ Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
@ -245,30 +237,29 @@ Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4b_1 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1b';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
ERROR HY000: Trigger does not exist
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
@ -276,32 +267,26 @@ GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
insert 3.5.3.7-2b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
@ -327,21 +312,19 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4c_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -350,23 +333,17 @@ GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
@ -390,23 +367,20 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4d_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -415,25 +389,18 @@ GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
@ -458,14 +425,14 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5a_1 before INSERT on t1 for each row
|
||||
set @test_var = new.f1;
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
@ -483,10 +450,6 @@ set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -517,15 +480,15 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5b_1 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
@ -542,10 +505,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -576,11 +535,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5c_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
@ -593,10 +552,6 @@ use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -626,11 +581,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5d_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
@ -643,10 +598,6 @@ use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -682,10 +633,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2;
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
@ -698,11 +649,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
@ -715,12 +666,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
1
|
||||
select f2 from t2;
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@ -736,13 +687,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -88,22 +89,22 @@ Use db_drop;
|
||||
create table t1 (f1 char(30)) engine=innodb;
|
||||
grant INSERT, SELECT on db_drop.t1 to test_general;
|
||||
Use db_drop;
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.1';
|
||||
Use db_drop;
|
||||
Insert into t1 values ('Insert error 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
Insert into t1 values ('Insert no trigger 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
Insert no trigger 3.5.4.1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
drop database if exists db_drop;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
@ -127,7 +128,7 @@ drop table if exists t1_433 ;
|
||||
drop table if exists t1_433a ;
|
||||
create table t1_433 (f1 char (30)) engine=innodb;
|
||||
create table t1_433a (f1a char (5)) engine=innodb;
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
set new.f1 = 'Trigger 3.5.4.3';
|
||||
Drop trigger t1.433.trg3;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
|
||||
@ -148,7 +149,7 @@ create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=innodb;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.4';
|
||||
Use db_drop4;
|
||||
Insert into t1 values ('Insert 3.5.4.4');
|
||||
@ -184,7 +185,7 @@ create database db_drop5;
|
||||
Use db_drop5;
|
||||
create table t1 (f1 char(50)) engine=innodb;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.5';
|
||||
Use db_drop5;
|
||||
Insert into t1 values ('Insert 3.5.4.5');
|
||||
@ -221,7 +222,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
|
||||
Testcase 3.5.5.2:
|
||||
-----------------
|
||||
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
|
||||
Create trigger trg2 before INSERT
|
||||
Create trigger trg2 before INSERT
|
||||
on t1_temp for each row set new.f2=9999;
|
||||
ERROR HY000: Trigger's 't1_temp' is view or temporary table
|
||||
drop table t1_temp;
|
||||
@ -229,7 +230,7 @@ drop table t1_temp;
|
||||
Testcase 3.5.5.3:
|
||||
-----------------
|
||||
Create view vw3 as select f118 from tb3;
|
||||
Create trigger trg3 before INSERT
|
||||
Create trigger trg3 before INSERT
|
||||
on vw3 for each row set new.f118='s';
|
||||
ERROR HY000: 'test.vw3' is not BASE TABLE
|
||||
drop view vw3;
|
||||
@ -257,7 +258,7 @@ use dbtest_one;
|
||||
Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from dbtest_two.t2;
|
||||
Select * from dbtest_two.t2 order by f1;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
2nd Insert 3.5.
|
||||
@ -310,9 +311,9 @@ drop trigger tb3.trg4_2;
|
||||
|
||||
Testcase 3.5.7.5 / 3.5.7.6:
|
||||
---------------------------
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.5';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
|
||||
@ -330,9 +331,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
|
||||
Testcase 3.5.7.7 / 3.5.7.8:
|
||||
---------------------------
|
||||
set @test_var='Before trig 3.5.7.7';
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.7';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
|
||||
|
||||
Testcase 3.5.7.9/10:
|
||||
--------------------
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.9';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
|
||||
@ -378,9 +379,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
|
||||
Testcase 3.5.7.11/12:
|
||||
---------------------
|
||||
set @test_var='Before trig 3.5.7.11';
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.11';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -408,9 +409,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
Testcase 3.5.7.13/14:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+10;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -440,12 +441,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
Testcase 3.5.7.15/16:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+5;
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+50;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
ERROR HY000: Trigger already exists
|
||||
select @test_var;
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -89,17 +90,17 @@ create database db_test;
|
||||
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
|
||||
grant LOCK TABLES on db_test.* to test_general;
|
||||
Use db_test;
|
||||
create table t1_i (
|
||||
create table t1_i (
|
||||
i120 char ascii not null DEFAULT b'101',
|
||||
i136 smallint zerofill not null DEFAULT 999,
|
||||
i144 int zerofill not null DEFAULT 99999,
|
||||
i163 decimal (63,30)) engine=innodb;
|
||||
create table t1_u (
|
||||
create table t1_u (
|
||||
u120 char ascii not null DEFAULT b'101',
|
||||
u136 smallint zerofill not null DEFAULT 999,
|
||||
u144 int zerofill not null DEFAULT 99999,
|
||||
u163 decimal (63,30)) engine=innodb;
|
||||
create table t1_d (
|
||||
create table t1_d (
|
||||
d120 char ascii not null DEFAULT b'101',
|
||||
d136 smallint zerofill not null DEFAULT 999,
|
||||
d144 int zerofill not null DEFAULT 99999,
|
||||
@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99);
|
||||
use test;
|
||||
Create trigger trg1 AFTER INSERT on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u144=new.f144, u163=new.f163
|
||||
where u136=new.f136;
|
||||
where u136=new.f136;
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
END//
|
||||
Use test;
|
||||
set @test_var=0;
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
|
||||
f120 f122 f136 f144 f163
|
||||
@ -161,14 +162,22 @@ select @test_var;
|
||||
3.5.8.4 - single SQL - insert
|
||||
-----------------------------
|
||||
Create trigger trg2 BEFORE UPDATE on tb3 for each row
|
||||
insert into db_test.t1_i
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
END//
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
|
||||
where f122='Test 3.5.8.4';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i;
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
I 00222 0000023456 1.050000000000000000000000000000
|
||||
@ -177,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000
|
||||
-----------------------------
|
||||
drop trigger trg2;
|
||||
Create trigger trg3 BEFORE UPDATE on tb3 for each row
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u120=new.f120
|
||||
where u136=new.f136;
|
||||
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
@ -185,27 +194,27 @@ update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u;
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - delete
|
||||
-------------------------------
|
||||
drop trigger trg3;
|
||||
Create trigger trg4 AFTER UPDATE on tb3 for each row
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
update tb3 set f120='D', f136=444,
|
||||
update tb3 set f120='D', f136=444,
|
||||
f122='Test 3.5.8.4-Single Delete'
|
||||
where f122='Test 3.5.8.4-Single Update';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_d;
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
@ -214,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000
|
||||
-------------------------------
|
||||
drop trigger trg4;
|
||||
Create trigger trg5 AFTER UPDATE on tb3 for each row
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
set @test_var=0;
|
||||
update tb3 set f120='S', f136=111,
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.4-Single Select'
|
||||
where f122='Test 3.5.8.4-Single Delete';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
@ -245,36 +254,36 @@ set @test_var='three', new.f120='4';
|
||||
END IF;
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END IF;
|
||||
END//
|
||||
set @test_var='Empty', @test_var2=0;
|
||||
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 one 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 two 2nd else
|
||||
D Test 3.5.8.5-if 00102 two 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
D Test 3.5.8.5-if 00101 three 2nd if
|
||||
D Test 3.5.8.5-if 00102 three 2nd if
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00101 three 2nd else
|
||||
D Test 3.5.8.5-if 00102 three 2nd else
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00103 three 2nd else
|
||||
create trigger trg3 before update on tb3 for each row
|
||||
BEGIN
|
||||
@ -289,7 +298,7 @@ create trigger trg4 before update on tb3 for each row
|
||||
BEGIN
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
|
||||
@ -331,60 +340,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
|
||||
END case;
|
||||
END//
|
||||
set @test_var='Empty';
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('a', 'Test 3.5.8.5-case', 5, 7);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 A*seven
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('b', 'Test 3.5.8.5-case', 71,16);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 B*0000000016
|
||||
B Test 3.5.8.5-case 00191 0000000016 B*0000000016
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('c', 'Test 3.5.8.5-case', 80,1);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 C=one
|
||||
B Test 3.5.8.5-case 00191 0000000016 C=one
|
||||
C Test 3.5.8.5-case 00200 0000000001 C=one
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
values ('d', 'Test 3.5.8.5-case', 152);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
A Test 3.5.8.5-case 00125 0000000007 1*0000099999
|
||||
B Test 3.5.8.5-case 00191 0000000016 1*0000099999
|
||||
C Test 3.5.8.5-case 00200 0000000001 1*0000099999
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('e', 'Test 3.5.8.5-case', 200, 8);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('f', 'Test 3.5.8.5-case', 100, 8);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
create trigger trg3a before update on tb3 for each row
|
||||
BEGIN
|
||||
CASE
|
||||
@ -398,40 +407,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
|
||||
Testcase 3.5.8.5-loop/leave:
|
||||
----------------------------
|
||||
Create trigger trg4 after insert on tb3 for each row
|
||||
BEGIN
|
||||
BEGIN
|
||||
set @counter=0, @flag='Initial';
|
||||
Label1: loop
|
||||
Label1: loop
|
||||
if new.f136<new.f144 then
|
||||
set @counter='Nothing to loop';
|
||||
leave Label1;
|
||||
leave Label1;
|
||||
else
|
||||
set @counter=@counter+1;
|
||||
if new.f136=new.f144+@counter then
|
||||
set @counter=concat(@counter, ' loops');
|
||||
leave Label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
set @flag='Final';
|
||||
END loop Label1;
|
||||
END loop Label1;
|
||||
END//
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 2, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
Nothing to loop Initial
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 11, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
3 loops Initial
|
||||
Create trigger trg4_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
Label1: loop
|
||||
BEGIN
|
||||
Label1: loop
|
||||
set @counter=@counter+1;
|
||||
END;
|
||||
END;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
END' at line 5
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4;
|
||||
@ -441,23 +450,23 @@ Testcase 3.5.8.5-repeat:
|
||||
------------------------
|
||||
Create trigger trg6 after insert on tb3 for each row
|
||||
BEGIN
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
UNTIL @counter1> new.f136 END REPEAT rp_label;
|
||||
END//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-repeat', 13);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
15 8
|
||||
Create trigger trg6_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
|
||||
drop trigger trg6;
|
||||
@ -466,33 +475,62 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
|
||||
Testcase 3.5.8.5-while:
|
||||
-----------------------
|
||||
Create trigger trg7 after insert on tb3 for each row
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END WHILE wl_label//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-while', 7);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
7 4
|
||||
Create trigger trg7_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
END' at line 4
|
||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||
drop trigger trg7;
|
||||
|
||||
Testcase 3.5.8.6: (requirement void)
|
||||
------------------------------------
|
||||
CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
|
||||
CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
|
||||
BEGIN
|
||||
CALL sp_01 ();
|
||||
END//
|
||||
Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.6-tr8_1'
|
||||
where f122='Test 3.5.8.6-insert';
|
||||
select f120, f122
|
||||
from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
|
||||
f120 f122
|
||||
S Test 3.5.8.6-tr8_1
|
||||
DROP TRIGGER trg8_1;
|
||||
DROP PROCEDURE sp_01;
|
||||
|
||||
Testcase 3.5.8.7: (Disabled as a result of bug _____)
|
||||
-----------------------------------------------------
|
||||
Testcase 3.5.8.7
|
||||
----------------
|
||||
Create trigger trg9_1 before update on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set new.f120='U';
|
||||
Commit;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
Create trigger trg9_2 before delete on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set @var2=old.f120;
|
||||
Rollback;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
||||
|
@ -1,74 +1,75 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.9.1/2:
|
||||
-------------------
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
set new.f142 = 94087, @counter=@counter+1;
|
||||
TotalRows
|
||||
10
|
||||
@ -80,15 +81,15 @@ NewValuew
|
||||
0
|
||||
set @counter=0;
|
||||
Update tb3 Set f142='1' where f130<100;
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
from tb3 where f142=94087;
|
||||
ExpectedChanged TrigCounter
|
||||
8 8
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
where f130<100 and f142<>94087;
|
||||
ExpectedNotChange
|
||||
0
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
where f130>=130 and f142=94087;
|
||||
NonExpectedChanged
|
||||
0
|
||||
@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
|
||||
0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
values ('Test 3.5.9.3', 7, 123.17);
|
||||
Update tb3 Set f136=8 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@ -135,13 +136,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
delete from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
|
||||
0 0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
0 0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
@ -194,15 +195,15 @@ Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
|
||||
where f122='Test 3.5.9.4';
|
||||
Warnings:
|
||||
Warning 1048 Column 'f136' cannot be null
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4-trig 00000 999 NULL
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
@ -240,6 +241,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
create trigger trg5b after DELETE on tb3 for each row
|
||||
set new.f122='test';
|
||||
ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
drop trigger trg5a;
|
||||
drop trigger trg5b;
|
||||
|
||||
Testcase 3.5.9.10: (implied in previous tests)
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.10.1/2/3:
|
||||
----------------------
|
||||
@ -86,7 +87,7 @@ Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
|
||||
Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
|
||||
Insert into vw11 (f122, f151) values ('Not in View', 3);
|
||||
select f121, f122, f151, f163
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%';
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
|
||||
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
|
||||
@ -100,7 +101,7 @@ f121 f122 f151 f163
|
||||
NULL Not in View 3 111.110000000000000000000000000000
|
||||
Update vw11 set f163=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
@ -114,7 +115,7 @@ before delete
|
||||
0
|
||||
delete from vw11 where f151=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
@ -141,11 +142,11 @@ set @counter= 0;
|
||||
select @counter as 'Rows Loaded Before';
|
||||
Rows Loaded Before
|
||||
0
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load;
|
||||
select @counter as 'Rows Loaded After';
|
||||
Rows Loaded After
|
||||
10
|
||||
Select * from tb_load limit 10;
|
||||
Select * from tb_load order by f1 limit 10;
|
||||
f1 f2 f3
|
||||
-5000 a` 1000
|
||||
-4999 aaa 999
|
||||
@ -240,7 +241,7 @@ insert into t3 (f1) values (new.f1+1000);
|
||||
create trigger tr2_4 after insert on t2_4 for each row
|
||||
insert into t3 (f1) values (new.f1+10000);
|
||||
insert into t1 values (1);
|
||||
select * from t3;
|
||||
select * from t3 order by f1;
|
||||
f1
|
||||
12
|
||||
102
|
||||
@ -275,14 +276,14 @@ create trigger tr4 after insert on t4
|
||||
for each row insert into t1 (f1) values (new.f4+1);
|
||||
insert into t1 values (1);
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
0
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
select * from t4;
|
||||
select * from t4 order by f4;
|
||||
f4
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
@ -293,8 +294,8 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
||||
|
||||
Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889)
|
||||
----------------------------------------------------------------------
|
||||
Testcase y.y.y.4: Recursive trigger/SP references
|
||||
-------------------------------------------------
|
||||
set @sql_mode='traditional';
|
||||
create table t1_sp (
|
||||
count integer,
|
||||
@ -382,12 +383,12 @@ start transaction;
|
||||
insert into t1 values (1);
|
||||
ERROR 22003: Out of range value adjusted for column 'f4' at row 1
|
||||
commit;
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
drop trigger tr1;
|
||||
drop trigger tr2;
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase x.x.x.1:
|
||||
-----------------
|
||||
|
@ -1,117 +1,119 @@
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
! Attention: The file with the expected results is not
|
||||
|
@ -3,63 +3,63 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
@ -76,180 +76,183 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f235 char(0) unicode,
|
||||
f236 char(90),
|
||||
@ -259,89 +262,97 @@ f239 varchar(20000) binary,
|
||||
f240 varchar(2000) unicode,
|
||||
f241 char(100) unicode
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -353,7 +364,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
SELECT * FROM information_schema.columns
|
||||
WHERE table_schema LIKE 'test%'
|
||||
ORDER BY table_schema, table_name, column_name;
|
||||
|
@ -4,55 +4,55 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
@ -72,174 +72,177 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f236 char(95) unicode,
|
||||
f241 char(255) unicode,
|
||||
@ -248,89 +251,97 @@ f238 varchar(25000) binary,
|
||||
f239 varbinary(0),
|
||||
f240 varchar(1200) unicode
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -342,7 +353,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
SELECT * FROM information_schema.columns
|
||||
WHERE table_schema LIKE 'test%'
|
||||
ORDER BY table_schema, table_name, column_name;
|
||||
|
@ -4,63 +4,63 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
@ -80,196 +80,199 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f227 VARBINARY(64),
|
||||
f228 VARBINARY(27),
|
||||
f229 VARBINARY(64),
|
||||
f230 VARBINARY(192),
|
||||
f231 VARBINARY(192),
|
||||
f232 VARBINARY(27),
|
||||
f233 VARBINARY(64),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f227 VARBINARY(64),
|
||||
f228 VARBINARY(27),
|
||||
f229 VARBINARY(64),
|
||||
f230 VARBINARY(192),
|
||||
f231 VARBINARY(192),
|
||||
f232 VARBINARY(27),
|
||||
f233 VARBINARY(64),
|
||||
f234 VARBINARY(192),
|
||||
f235 char(255) unicode,
|
||||
f236 char(60) ascii,
|
||||
@ -280,97 +283,105 @@ f240 varchar(120) unicode,
|
||||
f241 char(100) unicode,
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -382,7 +393,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
SELECT * FROM information_schema.columns
|
||||
WHERE table_schema LIKE 'test%'
|
||||
ORDER BY table_schema, table_name, column_name;
|
||||
|
@ -4,29 +4,35 @@ USE test;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = ndb;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = ndb;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = ndb;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = ndb;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = ndb;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = ndb;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -38,7 +44,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
SELECT * FROM information_schema.columns
|
||||
WHERE table_schema LIKE 'test%'
|
||||
ORDER BY table_schema, table_name, column_name;
|
||||
|
@ -3,63 +3,63 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f1 char(0),
|
||||
f2 char(0) binary,
|
||||
f3 char(0) ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal,
|
||||
f34 decimal unsigned,
|
||||
f35 decimal zerofill,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
@ -76,180 +76,183 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f235 char(0) unicode,
|
||||
f236 char(90),
|
||||
@ -259,89 +262,97 @@ f239 varchar(20000) binary,
|
||||
f240 varchar(2000) unicode,
|
||||
f241 char(100) unicode
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -353,7 +364,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
CREATE DATABASE db_datadict;
|
||||
SELECT *,
|
||||
|
@ -4,55 +4,55 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
@ -72,174 +72,177 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f236 char(95) unicode,
|
||||
f241 char(255) unicode,
|
||||
@ -248,89 +251,97 @@ f238 varchar(25000) binary,
|
||||
f239 varbinary(0),
|
||||
f240 varchar(1200) unicode
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -342,7 +353,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
CREATE DATABASE db_datadict;
|
||||
SELECT *,
|
||||
|
@ -4,63 +4,63 @@ CREATE DATABASE test1;
|
||||
USE test;
|
||||
drop table if exists tb1 ;
|
||||
create table tb1 (
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f1 char,
|
||||
f2 char binary,
|
||||
f3 char ascii,
|
||||
f4 tinytext unicode,
|
||||
f5 text,
|
||||
f6 mediumtext,
|
||||
f7 longtext,
|
||||
f8 tinyblob,
|
||||
f9 blob,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f10 mediumblob,
|
||||
f11 longblob,
|
||||
f12 binary,
|
||||
f13 tinyint,
|
||||
f14 tinyint unsigned,
|
||||
f15 tinyint zerofill,
|
||||
f16 tinyint unsigned zerofill,
|
||||
f17 smallint,
|
||||
f18 smallint unsigned,
|
||||
f19 smallint zerofill,
|
||||
f20 smallint unsigned zerofill,
|
||||
f21 mediumint,
|
||||
f22 mediumint unsigned,
|
||||
f23 mediumint zerofill,
|
||||
f24 mediumint unsigned zerofill,
|
||||
f25 int,
|
||||
f26 int unsigned,
|
||||
f27 int zerofill,
|
||||
f28 int unsigned zerofill,
|
||||
f29 bigint,
|
||||
f30 bigint unsigned,
|
||||
f31 bigint zerofill,
|
||||
f32 bigint unsigned zerofill,
|
||||
f33 decimal not null DEFAULT 9.9,
|
||||
f34 decimal unsigned not null DEFAULT 9.9,
|
||||
f35 decimal zerofill not null DEFAULT 9.9,
|
||||
f36 decimal unsigned zerofill not null DEFAULT 9.9,
|
||||
f37 decimal (0) not null DEFAULT 9.9,
|
||||
f38 decimal (64) not null DEFAULT 9.9,
|
||||
f39 decimal (0) unsigned not null DEFAULT 9.9,
|
||||
f40 decimal (64) unsigned not null DEFAULT 9.9,
|
||||
f41 decimal (0) zerofill not null DEFAULT 9.9,
|
||||
f42 decimal (64) zerofill not null DEFAULT 9.9,
|
||||
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
|
||||
f45 decimal (0,0) not null DEFAULT 9.9,
|
||||
f46 decimal (63,30) not null DEFAULT 9.9,
|
||||
f47 decimal (0,0) unsigned not null DEFAULT 9.9,
|
||||
f48 decimal (63,30) unsigned not null DEFAULT 9.9,
|
||||
f49 decimal (0,0) zerofill not null DEFAULT 9.9,
|
||||
f50 decimal (63,30) zerofill not null DEFAULT 9.9,
|
||||
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
|
||||
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
|
||||
f53 numeric not null DEFAULT 99,
|
||||
f54 numeric unsigned not null DEFAULT 99,
|
||||
f55 numeric zerofill not null DEFAULT 99,
|
||||
f56 numeric unsigned zerofill not null DEFAULT 99,
|
||||
f57 numeric (0) not null DEFAULT 99,
|
||||
f58 numeric (64) not null DEFAULT 99
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
@ -80,196 +80,199 @@ Note 1265 Data truncated for column 'f45' at row 1
|
||||
Note 1265 Data truncated for column 'f47' at row 1
|
||||
Note 1265 Data truncated for column 'f49' at row 1
|
||||
Note 1265 Data truncated for column 'f51' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f227 VARBINARY(64),
|
||||
f228 VARBINARY(27),
|
||||
f229 VARBINARY(64),
|
||||
f230 VARBINARY(192),
|
||||
f231 VARBINARY(192),
|
||||
f232 VARBINARY(27),
|
||||
f233 VARBINARY(64),
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
f178 numeric (0) zerofill not null DEFAULT 9,
|
||||
f179 numeric (64) zerofill not null DEFAULT 9,
|
||||
f180 numeric (0) unsigned zerofill not null DEFAULT 9,
|
||||
f181 numeric (64) unsigned zerofill not null DEFAULT 9,
|
||||
f182 numeric (0,0) not null DEFAULT 9,
|
||||
f183 numeric (63,30) not null DEFAULT 9,
|
||||
f184 numeric (0,0) unsigned not null DEFAULT 9,
|
||||
f185 numeric (63,30) unsigned not null DEFAULT 9,
|
||||
f186 numeric (0,0) zerofill not null DEFAULT 9,
|
||||
f187 numeric (63,30) zerofill not null DEFAULT 9,
|
||||
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
|
||||
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
|
||||
f190 real not null DEFAULT 88.8,
|
||||
f191 real unsigned not null DEFAULT 88.8,
|
||||
f192 real zerofill not null DEFAULT 88.8,
|
||||
f193 real unsigned zerofill not null DEFAULT 88.8,
|
||||
f194 double not null DEFAULT 55.5,
|
||||
f195 double unsigned not null DEFAULT 55.5,
|
||||
f196 double zerofill not null DEFAULT 55.5,
|
||||
f197 double unsigned zerofill not null DEFAULT 55.5,
|
||||
f198 float,
|
||||
f199 float unsigned,
|
||||
f200 float zerofill,
|
||||
f201 float unsigned zerofill,
|
||||
f202 float(0),
|
||||
f203 float(23),
|
||||
f204 float(0) unsigned,
|
||||
f205 float(23) unsigned,
|
||||
f206 float(0) zerofill,
|
||||
f207 float(23) zerofill,
|
||||
f208 float(0) unsigned zerofill,
|
||||
f209 float(23) unsigned zerofill,
|
||||
f210 float(24),
|
||||
f211 float(53),
|
||||
f212 float(24) unsigned,
|
||||
f213 float(53) unsigned,
|
||||
f214 float(24) zerofill,
|
||||
f215 float(53) zerofill,
|
||||
f216 float(24) unsigned zerofill,
|
||||
f217 float(53) unsigned zerofill,
|
||||
f218 date,
|
||||
f219 time,
|
||||
f220 datetime,
|
||||
f221 timestamp,
|
||||
f222 year,
|
||||
f223 year(3),
|
||||
f224 year(4),
|
||||
f225 enum("1enum","2enum"),
|
||||
f226 set("1set","2set"),
|
||||
f227 VARBINARY(64),
|
||||
f228 VARBINARY(27),
|
||||
f229 VARBINARY(64),
|
||||
f230 VARBINARY(192),
|
||||
f231 VARBINARY(192),
|
||||
f232 VARBINARY(27),
|
||||
f233 VARBINARY(64),
|
||||
f234 VARBINARY(192),
|
||||
f235 char(255) unicode,
|
||||
f236 char(60) ascii,
|
||||
@ -280,97 +283,105 @@ f240 varchar(120) unicode,
|
||||
f241 char(100) unicode,
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -382,7 +393,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
CREATE DATABASE db_datadict;
|
||||
SELECT *,
|
||||
|
@ -4,29 +4,35 @@ USE test;
|
||||
USE test;
|
||||
USE test;
|
||||
DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
|
||||
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11;
|
||||
CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = NDB;
|
||||
CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = NDB;
|
||||
CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = NDB;
|
||||
CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = NDB;
|
||||
CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
ENGINE = NDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
|
||||
drop TABLE if exists t3;
|
||||
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = NDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
|
||||
drop database if exists test4;
|
||||
CREATE database test4;
|
||||
use test4;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6;
|
||||
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
|
||||
ENGINE = NDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
|
||||
use test;
|
||||
drop TABLE if exists t7, t8;
|
||||
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB;
|
||||
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7;
|
||||
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB;
|
||||
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -38,7 +44,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
drop TABLE if exists t9;
|
||||
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = NDB;
|
||||
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9;
|
||||
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
|
||||
DROP DATABASE IF EXISTS db_datadict;
|
||||
CREATE DATABASE db_datadict;
|
||||
SELECT *,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.2 - Syntax checks for the stored procedure-specific
|
||||
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
|
||||
@ -164,7 +172,7 @@ declare y integer default 1;
|
||||
set @x = x;
|
||||
set @y = y;
|
||||
set @z = 234;
|
||||
SELECT f1, f2 into @x, @y from t2 limit 1;
|
||||
SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
|
||||
SELECT @x, @y, @z, invar;
|
||||
BEGIN
|
||||
set @x = 2;
|
||||
@ -207,7 +215,7 @@ BEGIN
|
||||
declare x integer; declare y integer;
|
||||
set @x=x;
|
||||
set @y=y;
|
||||
SELECT f4, f3 into @x, @y from t2 limit 1;
|
||||
SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
|
||||
SELECT @x, @y;
|
||||
END//
|
||||
CALL sp1();
|
||||
@ -695,7 +703,7 @@ Testcase 3.1.2.54:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
01 is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -794,7 +802,7 @@ Testcase 3.1.2.56:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
02 is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -902,7 +910,7 @@ Testcase 3.1.2.58:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a
|
||||
anything other that 01 or 02 is always exactly equivalent in action to a
|
||||
handler with an SQLEXCEPTION condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -1082,7 +1090,8 @@ declare f2_value char(20);
|
||||
declare f5_value char(20);
|
||||
declare f4_value integer;
|
||||
declare f6_value integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
|
||||
where f4 >=-5000 order by f4 limit 3;
|
||||
open cur1;
|
||||
while proceed do
|
||||
SELECT count AS 'loop';
|
||||
@ -1165,7 +1174,7 @@ of a compound statement ends.
|
||||
DROP TABLE IF EXISTS temp1;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
|
||||
SELECT f1, f2, f4, f5 from t2;
|
||||
SELECT f1, f2, f4, f5 from t2 order by f4;
|
||||
f1 f2 f4 f5
|
||||
a` a` -5000 a`
|
||||
aaa aaa -4999 aaa
|
||||
@ -1185,8 +1194,8 @@ declare newf1 char(20);
|
||||
declare newf2 char(20);
|
||||
declare newf5 char(20);
|
||||
declare newf4 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
open cur1;
|
||||
open cur2;
|
||||
BEGIN
|
||||
@ -1268,8 +1277,10 @@ declare i_newf11 char(20);
|
||||
declare i_newf12 char(20);
|
||||
declare i_newf13 date;
|
||||
declare i_newf14 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 3;
|
||||
declare continue handler for sqlstate '02000' set proceed=0;
|
||||
open cur1;
|
||||
open cur2;
|
||||
@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20);
|
||||
DECLARE o_newf12 CHAR(20);
|
||||
DECLARE o_newf13 DATE;
|
||||
DECLARE o_newf14 INTEGER;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
|
||||
OPEN cur1;
|
||||
OPEN cur2;
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
|
||||
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.6 - Privilege Checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -79,6 +87,7 @@ BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP USER 'user_1'@'localhost';
|
||||
@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
||||
BEGIN
|
||||
return v1;
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
drop user 'user_1'@'localhost';
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.7 - SQL mode checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.8 - SHOW statement checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.10 - CALL checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -78,7 +86,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
user_1@localhost db_storedproc
|
||||
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * FROM db_storedproc.t1 LIMIT 1;
|
||||
SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
|
||||
END//
|
||||
CREATE FUNCTION fn31105(n INT) RETURNS INT
|
||||
BEGIN
|
||||
@ -93,6 +101,8 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||
@ -129,6 +141,7 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
DROP PROCEDURE sp31102;
|
||||
@ -176,6 +189,8 @@ DROP PROCEDURE IF EXISTS sp_ins_1;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_3;
|
||||
DROP PROCEDURE IF EXISTS sp_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_del;
|
||||
DROP PROCEDURE IF EXISTS sp_with_rowcount;
|
||||
CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
|
||||
INSERT INTO temp SELECT * FROM t10;
|
||||
CREATE PROCEDURE sp_ins_1()
|
||||
@ -203,49 +218,72 @@ END;
|
||||
SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
|
||||
END//
|
||||
CREATE PROCEDURE sp_del()
|
||||
BEGIN
|
||||
DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
|
||||
END//
|
||||
CREATE PROCEDURE sp_with_rowcount()
|
||||
BEGIN
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
|
||||
('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
|
||||
END;
|
||||
SELECT row_count() AS 'row_count() after insert';
|
||||
SELECT row_count() AS 'row_count() after select row_count()';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
|
||||
SELECT row_count() AS 'row_count() after update';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
DELETE FROM temp WHERE temp.f1 = 'updated_2';
|
||||
SELECT row_count() AS 'row_count() after delete';
|
||||
END//
|
||||
CALL sp_ins_1();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
CALL sp_ins_3();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_upd();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -254,8 +292,6 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
@ -279,6 +315,8 @@ row_count()
|
||||
3
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -287,26 +325,73 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
updated_2 abc 1989-11-09 100 uvw 1000
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated_2 abc 2000-11-09 100 uvw 1000
|
||||
updated_2 abc 2005-11-07 100 uvw 1000
|
||||
CALL sp_del();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
DELETE FROM temp;
|
||||
CALL sp_with_rowcount();
|
||||
row_count() after insert
|
||||
4
|
||||
row_count() after select row_count()
|
||||
-1
|
||||
f1 f2 f3
|
||||
qwe abc 1989-11-09
|
||||
qwe abc 2000-11-09
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
row_count() after update
|
||||
2
|
||||
f1 f2 f3
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
updated_2 abc 1989-11-09
|
||||
updated_2 abc 2000-11-09
|
||||
row_count() after delete
|
||||
2
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
-1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
qwe xyz 2005-11-07 100 uvw 1000
|
||||
DROP PROCEDURE sp_ins_1;
|
||||
DROP PROCEDURE sp_ins_3;
|
||||
DROP PROCEDURE sp_upd;
|
||||
DROP PROCEDURE sp_ins_upd;
|
||||
DROP PROCEDURE sp_del;
|
||||
DROP PROCEDURE sp_with_rowcount;
|
||||
DROP TABLE temp;
|
||||
|
||||
Testcase 3.1.10.8:
|
||||
------------------
|
||||
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
number of rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,90 +1,91 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5.1.1:
|
||||
------------------
|
||||
use test;
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
on tb3 for each row set @test_before = 2, new.f142 = @test_before;
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
on tb3 for each row set @test_after = 6;
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
new.f122 = 'Before Update Trigger';
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
on tb3 for each row set @test_after = '15';
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
set @test_before = 1;
|
||||
set @test_after = 5;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
1 5
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -97,9 +98,9 @@ set @test_after = 8;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
18 8
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
where tb3.f121 = 'Test 3.5.1.1';
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -107,7 +108,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
27 15
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
|
||||
set @test_before = 0;
|
||||
set @test_after = 0;
|
||||
@ -135,7 +136,7 @@ delete from tb3 where f121='Test 3.5.1.1';
|
||||
|
||||
Testcase: 3.5.1.2:
|
||||
------------------
|
||||
Create trigger trg_1 after insert
|
||||
Create trigger trg_1 after insert
|
||||
on tb3 for each statement set @x= 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
|
||||
drop trigger trg_1;
|
||||
@ -188,7 +189,7 @@ drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int, f2 char(25),f3 int) engine=memory;
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
for each row set new.f3 = '14';
|
||||
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
|
||||
@ -200,7 +201,7 @@ update t1 set f2='update 3.5.1.7';
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL update 3.5.1.7 42
|
||||
select trigger_name from information_schema.triggers;
|
||||
select trigger_name from information_schema.triggers order by trigger_name;
|
||||
trigger_name
|
||||
trg5_1
|
||||
trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
|
||||
@ -220,7 +221,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
for each row set new.f120 ='X';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
drop database if exists trig_db;
|
||||
@ -228,11 +229,11 @@ create database trig_db;
|
||||
use trig_db;
|
||||
create table t1 (f1 integer) engine = memory;
|
||||
use test;
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
ERROR 42S02: Table 'trig_db.tb3' doesn't exist
|
||||
use trig_db;
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
for each row set @ret_trg6_3 = 18;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use test;
|
||||
@ -256,9 +257,9 @@ drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create table t2 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig t1';
|
||||
create trigger trig before update on t2
|
||||
create trigger trig before update on t2
|
||||
for each row set new.f1 ='trig t2';
|
||||
ERROR HY000: Trigger already exists
|
||||
insert into t1 value ('insert to t1',1);
|
||||
@ -288,15 +289,15 @@ create database trig_db2;
|
||||
create database trig_db3;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig1', @test_var1='trig1';
|
||||
use trig_db2;
|
||||
create table t2 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t2
|
||||
create trigger trig before insert on t2
|
||||
for each row set new.f1 ='trig2', @test_var2='trig2';
|
||||
use trig_db3;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig3', @test_var3='trig3';
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
use trig_db1;
|
||||
@ -307,7 +308,7 @@ insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1 trig2 trig3
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -317,7 +318,7 @@ trig2 3
|
||||
select * from trig_db3.t1;
|
||||
f1 f2
|
||||
trig3 4
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -335,17 +336,17 @@ create database trig_db2;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory;
|
||||
create trigger trig1_b before insert on t1
|
||||
create trigger trig1_b before insert on t1
|
||||
for each row set @test_var1='trig1_b';
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
for each row set @test_var2='trig1_a';
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
for each row set @test_var3='trig2';
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
trig_db1 trig1_b t1
|
||||
trig_db1 trig1_a t1
|
||||
trig_db1 trig1_b t1
|
||||
trig_db2 trig2 t1
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
|
||||
|
@ -1,64 +1,65 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
@ -100,7 +101,7 @@ set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
@ -115,15 +116,12 @@ root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
|
||||
note: once 15166 is fixed a similar case for SELECT needs to be added
|
||||
---------------------------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -135,7 +133,7 @@ drop trigger trg1_2;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -144,12 +142,12 @@ use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
@ -174,23 +172,22 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
create trigger trg4a_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
@ -201,18 +198,13 @@ Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
@ -239,30 +231,29 @@ Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4b_1 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1b';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
ERROR HY000: Trigger does not exist
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
@ -270,32 +261,26 @@ GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
insert 3.5.3.7-2b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
@ -321,21 +306,19 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4c_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -344,23 +327,17 @@ GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
@ -384,23 +361,20 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4d_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -409,25 +383,18 @@ GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
@ -452,14 +419,14 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5a_1 before INSERT on t1 for each row
|
||||
set @test_var = new.f1;
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
@ -477,10 +444,6 @@ set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -511,15 +474,15 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5b_1 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
@ -536,10 +499,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -570,11 +529,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5c_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
@ -587,10 +546,6 @@ use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -620,11 +575,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5d_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
@ -637,10 +592,6 @@ use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -676,10 +627,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2;
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
@ -692,11 +643,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
@ -709,12 +660,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
1
|
||||
select f2 from t2;
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@ -730,13 +681,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
|
@ -1,64 +1,65 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -82,22 +83,22 @@ Use db_drop;
|
||||
create table t1 (f1 char(30)) engine=memory;
|
||||
grant INSERT, SELECT on db_drop.t1 to test_general;
|
||||
Use db_drop;
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.1';
|
||||
Use db_drop;
|
||||
Insert into t1 values ('Insert error 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
Insert into t1 values ('Insert no trigger 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
Insert no trigger 3.5.4.1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
drop database if exists db_drop;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
@ -121,7 +122,7 @@ drop table if exists t1_433 ;
|
||||
drop table if exists t1_433a ;
|
||||
create table t1_433 (f1 char (30)) engine=memory;
|
||||
create table t1_433a (f1a char (5)) engine=memory;
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
set new.f1 = 'Trigger 3.5.4.3';
|
||||
Drop trigger t1.433.trg3;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
|
||||
@ -142,7 +143,7 @@ create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=memory;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.4';
|
||||
Use db_drop4;
|
||||
Insert into t1 values ('Insert 3.5.4.4');
|
||||
@ -178,7 +179,7 @@ create database db_drop5;
|
||||
Use db_drop5;
|
||||
create table t1 (f1 char(50)) engine=memory;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.5';
|
||||
Use db_drop5;
|
||||
Insert into t1 values ('Insert 3.5.4.5');
|
||||
@ -215,7 +216,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
|
||||
Testcase 3.5.5.2:
|
||||
-----------------
|
||||
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
|
||||
Create trigger trg2 before INSERT
|
||||
Create trigger trg2 before INSERT
|
||||
on t1_temp for each row set new.f2=9999;
|
||||
ERROR HY000: Trigger's 't1_temp' is view or temporary table
|
||||
drop table t1_temp;
|
||||
@ -223,7 +224,7 @@ drop table t1_temp;
|
||||
Testcase 3.5.5.3:
|
||||
-----------------
|
||||
Create view vw3 as select f118 from tb3;
|
||||
Create trigger trg3 before INSERT
|
||||
Create trigger trg3 before INSERT
|
||||
on vw3 for each row set new.f118='s';
|
||||
ERROR HY000: 'test.vw3' is not BASE TABLE
|
||||
drop view vw3;
|
||||
@ -251,7 +252,7 @@ use dbtest_one;
|
||||
Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from dbtest_two.t2;
|
||||
Select * from dbtest_two.t2 order by f1;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
2nd Insert 3.5.
|
||||
@ -304,9 +305,9 @@ drop trigger tb3.trg4_2;
|
||||
|
||||
Testcase 3.5.7.5 / 3.5.7.6:
|
||||
---------------------------
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.5';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
|
||||
@ -324,9 +325,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
|
||||
Testcase 3.5.7.7 / 3.5.7.8:
|
||||
---------------------------
|
||||
set @test_var='Before trig 3.5.7.7';
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.7';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -352,9 +353,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
|
||||
|
||||
Testcase 3.5.7.9/10:
|
||||
--------------------
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.9';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
|
||||
@ -372,9 +373,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
|
||||
Testcase 3.5.7.11/12:
|
||||
---------------------
|
||||
set @test_var='Before trig 3.5.7.11';
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.11';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -402,9 +403,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
Testcase 3.5.7.13/14:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+10;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -434,12 +435,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
Testcase 3.5.7.15/16:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+5;
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+50;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
ERROR HY000: Trigger already exists
|
||||
select @test_var;
|
||||
|
@ -1,64 +1,65 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -83,17 +84,17 @@ create database db_test;
|
||||
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
|
||||
grant LOCK TABLES on db_test.* to test_general;
|
||||
Use db_test;
|
||||
create table t1_i (
|
||||
create table t1_i (
|
||||
i120 char ascii not null DEFAULT b'101',
|
||||
i136 smallint zerofill not null DEFAULT 999,
|
||||
i144 int zerofill not null DEFAULT 99999,
|
||||
i163 decimal (63,30)) engine=memory;
|
||||
create table t1_u (
|
||||
create table t1_u (
|
||||
u120 char ascii not null DEFAULT b'101',
|
||||
u136 smallint zerofill not null DEFAULT 999,
|
||||
u144 int zerofill not null DEFAULT 99999,
|
||||
u163 decimal (63,30)) engine=memory;
|
||||
create table t1_d (
|
||||
create table t1_d (
|
||||
d120 char ascii not null DEFAULT b'101',
|
||||
d136 smallint zerofill not null DEFAULT 999,
|
||||
d144 int zerofill not null DEFAULT 99999,
|
||||
@ -116,18 +117,18 @@ Insert into t1_d values ('f',222,99999,999.99);
|
||||
use test;
|
||||
Create trigger trg1 AFTER INSERT on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u144=new.f144, u163=new.f163
|
||||
where u136=new.f136;
|
||||
where u136=new.f136;
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
END//
|
||||
Use test;
|
||||
set @test_var=0;
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
|
||||
f120 f122 f136 f144 f163
|
||||
@ -155,14 +156,22 @@ select @test_var;
|
||||
3.5.8.4 - single SQL - insert
|
||||
-----------------------------
|
||||
Create trigger trg2 BEFORE UPDATE on tb3 for each row
|
||||
insert into db_test.t1_i
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
END//
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
|
||||
where f122='Test 3.5.8.4';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i;
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
I 00222 0000023456 1.050000000000000000000000000000
|
||||
@ -171,7 +180,7 @@ I 00222 0000023456 1.050000000000000000000000000000
|
||||
-----------------------------
|
||||
drop trigger trg2;
|
||||
Create trigger trg3 BEFORE UPDATE on tb3 for each row
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u120=new.f120
|
||||
where u136=new.f136;
|
||||
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
@ -179,27 +188,27 @@ update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u;
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - delete
|
||||
-------------------------------
|
||||
drop trigger trg3;
|
||||
Create trigger trg4 AFTER UPDATE on tb3 for each row
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
update tb3 set f120='D', f136=444,
|
||||
update tb3 set f120='D', f136=444,
|
||||
f122='Test 3.5.8.4-Single Delete'
|
||||
where f122='Test 3.5.8.4-Single Update';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_d;
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
@ -208,10 +217,10 @@ c 00333 0000099999 999.990000000000000000000000000000
|
||||
-------------------------------
|
||||
drop trigger trg4;
|
||||
Create trigger trg5 AFTER UPDATE on tb3 for each row
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
set @test_var=0;
|
||||
update tb3 set f120='S', f136=111,
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.4-Single Select'
|
||||
where f122='Test 3.5.8.4-Single Delete';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
@ -239,36 +248,36 @@ set @test_var='three', new.f120='4';
|
||||
END IF;
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END IF;
|
||||
END//
|
||||
set @test_var='Empty', @test_var2=0;
|
||||
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 one 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 two 2nd else
|
||||
D Test 3.5.8.5-if 00102 two 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
D Test 3.5.8.5-if 00101 three 2nd if
|
||||
D Test 3.5.8.5-if 00102 three 2nd if
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00101 three 2nd else
|
||||
D Test 3.5.8.5-if 00102 three 2nd else
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00103 three 2nd else
|
||||
create trigger trg3 before update on tb3 for each row
|
||||
BEGIN
|
||||
@ -283,7 +292,7 @@ create trigger trg4 before update on tb3 for each row
|
||||
BEGIN
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
|
||||
@ -325,60 +334,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
|
||||
END case;
|
||||
END//
|
||||
set @test_var='Empty';
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('a', 'Test 3.5.8.5-case', 5, 7);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 A*seven
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('b', 'Test 3.5.8.5-case', 71,16);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 B*0000000016
|
||||
B Test 3.5.8.5-case 00191 0000000016 B*0000000016
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('c', 'Test 3.5.8.5-case', 80,1);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 C=one
|
||||
B Test 3.5.8.5-case 00191 0000000016 C=one
|
||||
C Test 3.5.8.5-case 00200 0000000001 C=one
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
values ('d', 'Test 3.5.8.5-case', 152);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
A Test 3.5.8.5-case 00125 0000000007 1*0000099999
|
||||
B Test 3.5.8.5-case 00191 0000000016 1*0000099999
|
||||
C Test 3.5.8.5-case 00200 0000000001 1*0000099999
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('e', 'Test 3.5.8.5-case', 200, 8);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('f', 'Test 3.5.8.5-case', 100, 8);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
create trigger trg3a before update on tb3 for each row
|
||||
BEGIN
|
||||
CASE
|
||||
@ -392,40 +401,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
|
||||
Testcase 3.5.8.5-loop/leave:
|
||||
----------------------------
|
||||
Create trigger trg4 after insert on tb3 for each row
|
||||
BEGIN
|
||||
BEGIN
|
||||
set @counter=0, @flag='Initial';
|
||||
Label1: loop
|
||||
Label1: loop
|
||||
if new.f136<new.f144 then
|
||||
set @counter='Nothing to loop';
|
||||
leave Label1;
|
||||
leave Label1;
|
||||
else
|
||||
set @counter=@counter+1;
|
||||
if new.f136=new.f144+@counter then
|
||||
set @counter=concat(@counter, ' loops');
|
||||
leave Label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
set @flag='Final';
|
||||
END loop Label1;
|
||||
END loop Label1;
|
||||
END//
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 2, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
Nothing to loop Initial
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 11, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
3 loops Initial
|
||||
Create trigger trg4_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
Label1: loop
|
||||
BEGIN
|
||||
Label1: loop
|
||||
set @counter=@counter+1;
|
||||
END;
|
||||
END;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
END' at line 5
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4;
|
||||
@ -435,23 +444,23 @@ Testcase 3.5.8.5-repeat:
|
||||
------------------------
|
||||
Create trigger trg6 after insert on tb3 for each row
|
||||
BEGIN
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
UNTIL @counter1> new.f136 END REPEAT rp_label;
|
||||
END//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-repeat', 13);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
15 8
|
||||
Create trigger trg6_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
|
||||
drop trigger trg6;
|
||||
@ -460,33 +469,62 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
|
||||
Testcase 3.5.8.5-while:
|
||||
-----------------------
|
||||
Create trigger trg7 after insert on tb3 for each row
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END WHILE wl_label//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-while', 7);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
7 4
|
||||
Create trigger trg7_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
END' at line 4
|
||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||
drop trigger trg7;
|
||||
|
||||
Testcase 3.5.8.6: (requirement void)
|
||||
------------------------------------
|
||||
CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
|
||||
CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
|
||||
BEGIN
|
||||
CALL sp_01 ();
|
||||
END//
|
||||
Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.6-tr8_1'
|
||||
where f122='Test 3.5.8.6-insert';
|
||||
select f120, f122
|
||||
from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
|
||||
f120 f122
|
||||
S Test 3.5.8.6-tr8_1
|
||||
DROP TRIGGER trg8_1;
|
||||
DROP PROCEDURE sp_01;
|
||||
|
||||
Testcase 3.5.8.7: (Disabled as a result of bug _____)
|
||||
-----------------------------------------------------
|
||||
Testcase 3.5.8.7
|
||||
----------------
|
||||
Create trigger trg9_1 before update on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set new.f120='U';
|
||||
Commit;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
Create trigger trg9_2 before delete on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set @var2=old.f120;
|
||||
Rollback;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
||||
|
@ -1,68 +1,69 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.9.1/2:
|
||||
-------------------
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
set new.f142 = 94087, @counter=@counter+1;
|
||||
TotalRows
|
||||
10
|
||||
@ -74,15 +75,15 @@ NewValuew
|
||||
0
|
||||
set @counter=0;
|
||||
Update tb3 Set f142='1' where f130<100;
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
from tb3 where f142=94087;
|
||||
ExpectedChanged TrigCounter
|
||||
9 9
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
where f130<100 and f142<>94087;
|
||||
ExpectedNotChange
|
||||
0
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
where f130>=130 and f142=94087;
|
||||
NonExpectedChanged
|
||||
0
|
||||
@ -110,17 +111,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
|
||||
0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
values ('Test 3.5.9.3', 7, 123.17);
|
||||
Update tb3 Set f136=8 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@ -129,13 +130,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
delete from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
@ -166,17 +167,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
|
||||
0 0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
0 0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
@ -188,15 +189,15 @@ Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
|
||||
where f122='Test 3.5.9.4';
|
||||
Warnings:
|
||||
Warning 1048 Column 'f136' cannot be null
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4-trig 00000 999 NULL
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
@ -234,6 +235,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
create trigger trg5b after DELETE on tb3 for each row
|
||||
set new.f122='test';
|
||||
ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
drop trigger trg5a;
|
||||
drop trigger trg5b;
|
||||
|
||||
Testcase 3.5.9.10: (implied in previous tests)
|
||||
|
@ -1,64 +1,65 @@
|
||||
USE test;
|
||||
drop table if exists tb3;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 char(50),
|
||||
f122 char(50),
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.10.1/2/3:
|
||||
----------------------
|
||||
@ -80,7 +81,7 @@ Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
|
||||
Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
|
||||
Insert into vw11 (f122, f151) values ('Not in View', 3);
|
||||
select f121, f122, f151, f163
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%';
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
|
||||
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
|
||||
@ -94,7 +95,7 @@ f121 f122 f151 f163
|
||||
NULL Not in View 3 111.110000000000000000000000000000
|
||||
Update vw11 set f163=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
@ -108,7 +109,7 @@ before delete
|
||||
0
|
||||
delete from vw11 where f151=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
@ -135,11 +136,11 @@ set @counter= 0;
|
||||
select @counter as 'Rows Loaded Before';
|
||||
Rows Loaded Before
|
||||
0
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load;
|
||||
select @counter as 'Rows Loaded After';
|
||||
Rows Loaded After
|
||||
10
|
||||
Select * from tb_load limit 10;
|
||||
Select * from tb_load order by f1 limit 10;
|
||||
f1 f2 f3
|
||||
-5000 a` 1000
|
||||
-4999 aaa 999
|
||||
@ -234,7 +235,7 @@ insert into t3 (f1) values (new.f1+1000);
|
||||
create trigger tr2_4 after insert on t2_4 for each row
|
||||
insert into t3 (f1) values (new.f1+10000);
|
||||
insert into t1 values (1);
|
||||
select * from t3;
|
||||
select * from t3 order by f1;
|
||||
f1
|
||||
12
|
||||
102
|
||||
@ -269,17 +270,17 @@ create trigger tr4 after insert on t4
|
||||
for each row insert into t1 (f1) values (new.f4+1);
|
||||
insert into t1 values (1);
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
0
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
3
|
||||
select * from t4;
|
||||
select * from t4 order by f4;
|
||||
f4
|
||||
4
|
||||
drop trigger tr1;
|
||||
@ -291,8 +292,8 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
||||
|
||||
Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889)
|
||||
----------------------------------------------------------------------
|
||||
Testcase y.y.y.4: Recursive trigger/SP references
|
||||
-------------------------------------------------
|
||||
set @sql_mode='traditional';
|
||||
create table t1_sp (
|
||||
count integer,
|
||||
@ -380,14 +381,14 @@ start transaction;
|
||||
insert into t1 values (1);
|
||||
ERROR 22003: Out of range value adjusted for column 'f4' at row 1
|
||||
commit;
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
3
|
||||
drop trigger tr1;
|
||||
|
@ -1,117 +1,119 @@
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
|
||||
! Attention: The file with the expected results is not
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.2 - Syntax checks for the stored procedure-specific
|
||||
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
|
||||
@ -164,7 +172,7 @@ declare y integer default 1;
|
||||
set @x = x;
|
||||
set @y = y;
|
||||
set @z = 234;
|
||||
SELECT f1, f2 into @x, @y from t2 limit 1;
|
||||
SELECT f1, f2 into @x, @y from t2 where f1='a`' and f2='a`' limit 1;
|
||||
SELECT @x, @y, @z, invar;
|
||||
BEGIN
|
||||
set @x = 2;
|
||||
@ -207,7 +215,7 @@ BEGIN
|
||||
declare x integer; declare y integer;
|
||||
set @x=x;
|
||||
set @y=y;
|
||||
SELECT f4, f3 into @x, @y from t2 limit 1;
|
||||
SELECT f4, f3 into @x, @y from t2 where f4=-5000 and f3='1000-01-01' limit 1;
|
||||
SELECT @x, @y;
|
||||
END//
|
||||
CALL sp1();
|
||||
@ -695,7 +703,7 @@ Testcase 3.1.2.54:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
01 is always exactly equivalent in action to a handler with an SQLWARNING
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -794,7 +802,7 @@ Testcase 3.1.2.56:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
02 is always exactly equivalent in action to a handler with a NOT FOUND
|
||||
condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -902,7 +910,7 @@ Testcase 3.1.2.58:
|
||||
------------------
|
||||
|
||||
Ensure that a handler with a condition defined with an SQLSTATE that begins with
|
||||
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a
|
||||
anything other that 01 or 02 is always exactly equivalent in action to a
|
||||
handler with an SQLEXCEPTION condition.
|
||||
--------------------------------------------------------------------------------
|
||||
DROP PROCEDURE IF EXISTS sp0;
|
||||
@ -1082,7 +1090,8 @@ declare f2_value char(20);
|
||||
declare f5_value char(20);
|
||||
declare f4_value integer;
|
||||
declare f6_value integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5, f6 from t2
|
||||
where f4 >=-5000 order by f4 limit 3;
|
||||
open cur1;
|
||||
while proceed do
|
||||
SELECT count AS 'loop';
|
||||
@ -1165,7 +1174,7 @@ of a compound statement ends.
|
||||
DROP TABLE IF EXISTS temp1;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
create table temp1( f0 char(20), f1 char(20), f2 char(20), f3 int, f4 char(20) );
|
||||
SELECT f1, f2, f4, f5 from t2;
|
||||
SELECT f1, f2, f4, f5 from t2 order by f4;
|
||||
f1 f2 f4 f5
|
||||
a` a` -5000 a`
|
||||
aaa aaa -4999 aaa
|
||||
@ -1185,8 +1194,8 @@ declare newf1 char(20);
|
||||
declare newf2 char(20);
|
||||
declare newf5 char(20);
|
||||
declare newf4 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 limit 5;
|
||||
declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by f4 limit 5;
|
||||
open cur1;
|
||||
open cur2;
|
||||
BEGIN
|
||||
@ -1268,8 +1277,10 @@ declare i_newf11 char(20);
|
||||
declare i_newf12 char(20);
|
||||
declare i_newf13 date;
|
||||
declare i_newf14 integer;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2 limit 3;
|
||||
declare cur1 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 4;
|
||||
declare cur2 cursor for SELECT f1, f2, f3, f4 from t2
|
||||
where f4>=-5000 order by f4 limit 3;
|
||||
declare continue handler for sqlstate '02000' set proceed=0;
|
||||
open cur1;
|
||||
open cur2;
|
||||
@ -1300,8 +1311,10 @@ DECLARE o_newf11 CHAR(20);
|
||||
DECLARE o_newf12 CHAR(20);
|
||||
DECLARE o_newf13 DATE;
|
||||
DECLARE o_newf14 INTEGER;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2 LIMIT 5;
|
||||
DECLARE cur1 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE cur2 CURSOR FOR SELECT f1, f2, f3, f4 FROM t2
|
||||
WHERE f4>=-5000 ORDER BY f4 LIMIT 5;
|
||||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET proceed=0;
|
||||
OPEN cur1;
|
||||
OPEN cur2;
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
|
||||
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.6 - Privilege Checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -79,6 +87,7 @@ BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_storedproc_1'
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
GRANT CREATE ROUTINE ON db_storedproc_1.* TO 'user_1'@'localhost';
|
||||
@ -90,6 +99,7 @@ CREATE PROCEDURE sp1(v1 char(20))
|
||||
BEGIN
|
||||
SELECT * from db_storedproc_1.t6 where t6.f2= 'xyz';
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
DROP USER 'user_1'@'localhost';
|
||||
@ -115,6 +125,7 @@ CREATE FUNCTION fn1(v1 int) returns int
|
||||
BEGIN
|
||||
return v1;
|
||||
END//
|
||||
USE db_storedproc_1;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
drop user 'user_1'@'localhost';
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.7 - SQL mode checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.8 - SHOW statement checks:
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
|
||||
CREATE DATABASE db_storedproc;
|
||||
CREATE DATABASE db_storedproc_1;
|
||||
USE db_storedproc;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
|
||||
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
|
||||
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
|
||||
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
|
||||
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
|
||||
USE db_storedproc_1;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
|
||||
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
|
||||
USE db_storedproc;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
|
||||
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
|
||||
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f3' at row 1
|
||||
Warning 1265 Data truncated for column 'f3' at row 2
|
||||
@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
|
||||
Warning 1265 Data truncated for column 'f3' at row 8
|
||||
Warning 1265 Data truncated for column 'f3' at row 9
|
||||
Warning 1265 Data truncated for column 'f3' at row 10
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
|
||||
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
|
||||
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
|
||||
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
|
||||
engine = <engine_to_be_tested>;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
|
||||
|
||||
Section 3.1.10 - CALL checks:
|
||||
--------------------------------------------------------------------------------
|
||||
@ -78,7 +86,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK);
|
||||
user_1@localhost db_storedproc
|
||||
CREATE PROCEDURE sp31102 () SQL SECURITY INVOKER
|
||||
BEGIN
|
||||
SELECT * FROM db_storedproc.t1 LIMIT 1;
|
||||
SELECT * FROM db_storedproc.t1 WHERE f4=-5000 LIMIT 1;
|
||||
END//
|
||||
CREATE FUNCTION fn31105(n INT) RETURNS INT
|
||||
BEGIN
|
||||
@ -93,6 +101,8 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
CALL sp31102();
|
||||
@ -112,6 +122,8 @@ a` a` 1000-01-01 -5000 a` -5000
|
||||
SELECT fn31105( 9 );
|
||||
fn31105( 9 )
|
||||
81
|
||||
connection default;
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
REVOKE EXECUTE ON db_storedproc.* FROM 'user_2'@'localhost';
|
||||
@ -129,6 +141,7 @@ CALL sp31102();
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.sp31102'
|
||||
SELECT fn31105( 9 );
|
||||
ERROR 42000: execute command denied to user 'user_2'@'localhost' for routine 'db_storedproc.fn31105'
|
||||
USE db_storedproc;
|
||||
|
||||
root@localhost db_storedproc
|
||||
DROP PROCEDURE sp31102;
|
||||
@ -176,6 +189,8 @@ DROP PROCEDURE IF EXISTS sp_ins_1;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_3;
|
||||
DROP PROCEDURE IF EXISTS sp_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_ins_upd;
|
||||
DROP PROCEDURE IF EXISTS sp_del;
|
||||
DROP PROCEDURE IF EXISTS sp_with_rowcount;
|
||||
CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT);
|
||||
INSERT INTO temp SELECT * FROM t10;
|
||||
CREATE PROCEDURE sp_ins_1()
|
||||
@ -203,49 +218,72 @@ END;
|
||||
SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc';
|
||||
END//
|
||||
CREATE PROCEDURE sp_del()
|
||||
BEGIN
|
||||
DELETE FROM temp WHERE temp.f1 ='qwe' OR temp.f1 = 'updated_2';
|
||||
END//
|
||||
CREATE PROCEDURE sp_with_rowcount()
|
||||
BEGIN
|
||||
BEGIN
|
||||
INSERT INTO temp VALUES ('qwe', 'abc', '1989-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '1998-03-26', 100, 'uvw', 1000),
|
||||
('qwe', 'abc', '2000-11-09', 100, 'uvw', 1000),
|
||||
('qwe', 'xyz', '2005-11-07', 100, 'uvw', 1000);
|
||||
END;
|
||||
SELECT row_count() AS 'row_count() after insert';
|
||||
SELECT row_count() AS 'row_count() after select row_count()';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f2 = 'abc';
|
||||
SELECT row_count() AS 'row_count() after update';
|
||||
SELECT f1,f2,f3 FROM temp ORDER BY f1,f2,f3;
|
||||
DELETE FROM temp WHERE temp.f1 = 'updated_2';
|
||||
SELECT row_count() AS 'row_count() after delete';
|
||||
END//
|
||||
CALL sp_ins_1();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
CALL sp_ins_3();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
abc abc 2005-10-03 100 uvw 1000
|
||||
abc xyz 1949-05-23 100 uvw 1000
|
||||
abc xyz 1989-11-09 100 uvw 1000
|
||||
abc xyz 2005-10-24 100 uvw 1000
|
||||
CALL sp_upd();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -254,8 +292,6 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
@ -279,6 +315,8 @@ row_count()
|
||||
3
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
@ -287,26 +325,73 @@ adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
updated_2 abc 1989-11-09 100 uvw 1000
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
updated_2 abc 2000-11-09 100 uvw 1000
|
||||
updated_2 abc 2005-11-07 100 uvw 1000
|
||||
CALL sp_del();
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
4
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992
|
||||
a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991
|
||||
a` a` 1000-01-01 -5000 a` -5000
|
||||
aaa aaa 1000-01-02 -4999 aaa -4999
|
||||
abaa abaa 1000-01-03 -4998 abaa -4998
|
||||
acaaa acaaa 1000-01-04 -4997 acaaa -4997
|
||||
adaaaa adaaaa 1000-01-05 -4996 adaaaa -4996
|
||||
aeaaaaa aeaaaaa 1000-01-06 -4995 aeaaaaa -4995
|
||||
afaaaaaa afaaaaaa 1000-01-07 -4994 afaaaaaa -4994
|
||||
agaaaaaaa agaaaaaaa 1000-01-08 -4993 agaaaaaaa -4993
|
||||
updated abc 2005-10-03 100 uvw 1000
|
||||
updated xyz 1949-05-23 100 uvw 1000
|
||||
updated xyz 1989-11-09 100 uvw 1000
|
||||
updated xyz 2005-10-24 100 uvw 1000
|
||||
DELETE FROM temp;
|
||||
CALL sp_with_rowcount();
|
||||
row_count() after insert
|
||||
4
|
||||
row_count() after select row_count()
|
||||
-1
|
||||
f1 f2 f3
|
||||
qwe abc 1989-11-09
|
||||
qwe abc 2000-11-09
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
row_count() after update
|
||||
2
|
||||
f1 f2 f3
|
||||
qwe xyz 1998-03-26
|
||||
qwe xyz 2005-11-07
|
||||
updated_2 abc 1989-11-09
|
||||
updated_2 abc 2000-11-09
|
||||
row_count() after delete
|
||||
2
|
||||
SELECT row_count();
|
||||
row_count()
|
||||
-1
|
||||
SELECT * FROM temp;
|
||||
f1 f2 f3 f4 f5 f6
|
||||
qwe xyz 1998-03-26 100 uvw 1000
|
||||
qwe xyz 2005-11-07 100 uvw 1000
|
||||
DROP PROCEDURE sp_ins_1;
|
||||
DROP PROCEDURE sp_ins_3;
|
||||
DROP PROCEDURE sp_upd;
|
||||
DROP PROCEDURE sp_ins_upd;
|
||||
DROP PROCEDURE sp_del;
|
||||
DROP PROCEDURE sp_with_rowcount;
|
||||
DROP TABLE temp;
|
||||
|
||||
Testcase 3.1.10.8:
|
||||
------------------
|
||||
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
Ensure that the mysql_affected_rows() C API function always returns the correct
|
||||
number of rows affected by the execution of a stored procedure.
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -1,96 +1,97 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5.1.1:
|
||||
------------------
|
||||
use test;
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
Create trigger trg1_1 BEFORE INSERT
|
||||
on tb3 for each row set @test_before = 2, new.f142 = @test_before;
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
Create trigger trg1_2 AFTER INSERT
|
||||
on tb3 for each row set @test_after = 6;
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
Create trigger trg1_4 BEFORE UPDATE
|
||||
on tb3 for each row set @test_before = 27,
|
||||
new.f142 = @test_before,
|
||||
new.f122 = 'Before Update Trigger';
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
Create trigger trg1_3 AFTER UPDATE
|
||||
on tb3 for each row set @test_after = '15';
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
Create trigger trg1_5 BEFORE DELETE on tb3 for each row
|
||||
select count(*) into @test_before from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
Create trigger trg1_6 AFTER DELETE on tb3 for each row
|
||||
select count(*) into @test_after from tb3 as tr_tb3
|
||||
where f121 = 'Test 3.5.1.1';
|
||||
set @test_before = 1;
|
||||
set @test_after = 5;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
1 5
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -103,9 +104,9 @@ set @test_after = 8;
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
18 8
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
Update tb3 set tb3.f122 = 'Update',
|
||||
tb3.f142 = @test_before,
|
||||
tb3.f144 = @test_after
|
||||
where tb3.f121 = 'Test 3.5.1.1';
|
||||
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1';
|
||||
f121 f122 f142 f144 f134
|
||||
@ -113,7 +114,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
|
||||
select @test_before, @test_after;
|
||||
@test_before @test_after
|
||||
27 15
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
Insert into tb3 (f121, f122, f142, f144, f134)
|
||||
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
|
||||
set @test_before = 0;
|
||||
set @test_after = 0;
|
||||
@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1';
|
||||
|
||||
Testcase: 3.5.1.2:
|
||||
------------------
|
||||
Create trigger trg_1 after insert
|
||||
Create trigger trg_1 after insert
|
||||
on tb3 for each statement set @x= 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
|
||||
drop trigger trg_1;
|
||||
@ -194,7 +195,7 @@ drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
create table t1 (f1 int, f2 char(25),f3 int) engine=myisam;
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
|
||||
for each row set new.f3 = '14';
|
||||
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
|
||||
@ -206,7 +207,7 @@ update t1 set f2='update 3.5.1.7';
|
||||
select * from t1;
|
||||
f1 f2 f3
|
||||
NULL update 3.5.1.7 42
|
||||
select trigger_name from information_schema.triggers;
|
||||
select trigger_name from information_schema.triggers order by trigger_name;
|
||||
trigger_name
|
||||
trg5_1
|
||||
trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
|
||||
@ -226,7 +227,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
|
||||
for each row set new.f120 ='X';
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
drop database if exists trig_db;
|
||||
@ -234,11 +235,11 @@ create database trig_db;
|
||||
use trig_db;
|
||||
create table t1 (f1 integer) engine = myisam;
|
||||
use test;
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
|
||||
for each row set @ret_trg6_2 = 5;
|
||||
ERROR 42S02: Table 'trig_db.tb3' doesn't exist
|
||||
use trig_db;
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
|
||||
for each row set @ret_trg6_3 = 18;
|
||||
ERROR HY000: Trigger in wrong schema
|
||||
use test;
|
||||
@ -262,9 +263,9 @@ drop table if exists t1;
|
||||
drop table if exists t2;
|
||||
create table t1 (f1 char(50), f2 integer) engine = myisam;
|
||||
create table t2 (f1 char(50), f2 integer) engine = myisam;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig t1';
|
||||
create trigger trig before update on t2
|
||||
create trigger trig before update on t2
|
||||
for each row set new.f1 ='trig t2';
|
||||
ERROR HY000: Trigger already exists
|
||||
insert into t1 value ('insert to t1',1);
|
||||
@ -294,15 +295,15 @@ create database trig_db2;
|
||||
create database trig_db3;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = myisam;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig1', @test_var1='trig1';
|
||||
use trig_db2;
|
||||
create table t2 (f1 char(50), f2 integer) engine = myisam;
|
||||
create trigger trig before insert on t2
|
||||
create trigger trig before insert on t2
|
||||
for each row set new.f1 ='trig2', @test_var2='trig2';
|
||||
use trig_db3;
|
||||
create table t1 (f1 char(50), f2 integer) engine = myisam;
|
||||
create trigger trig before insert on t1
|
||||
create trigger trig before insert on t1
|
||||
for each row set new.f1 ='trig3', @test_var3='trig3';
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
use trig_db1;
|
||||
@ -313,7 +314,7 @@ insert into trig_db3.t1 (f1,f2) values ('insert to db3 t1 from db1',4);
|
||||
select @test_var1, @test_var2, @test_var3;
|
||||
@test_var1 @test_var2 @test_var3
|
||||
trig1 trig2 trig3
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -323,7 +324,7 @@ trig2 3
|
||||
select * from trig_db3.t1;
|
||||
f1 f2
|
||||
trig3 4
|
||||
select * from t1;
|
||||
select * from t1 order by f2;
|
||||
f1 f2
|
||||
trig1 1
|
||||
trig1 2
|
||||
@ -341,17 +342,17 @@ create database trig_db2;
|
||||
use trig_db1;
|
||||
create table t1 (f1 char(50), f2 integer) engine = myisam;
|
||||
create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam;
|
||||
create trigger trig1_b before insert on t1
|
||||
create trigger trig1_b before insert on t1
|
||||
for each row set @test_var1='trig1_b';
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
create trigger trig_db1.trig1_a after insert on t1
|
||||
for each row set @test_var2='trig1_a';
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
create trigger trig_db2.trig2 before insert on trig_db2.t1
|
||||
for each row set @test_var3='trig2';
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
trig_db1 trig1_b t1
|
||||
trig_db1 trig1_a t1
|
||||
trig_db1 trig1_b t1
|
||||
trig_db2 trig2 t1
|
||||
set @test_var1= '', @test_var2= '', @test_var3= '';
|
||||
insert into t1 (f1,f2) values ('insert to db1 t1 from db1',352);
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.3:
|
||||
---------------
|
||||
@ -106,7 +107,7 @@ set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
select current_user;
|
||||
@ -121,15 +122,12 @@ root@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
|
||||
note: once 15166 is fixed a similar case for SELECT needs to be added
|
||||
---------------------------------------------------------------------
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -141,7 +139,7 @@ drop trigger trg1_2;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
@ -150,12 +148,12 @@ use priv_db;
|
||||
drop trigger trg1_2;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-no');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg1_2;
|
||||
|
||||
Testcase 3.5.3.7a:
|
||||
@ -180,23 +178,22 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
create trigger trg4a_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1a';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1a');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
drop trigger trg4a_1;
|
||||
use priv_db;
|
||||
select current_user;
|
||||
@ -207,18 +204,13 @@ Grants for test_yesprivs@localhost
|
||||
GRANT UPDATE, SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
create trigger trg4a_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2a';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
drop trigger trg4a_2;
|
||||
|
||||
@ -245,30 +237,29 @@ Grants for test_noprivs@localhost
|
||||
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4b_1 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1b';
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
insert 3.5.3.7-1b
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b';
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_1;
|
||||
ERROR HY000: Trigger does not exist
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
@ -276,32 +267,26 @@ GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4b_2 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2b';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2b');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
insert 3.5.3.7-2b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
update t1 set f1 = 'update 3.5.3.7-2b' where f1 = 'insert 3.5.3.7-2b';
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
insert 3.5.3.6-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
trig 3.5.3.7-2b
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4b_2;
|
||||
|
||||
Testcase 3.5.3.7c
|
||||
@ -327,21 +312,19 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4c_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1c');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -350,23 +333,17 @@ GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4c_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2c';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2c');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4c_2;
|
||||
|
||||
Testcase 3.5.3.7d:
|
||||
@ -390,23 +367,20 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8884
|
||||
------------------------------------------------
|
||||
create trigger trg4d_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-1d');
|
||||
select f1 from t1;
|
||||
ERROR 42000: UPDATE command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_1;
|
||||
show grants;
|
||||
Grants for test_yesprivs@localhost
|
||||
@ -415,25 +389,18 @@ GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
|
||||
use priv_db;
|
||||
create trigger trg4d_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.7-2d';
|
||||
|
||||
SELECT priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.7-2d');
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert 3.5.3.2-no
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
insert 3.5.3.6-no
|
||||
insert 3.5.3.7-1a
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.2_2-yes
|
||||
trig 3.5.3.7-2a
|
||||
update 3.5.3.7-1b
|
||||
trig 3.5.3.7-2b
|
||||
insert 3.5.3.7-1c
|
||||
trig 3.5.3.7-2c
|
||||
insert 3.5.3.7-1d
|
||||
trig 3.5.3.7-2d
|
||||
update 3.5.3.7-1b
|
||||
drop trigger trg4d_2;
|
||||
|
||||
Testcase 3.5.3.8a:
|
||||
@ -458,14 +425,14 @@ use priv_db;
|
||||
show grants;
|
||||
Grants for test_noprivs@localhost
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5a_1 before INSERT on t1 for each row
|
||||
set @test_var = new.f1;
|
||||
set @test_var = 'before trig 3.5.3.8-1a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1a');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1a
|
||||
@ -483,10 +450,6 @@ set @test_var= 'before trig 3.5.3.8-2a';
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2a
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on *.* to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2a');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -517,15 +480,15 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `priv_db`.* TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5b_1 before UPDATE on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1b';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b';
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1b
|
||||
@ -542,10 +505,6 @@ insert into t1 (f1) values ('insert 3.5.3.8-2b');
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-2b
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.* to test_yesprivs@localhost;
|
||||
update t1 set f1= 'update 3.5.3.8-2b' where f1 = 'insert 3.5.3.8-2b';
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -576,11 +535,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5c_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var= 'before trig 3.5.3.8-1c';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1c');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1c
|
||||
@ -593,10 +552,6 @@ use priv_db;
|
||||
create trigger trg5c_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2c';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2c');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -626,11 +581,11 @@ Grants for test_noprivs@localhost
|
||||
GRANT SUPER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
|
||||
use priv_db;
|
||||
|
||||
Trigger create disabled - should fail - Bug 8887
|
||||
------------------------------------------------
|
||||
create trigger trg5d_1 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-1d';
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-1d');
|
||||
ERROR 42000: SELECT command denied to user 'test_noprivs'@'localhost' for column 'f1' in table 't1'
|
||||
select @test_var;
|
||||
@test_var
|
||||
before trig 3.5.3.8-1d
|
||||
@ -643,10 +598,6 @@ use priv_db;
|
||||
create trigger trg5d_2 before INSERT on t1 for each row
|
||||
set @test_var= new.f1;
|
||||
set @test_var='before trig 3.5.3.8-2d';
|
||||
|
||||
UPDATE priv added to bypass bug 15166
|
||||
-------------------------------------
|
||||
grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values ('insert 3.5.3.8-2d');
|
||||
select @test_var;
|
||||
@test_var
|
||||
@ -682,10 +633,10 @@ ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
select f2 from t2;
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
4
|
||||
use priv_db;
|
||||
@ -698,11 +649,11 @@ ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
use priv_db;
|
||||
@ -715,12 +666,12 @@ ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
2
|
||||
1
|
||||
select f2 from t2;
|
||||
2
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
1
|
||||
select @aaa;
|
||||
@ -736,13 +687,13 @@ ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
select f1 from t1;
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
4
|
||||
1
|
||||
1
|
||||
2
|
||||
1
|
||||
1
|
||||
select f2 from t2;
|
||||
4
|
||||
select f2 from t2 order by f2;
|
||||
f2
|
||||
drop database if exists priv_db;
|
||||
drop user test_yesprivs@localhost;
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -88,22 +89,22 @@ Use db_drop;
|
||||
create table t1 (f1 char(30)) engine=myisam;
|
||||
grant INSERT, SELECT on db_drop.t1 to test_general;
|
||||
Use db_drop;
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
Create trigger trg1 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.1';
|
||||
Use db_drop;
|
||||
Insert into t1 values ('Insert error 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
select trigger_schema, trigger_name, event_object_table
|
||||
from information_schema.triggers;
|
||||
from information_schema.triggers order by trigger_name;
|
||||
trigger_schema trigger_name event_object_table
|
||||
Insert into t1 values ('Insert no trigger 3.5.4.1');
|
||||
Select * from t1;
|
||||
Select * from t1 order by f1;
|
||||
f1
|
||||
Trigger 3.5.4.1
|
||||
Insert no trigger 3.5.4.1
|
||||
Trigger 3.5.4.1
|
||||
drop trigger trg1;
|
||||
drop database if exists db_drop;
|
||||
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
|
||||
@ -127,7 +128,7 @@ drop table if exists t1_433 ;
|
||||
drop table if exists t1_433a ;
|
||||
create table t1_433 (f1 char (30)) engine=myisam;
|
||||
create table t1_433a (f1a char (5)) engine=myisam;
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
|
||||
set new.f1 = 'Trigger 3.5.4.3';
|
||||
Drop trigger t1.433.trg3;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
|
||||
@ -148,7 +149,7 @@ create database db_drop4;
|
||||
Use db_drop4;
|
||||
create table t1 (f1 char(30)) engine=myisam;
|
||||
grant INSERT, SELECT on db_drop4.t1 to test_general;
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
Create trigger trg4 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.4';
|
||||
Use db_drop4;
|
||||
Insert into t1 values ('Insert 3.5.4.4');
|
||||
@ -184,7 +185,7 @@ create database db_drop5;
|
||||
Use db_drop5;
|
||||
create table t1 (f1 char(50)) engine=myisam;
|
||||
grant INSERT, SELECT on t1 to test_general;
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
Create trigger trg5 BEFORE INSERT on t1
|
||||
for each row set new.f1='Trigger 3.5.4.5';
|
||||
Use db_drop5;
|
||||
Insert into t1 values ('Insert 3.5.4.5');
|
||||
@ -221,7 +222,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
|
||||
Testcase 3.5.5.2:
|
||||
-----------------
|
||||
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
|
||||
Create trigger trg2 before INSERT
|
||||
Create trigger trg2 before INSERT
|
||||
on t1_temp for each row set new.f2=9999;
|
||||
ERROR HY000: Trigger's 't1_temp' is view or temporary table
|
||||
drop table t1_temp;
|
||||
@ -229,7 +230,7 @@ drop table t1_temp;
|
||||
Testcase 3.5.5.3:
|
||||
-----------------
|
||||
Create view vw3 as select f118 from tb3;
|
||||
Create trigger trg3 before INSERT
|
||||
Create trigger trg3 before INSERT
|
||||
on vw3 for each row set new.f118='s';
|
||||
ERROR HY000: 'test.vw3' is not BASE TABLE
|
||||
drop view vw3;
|
||||
@ -257,7 +258,7 @@ use dbtest_one;
|
||||
Insert into dbtest_two.t2 values ('2nd Insert 3.5.5.4');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Select * from dbtest_two.t2;
|
||||
Select * from dbtest_two.t2 order by f1;
|
||||
f1
|
||||
1st Insert 3.5.
|
||||
2nd Insert 3.5.
|
||||
@ -310,9 +311,9 @@ drop trigger tb3.trg4_2;
|
||||
|
||||
Testcase 3.5.7.5 / 3.5.7.6:
|
||||
---------------------------
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
Create trigger trg5_1 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
Create trigger trg5_2 BEFORE INSERT
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.5';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
|
||||
@ -330,9 +331,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
|
||||
Testcase 3.5.7.7 / 3.5.7.8:
|
||||
---------------------------
|
||||
set @test_var='Before trig 3.5.7.7';
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
Create trigger trg6_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
Create trigger trg6_2 AFTER INSERT
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.7';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
|
||||
|
||||
Testcase 3.5.7.9/10:
|
||||
--------------------
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
Create trigger trg7_1 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
Create trigger trg7_2 BEFORE UPDATE
|
||||
on tb3 for each row set new.f122='Trigger2 3.5.7.9';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
|
||||
@ -378,9 +379,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
|
||||
Testcase 3.5.7.11/12:
|
||||
---------------------
|
||||
set @test_var='Before trig 3.5.7.11';
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
Create trigger trg8_1 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
Create trigger trg8_2 AFTER UPDATE
|
||||
on tb3 for each row set @test_var='Trigger2 3.5.7.11';
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -408,9 +409,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
|
||||
Testcase 3.5.7.13/14:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
Create trigger trg9_1 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
Create trigger trg9_2 BEFORE DELETE
|
||||
on tb3 for each row set @test_var=@test_var+10;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
select @test_var;
|
||||
@ -440,12 +441,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
|
||||
Testcase 3.5.7.15/16:
|
||||
---------------------
|
||||
set @test_var=1;
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
Create trigger trg_3_406010_1 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+5;
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
Create trigger trg_3_406010_2 AFTER DELETE
|
||||
on tb3 for each row set @test_var=@test_var+50;
|
||||
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
Create trigger trg_3_406010_1 AFTER INSERT
|
||||
on tb3 for each row set @test_var=@test_var+1;
|
||||
ERROR HY000: Trigger already exists
|
||||
select @test_var;
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase: 3.5:
|
||||
--------------
|
||||
@ -89,17 +90,17 @@ create database db_test;
|
||||
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
|
||||
grant LOCK TABLES on db_test.* to test_general;
|
||||
Use db_test;
|
||||
create table t1_i (
|
||||
create table t1_i (
|
||||
i120 char ascii not null DEFAULT b'101',
|
||||
i136 smallint zerofill not null DEFAULT 999,
|
||||
i144 int zerofill not null DEFAULT 99999,
|
||||
i163 decimal (63,30)) engine=myisam;
|
||||
create table t1_u (
|
||||
create table t1_u (
|
||||
u120 char ascii not null DEFAULT b'101',
|
||||
u136 smallint zerofill not null DEFAULT 999,
|
||||
u144 int zerofill not null DEFAULT 99999,
|
||||
u163 decimal (63,30)) engine=myisam;
|
||||
create table t1_d (
|
||||
create table t1_d (
|
||||
d120 char ascii not null DEFAULT b'101',
|
||||
d136 smallint zerofill not null DEFAULT 999,
|
||||
d144 int zerofill not null DEFAULT 99999,
|
||||
@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99);
|
||||
use test;
|
||||
Create trigger trg1 AFTER INSERT on tb3 for each row
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u144=new.f144, u163=new.f163
|
||||
where u136=new.f136;
|
||||
where u136=new.f136;
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
END//
|
||||
Use test;
|
||||
set @test_var=0;
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
Insert into tb3 (f120, f122, f136, f144, f163)
|
||||
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
|
||||
f120 f122 f136 f144 f163
|
||||
@ -161,14 +162,22 @@ select @test_var;
|
||||
3.5.8.4 - single SQL - insert
|
||||
-----------------------------
|
||||
Create trigger trg2 BEFORE UPDATE on tb3 for each row
|
||||
insert into db_test.t1_i
|
||||
BEGIN
|
||||
insert into db_test.t1_i
|
||||
values (new.f120, new.f136, new.f144, new.f163);
|
||||
END//
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
1 Test 3.5.8.4 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
update tb3 set f120='I', f122='Test 3.5.8.4-Single Insert'
|
||||
where f122='Test 3.5.8.4';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
I Test 3.5.8.4-Single Insert 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_i;
|
||||
select * from db_test.t1_i order by i120;
|
||||
i120 i136 i144 i163
|
||||
1 00222 0000023456 1.050000000000000000000000000000
|
||||
I 00222 0000023456 1.050000000000000000000000000000
|
||||
@ -177,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000
|
||||
-----------------------------
|
||||
drop trigger trg2;
|
||||
Create trigger trg3 BEFORE UPDATE on tb3 for each row
|
||||
update db_test.t1_u
|
||||
update db_test.t1_u
|
||||
set u120=new.f120
|
||||
where u136=new.f136;
|
||||
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
@ -185,27 +194,27 @@ update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
U Test 3.5.8.4-Single Update 00222 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_u;
|
||||
select * from db_test.t1_u order by u120;
|
||||
u120 u136 u144 u163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
f 00333 0000099999 999.990000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
U 00222 0000023456 1.050000000000000000000000000000
|
||||
|
||||
3.5.8.3/4 - single SQL - delete
|
||||
-------------------------------
|
||||
drop trigger trg3;
|
||||
Create trigger trg4 AFTER UPDATE on tb3 for each row
|
||||
delete from db_test.t1_d where d136= new.f136;
|
||||
update tb3 set f120='D', f136=444,
|
||||
update tb3 set f120='D', f136=444,
|
||||
f122='Test 3.5.8.4-Single Delete'
|
||||
where f122='Test 3.5.8.4-Single Update';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
f120 f122 f136 f144 f163
|
||||
D Test 3.5.8.4-Single Delete 00444 0000023456 1.050000000000000000000000000000
|
||||
select * from db_test.t1_d;
|
||||
select * from db_test.t1_d order by d120;
|
||||
d120 d136 d144 d163
|
||||
a 00111 0000099999 999.990000000000000000000000000000
|
||||
c 00333 0000099999 999.990000000000000000000000000000
|
||||
@ -214,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000
|
||||
-------------------------------
|
||||
drop trigger trg4;
|
||||
Create trigger trg5 AFTER UPDATE on tb3 for each row
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
|
||||
where u136= new.f136;
|
||||
set @test_var=0;
|
||||
update tb3 set f120='S', f136=111,
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.4-Single Select'
|
||||
where f122='Test 3.5.8.4-Single Delete';
|
||||
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
|
||||
@ -245,36 +254,36 @@ set @test_var='three', new.f120='4';
|
||||
END IF;
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END IF;
|
||||
END//
|
||||
set @test_var='Empty', @test_var2=0;
|
||||
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 one 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
D Test 3.5.8.5-if 00101 two 2nd else
|
||||
D Test 3.5.8.5-if 00102 two 2nd else
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
D Test 3.5.8.5-if 00101 three 2nd if
|
||||
D Test 3.5.8.5-if 00102 three 2nd if
|
||||
d Test 3.5.8.5-if 00010 three 2nd if
|
||||
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if';
|
||||
select f120, f122, f136, @test_var, @test_var2
|
||||
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
|
||||
f120 f122 f136 @test_var @test_var2
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00101 three 2nd else
|
||||
D Test 3.5.8.5-if 00102 three 2nd else
|
||||
d Test 3.5.8.5-if 00010 three 2nd else
|
||||
D Test 3.5.8.5-if 00103 three 2nd else
|
||||
create trigger trg3 before update on tb3 for each row
|
||||
BEGIN
|
||||
@ -289,7 +298,7 @@ create trigger trg4 before update on tb3 for each row
|
||||
BEGIN
|
||||
IF (new.f120='4') and (new.f136=10) then
|
||||
set @test_var2='2nd if', new.f120='d';
|
||||
ELSE
|
||||
ELSE
|
||||
set @test_var2='2nd else', new.f120='D';
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
|
||||
@ -331,60 +340,60 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
|
||||
END case;
|
||||
END//
|
||||
set @test_var='Empty';
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('a', 'Test 3.5.8.5-case', 5, 7);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 A*seven
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('b', 'Test 3.5.8.5-case', 71,16);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 B*0000000016
|
||||
B Test 3.5.8.5-case 00191 0000000016 B*0000000016
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('c', 'Test 3.5.8.5-case', 80,1);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
A Test 3.5.8.5-case 00125 0000000007 C=one
|
||||
B Test 3.5.8.5-case 00191 0000000016 C=one
|
||||
C Test 3.5.8.5-case 00200 0000000001 C=one
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
Insert into tb3 (f120, f122, f136)
|
||||
values ('d', 'Test 3.5.8.5-case', 152);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
A Test 3.5.8.5-case 00125 0000000007 1*0000099999
|
||||
B Test 3.5.8.5-case 00191 0000000016 1*0000099999
|
||||
C Test 3.5.8.5-case 00200 0000000001 1*0000099999
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('e', 'Test 3.5.8.5-case', 200, 8);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f120' at row 1
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
Insert into tb3 (f120, f122, f136, f144)
|
||||
values ('f', 'Test 3.5.8.5-case', 100, 8);
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case';
|
||||
select f120, f122, f136, f144, @test_var
|
||||
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
|
||||
f120 f122 f136 f144 @test_var
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
A Test 3.5.8.5-case 00125 0000000007 1=eight
|
||||
B Test 3.5.8.5-case 00191 0000000016 1=eight
|
||||
C Test 3.5.8.5-case 00200 0000000001 1=eight
|
||||
1 Test 3.5.8.5-case 00152 0000099999 1=eight
|
||||
1 Test 3.5.8.5-case 00200 0000000008 1=eight
|
||||
create trigger trg3a before update on tb3 for each row
|
||||
BEGIN
|
||||
CASE
|
||||
@ -398,40 +407,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
|
||||
Testcase 3.5.8.5-loop/leave:
|
||||
----------------------------
|
||||
Create trigger trg4 after insert on tb3 for each row
|
||||
BEGIN
|
||||
BEGIN
|
||||
set @counter=0, @flag='Initial';
|
||||
Label1: loop
|
||||
Label1: loop
|
||||
if new.f136<new.f144 then
|
||||
set @counter='Nothing to loop';
|
||||
leave Label1;
|
||||
leave Label1;
|
||||
else
|
||||
set @counter=@counter+1;
|
||||
if new.f136=new.f144+@counter then
|
||||
set @counter=concat(@counter, ' loops');
|
||||
leave Label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
end if;
|
||||
end if;
|
||||
iterate label1;
|
||||
set @flag='Final';
|
||||
END loop Label1;
|
||||
END loop Label1;
|
||||
END//
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 2, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
Nothing to loop Initial
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
Insert into tb3 (f122, f136, f144)
|
||||
values ('Test 3.5.8.5-loop', 11, 8);
|
||||
select @counter, @flag;
|
||||
@counter @flag
|
||||
3 loops Initial
|
||||
Create trigger trg4_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
Label1: loop
|
||||
BEGIN
|
||||
Label1: loop
|
||||
set @counter=@counter+1;
|
||||
END;
|
||||
END;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
||||
END' at line 5
|
||||
drop trigger trg4_2;
|
||||
drop trigger trg4;
|
||||
@ -441,23 +450,23 @@ Testcase 3.5.8.5-repeat:
|
||||
------------------------
|
||||
Create trigger trg6 after insert on tb3 for each row
|
||||
BEGIN
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
rp_label: REPEAT
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
UNTIL @counter1> new.f136 END REPEAT rp_label;
|
||||
END//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-repeat', 13);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
15 8
|
||||
Create trigger trg6_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
REPEAT
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
|
||||
drop trigger trg6;
|
||||
@ -466,33 +475,62 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
|
||||
Testcase 3.5.8.5-while:
|
||||
-----------------------
|
||||
Create trigger trg7 after insert on tb3 for each row
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
wl_label: WHILE @counter1 < new.f136 DO
|
||||
SET @counter1 = @counter1 + 1;
|
||||
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
|
||||
END IF;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
SET @counter2 = @counter2 + 1;
|
||||
END WHILE wl_label//
|
||||
set @counter1= 0, @counter2= 0;
|
||||
Insert into tb3 (f122, f136)
|
||||
Insert into tb3 (f122, f136)
|
||||
values ('Test 3.5.8.5-while', 7);
|
||||
select @counter1, @counter2;
|
||||
@counter1 @counter2
|
||||
7 4
|
||||
Create trigger trg7_2 after update on tb3 for each row
|
||||
BEGIN
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
WHILE @counter1 < new.f136
|
||||
SET @counter1 = @counter1 + 1;
|
||||
END//
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
|
||||
END' at line 4
|
||||
delete from tb3 where f122='Test 3.5.8.5-while';
|
||||
drop trigger trg7;
|
||||
|
||||
Testcase 3.5.8.6: (requirement void)
|
||||
------------------------------------
|
||||
CREATE PROCEDURE sp_01 () BEGIN set @v1=1; END//
|
||||
CREATE TRIGGER trg8_1 BEFORE UPDATE ON tb3 FOR EACH ROW
|
||||
BEGIN
|
||||
CALL sp_01 ();
|
||||
END//
|
||||
Insert into tb3 (f120, f122, f136) values ('6', 'Test 3.5.8.6-insert', 101);
|
||||
update tb3 set f120='S', f136=111,
|
||||
f122='Test 3.5.8.6-tr8_1'
|
||||
where f122='Test 3.5.8.6-insert';
|
||||
select f120, f122
|
||||
from tb3 where f122 like 'Test 3.5.8.6%' order by f120;
|
||||
f120 f122
|
||||
S Test 3.5.8.6-tr8_1
|
||||
DROP TRIGGER trg8_1;
|
||||
DROP PROCEDURE sp_01;
|
||||
|
||||
Testcase 3.5.8.7: (Disabled as a result of bug _____)
|
||||
-----------------------------------------------------
|
||||
Testcase 3.5.8.7
|
||||
----------------
|
||||
Create trigger trg9_1 before update on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set new.f120='U';
|
||||
Commit;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
Create trigger trg9_2 before delete on tb3 for each row
|
||||
BEGIN
|
||||
Start transaction;
|
||||
Set @var2=old.f120;
|
||||
Rollback;
|
||||
END//
|
||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||
drop user test_general@localhost;
|
||||
drop user test_general;
|
||||
drop user test_super@localhost;
|
||||
|
@ -1,74 +1,75 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.9.1/2:
|
||||
-------------------
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
Create trigger trg1 BEFORE UPDATE on tb3 for each row
|
||||
set new.f142 = 94087, @counter=@counter+1;
|
||||
TotalRows
|
||||
10
|
||||
@ -80,15 +81,15 @@ NewValuew
|
||||
0
|
||||
set @counter=0;
|
||||
Update tb3 Set f142='1' where f130<100;
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
select count(*) as ExpectedChanged, @counter as TrigCounter
|
||||
from tb3 where f142=94087;
|
||||
ExpectedChanged TrigCounter
|
||||
8 8
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
select count(*) as ExpectedNotChange from tb3
|
||||
where f130<100 and f142<>94087;
|
||||
ExpectedNotChange
|
||||
0
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
select count(*) as NonExpectedChanged from tb3
|
||||
where f130>=130 and f142=94087;
|
||||
NonExpectedChanged
|
||||
0
|
||||
@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
|
||||
0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
Insert into tb3 (f122, f136, f163)
|
||||
values ('Test 3.5.9.3', 7, 123.17);
|
||||
Update tb3 Set f136=8 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@ -135,13 +136,13 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
0 0 0 0 0
|
||||
delete from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3';
|
||||
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
|
||||
f118 f121 f122 f136 f163
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
|
||||
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
|
||||
@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
|
||||
0 0 0 0 0 0
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
0 0 0 0 0 0
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
Insert into tb3 (f122, f136, f151, f163)
|
||||
values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4%' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
|
||||
@ -194,15 +195,15 @@ Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
|
||||
where f122='Test 3.5.9.4';
|
||||
Warnings:
|
||||
Warning 1048 Column 'f136' cannot be null
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig';
|
||||
select f118, f121, f122, f136, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.9.4-trig' order by f163;
|
||||
f118 f121 f122 f136 f151 f163
|
||||
a NULL Test 3.5.9.4-trig 00000 999 NULL
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
|
||||
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
|
||||
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
|
||||
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
|
||||
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
|
||||
a NULL Test 3.5.9.4-trig 0 999 NULL
|
||||
@ -240,6 +241,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
create trigger trg5b after DELETE on tb3 for each row
|
||||
set new.f122='test';
|
||||
ERROR HY000: There is no NEW row in on DELETE trigger
|
||||
drop trigger trg5a;
|
||||
drop trigger trg5b;
|
||||
|
||||
Testcase 3.5.9.10: (implied in previous tests)
|
||||
|
@ -1,70 +1,71 @@
|
||||
USE test;
|
||||
drop table if exists tb3 ;
|
||||
create table tb3 (
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
f118 char not null DEFAULT 'a',
|
||||
f119 char binary not null DEFAULT b'101',
|
||||
f120 char ascii not null DEFAULT b'101',
|
||||
f121 tinytext,
|
||||
f122 text,
|
||||
f123 mediumtext,
|
||||
f124 longtext unicode,
|
||||
f125 tinyblob,
|
||||
f126 blob,
|
||||
f127 mediumblob,
|
||||
f128 longblob,
|
||||
f129 binary not null DEFAULT b'101',
|
||||
f130 tinyint not null DEFAULT 99,
|
||||
f131 tinyint unsigned not null DEFAULT 99,
|
||||
f132 tinyint zerofill not null DEFAULT 99,
|
||||
f133 tinyint unsigned zerofill not null DEFAULT 99,
|
||||
f134 smallint not null DEFAULT 999,
|
||||
f135 smallint unsigned not null DEFAULT 999,
|
||||
f136 smallint zerofill not null DEFAULT 999,
|
||||
f137 smallint unsigned zerofill not null DEFAULT 999,
|
||||
f138 mediumint not null DEFAULT 9999,
|
||||
f139 mediumint unsigned not null DEFAULT 9999,
|
||||
f140 mediumint zerofill not null DEFAULT 9999,
|
||||
f141 mediumint unsigned zerofill not null DEFAULT 9999,
|
||||
f142 int not null DEFAULT 99999,
|
||||
f143 int unsigned not null DEFAULT 99999,
|
||||
f144 int zerofill not null DEFAULT 99999,
|
||||
f145 int unsigned zerofill not null DEFAULT 99999,
|
||||
f146 bigint not null DEFAULT 999999,
|
||||
f147 bigint unsigned not null DEFAULT 999999,
|
||||
f148 bigint zerofill not null DEFAULT 999999,
|
||||
f149 bigint unsigned zerofill not null DEFAULT 999999,
|
||||
f150 decimal not null DEFAULT 999.999,
|
||||
f151 decimal unsigned not null DEFAULT 999.17,
|
||||
f152 decimal zerofill not null DEFAULT 999.999,
|
||||
f153 decimal unsigned zerofill,
|
||||
f154 decimal (0),
|
||||
f155 decimal (64),
|
||||
f156 decimal (0) unsigned,
|
||||
f157 decimal (64) unsigned,
|
||||
f158 decimal (0) zerofill,
|
||||
f159 decimal (64) zerofill,
|
||||
f160 decimal (0) unsigned zerofill,
|
||||
f161 decimal (64) unsigned zerofill,
|
||||
f162 decimal (0,0),
|
||||
f163 decimal (63,30),
|
||||
f164 decimal (0,0) unsigned,
|
||||
f165 decimal (63,30) unsigned,
|
||||
f166 decimal (0,0) zerofill,
|
||||
f167 decimal (63,30) zerofill,
|
||||
f168 decimal (0,0) unsigned zerofill,
|
||||
f169 decimal (63,30) unsigned zerofill,
|
||||
f170 numeric,
|
||||
f171 numeric unsigned,
|
||||
f172 numeric zerofill,
|
||||
f173 numeric unsigned zerofill,
|
||||
f174 numeric (0),
|
||||
f175 numeric (64)
|
||||
) Engine = myisam;
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'f150' at row 1
|
||||
Note 1265 Data truncated for column 'f151' at row 1
|
||||
Note 1265 Data truncated for column 'f152' at row 1
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
|
||||
Testcase 3.5.10.1/2/3:
|
||||
----------------------
|
||||
@ -86,7 +87,7 @@ Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 1);
|
||||
Insert into vw11 (f122, f151) values ('Test 3.5.10.1/2/3', 2);
|
||||
Insert into vw11 (f122, f151) values ('Not in View', 3);
|
||||
select f121, f122, f151, f163
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%';
|
||||
from tb3 where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
|
||||
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
|
||||
@ -100,7 +101,7 @@ f121 f122 f151 f163
|
||||
NULL Not in View 3 111.110000000000000000000000000000
|
||||
Update vw11 set f163=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
@ -114,7 +115,7 @@ before delete
|
||||
0
|
||||
delete from vw11 where f151=1;
|
||||
select f121, f122, f151, f163 from tb3
|
||||
where f122 like 'Test 3.5.10.1/2/3%';
|
||||
where f122 like 'Test 3.5.10.1/2/3%' order by f151;
|
||||
f121 f122 f151 f163
|
||||
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
|
||||
select f121, f122, f151, f163 from vw11;
|
||||
@ -141,11 +142,11 @@ set @counter= 0;
|
||||
select @counter as 'Rows Loaded Before';
|
||||
Rows Loaded Before
|
||||
0
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load;
|
||||
select @counter as 'Rows Loaded After';
|
||||
Rows Loaded After
|
||||
10
|
||||
Select * from tb_load limit 10;
|
||||
Select * from tb_load order by f1 limit 10;
|
||||
f1 f2 f3
|
||||
-5000 a` 1000
|
||||
-4999 aaa 999
|
||||
@ -240,7 +241,7 @@ insert into t3 (f1) values (new.f1+1000);
|
||||
create trigger tr2_4 after insert on t2_4 for each row
|
||||
insert into t3 (f1) values (new.f1+10000);
|
||||
insert into t1 values (1);
|
||||
select * from t3;
|
||||
select * from t3 order by f1;
|
||||
f1
|
||||
12
|
||||
102
|
||||
@ -275,17 +276,17 @@ create trigger tr4 after insert on t4
|
||||
for each row insert into t1 (f1) values (new.f4+1);
|
||||
insert into t1 values (1);
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
0
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
3
|
||||
select * from t4;
|
||||
select * from t4 order by f4;
|
||||
f4
|
||||
4
|
||||
drop trigger tr1;
|
||||
@ -297,8 +298,8 @@ drop table t2;
|
||||
drop table t3;
|
||||
drop table t4;
|
||||
|
||||
Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889)
|
||||
----------------------------------------------------------------------
|
||||
Testcase y.y.y.4: Recursive trigger/SP references
|
||||
-------------------------------------------------
|
||||
set @sql_mode='traditional';
|
||||
create table t1_sp (
|
||||
count integer,
|
||||
@ -386,14 +387,14 @@ start transaction;
|
||||
insert into t1 values (1);
|
||||
ERROR 22003: Out of range value adjusted for column 'f4' at row 1
|
||||
commit;
|
||||
select * from t1;
|
||||
select * from t1 order by f1;
|
||||
f1
|
||||
1
|
||||
1
|
||||
select * from t2;
|
||||
select * from t2 order by f2;
|
||||
f2
|
||||
2
|
||||
select * from t3;
|
||||
select * from t3 order by f3;
|
||||
f3
|
||||
3
|
||||
drop trigger tr1;
|
||||
|
@ -1,133 +1,135 @@
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
f61 numeric (0) zerofill,
|
||||
f62 numeric (64) zerofill,
|
||||
f63 numeric (0) unsigned zerofill,
|
||||
f64 numeric (64) unsigned zerofill,
|
||||
f65 numeric (0,0),
|
||||
f66 numeric (63,30),
|
||||
f67 numeric (0,0) unsigned,
|
||||
f68 numeric (63,30) unsigned,
|
||||
f69 numeric (0,0) zerofill,
|
||||
f70 numeric (63,30) zerofill,
|
||||
f71 numeric (0,0) unsigned zerofill,
|
||||
f72 numeric (63,30) unsigned zerofill,
|
||||
f73 real,
|
||||
f74 real unsigned,
|
||||
f75 real zerofill,
|
||||
f76 real unsigned zerofill,
|
||||
f77 double default 7.7,
|
||||
f78 double unsigned default 7.7,
|
||||
f79 double zerofill default 7.7,
|
||||
f80 double unsigned zerofill default 8.8,
|
||||
f81 float not null default 8.8,
|
||||
f82 float unsigned not null default 8.8,
|
||||
f83 float zerofill not null default 8.8,
|
||||
f84 float unsigned zerofill not null default 8.8,
|
||||
f85 float(0) not null default 8.8,
|
||||
f86 float(23) not null default 8.8,
|
||||
f87 float(0) unsigned not null default 8.8,
|
||||
f88 float(23) unsigned not null default 8.8,
|
||||
f89 float(0) zerofill not null default 8.8,
|
||||
f90 float(23) zerofill not null default 8.8,
|
||||
f91 float(0) unsigned zerofill not null default 8.8,
|
||||
f92 float(23) unsigned zerofill not null default 8.8,
|
||||
f93 float(24) not null default 8.8,
|
||||
f94 float(53) not null default 8.8,
|
||||
f95 float(24) unsigned not null default 8.8,
|
||||
f96 float(53) unsigned not null default 8.8,
|
||||
f97 float(24) zerofill not null default 8.8,
|
||||
f98 float(53) zerofill not null default 8.8,
|
||||
f99 float(24) unsigned zerofill not null default 8.8,
|
||||
f100 float(53) unsigned zerofill not null default 8.8,
|
||||
f101 date not null default '2000-01-01',
|
||||
f102 time not null default 20,
|
||||
f103 datetime not null default '2/2/2',
|
||||
f104 timestamp not null default 20001231235959,
|
||||
f105 year not null default 2000,
|
||||
f106 year(3) not null default 2000,
|
||||
f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set",
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
f110 VARBINARY(64) null,
|
||||
f111 VARBINARY(27) null ,
|
||||
f112 VARBINARY(64) null ,
|
||||
f113 VARBINARY(192) null ,
|
||||
f114 VARBINARY(192) ,
|
||||
f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
Attention: The nesting level @max_level in Testcase 3.3.1.A6
|
||||
|
Reference in New Issue
Block a user