Commit 8d7fcad1 authored by Matthias Leich mleich@mysql.com's avatar Matthias Leich mleich@mysql.com

Upmerge of fix for

Bug 36788 Multiple funcs_1 'trig' tests are failing on vanilla builds
parents c392457f 15440264
...@@ -149,7 +149,7 @@ test-bt: ...@@ -149,7 +149,7 @@ test-bt:
echo "no program found for 'ndbcluster' tests - skipped testing" ; \ echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --suite=funcs_1 @PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --reorder --suite=funcs_1
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 @PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2
-cd mysql-test ; MTR_BUILD_THREAD=auto \ -cd mysql-test ; MTR_BUILD_THREAD=auto \
...@@ -190,7 +190,7 @@ test-force-full-pl: test-force-full ...@@ -190,7 +190,7 @@ test-force-full-pl: test-force-full
test-ext-funcs: test-ext-funcs:
cd mysql-test ; \ cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=funcs_1 ; \ @PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \
@PERL@ ./mysql-test-run.pl --force --suite=funcs_2 @PERL@ ./mysql-test-run.pl --force --suite=funcs_2
test-ext-rpl: test-ext-rpl:
......
...@@ -173,7 +173,7 @@ WHERE attempt = 4 - 1 + 1; ...@@ -173,7 +173,7 @@ WHERE attempt = 4 - 1 + 1;
UPDATE t_history SET end_cached = 0 UPDATE t_history SET end_cached = 0
WHERE attempt = 4 - 1 + 1; WHERE attempt = 4 - 1 + 1;
# Test 1: Does the query with SLEEP need a reasonable time? # Test 1: Does the query with SLEEP need a reasonable time?
SELECT COUNT(*) > 4 - 1 INTO @aux1 FROM t_history SELECT COUNT(*) >= 4 - 1 INTO @aux1 FROM t_history
WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count
BETWEEN 0 AND @max_acceptable_delay; BETWEEN 0 AND @max_acceptable_delay;
SELECT @aux1 AS "Expect 1"; SELECT @aux1 AS "Expect 1";
...@@ -181,7 +181,7 @@ Expect 1 ...@@ -181,7 +181,7 @@ Expect 1
1 1
# Test 2: Does the query with SLEEP need a reasonable time even in case # Test 2: Does the query with SLEEP need a reasonable time even in case
# of the non first execution? # of the non first execution?
SELECT COUNT(*) > 4 - 1 - 1 INTO @aux2 FROM t_history SELECT COUNT(*) >= 4 - 1 - 1 INTO @aux2 FROM t_history
WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count WHERE TIMEDIFF(end_ts,start_ts) - @sleep_time_per_result_row * @row_count
BETWEEN 0 AND @max_acceptable_delay BETWEEN 0 AND @max_acceptable_delay
AND attempt > 1; AND attempt > 1;
......
##### suite/funcs_1/include/tb3.inc
#
# This auxiliary script is used in several Trigger tests.
#
# If the table need data than the file std_data_ln/funcs_1/memory_tb3.txt
# could be used.
#
--disable_warnings
drop table if exists tb3;
--enable_warnings
--replace_result $engine_type <engine_to_be_used>
eval 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)
) engine = $engine_type;
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
...@@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix ...@@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 't1'
create table t1 (f1 int, f2 char(25),f3 int) engine=innodb; create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
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'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
...@@ -238,7 +230,7 @@ ERROR HY000: Trigger in wrong schema ...@@ -238,7 +230,7 @@ ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
create database trig_db; create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = innodb; create table t1 (f1 integer) engine = <engine_to_be_used>;
use test; 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; for each row set @ret_trg6_2 = 5;
...@@ -266,8 +258,8 @@ Testcase 3.5.1.?: ...@@ -266,8 +258,8 @@ Testcase 3.5.1.?:
----------------- -----------------
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 char(50), f2 integer) engine = innodb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table t2 (f1 char(50), f2 integer) engine = innodb; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
...@@ -299,15 +291,15 @@ create database trig_db1; ...@@ -299,15 +291,15 @@ create database trig_db1;
create database trig_db2; create database trig_db2;
create database trig_db3; create database trig_db3;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = innodb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; for each row set new.f1 ='trig1', @test_var1='trig1';
use trig_db2; use trig_db2;
create table t2 (f1 char(50), f2 integer) engine = innodb; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; for each row set new.f1 ='trig2', @test_var2='trig2';
use trig_db3; use trig_db3;
create table t1 (f1 char(50), f2 integer) engine = innodb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
...@@ -345,8 +337,8 @@ drop database if exists trig_db2; ...@@ -345,8 +337,8 @@ drop database if exists trig_db2;
create database trig_db1; create database trig_db1;
create database trig_db2; create database trig_db2;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = innodb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb; create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; 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
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,20 +53,18 @@ f172 numeric zerofill, ...@@ -59,20 +53,18 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase 3.5.3: Testcase 3.5.3:
--------------- ---------------
drop database if exists priv_db; drop database if exists priv_db;
create database priv_db; create database priv_db;
use priv_db; use priv_db;
create table t1 (f1 char(20)) engine= innodb; create table t1 (f1 char(20)) engine= <engine_to_be_used>;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
...@@ -608,8 +600,8 @@ Testcase: 3.5.3.x: ...@@ -608,8 +600,8 @@ Testcase: 3.5.3.x:
use priv_db; use priv_db;
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 int) engine= innodb; create table t1 (f1 int) engine= <engine_to_be_used>;
create table t2 (f2 int) engine= innodb; create table t2 (f2 int) engine= <engine_to_be_used>;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
...@@ -698,4 +690,5 @@ drop database if exists priv_db; ...@@ -698,4 +690,5 @@ drop database if exists priv_db;
drop user test_yesprivs@localhost; drop user test_yesprivs@localhost;
drop user test_noprivs@localhost; drop user test_noprivs@localhost;
drop user test_noprivs; drop user test_noprivs;
DROP TABLE test.tb3; use test;
drop table tb3;
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -86,7 +78,7 @@ Testcase 3.5.4.1: ...@@ -86,7 +78,7 @@ Testcase 3.5.4.1:
----------------- -----------------
create database db_drop; create database db_drop;
Use db_drop; Use db_drop;
create table t1 (f1 char(30)) engine=innodb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop.t1 to test_general; grant INSERT, SELECT on db_drop.t1 to test_general;
Use db_drop; Use db_drop;
Create trigger trg1 BEFORE INSERT on t1 Create trigger trg1 BEFORE INSERT on t1
...@@ -114,7 +106,7 @@ Testcase 3.5.4.2: ...@@ -114,7 +106,7 @@ Testcase 3.5.4.2:
create database db_drop2; create database db_drop2;
Use db_drop2; Use db_drop2;
drop table if exists t1_432 ; drop table if exists t1_432 ;
create table t1_432 (f1 char (30)) engine=innodb; create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
Drop trigger tr_does_not_exit; Drop trigger tr_does_not_exit;
ERROR HY000: Trigger does not exist ERROR HY000: Trigger does not exist
drop table if exists t1_432 ; drop table if exists t1_432 ;
...@@ -126,8 +118,8 @@ create database db_drop3; ...@@ -126,8 +118,8 @@ create database db_drop3;
Use db_drop3; Use db_drop3;
drop table if exists t1_433 ; drop table if exists t1_433 ;
drop table if exists t1_433a ; drop table if exists t1_433a ;
create table t1_433 (f1 char (30)) engine=innodb; create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
create table t1_433a (f1a char (5)) engine=innodb; create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
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'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
...@@ -147,7 +139,7 @@ Testcase 3.5.4.4: ...@@ -147,7 +139,7 @@ Testcase 3.5.4.4:
----------------- -----------------
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=innodb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.4';
...@@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; ...@@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=innodb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; grant INSERT, SELECT on db_drop4.t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.4'); Insert into t1 values ('2nd Insert 3.5.4.4');
Select * from t1; Select * from t1;
...@@ -183,7 +175,7 @@ Testcase 3.5.4.5: ...@@ -183,7 +175,7 @@ Testcase 3.5.4.5:
----------------- -----------------
create database db_drop5; create database db_drop5;
Use db_drop5; Use db_drop5;
create table t1 (f1 char(50)) engine=innodb; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.5';
...@@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table ...@@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg5'; where information_schema.triggers.trigger_name='trg5';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create table t1 (f1 char(50)) engine=innodb; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; grant INSERT, SELECT on t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.5'); Insert into t1 values ('2nd Insert 3.5.4.5');
Select * from t1; Select * from t1;
...@@ -240,7 +232,7 @@ Testcase 3.5.5.4: ...@@ -240,7 +232,7 @@ Testcase 3.5.5.4:
create database dbtest_one; create database dbtest_one;
create database dbtest_two; create database dbtest_two;
use dbtest_two; use dbtest_two;
create table t2 (f1 char(15)) engine=innodb; create table t2 (f1 char(15)) engine = <engine_to_be_used>;
use dbtest_one; use dbtest_one;
create trigger trg4 before INSERT create trigger trg4 before INSERT
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -94,17 +86,17 @@ create table t1_i ( ...@@ -94,17 +86,17 @@ create table t1_i (
i120 char ascii not null DEFAULT b'101', i120 char ascii not null DEFAULT b'101',
i136 smallint zerofill not null DEFAULT 999, i136 smallint zerofill not null DEFAULT 999,
i144 int zerofill not null DEFAULT 99999, i144 int zerofill not null DEFAULT 99999,
i163 decimal (63,30)) engine=innodb; i163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_u ( create table t1_u (
u120 char ascii not null DEFAULT b'101', u120 char ascii not null DEFAULT b'101',
u136 smallint zerofill not null DEFAULT 999, u136 smallint zerofill not null DEFAULT 999,
u144 int zerofill not null DEFAULT 99999, u144 int zerofill not null DEFAULT 99999,
u163 decimal (63,30)) engine=innodb; u163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_d ( create table t1_d (
d120 char ascii not null DEFAULT b'101', d120 char ascii not null DEFAULT b'101',
d136 smallint zerofill not null DEFAULT 999, d136 smallint zerofill not null DEFAULT 999,
d144 int zerofill not null DEFAULT 99999, d144 int zerofill not null DEFAULT 99999,
d163 decimal (63,30)) engine=innodb; d163 decimal (63,30)) engine=<engine_to_be_used>;
Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('a',111,99999,999.99);
Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('b',222,99999,999.99);
Insert into t1_u values ('c',333,99999,999.99); Insert into t1_u values ('c',333,99999,999.99);
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,12 +53,12 @@ f172 numeric zerofill, ...@@ -59,12 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.9.1/2: Testcase 3.5.9.1/2:
...@@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1; ...@@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
Affected Affected
8 9
NotAffected NotAffected
2 1
NewValuew NewValuew
0 0
set @counter=0; set @counter=0;
...@@ -84,7 +78,7 @@ Update tb3 Set f142='1' where f130<100; ...@@ -84,7 +78,7 @@ 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; from tb3 where f142=94087;
ExpectedChanged TrigCounter ExpectedChanged TrigCounter
8 8 9 9
select count(*) as ExpectedNotChange from tb3 select count(*) as ExpectedNotChange from tb3
where f130<100 and f142<>94087; where f130<100 and f142<>94087;
ExpectedNotChange ExpectedNotChange
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,12 +53,12 @@ f172 numeric zerofill, ...@@ -59,12 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = innodb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
...@@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; ...@@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
Testcase 3.5.10.4: Testcase 3.5.10.4:
------------------ ------------------
create table tb_load (f1 int, f2 char(25),f3 int) engine=innodb; create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
Create trigger trg4 before insert on tb_load Create trigger trg4 before insert on tb_load
for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
set @counter= 0; set @counter= 0;
...@@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) ...@@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test)
Testcase 3.5.10.extra: Testcase 3.5.10.extra:
---------------------- ----------------------
create table t1_sp (var136 tinyint, var151 decimal) engine=innodb; create table t1_sp (var136 tinyint, var151 decimal) engine = <engine_to_be_used>;
create trigger trg before insert on t1_sp create trigger trg before insert on t1_sp
for each row set @counter=@counter+1; for each row set @counter=@counter+1;
create procedure trig_sp() create procedure trig_sp()
...@@ -218,12 +212,12 @@ drop table if exists t2_2; ...@@ -218,12 +212,12 @@ drop table if exists t2_2;
drop table if exists t2_3; drop table if exists t2_3;
drop table if exists t2_4; drop table if exists t2_4;
drop table if exists t3; drop table if exists t3;
create table t1 (f1 integer) engine=innodb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2_1 (f1 integer) engine=innodb; create table t2_1 (f1 integer) engine = <engine_to_be_used>;
create table t2_2 (f1 integer) engine=innodb; create table t2_2 (f1 integer) engine = <engine_to_be_used>;
create table t2_3 (f1 integer) engine=innodb; create table t2_3 (f1 integer) engine = <engine_to_be_used>;
create table t2_4 (f1 integer) engine=innodb; create table t2_4 (f1 integer) engine = <engine_to_be_used>;
create table t3 (f1 integer) engine=innodb; create table t3 (f1 integer) engine = <engine_to_be_used>;
insert into t1 values (1); insert into t1 values (1);
create trigger tr1 after insert on t1 for each row create trigger tr1 after insert on t1 for each row
BEGIN BEGIN
...@@ -261,10 +255,10 @@ drop table if exists t1; ...@@ -261,10 +255,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = innodb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = innodb; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = innodb; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 integer) engine = innodb; create table t4 (f4 integer) engine = <engine_to_be_used>;
insert into t1 values (0); insert into t1 values (0);
create trigger tr1 after insert on t1 create trigger tr1 after insert on t1
for each row insert into t2 (f2) values (new.f1+1); for each row insert into t2 (f2) values (new.f1+1);
...@@ -300,7 +294,7 @@ set @sql_mode='traditional'; ...@@ -300,7 +294,7 @@ set @sql_mode='traditional';
create table t1_sp ( create table t1_sp (
count integer, count integer,
var136 tinyint, var136 tinyint,
var151 decimal) engine=innodb; var151 decimal) engine = <engine_to_be_used>;
create procedure trig_sp() create procedure trig_sp()
begin begin
declare done int default 0; declare done int default 0;
...@@ -354,7 +348,7 @@ drop procedure trig_sp; ...@@ -354,7 +348,7 @@ drop procedure trig_sp;
drop trigger trg; drop trigger trg;
drop table t1_sp; drop table t1_sp;
Testcase y.y.y.5: Roleback of nested trigger references Testcase y.y.y.5: Rollback of nested trigger references
------------------------------------------------------- -------------------------------------------------------
set @@sql_mode='traditional'; set @@sql_mode='traditional';
use test; use test;
...@@ -362,10 +356,10 @@ drop table if exists t1; ...@@ -362,10 +356,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = innodb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = innodb; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = innodb; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 tinyint) engine = innodb; create table t4 (f4 tinyint) engine = <engine_to_be_used>;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -53,13 +53,11 @@ f172 numeric zerofill, ...@@ -53,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
...@@ -188,7 +186,7 @@ Testcase 3.5.1.7: - need to fix ...@@ -188,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 't1'
create table t1 (f1 int, f2 char(25),f3 int) engine=memory; create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
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'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
...@@ -232,7 +230,7 @@ ERROR HY000: Trigger in wrong schema ...@@ -232,7 +230,7 @@ ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
create database trig_db; create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = memory; create table t1 (f1 integer) engine = <engine_to_be_used>;
use test; 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; for each row set @ret_trg6_2 = 5;
...@@ -260,8 +258,8 @@ Testcase 3.5.1.?: ...@@ -260,8 +258,8 @@ Testcase 3.5.1.?:
----------------- -----------------
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 char(50), f2 integer) engine = memory; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table t2 (f1 char(50), f2 integer) engine = memory; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
...@@ -293,15 +291,15 @@ create database trig_db1; ...@@ -293,15 +291,15 @@ create database trig_db1;
create database trig_db2; create database trig_db2;
create database trig_db3; create database trig_db3;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = memory; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; for each row set new.f1 ='trig1', @test_var1='trig1';
use trig_db2; use trig_db2;
create table t2 (f1 char(50), f2 integer) engine = memory; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; for each row set new.f1 ='trig2', @test_var2='trig2';
use trig_db3; use trig_db3;
create table t1 (f1 char(50), f2 integer) engine = memory; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
...@@ -339,8 +337,8 @@ drop database if exists trig_db2; ...@@ -339,8 +337,8 @@ drop database if exists trig_db2;
create database trig_db1; create database trig_db1;
create database trig_db2; create database trig_db2;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = memory; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory; create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; 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
......
...@@ -53,20 +53,18 @@ f172 numeric zerofill, ...@@ -53,20 +53,18 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase 3.5.3: Testcase 3.5.3:
--------------- ---------------
drop database if exists priv_db; drop database if exists priv_db;
create database priv_db; create database priv_db;
use priv_db; use priv_db;
create table t1 (f1 char(20)) engine= memory; create table t1 (f1 char(20)) engine= <engine_to_be_used>;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
...@@ -602,8 +600,8 @@ Testcase: 3.5.3.x: ...@@ -602,8 +600,8 @@ Testcase: 3.5.3.x:
use priv_db; use priv_db;
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 int) engine= memory; create table t1 (f1 int) engine= <engine_to_be_used>;
create table t2 (f2 int) engine= memory; create table t2 (f2 int) engine= <engine_to_be_used>;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
...@@ -692,4 +690,5 @@ drop database if exists priv_db; ...@@ -692,4 +690,5 @@ drop database if exists priv_db;
drop user test_yesprivs@localhost; drop user test_yesprivs@localhost;
drop user test_noprivs@localhost; drop user test_noprivs@localhost;
drop user test_noprivs; drop user test_noprivs;
DROP TABLE test.tb3; use test;
drop table tb3;
...@@ -53,13 +53,11 @@ f172 numeric zerofill, ...@@ -53,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -80,7 +78,7 @@ Testcase 3.5.4.1: ...@@ -80,7 +78,7 @@ Testcase 3.5.4.1:
----------------- -----------------
create database db_drop; create database db_drop;
Use db_drop; Use db_drop;
create table t1 (f1 char(30)) engine=memory; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop.t1 to test_general; grant INSERT, SELECT on db_drop.t1 to test_general;
Use db_drop; Use db_drop;
Create trigger trg1 BEFORE INSERT on t1 Create trigger trg1 BEFORE INSERT on t1
...@@ -108,7 +106,7 @@ Testcase 3.5.4.2: ...@@ -108,7 +106,7 @@ Testcase 3.5.4.2:
create database db_drop2; create database db_drop2;
Use db_drop2; Use db_drop2;
drop table if exists t1_432 ; drop table if exists t1_432 ;
create table t1_432 (f1 char (30)) engine=memory; create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
Drop trigger tr_does_not_exit; Drop trigger tr_does_not_exit;
ERROR HY000: Trigger does not exist ERROR HY000: Trigger does not exist
drop table if exists t1_432 ; drop table if exists t1_432 ;
...@@ -120,8 +118,8 @@ create database db_drop3; ...@@ -120,8 +118,8 @@ create database db_drop3;
Use db_drop3; Use db_drop3;
drop table if exists t1_433 ; drop table if exists t1_433 ;
drop table if exists t1_433a ; drop table if exists t1_433a ;
create table t1_433 (f1 char (30)) engine=memory; create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
create table t1_433a (f1a char (5)) engine=memory; create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
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'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
...@@ -141,7 +139,7 @@ Testcase 3.5.4.4: ...@@ -141,7 +139,7 @@ Testcase 3.5.4.4:
----------------- -----------------
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=memory; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.4';
...@@ -162,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; ...@@ -162,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=memory; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; grant INSERT, SELECT on db_drop4.t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.4'); Insert into t1 values ('2nd Insert 3.5.4.4');
Select * from t1; Select * from t1;
...@@ -177,7 +175,7 @@ Testcase 3.5.4.5: ...@@ -177,7 +175,7 @@ Testcase 3.5.4.5:
----------------- -----------------
create database db_drop5; create database db_drop5;
Use db_drop5; Use db_drop5;
create table t1 (f1 char(50)) engine=memory; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.5';
...@@ -193,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table ...@@ -193,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg5'; where information_schema.triggers.trigger_name='trg5';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create table t1 (f1 char(50)) engine=memory; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; grant INSERT, SELECT on t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.5'); Insert into t1 values ('2nd Insert 3.5.4.5');
Select * from t1; Select * from t1;
...@@ -234,7 +232,7 @@ Testcase 3.5.5.4: ...@@ -234,7 +232,7 @@ Testcase 3.5.5.4:
create database dbtest_one; create database dbtest_one;
create database dbtest_two; create database dbtest_two;
use dbtest_two; use dbtest_two;
create table t2 (f1 char(15)) engine=memory; create table t2 (f1 char(15)) engine = <engine_to_be_used>;
use dbtest_one; use dbtest_one;
create trigger trg4 before INSERT create trigger trg4 before INSERT
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
......
...@@ -53,13 +53,11 @@ f172 numeric zerofill, ...@@ -53,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -88,17 +86,17 @@ create table t1_i ( ...@@ -88,17 +86,17 @@ create table t1_i (
i120 char ascii not null DEFAULT b'101', i120 char ascii not null DEFAULT b'101',
i136 smallint zerofill not null DEFAULT 999, i136 smallint zerofill not null DEFAULT 999,
i144 int zerofill not null DEFAULT 99999, i144 int zerofill not null DEFAULT 99999,
i163 decimal (63,30)) engine=memory; i163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_u ( create table t1_u (
u120 char ascii not null DEFAULT b'101', u120 char ascii not null DEFAULT b'101',
u136 smallint zerofill not null DEFAULT 999, u136 smallint zerofill not null DEFAULT 999,
u144 int zerofill not null DEFAULT 99999, u144 int zerofill not null DEFAULT 99999,
u163 decimal (63,30)) engine=memory; u163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_d ( create table t1_d (
d120 char ascii not null DEFAULT b'101', d120 char ascii not null DEFAULT b'101',
d136 smallint zerofill not null DEFAULT 999, d136 smallint zerofill not null DEFAULT 999,
d144 int zerofill not null DEFAULT 99999, d144 int zerofill not null DEFAULT 99999,
d163 decimal (63,30)) engine=memory; d163 decimal (63,30)) engine=<engine_to_be_used>;
Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('a',111,99999,999.99);
Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('b',222,99999,999.99);
Insert into t1_u values ('c',333,99999,999.99); Insert into t1_u values ('c',333,99999,999.99);
......
...@@ -53,7 +53,7 @@ f172 numeric zerofill, ...@@ -53,7 +53,7 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
......
...@@ -53,7 +53,7 @@ f172 numeric zerofill, ...@@ -53,7 +53,7 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = memory; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
...@@ -129,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; ...@@ -129,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
Testcase 3.5.10.4: Testcase 3.5.10.4:
------------------ ------------------
create table tb_load (f1 int, f2 char(25),f3 int) engine=memory; create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
Create trigger trg4 before insert on tb_load Create trigger trg4 before insert on tb_load
for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
set @counter= 0; set @counter= 0;
...@@ -163,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) ...@@ -163,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test)
Testcase 3.5.10.extra: Testcase 3.5.10.extra:
---------------------- ----------------------
create table t1_sp (var136 tinyint, var151 decimal) engine=memory; create table t1_sp (var136 tinyint, var151 decimal) engine = <engine_to_be_used>;
create trigger trg before insert on t1_sp create trigger trg before insert on t1_sp
for each row set @counter=@counter+1; for each row set @counter=@counter+1;
create procedure trig_sp() create procedure trig_sp()
...@@ -212,12 +212,12 @@ drop table if exists t2_2; ...@@ -212,12 +212,12 @@ drop table if exists t2_2;
drop table if exists t2_3; drop table if exists t2_3;
drop table if exists t2_4; drop table if exists t2_4;
drop table if exists t3; drop table if exists t3;
create table t1 (f1 integer) engine=memory; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2_1 (f1 integer) engine=memory; create table t2_1 (f1 integer) engine = <engine_to_be_used>;
create table t2_2 (f1 integer) engine=memory; create table t2_2 (f1 integer) engine = <engine_to_be_used>;
create table t2_3 (f1 integer) engine=memory; create table t2_3 (f1 integer) engine = <engine_to_be_used>;
create table t2_4 (f1 integer) engine=memory; create table t2_4 (f1 integer) engine = <engine_to_be_used>;
create table t3 (f1 integer) engine=memory; create table t3 (f1 integer) engine = <engine_to_be_used>;
insert into t1 values (1); insert into t1 values (1);
create trigger tr1 after insert on t1 for each row create trigger tr1 after insert on t1 for each row
BEGIN BEGIN
...@@ -255,10 +255,10 @@ drop table if exists t1; ...@@ -255,10 +255,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = memory; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = memory; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = memory; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 integer) engine = memory; create table t4 (f4 integer) engine = <engine_to_be_used>;
insert into t1 values (0); insert into t1 values (0);
create trigger tr1 after insert on t1 create trigger tr1 after insert on t1
for each row insert into t2 (f2) values (new.f1+1); for each row insert into t2 (f2) values (new.f1+1);
...@@ -298,7 +298,7 @@ set @sql_mode='traditional'; ...@@ -298,7 +298,7 @@ set @sql_mode='traditional';
create table t1_sp ( create table t1_sp (
count integer, count integer,
var136 tinyint, var136 tinyint,
var151 decimal) engine=memory; var151 decimal) engine = <engine_to_be_used>;
create procedure trig_sp() create procedure trig_sp()
begin begin
declare done int default 0; declare done int default 0;
...@@ -352,7 +352,7 @@ drop procedure trig_sp; ...@@ -352,7 +352,7 @@ drop procedure trig_sp;
drop trigger trg; drop trigger trg;
drop table t1_sp; drop table t1_sp;
Testcase y.y.y.5: Roleback of nested trigger references Testcase y.y.y.5: Rollback of nested trigger references
------------------------------------------------------- -------------------------------------------------------
set @@sql_mode='traditional'; set @@sql_mode='traditional';
use test; use test;
...@@ -360,10 +360,10 @@ drop table if exists t1; ...@@ -360,10 +360,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = memory; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = memory; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = memory; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 tinyint) engine = memory; create table t4 (f4 tinyint) engine = <engine_to_be_used>;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
...@@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix ...@@ -194,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 't1'
create table t1 (f1 int, f2 char(25),f3 int) engine=myisam; create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
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'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
...@@ -238,7 +230,7 @@ ERROR HY000: Trigger in wrong schema ...@@ -238,7 +230,7 @@ ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
create database trig_db; create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = myisam; create table t1 (f1 integer) engine = <engine_to_be_used>;
use test; 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; for each row set @ret_trg6_2 = 5;
...@@ -266,8 +258,8 @@ Testcase 3.5.1.?: ...@@ -266,8 +258,8 @@ Testcase 3.5.1.?:
----------------- -----------------
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 char(50), f2 integer) engine = myisam; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table t2 (f1 char(50), f2 integer) engine = myisam; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
...@@ -299,15 +291,15 @@ create database trig_db1; ...@@ -299,15 +291,15 @@ create database trig_db1;
create database trig_db2; create database trig_db2;
create database trig_db3; create database trig_db3;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = myisam; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; for each row set new.f1 ='trig1', @test_var1='trig1';
use trig_db2; use trig_db2;
create table t2 (f1 char(50), f2 integer) engine = myisam; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; for each row set new.f1 ='trig2', @test_var2='trig2';
use trig_db3; use trig_db3;
create table t1 (f1 char(50), f2 integer) engine = myisam; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
...@@ -345,8 +337,8 @@ drop database if exists trig_db2; ...@@ -345,8 +337,8 @@ drop database if exists trig_db2;
create database trig_db1; create database trig_db1;
create database trig_db2; create database trig_db2;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = myisam; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam; create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; 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
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,20 +53,18 @@ f172 numeric zerofill, ...@@ -59,20 +53,18 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase 3.5.3: Testcase 3.5.3:
--------------- ---------------
drop database if exists priv_db; drop database if exists priv_db;
create database priv_db; create database priv_db;
use priv_db; use priv_db;
create table t1 (f1 char(20)) engine= myisam; create table t1 (f1 char(20)) engine= <engine_to_be_used>;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
...@@ -608,8 +600,8 @@ Testcase: 3.5.3.x: ...@@ -608,8 +600,8 @@ Testcase: 3.5.3.x:
use priv_db; use priv_db;
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 int) engine= myisam; create table t1 (f1 int) engine= <engine_to_be_used>;
create table t2 (f2 int) engine= myisam; create table t2 (f2 int) engine= <engine_to_be_used>;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
...@@ -698,4 +690,5 @@ drop database if exists priv_db; ...@@ -698,4 +690,5 @@ drop database if exists priv_db;
drop user test_yesprivs@localhost; drop user test_yesprivs@localhost;
drop user test_noprivs@localhost; drop user test_noprivs@localhost;
drop user test_noprivs; drop user test_noprivs;
DROP TABLE test.tb3; use test;
drop table tb3;
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -86,7 +78,7 @@ Testcase 3.5.4.1: ...@@ -86,7 +78,7 @@ Testcase 3.5.4.1:
----------------- -----------------
create database db_drop; create database db_drop;
Use db_drop; Use db_drop;
create table t1 (f1 char(30)) engine=myisam; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop.t1 to test_general; grant INSERT, SELECT on db_drop.t1 to test_general;
Use db_drop; Use db_drop;
Create trigger trg1 BEFORE INSERT on t1 Create trigger trg1 BEFORE INSERT on t1
...@@ -114,7 +106,7 @@ Testcase 3.5.4.2: ...@@ -114,7 +106,7 @@ Testcase 3.5.4.2:
create database db_drop2; create database db_drop2;
Use db_drop2; Use db_drop2;
drop table if exists t1_432 ; drop table if exists t1_432 ;
create table t1_432 (f1 char (30)) engine=myisam; create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
Drop trigger tr_does_not_exit; Drop trigger tr_does_not_exit;
ERROR HY000: Trigger does not exist ERROR HY000: Trigger does not exist
drop table if exists t1_432 ; drop table if exists t1_432 ;
...@@ -126,8 +118,8 @@ create database db_drop3; ...@@ -126,8 +118,8 @@ create database db_drop3;
Use db_drop3; Use db_drop3;
drop table if exists t1_433 ; drop table if exists t1_433 ;
drop table if exists t1_433a ; drop table if exists t1_433a ;
create table t1_433 (f1 char (30)) engine=myisam; create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
create table t1_433a (f1a char (5)) engine=myisam; create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
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'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
...@@ -147,7 +139,7 @@ Testcase 3.5.4.4: ...@@ -147,7 +139,7 @@ Testcase 3.5.4.4:
----------------- -----------------
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=myisam; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.4';
...@@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; ...@@ -168,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=myisam; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; grant INSERT, SELECT on db_drop4.t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.4'); Insert into t1 values ('2nd Insert 3.5.4.4');
Select * from t1; Select * from t1;
...@@ -183,7 +175,7 @@ Testcase 3.5.4.5: ...@@ -183,7 +175,7 @@ Testcase 3.5.4.5:
----------------- -----------------
create database db_drop5; create database db_drop5;
Use db_drop5; Use db_drop5;
create table t1 (f1 char(50)) engine=myisam; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.5';
...@@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table ...@@ -199,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg5'; where information_schema.triggers.trigger_name='trg5';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create table t1 (f1 char(50)) engine=myisam; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; grant INSERT, SELECT on t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.5'); Insert into t1 values ('2nd Insert 3.5.4.5');
Select * from t1; Select * from t1;
...@@ -240,7 +232,7 @@ Testcase 3.5.5.4: ...@@ -240,7 +232,7 @@ Testcase 3.5.5.4:
create database dbtest_one; create database dbtest_one;
create database dbtest_two; create database dbtest_two;
use dbtest_two; use dbtest_two;
create table t2 (f1 char(15)) engine=myisam; create table t2 (f1 char(15)) engine = <engine_to_be_used>;
use dbtest_one; use dbtest_one;
create trigger trg4 before INSERT create trigger trg4 before INSERT
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,11 @@ f172 numeric zerofill, ...@@ -59,13 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -94,17 +86,17 @@ create table t1_i ( ...@@ -94,17 +86,17 @@ create table t1_i (
i120 char ascii not null DEFAULT b'101', i120 char ascii not null DEFAULT b'101',
i136 smallint zerofill not null DEFAULT 999, i136 smallint zerofill not null DEFAULT 999,
i144 int zerofill not null DEFAULT 99999, i144 int zerofill not null DEFAULT 99999,
i163 decimal (63,30)) engine=myisam; i163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_u ( create table t1_u (
u120 char ascii not null DEFAULT b'101', u120 char ascii not null DEFAULT b'101',
u136 smallint zerofill not null DEFAULT 999, u136 smallint zerofill not null DEFAULT 999,
u144 int zerofill not null DEFAULT 99999, u144 int zerofill not null DEFAULT 99999,
u163 decimal (63,30)) engine=myisam; u163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_d ( create table t1_d (
d120 char ascii not null DEFAULT b'101', d120 char ascii not null DEFAULT b'101',
d136 smallint zerofill not null DEFAULT 999, d136 smallint zerofill not null DEFAULT 999,
d144 int zerofill not null DEFAULT 99999, d144 int zerofill not null DEFAULT 99999,
d163 decimal (63,30)) engine=myisam; d163 decimal (63,30)) engine=<engine_to_be_used>;
Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('a',111,99999,999.99);
Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('b',222,99999,999.99);
Insert into t1_u values ('c',333,99999,999.99); Insert into t1_u values ('c',333,99999,999.99);
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,12 +53,12 @@ f172 numeric zerofill, ...@@ -59,12 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.9.1/2: Testcase 3.5.9.1/2:
...@@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1; ...@@ -74,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
Affected Affected
8 9
NotAffected NotAffected
2 1
NewValuew NewValuew
0 0
set @counter=0; set @counter=0;
...@@ -84,7 +78,7 @@ Update tb3 Set f142='1' where f130<100; ...@@ -84,7 +78,7 @@ 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; from tb3 where f142=94087;
ExpectedChanged TrigCounter ExpectedChanged TrigCounter
8 8 9 9
select count(*) as ExpectedNotChange from tb3 select count(*) as ExpectedNotChange from tb3
where f130<100 and f142<>94087; where f130<100 and f142<>94087;
ExpectedNotChange ExpectedNotChange
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,12 +53,12 @@ f172 numeric zerofill, ...@@ -59,12 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) Engine = myisam; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
...@@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; ...@@ -135,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
Testcase 3.5.10.4: Testcase 3.5.10.4:
------------------ ------------------
create table tb_load (f1 int, f2 char(25),f3 int) engine=myisam; create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
Create trigger trg4 before insert on tb_load Create trigger trg4 before insert on tb_load
for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
set @counter= 0; set @counter= 0;
...@@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) ...@@ -169,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test)
Testcase 3.5.10.extra: Testcase 3.5.10.extra:
---------------------- ----------------------
create table t1_sp (var136 tinyint, var151 decimal) engine=myisam; create table t1_sp (var136 tinyint, var151 decimal) engine = <engine_to_be_used>;
create trigger trg before insert on t1_sp create trigger trg before insert on t1_sp
for each row set @counter=@counter+1; for each row set @counter=@counter+1;
create procedure trig_sp() create procedure trig_sp()
...@@ -218,12 +212,12 @@ drop table if exists t2_2; ...@@ -218,12 +212,12 @@ drop table if exists t2_2;
drop table if exists t2_3; drop table if exists t2_3;
drop table if exists t2_4; drop table if exists t2_4;
drop table if exists t3; drop table if exists t3;
create table t1 (f1 integer) engine=myisam; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2_1 (f1 integer) engine=myisam; create table t2_1 (f1 integer) engine = <engine_to_be_used>;
create table t2_2 (f1 integer) engine=myisam; create table t2_2 (f1 integer) engine = <engine_to_be_used>;
create table t2_3 (f1 integer) engine=myisam; create table t2_3 (f1 integer) engine = <engine_to_be_used>;
create table t2_4 (f1 integer) engine=myisam; create table t2_4 (f1 integer) engine = <engine_to_be_used>;
create table t3 (f1 integer) engine=myisam; create table t3 (f1 integer) engine = <engine_to_be_used>;
insert into t1 values (1); insert into t1 values (1);
create trigger tr1 after insert on t1 for each row create trigger tr1 after insert on t1 for each row
BEGIN BEGIN
...@@ -261,10 +255,10 @@ drop table if exists t1; ...@@ -261,10 +255,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = myisam; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = myisam; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = myisam; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 integer) engine = myisam; create table t4 (f4 integer) engine = <engine_to_be_used>;
insert into t1 values (0); insert into t1 values (0);
create trigger tr1 after insert on t1 create trigger tr1 after insert on t1
for each row insert into t2 (f2) values (new.f1+1); for each row insert into t2 (f2) values (new.f1+1);
...@@ -304,7 +298,7 @@ set @sql_mode='traditional'; ...@@ -304,7 +298,7 @@ set @sql_mode='traditional';
create table t1_sp ( create table t1_sp (
count integer, count integer,
var136 tinyint, var136 tinyint,
var151 decimal) engine=myisam; var151 decimal) engine = <engine_to_be_used>;
create procedure trig_sp() create procedure trig_sp()
begin begin
declare done int default 0; declare done int default 0;
...@@ -358,7 +352,7 @@ drop procedure trig_sp; ...@@ -358,7 +352,7 @@ drop procedure trig_sp;
drop trigger trg; drop trigger trg;
drop table t1_sp; drop table t1_sp;
Testcase y.y.y.5: Roleback of nested trigger references Testcase y.y.y.5: Rollback of nested trigger references
------------------------------------------------------- -------------------------------------------------------
set @@sql_mode='traditional'; set @@sql_mode='traditional';
use test; use test;
...@@ -366,10 +360,10 @@ drop table if exists t1; ...@@ -366,10 +360,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = myisam; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = myisam; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = myisam; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 tinyint) engine = myisam; create table t4 (f4 tinyint) engine = <engine_to_be_used>;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,14 +53,11 @@ f172 numeric zerofill, ...@@ -59,14 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
...@@ -121,8 +112,8 @@ set @test_before = 0; ...@@ -121,8 +112,8 @@ set @test_before = 0;
set @test_after = 0; set @test_after = 0;
select f121, f122, f142, f144, f134 from tb3 where 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 f121 f122 f142 f144 f134
Test 3.5.1.1 Second Row 2 0000000006 2
Test 3.5.1.1 Before Update Trigger 27 0000000008 1 Test 3.5.1.1 Before Update Trigger 27 0000000008 1
Test 3.5.1.1 Second Row 2 0000000006 2
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
0 0 0 0
...@@ -195,7 +186,7 @@ Testcase 3.5.1.7: - need to fix ...@@ -195,7 +186,7 @@ Testcase 3.5.1.7: - need to fix
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 't1'
create table t1 (f1 int, f2 char(25),f3 int) engine=ndb; create table t1 (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
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'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
...@@ -239,7 +230,7 @@ ERROR HY000: Trigger in wrong schema ...@@ -239,7 +230,7 @@ ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
create database trig_db; create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = ndb; create table t1 (f1 integer) engine = <engine_to_be_used>;
use test; 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; for each row set @ret_trg6_2 = 5;
...@@ -267,8 +258,8 @@ Testcase 3.5.1.?: ...@@ -267,8 +258,8 @@ Testcase 3.5.1.?:
----------------- -----------------
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 char(50), f2 integer) engine = ndb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table t2 (f1 char(50), f2 integer) engine = ndb; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
...@@ -300,15 +291,15 @@ create database trig_db1; ...@@ -300,15 +291,15 @@ create database trig_db1;
create database trig_db2; create database trig_db2;
create database trig_db3; create database trig_db3;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = ndb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; for each row set new.f1 ='trig1', @test_var1='trig1';
use trig_db2; use trig_db2;
create table t2 (f1 char(50), f2 integer) engine = ndb; create table t2 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; for each row set new.f1 ='trig2', @test_var2='trig2';
use trig_db3; use trig_db3;
create table t1 (f1 char(50), f2 integer) engine = ndb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
...@@ -346,8 +337,8 @@ drop database if exists trig_db2; ...@@ -346,8 +337,8 @@ drop database if exists trig_db2;
create database trig_db1; create database trig_db1;
create database trig_db2; create database trig_db2;
use trig_db1; use trig_db1;
create table t1 (f1 char(50), f2 integer) engine = ndb; create table t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = ndb; create table trig_db2.t1 (f1 char(50), f2 integer) engine = <engine_to_be_used>;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; 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
......
This diff is collapsed.
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,21 +53,18 @@ f172 numeric zerofill, ...@@ -59,21 +53,18 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase 3.5.3: Testcase 3.5.3:
--------------- ---------------
drop database if exists priv_db; drop database if exists priv_db;
create database priv_db; create database priv_db;
use priv_db; use priv_db;
create table t1 (f1 char(20)) engine= ndb; create table t1 (f1 char(20)) engine= <engine_to_be_used>;
create User test_noprivs@localhost; create User test_noprivs@localhost;
set password for test_noprivs@localhost = password('PWD'); set password for test_noprivs@localhost = password('PWD');
create User test_yesprivs@localhost; create User test_yesprivs@localhost;
...@@ -609,8 +600,8 @@ Testcase: 3.5.3.x: ...@@ -609,8 +600,8 @@ Testcase: 3.5.3.x:
use priv_db; use priv_db;
drop table if exists t1; drop table if exists t1;
drop table if exists t2; drop table if exists t2;
create table t1 (f1 int) engine= ndb; create table t1 (f1 int) engine= <engine_to_be_used>;
create table t2 (f2 int) engine= ndb; create table t2 (f2 int) engine= <engine_to_be_used>;
revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
grant TRIGGER on *.* to test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost;
grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost;
...@@ -699,4 +690,5 @@ drop database if exists priv_db; ...@@ -699,4 +690,5 @@ drop database if exists priv_db;
drop user test_yesprivs@localhost; drop user test_yesprivs@localhost;
drop user test_noprivs@localhost; drop user test_noprivs@localhost;
drop user test_noprivs; drop user test_noprivs;
DROP TABLE test.tb3; use test;
drop table tb3;
This diff is collapsed.
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,14 +53,11 @@ f172 numeric zerofill, ...@@ -59,14 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -87,7 +78,7 @@ Testcase 3.5.4.1: ...@@ -87,7 +78,7 @@ Testcase 3.5.4.1:
----------------- -----------------
create database db_drop; create database db_drop;
Use db_drop; Use db_drop;
create table t1 (f1 char(30)) engine=ndb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop.t1 to test_general; grant INSERT, SELECT on db_drop.t1 to test_general;
Use db_drop; Use db_drop;
Create trigger trg1 BEFORE INSERT on t1 Create trigger trg1 BEFORE INSERT on t1
...@@ -115,7 +106,7 @@ Testcase 3.5.4.2: ...@@ -115,7 +106,7 @@ Testcase 3.5.4.2:
create database db_drop2; create database db_drop2;
Use db_drop2; Use db_drop2;
drop table if exists t1_432 ; drop table if exists t1_432 ;
create table t1_432 (f1 char (30)) engine=ndb; create table t1_432 (f1 char (30)) engine = <engine_to_be_used>;
Drop trigger tr_does_not_exit; Drop trigger tr_does_not_exit;
ERROR HY000: Trigger does not exist ERROR HY000: Trigger does not exist
drop table if exists t1_432 ; drop table if exists t1_432 ;
...@@ -127,8 +118,8 @@ create database db_drop3; ...@@ -127,8 +118,8 @@ create database db_drop3;
Use db_drop3; Use db_drop3;
drop table if exists t1_433 ; drop table if exists t1_433 ;
drop table if exists t1_433a ; drop table if exists t1_433a ;
create table t1_433 (f1 char (30)) engine=ndb; create table t1_433 (f1 char (30)) engine = <engine_to_be_used>;
create table t1_433a (f1a char (5)) engine=ndb; create table t1_433a (f1a char (5)) engine = <engine_to_be_used>;
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'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
...@@ -148,7 +139,7 @@ Testcase 3.5.4.4: ...@@ -148,7 +139,7 @@ Testcase 3.5.4.4:
----------------- -----------------
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=ndb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.4';
...@@ -169,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4'; ...@@ -169,7 +160,7 @@ where information_schema.triggers.trigger_name='trg4';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create database db_drop4; create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=ndb; create table t1 (f1 char(30)) engine = <engine_to_be_used>;
grant INSERT, SELECT on db_drop4.t1 to test_general; grant INSERT, SELECT on db_drop4.t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.4'); Insert into t1 values ('2nd Insert 3.5.4.4');
Select * from t1; Select * from t1;
...@@ -184,7 +175,7 @@ Testcase 3.5.4.5: ...@@ -184,7 +175,7 @@ Testcase 3.5.4.5:
----------------- -----------------
create database db_drop5; create database db_drop5;
Use db_drop5; Use db_drop5;
create table t1 (f1 char(50)) engine=ndb; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; 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'; for each row set new.f1='Trigger 3.5.4.5';
...@@ -200,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table ...@@ -200,7 +191,7 @@ select trigger_schema, trigger_name, event_object_table
from information_schema.triggers from information_schema.triggers
where information_schema.triggers.trigger_name='trg5'; where information_schema.triggers.trigger_name='trg5';
trigger_schema trigger_name event_object_table trigger_schema trigger_name event_object_table
create table t1 (f1 char(50)) engine=ndb; create table t1 (f1 char(50)) engine = <engine_to_be_used>;
grant INSERT, SELECT on t1 to test_general; grant INSERT, SELECT on t1 to test_general;
Insert into t1 values ('2nd Insert 3.5.4.5'); Insert into t1 values ('2nd Insert 3.5.4.5');
Select * from t1; Select * from t1;
...@@ -241,7 +232,7 @@ Testcase 3.5.5.4: ...@@ -241,7 +232,7 @@ Testcase 3.5.5.4:
create database dbtest_one; create database dbtest_one;
create database dbtest_two; create database dbtest_two;
use dbtest_two; use dbtest_two;
create table t2 (f1 char(15)) engine=ndb; create table t2 (f1 char(15)) engine = <engine_to_be_used>;
use dbtest_one; use dbtest_one;
create trigger trg4 before INSERT create trigger trg4 before INSERT
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4'; on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
......
This diff is collapsed.
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,14 +53,11 @@ f172 numeric zerofill, ...@@ -59,14 +53,11 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5: Testcase: 3.5:
-------------- --------------
...@@ -95,17 +86,17 @@ create table t1_i ( ...@@ -95,17 +86,17 @@ create table t1_i (
i120 char ascii not null DEFAULT b'101', i120 char ascii not null DEFAULT b'101',
i136 smallint zerofill not null DEFAULT 999, i136 smallint zerofill not null DEFAULT 999,
i144 int zerofill not null DEFAULT 99999, i144 int zerofill not null DEFAULT 99999,
i163 decimal (63,30)) engine=ndb; i163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_u ( create table t1_u (
u120 char ascii not null DEFAULT b'101', u120 char ascii not null DEFAULT b'101',
u136 smallint zerofill not null DEFAULT 999, u136 smallint zerofill not null DEFAULT 999,
u144 int zerofill not null DEFAULT 99999, u144 int zerofill not null DEFAULT 99999,
u163 decimal (63,30)) engine=ndb; u163 decimal (63,30)) engine=<engine_to_be_used>;
create table t1_d ( create table t1_d (
d120 char ascii not null DEFAULT b'101', d120 char ascii not null DEFAULT b'101',
d136 smallint zerofill not null DEFAULT 999, d136 smallint zerofill not null DEFAULT 999,
d144 int zerofill not null DEFAULT 99999, d144 int zerofill not null DEFAULT 99999,
d163 decimal (63,30)) engine=ndb; d163 decimal (63,30)) engine=<engine_to_be_used>;
Insert into t1_u values ('a',111,99999,999.99); Insert into t1_u values ('a',111,99999,999.99);
Insert into t1_u values ('b',222,99999,999.99); Insert into t1_u values ('b',222,99999,999.99);
Insert into t1_u values ('c',333,99999,999.99); Insert into t1_u values ('c',333,99999,999.99);
......
This diff is collapsed.
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,12 @@ f172 numeric zerofill, ...@@ -59,13 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.9.1/2: Testcase 3.5.9.1/2:
...@@ -75,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1; ...@@ -75,9 +68,9 @@ set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
Affected Affected
8 9
NotAffected NotAffected
2 1
NewValuew NewValuew
0 0
set @counter=0; set @counter=0;
...@@ -85,7 +78,7 @@ Update tb3 Set f142='1' where f130<100; ...@@ -85,7 +78,7 @@ 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; from tb3 where f142=94087;
ExpectedChanged TrigCounter ExpectedChanged TrigCounter
8 8 9 9
select count(*) as ExpectedNotChange from tb3 select count(*) as ExpectedNotChange from tb3
where f130<100 and f142<>94087; where f130<100 and f142<>94087;
ExpectedNotChange ExpectedNotChange
......
This diff is collapsed.
USE test; USE test;
drop table if exists tb3 ; drop table if exists tb3;
create table tb3 ( create table tb3 (
f118 char not null DEFAULT 'a', f118 char not null DEFAULT 'a',
f119 char binary not null DEFAULT b'101', f119 char binary not null DEFAULT b'101',
f120 char ascii not null DEFAULT b'101', f120 char ascii not null DEFAULT b'101',
f121 tinytext, f121 char(50),
f122 text, f122 char(50),
f123 mediumtext,
f124 longtext unicode,
f125 tinyblob,
f126 blob,
f127 mediumblob,
f128 longblob,
f129 binary not null DEFAULT b'101', f129 binary not null DEFAULT b'101',
f130 tinyint not null DEFAULT 99, f130 tinyint not null DEFAULT 99,
f131 tinyint unsigned not null DEFAULT 99, f131 tinyint unsigned not null DEFAULT 99,
...@@ -59,13 +53,12 @@ f172 numeric zerofill, ...@@ -59,13 +53,12 @@ f172 numeric zerofill,
f173 numeric unsigned zerofill, f173 numeric unsigned zerofill,
f174 numeric (0), f174 numeric (0),
f175 numeric (64) f175 numeric (64)
) engine = ndb; ) engine = <engine_to_be_used>;
Warnings: Warnings:
Note 1265 Data truncated for column 'f150' at row 1 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 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1 Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3; into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
...@@ -94,8 +87,8 @@ NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 ...@@ -94,8 +87,8 @@ NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000 NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
select f121, f122, f151, f163 from vw11; select f121, f122, f151, f163 from vw11;
f121 f122 f151 f163 f121 f122 f151 f163
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000 NULL Test 3.5.10.1/2/3 1 111.110000000000000000000000000000
NULL Test 3.5.10.1/2/3 2 111.110000000000000000000000000000
select f121, f122, f151, f163 select f121, f122, f151, f163
from tb3 where f122 like 'Not in View'; from tb3 where f122 like 'Not in View';
f121 f122 f151 f163 f121 f122 f151 f163
...@@ -108,8 +101,8 @@ Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 ...@@ -108,8 +101,8 @@ Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000 Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
select f121, f122, f151, f163 from vw11; select f121, f122, f151, f163 from vw11;
f121 f122 f151 f163 f121 f122 f151 f163
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000 Y Test 3.5.10.1/2/3-Update 1 1.000000000000000000000000000000
Y Test 3.5.10.1/2/3-Update 2 1.000000000000000000000000000000
set @test_var=0; set @test_var=0;
Select @test_var as 'before delete'; Select @test_var as 'before delete';
before delete before delete
...@@ -136,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%'; ...@@ -136,7 +129,7 @@ delete from tb3 where f122 like 'Test 3.5.10.1/2/3%';
Testcase 3.5.10.4: Testcase 3.5.10.4:
------------------ ------------------
create table tb_load (f1 int, f2 char(25),f3 int) engine=ndb; create table tb_load (f1 int, f2 char(25),f3 int) engine = <engine_to_be_used>;
Create trigger trg4 before insert on tb_load Create trigger trg4 before insert on tb_load
for each row set new.f3=-(new.f1 div 5), @counter= @counter+1; for each row set new.f3=-(new.f1 div 5), @counter= @counter+1;
set @counter= 0; set @counter= 0;
...@@ -170,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test) ...@@ -170,7 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test)
Testcase 3.5.10.extra: Testcase 3.5.10.extra:
---------------------- ----------------------
create table t1_sp (var136 tinyint, var151 decimal) engine=ndb; create table t1_sp (var136 tinyint, var151 decimal) engine = <engine_to_be_used>;
create trigger trg before insert on t1_sp create trigger trg before insert on t1_sp
for each row set @counter=@counter+1; for each row set @counter=@counter+1;
create procedure trig_sp() create procedure trig_sp()
...@@ -219,12 +212,12 @@ drop table if exists t2_2; ...@@ -219,12 +212,12 @@ drop table if exists t2_2;
drop table if exists t2_3; drop table if exists t2_3;
drop table if exists t2_4; drop table if exists t2_4;
drop table if exists t3; drop table if exists t3;
create table t1 (f1 integer) engine=ndb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2_1 (f1 integer) engine=ndb; create table t2_1 (f1 integer) engine = <engine_to_be_used>;
create table t2_2 (f1 integer) engine=ndb; create table t2_2 (f1 integer) engine = <engine_to_be_used>;
create table t2_3 (f1 integer) engine=ndb; create table t2_3 (f1 integer) engine = <engine_to_be_used>;
create table t2_4 (f1 integer) engine=ndb; create table t2_4 (f1 integer) engine = <engine_to_be_used>;
create table t3 (f1 integer) engine=ndb; create table t3 (f1 integer) engine = <engine_to_be_used>;
insert into t1 values (1); insert into t1 values (1);
create trigger tr1 after insert on t1 for each row create trigger tr1 after insert on t1 for each row
BEGIN BEGIN
...@@ -262,10 +255,10 @@ drop table if exists t1; ...@@ -262,10 +255,10 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = ndb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = ndb; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = ndb; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 integer) engine = ndb; create table t4 (f4 integer) engine = <engine_to_be_used>;
insert into t1 values (0); insert into t1 values (0);
create trigger tr1 after insert on t1 create trigger tr1 after insert on t1
for each row insert into t2 (f2) values (new.f1+1); for each row insert into t2 (f2) values (new.f1+1);
...@@ -301,7 +294,7 @@ set @sql_mode='traditional'; ...@@ -301,7 +294,7 @@ set @sql_mode='traditional';
create table t1_sp ( create table t1_sp (
count integer, count integer,
var136 tinyint, var136 tinyint,
var151 decimal) engine=ndb; var151 decimal) engine = <engine_to_be_used>;
create procedure trig_sp() create procedure trig_sp()
begin begin
declare done int default 0; declare done int default 0;
...@@ -355,7 +348,7 @@ drop procedure trig_sp; ...@@ -355,7 +348,7 @@ drop procedure trig_sp;
drop trigger trg; drop trigger trg;
drop table t1_sp; drop table t1_sp;
Testcase y.y.y.5: Roleback of nested trigger references Testcase y.y.y.5: Rollback of nested trigger references
------------------------------------------------------- -------------------------------------------------------
set @@sql_mode='traditional'; set @@sql_mode='traditional';
use test; use test;
...@@ -363,15 +356,15 @@ drop table if exists t1; ...@@ -363,15 +356,15 @@ drop table if exists t1;
drop table if exists t2; drop table if exists t2;
drop table if exists t3; drop table if exists t3;
drop table if exists t4; drop table if exists t4;
create table t1 (f1 integer) engine = ndb; create table t1 (f1 integer) engine = <engine_to_be_used>;
create table t2 (f2 integer) engine = ndb; create table t2 (f2 integer) engine = <engine_to_be_used>;
create table t3 (f3 integer) engine = ndb; create table t3 (f3 integer) engine = <engine_to_be_used>;
create table t4 (f4 tinyint) engine = ndb; create table t4 (f4 tinyint) engine = <engine_to_be_used>;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL `f1` int(11) default NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 ) ENGINE=<engine_to_be_used> DEFAULT CHARSET=latin1
insert into t1 values (1); insert into t1 values (1);
create trigger tr1 after insert on t1 create trigger tr1 after insert on t1
for each row insert into t2 (f2) values (new.f1+1); for each row insert into t2 (f2) values (new.f1+1);
...@@ -382,18 +375,15 @@ for each row insert into t4 (f4) values (new.f3+1000); ...@@ -382,18 +375,15 @@ for each row insert into t4 (f4) values (new.f3+1000);
set autocommit=0; set autocommit=0;
start transaction; start transaction;
insert into t1 values (1); insert into t1 values (1);
ERROR 22003: Out of range value for column 'f4' at row 1 ERROR 22003: Out of range value adjusted for column 'f4' at row 1
commit; commit;
select * from t1 order by f1; select * from t1 order by f1;
f1 f1
1 1
1
select * from t2 order by f2; select * from t2 order by f2;
f2 f2
2
select * from t3 order by f3; select * from t3 order by f3;
f3 f3
3
drop trigger tr1; drop trigger tr1;
drop trigger tr2; drop trigger tr2;
drop trigger tr3; drop trigger tr3;
......
This diff is collapsed.
...@@ -9,3 +9,5 @@ ...@@ -9,3 +9,5 @@
# Don't use any TAB characters for whitespace. # Don't use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
ndb_trig_1011ext: Bug#32656 NDB: Duplicate key error aborts transaction in handler. Doesn't talk back to SQL
\ No newline at end of file
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_0102.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_0102.inc --source suite/funcs_1/triggers/triggers_0102.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_03.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_03.inc --source suite/funcs_1/triggers/triggers_03.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_0407.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_0407.inc --source suite/funcs_1/triggers/triggers_0407.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_08.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_08.inc --source suite/funcs_1/triggers/triggers_08.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_09.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_09.inc --source suite/funcs_1/triggers/triggers_09.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/innodb_triggers.test #### suite/funcs_1/t/innodb_trig_1011ext.test
# InnoDB tables should be used # InnoDB tables should be used
# #
...@@ -7,10 +7,4 @@ ...@@ -7,10 +7,4 @@
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= innodb; let $engine_type= innodb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/innodb_tb3.inc
--source suite/funcs_1/triggers/triggers_1011ext.inc --source suite/funcs_1/triggers/triggers_1011ext.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_0102.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_0102.inc --source suite/funcs_1/triggers/triggers_0102.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_03.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_03.inc --source suite/funcs_1/triggers/triggers_03.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_0407.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_0407.inc --source suite/funcs_1/triggers/triggers_0407.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_08.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_08.inc --source suite/funcs_1/triggers/triggers_08.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_09.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_09.inc --source suite/funcs_1/triggers/triggers_09.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/memory_triggers.test #### suite/funcs_1/t/memory_trig_1011ext.test
# Memory tables should be used # Memory tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= memory; let $engine_type= memory;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/memory_tb3.inc
--source suite/funcs_1/triggers/triggers_1011ext.inc --source suite/funcs_1/triggers/triggers_1011ext.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_0102.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_0102.inc --source suite/funcs_1/triggers/triggers_0102.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_03.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_03.inc --source suite/funcs_1/triggers/triggers_03.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_0407.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_0407.inc --source suite/funcs_1/triggers/triggers_0407.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_08.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_08.inc --source suite/funcs_1/triggers/triggers_08.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_09.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_09.inc --source suite/funcs_1/triggers/triggers_09.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/myisam_triggers.test #### suite/funcs_1/t/myisam_trig_1011ext.test
# MyISAM tables should be used # MyISAM tables should be used
# #
# Set $engine_type # Set $engine_type
let $engine_type= myisam; let $engine_type= myisam;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/myisam_tb3.inc
--source suite/funcs_1/triggers/triggers_1011ext.inc --source suite/funcs_1/triggers/triggers_1011ext.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/ndb_triggers.test #### suite/funcs_1/t/ndb_trig_0102.test
# ndb tables should be used # NDB tables should be used
# #
# 1. Check if ndb is available # 1. Check if NDB is available
--source include/have_ndb.inc --source include/have_ndb.inc
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= ndb; let $engine_type= ndbcluster;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/triggers/triggers_0102.inc --source suite/funcs_1/triggers/triggers_0102.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/ndb_triggers.test
# ndb tables should be used
#
# 1. Check if ndb is available
--source include/have_ndb.inc
# 2. Set $engine_type
let $engine_type= ndb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/triggers/triggers_0102.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/ndb_triggers.test #### suite/funcs_1/t/ndb_trig_03.test
# NDB tables should be used # NDB tables should be used
# #
# 1. Check if NDB is available # 1. Check if NDB is available
--source include/have_ndb.inc --source include/have_ndb.inc
# 2. Set $engine_type # 2. Set $engine_type
let $engine_type= ndb; let $engine_type= ndbcluster;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/triggers/triggers_03.inc --source suite/funcs_1/triggers/triggers_03.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/ndb_triggers.test
# NDB tables should be used
#
# 1. Check if NDB is available
--source include/have_ndb.inc
# 2. Set $engine_type
let $engine_type= ndb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/triggers/triggers_03.inc
DROP TABLE test.tb3;
#### suite/funcs_1/t/ndb_triggers.test
# ndb tables should be used
#
# 1. Check if ndb is available
--source include/have_ndb.inc
# 2. Set $engine_type
let $engine_type= ndb;
# Create some objects needed in many testcases
USE test;
--source suite/funcs_1/include/ndb_tb3.inc
--source suite/funcs_1/triggers/triggers_0407.inc
DROP TABLE test.tb3;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment