Commit 93f2e395 authored by unknown's avatar unknown

Post merge fix for

   ChangeSet@1.2583, 2008-03-31
   Merge five.local.lan:/work/merge/mysql-5.0-Bug
   into  five.local.lan:/work/merge/mysql-5.1-Bug
   Addditional manual fixes will be needed.
   MERGE: 1.1810.3667.16

   Which contains
      ChangeSet@1.1810.3667.16, 2008-03-31
      Fix for Bug
        #35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
   ...


mysql-test/std_data/funcs_1/ndb_tb1.txt:
  Rename: mysql-test/suite/funcs_1/data/ndb_tb1.txt -> mysql-test/std_data/funcs_1/ndb_tb1.txt
mysql-test/std_data/funcs_1/ndb_tb2.txt:
  Rename: mysql-test/suite/funcs_1/data/ndb_tb2.txt -> mysql-test/std_data/funcs_1/ndb_tb2.txt
mysql-test/std_data/funcs_1/ndb_tb3.txt:
  Rename: mysql-test/suite/funcs_1/data/ndb_tb3.txt -> mysql-test/std_data/funcs_1/ndb_tb3.txt
mysql-test/std_data/funcs_1/ndb_tb4.txt:
  Rename: mysql-test/suite/funcs_1/data/ndb_tb4.txt -> mysql-test/std_data/funcs_1/ndb_tb4.txt
parent 2c4f9bd4
......@@ -46,6 +46,7 @@ dist-hook:
$(distdir)/std_data/ndb_backup51_data_le \
$(distdir)/std_data/parts \
$(distdir)/lib \
$(distdir)/funcs_1 \
$(distdir)/lib/My
-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.test $(distdir)/t
......@@ -75,6 +76,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(distdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(distdir)/std_data/ndb_backup51_data_le
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(distdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My
-rm -rf `find $(distdir)/suite -type d -name SCCS` $(distdir)/suite/row_lock
......@@ -93,6 +95,7 @@ install-data-local:
$(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le \
$(DESTDIR)$(testdir)/std_data/parts \
$(DESTDIR)$(testdir)/lib \
$(DESTDIR)$(testdir)/funcs_1 \
$(DESTDIR)$(testdir)/lib/My
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t
......@@ -127,6 +130,7 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_be/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_be
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51_data_le/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51_data_le
$(INSTALL_DATA) $(srcdir)/std_data/parts/part_* $(DESTDIR)$(testdir)/std_data/parts
$(INSTALL_DATA) $(srcdir)/std_data/funcs_1/* $(distdir)/std_data/funcs_1
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My
for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \
......
......@@ -64,6 +64,7 @@ f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb1.txt'
into table tb1 ;
......@@ -57,5 +57,7 @@ f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set"
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb2.txt'
into table tb2 ;
......@@ -64,5 +64,7 @@ f174 numeric (0),
f175 numeric (64)
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
......@@ -64,5 +64,7 @@ f240 varchar(2000) unicode,
f241 char(100) unicode
) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb4.txt' into table tb4 ;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb4.txt'
into table tb4 ;
No preview for this file type
......@@ -1202,16 +1202,16 @@ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by
open cur1;
open cur2;
BEGIN
declare continue handler for sqlstate '02000' set count=1;
declare continue handler for sqlstate '02000' set count = 1;
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4;
set count = 4;
BEGIN
while count> 0 do
while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1;
set count = count - 1;
END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4;
END;
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase 3.5.3:
---------------
......@@ -103,7 +104,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1;
......@@ -135,7 +136,7 @@ Testcase 3.5.3.6:
-----------------
use priv_db;
drop trigger trg1_2;
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1;
......
......@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered
Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase: 3.5:
--------------
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase 3.5.9.1/2:
-------------------
......@@ -241,6 +242,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
create trigger trg5b after DELETE on tb3 for each row
set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests)
......
......@@ -1202,16 +1202,16 @@ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by
open cur1;
open cur2;
BEGIN
declare continue handler for sqlstate '02000' set count=1;
declare continue handler for sqlstate '02000' set count = 1;
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4;
set count = 4;
BEGIN
while count> 0 do
while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1;
set count = count - 1;
END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4;
END;
......
......@@ -58,7 +58,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase 3.5.3:
---------------
......@@ -97,7 +98,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1;
......@@ -129,7 +130,7 @@ Testcase 3.5.3.6:
-----------------
use priv_db;
drop trigger trg1_2;
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1;
......
......@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered
Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row
......
......@@ -58,7 +58,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase: 3.5:
--------------
......
......@@ -58,7 +58,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase 3.5.9.1/2:
-------------------
......@@ -235,6 +236,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
create trigger trg5b after DELETE on tb3 for each row
set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests)
......
No preview for this file type
......@@ -1202,16 +1202,16 @@ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by
open cur1;
open cur2;
BEGIN
declare continue handler for sqlstate '02000' set count=1;
declare continue handler for sqlstate '02000' set count = 1;
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4;
set count = 4;
BEGIN
while count> 0 do
while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1;
set count = count - 1;
END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4;
END;
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase 3.5.3:
---------------
......@@ -103,7 +104,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1;
......@@ -135,7 +136,7 @@ Testcase 3.5.3.6:
-----------------
use priv_db;
drop trigger trg1_2;
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1;
......
......@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered
Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase: 3.5:
--------------
......
......@@ -64,7 +64,8 @@ Warnings:
Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase 3.5.9.1/2:
-------------------
......@@ -241,6 +242,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
create trigger trg5b after DELETE on tb3 for each row
set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests)
......
No preview for this file type
No preview for this file type
......@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.2 - Syntax checks for the stored procedure-specific
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE:
......@@ -698,7 +706,7 @@ Testcase 3.1.2.54:
------------------
Ensure that a handler with a condition defined with an SQLSTATE that begins with
01 is always exactly equivalent in action to a handler with an SQLWARNING
“01“ is always exactly equivalent in action to a handler with an SQLWARNING
condition.
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0;
......@@ -797,7 +805,7 @@ Testcase 3.1.2.56:
------------------
Ensure that a handler with a condition defined with an SQLSTATE that begins with
02 is always exactly equivalent in action to a handler with a NOT FOUND
“02“ is always exactly equivalent in action to a handler with a NOT FOUND
condition.
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0;
......@@ -905,7 +913,7 @@ Testcase 3.1.2.58:
------------------
Ensure that a handler with a condition defined with an SQLSTATE that begins with
anything other that 01 or 02 is always exactly equivalent in action to a
anything other that “01“ or “02“ is always exactly equivalent in action to a
handler with an SQLEXCEPTION condition.
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0;
......@@ -1194,16 +1202,16 @@ declare cur2 cursor for SELECT f1, f2, f4, f5 from t2 where f4 >= -5000 order by
open cur1;
open cur2;
BEGIN
declare continue handler for sqlstate '02000' set count=1;
declare continue handler for sqlstate '02000' set count = 1;
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4;
set count = 4;
BEGIN
while count> 0 do
while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1;
set count = count - 1;
END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4;
END;
......
......@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.3 - Syntax checks for the stored procedure-specific flow
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:
......
--source suite/funcs_1/storedproc/load_sp_tb.inc
--------------------------------------------------------------------------------
SET @@global.max_heap_table_size=4294967295;
SET @@session.max_heap_table_size=4294967295;
--source suite/funcs_1/storedproc/cleanup_sp_tb.inc
--------------------------------------------------------------------------------
......@@ -11,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -36,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -49,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.6 - Privilege Checks:
--------------------------------------------------------------------------------
......
......@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.7 - SQL mode checks:
--------------------------------------------------------------------------------
......
......@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.8 - SHOW statement checks:
--------------------------------------------------------------------------------
......
......@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1;
USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' into table t3;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t4;
USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -34,8 +39,9 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8;
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
......@@ -47,12 +53,14 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11;
create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t11;
Section 3.1.10 - CALL checks:
--------------------------------------------------------------------------------
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5.1.1:
------------------
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase 3.5.3:
---------------
......@@ -104,7 +105,7 @@ test_noprivs@localhost
use priv_db;
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1;
......@@ -136,7 +137,7 @@ Testcase 3.5.3.6:
-----------------
use priv_db;
drop trigger trg1_2;
Got one of the listed errors
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1;
......
......@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
Warnings:
Note 1449 There is no 'not_ex_user'@'localhost' registered
Note 1449 The user specified as a definer ('not_ex_user'@'localhost') does not exist
drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5:
--------------
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase: 3.5:
--------------
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase 3.5.9.1/2:
-------------------
......@@ -242,6 +243,7 @@ ERROR HY000: There is no NEW row in on DELETE trigger
create trigger trg5b after DELETE on tb3 for each row
set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests)
......
......@@ -65,7 +65,8 @@ Note 1265 Data truncated for column 'f150' at row 1
Note 1265 Data truncated for column 'f151' at row 1
Note 1265 Data truncated for column 'f152' at row 1
Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;
Testcase 3.5.10.1/2/3:
----------------------
......@@ -142,7 +143,7 @@ set @counter= 0;
select @counter as 'Rows Loaded Before';
Rows Loaded Before
0
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table tb_load;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table tb_load;
select @counter as 'Rows Loaded After';
Rows Loaded After
10
......
......@@ -53,7 +53,8 @@ f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set"
) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb2.txt'
into table tb2 ;
DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1;
USE test1;
......@@ -111,7 +112,8 @@ f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set"
) engine = ndb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/ndb_tb2.txt'
into table tb2 ;
USE test;
! Attention: The file with the expected results is not
......
......@@ -1503,16 +1503,16 @@ BEGIN
open cur1;
open cur2;
BEGIN
declare continue handler for sqlstate '02000' set count=1;
declare continue handler for sqlstate '02000' set count = 1;
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4;
set count = 4;
BEGIN
while count> 0 do
while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1;
set count = count - 1;
END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4;
END;
......
......@@ -6,10 +6,6 @@
############################################################################
--enable_query_log
# prepare a variable to be able to suppress machine dependant diffs
#let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`;
# can be used in: --replace_result $SERVER_NAME <SERVER_NAME>
# ==============================================================================
let $message= Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
......@@ -18116,53 +18112,56 @@ let $message= Testcase 4.3.1:;
--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
drop table IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
DROP TABLE IF EXISTS res_t3_itisalongname_1381742_itsaverylongname_1381742;
--enable_warnings
#FIXME: change back to $engine_type for INNODB and MYISAM, but MEMORY doesn't support this
eval CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
middleinitial CHAR,
lastname VARCHAR(50),
age_averylongfieldname_averylongname_1234569 int,
COMMENT TEXT) ENGINE=$engine_type;
--replace_result $engine_type <engine_to_be_tested>
eval
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
middleinitial CHAR, lastname VARCHAR(50),
age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
ENGINE=$engine_type;
INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
delimiter //;
CREATE PROCEDURE sp1(a int)
BEGIN
declare itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx char;
declare itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx varchar(100);
declare itisjustamediumsizeintintegervariablename integer;
set itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
set itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
set itisjustamediumsizeintintegervariablename = 5;
set @comment='a';
label1: loop
if a>100 then
set @comment='value of a is greater than 100';
elseif a<100 then
if a<50 then
set @comment='value of a is less than 50';
elseif a<25 then
set @comment='value of a is less than 25';
else
set @comment='value of a is greater than 50 and less than 100';
END if;
else
set @comment='value of a is 100';
END if;
VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
delimiter //;
CREATE PROCEDURE sp1(a INT)
BEGIN
DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
DECLARE itisjustamediumsizeintintegervariablename INTEGER;
SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
= 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
SET itisjustamediumsizeintintegervariablename = 5;
SET @comment='a';
label1: LOOP
IF a > 100 THEN
SET @comment = 'value of a is greater than 100';
ELSEIF a < 100 THEN
IF a < 50 THEN
SET @comment = 'value of a is less than 50';
ELSEIF a < 25 THEN
SET @comment = 'value of a is less than 25';
ELSE
SET @comment = 'value of a is greater than 50 and less than 100';
END IF;
ELSE
SET @comment = 'value of a is 100';
END IF;
if itisjustamediumsizeintintegervariablename = 0 then leave label1;
END if;
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742
values( itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
concat(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx, ' ', a),
a, @comment );
set itisjustamediumsizeintintegervariablename = itisjustamediumsizeintintegervariablename - 1;
iterate label1;
END loop label1;
IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
END IF;
INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
' ', a), a, @comment);
SET itisjustamediumsizeintintegervariablename
= itisjustamediumsizeintintegervariablename - 1;
ITERATE label1;
END LOOP label1;
END//
delimiter ;//
......
--secure-file-priv=$MYSQL_TEST_DIR
--secure-file-priv=$MYSQLTEST_VARDIR
......@@ -70,7 +70,7 @@ let $message= Testcase x.x.x.2:;
insert into t2 values (1,2,'Emp 1');
insert into t2 values (2,3,'Emp 2');
--error 1452
--error ER_NO_REFERENCED_ROW_2
insert into t2 values (3,4,'Emp 3');
create trigger tr_t2 before insert on t2 for each row
......
......@@ -217,7 +217,7 @@ let $message= Testcase 3.5.1.7: - need to fix;
# In 5.0 names to long (more than 64 chars) were trimed without an error
# In 5.1 an error is returned. So adding a call with the expected error
# and one with a shorter name to validate proper execution
--error 1059
--error ER_TOO_LONG_IDENT
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX
......@@ -234,7 +234,7 @@ let $message= Testcase 3.5.1.7: - need to fix;
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg5_1;
# In 5.1 the long name should generate an error that is to long
--error 1059
--error ER_TOO_LONG_IDENT
drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ;
drop trigger trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWX;
drop table t1;
......
......@@ -64,8 +64,7 @@ let $message= Testcase 3.5.3.2:;
select current_user;
use priv_db;
# error 1227 is better, as it says, that not the privilege
--error 1142,1227
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no';
......@@ -85,7 +84,7 @@ let $message= Testcase 3.5.3.2:;
select current_user;
use priv_db;
--error 1143
--error ER_COLUMNACCESS_DENIED_ERROR
insert into t1 (f1) values ('insert 3.5.3.2-yes');
select f1 from t1 order by f1;
......@@ -99,7 +98,7 @@ let $message= Testcase 3.5.3.6:;
connection no_privs;
use priv_db;
--error 1142,1227
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_2;
connection default;
......@@ -120,7 +119,7 @@ let $message= Testcase 3.5.3.6:;
# Cleanup
--disable_warnings
connection default;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg1_2;
disconnect no_privs;
disconnect yes_privs;
......@@ -131,8 +130,6 @@ let $message= Testcase 3.5.3.6:;
# Test case: Ensure that use of the construct "SET NEW. <column name> = <value>"
# fails at CREATE TRIGGER time, if the current user does not have the
# UPDATE privilege on the column specified
# Note: As a result of bug 8884 the triggers are actually created.
# Disabled because of bug 8884
# --- 3.5.3.7a - Privs set on a global level
let $message=Testcase 3.5.3.7a:;
......
......@@ -95,12 +95,12 @@ let $message= update only on column:;
use priv_db;
update t1 set f1 = 'update2_no'
where f1 like '%insert%';
--error 1143
--error ER_COLUMNACCESS_DENIED_ERROR
update t2 set f1 = 'update2_no'
where f1 like '%insert%';
update t1 set f1 = 'update3_no'
where f1 like '%insert%';
--error 1143
--error ER_COLUMNACCESS_DENIED_ERROR
update t2 set f1 = 'update3_no'
where f1 like '%insert%';
select f1 from t1 order by f1;
......@@ -148,12 +148,12 @@ let $message= check if access only on one of three columns;
update t1 set f1 = 'update6_no'
where f1 like '%insert%';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
update t2 set f1 = 'update6_no'
where f1 like '%insert%';
update t1 set f1 = 'update7_no'
where f1 like '%insert%';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
update t2 set f1 = 'update7_no'
where f1 like '%insert%';
select f1 from t1 order by f1;
......@@ -173,7 +173,7 @@ let $message= check if rejected without trigger privilege:;
connection no_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
update t1 set f1 = 'update8-no',
f2 = 'update8-no'
where f2 like '%yes';
......@@ -202,14 +202,14 @@ let $message= check trigger, but not update privilege on column:;
connection no_privs;
select current_user;
use priv_db;
--error 1143
--error ER_COLUMNACCESS_DENIED_ERROR
update t1 set f1 = 'update9-no',
f2 = 'update9-no'
where f2 like '%yes';
select * from t1 order by f1,f2,f3;
# trigger is involved (table privilege) ->fail
--error 1143
--error ER_COLUMNACCESS_DENIED_ERROR
update t1 set f3= f3+1;
select f3 from t1 order by f3;
......@@ -224,13 +224,13 @@ let $message= check trigger, but not update privilege on column:;
connection no_privs;
select current_user;
use priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
update t1 set f3= f3+1;
select f3 from t1 order by f3;
let $message= ##### trigger privilege on column level? #######;
--source include/show_msg.inc
--error 1064
--error ER_PARSE_ERROR
grant TRIGGER(f1) on priv_db.t1 to test_yesprivs@localhost;
# Cleanup table level
......
......@@ -42,7 +42,7 @@ let $message= Testcase for db level:;
let $message= no trigger privilege on db level for create:;
--source include/show_msg.inc
use priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
......@@ -101,7 +101,7 @@ let $message= no trigger privilege on db level for drop:;
connection yes_privs;
select current_user;
use priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_2;
connection no_privs;
......@@ -110,7 +110,7 @@ let $message= no trigger privilege on db level for drop:;
# no trigger privilege at activation time:
let $message= no trigger privilege at activation time:;
--source include/show_msg.inc
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
......@@ -132,7 +132,7 @@ let $message= trigger privilege on db level for drop:;
connection yes_privs;
select current_user;
show grants for test_yesprivs@localhost;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_2;
# succeed
......@@ -161,14 +161,14 @@ let $message= use db with trigger privilege on db level and without...:;
connection yes_privs;
select current_user;
use no_priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-no';
use priv_db;
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
use no_priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-no';
use priv_db;
......@@ -190,12 +190,12 @@ let $message= use db with trigger privilege on db level and without...:;
connection yes_privs;
select current_user;
use no_priv_db;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg1_3;
use priv_db;
drop trigger trg1_3;
use no_priv_db;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg1_4;
use priv_db;
drop trigger trg1_4;
......
......@@ -60,7 +60,7 @@ let $message= trigger privilege on one db1 db level, not on db2;
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
use priv2_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig1_1-yes';
......@@ -88,7 +88,7 @@ let $message= revoke trigger privilege on table level (not existing);
connection default;
select current_user;
use priv1_db;
--error 1147
--error ER_NONEXISTING_TABLE_GRANT
revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
......@@ -116,7 +116,7 @@ let $message= no trigger privilege on table level for create:;
connection yes_privs;
select current_user;
use priv1_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
......@@ -133,7 +133,7 @@ let $message= trigger privilege on table level for create:;
show triggers;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
......@@ -157,7 +157,7 @@ let $message= trigger privilege on table level for create:;
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-yes';
......
......@@ -49,13 +49,15 @@ let $message= ######### Testcase for definer: ########;
select current_user;
use priv_db;
# user hasn't trigger privilege->fail:
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
insert into t1 (f1) values ('insert-no');
select f1 from t1 order by f1;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_0;
connection default; select current_user; grant select, insert, update ,trigger
connection default;
select current_user;
grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost;
show grants for test_yesprivs@localhost;
......@@ -66,7 +68,7 @@ let $message= ######### Testcase for definer: ########;
select f1 from t1 order by f1;
drop trigger trg1_0;
# user has not super privilege->fail:
--error 1227
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes';
......@@ -92,7 +94,7 @@ let $message= ######### Testcase for definer: ########;
connection yes_privs;
select current_user;
show grants;
--error 1227
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
create definer=not_ex_user@localhost trigger trg1_3
after UPDATE on t1 for each row
set @var1 = 'trig 1_3-yes';
......
......@@ -89,7 +89,7 @@ let $message= trigger privilege on user level for create:;
use priv_db;
show triggers;
select * from information_schema.triggers;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_1;
connection default;
......@@ -106,7 +106,7 @@ let $message= no trigger privilege on db level for create:;
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
......@@ -131,12 +131,12 @@ let $message= trigger privilege on db level for create:;
use priv_db;
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-yes';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
for each row
set new.f1 = 'trig 1_9-yes';
use no_priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
......@@ -151,7 +151,7 @@ let $message= trigger privilege on db level for create:;
use no_priv_db;
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger priv_db.trg1_9;
connection default;
......@@ -159,7 +159,7 @@ let $message= trigger privilege on db level for create:;
drop trigger priv_db.trg1_9;
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
use priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
insert into t1 (f1) values ('insert-yes');
select f1 from t1 order by f1;
grant TRIGGER on *.* to test_yesprivs@localhost;
......@@ -168,7 +168,7 @@ let $message= trigger privilege on db level for create:;
connection yes_privs;
select current_user;
use no_priv_db;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_2 before INSERT on t1 for each row
set new.f1 = 'trig 1_2-no';
......
......@@ -71,7 +71,7 @@ let $message= #### Testcase for trigger privilege on execution time ########;
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
execute ins1;
select f1 from t1 order by f1;
prepare ins1 from 'insert into t1 (f1) values (''insert4-no'')';
......@@ -79,7 +79,7 @@ let $message= #### Testcase for trigger privilege on execution time ########;
connection use_privs;
select current_user;
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
execute ins1;
select f1 from t1 order by f1;
......@@ -107,13 +107,13 @@ let $message= #### Testcase for trigger privilege on execution time ########;
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
execute ins1;
select f1 from t1 order by f1;
connection use_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
execute ins1;
select f1 from t1 order by f1;
......
......@@ -57,7 +57,7 @@ let $message= no trigger privilege on table level for create:;
select current_user;
use priv_db;
show tables;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 1_1-no';
......@@ -109,7 +109,7 @@ let $message= no trigger privilege on table level for drop:;
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
drop trigger trg1_2;
# no trigger priv at activation time->insert fails
......@@ -118,7 +118,7 @@ let $message= no trigger privilege at activation time:;
--source include/show_msg.inc
connection no_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
insert into t1 (f1) values ('insert5-no');
select f1 from t1 order by f1;
......@@ -172,12 +172,12 @@ let $message= use table with trigger privilege and without...:;
--source include/show_msg.inc
connection yes_privs;
select current_user;
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg2_1 before INSERT on t2 for each row
set new.f1 = 'trig 2_1-no';
create trigger trg1_3 before INSERT on t1 for each row
set new.f1 = 'trig 1_3-yes';
--error 1142
--error ER_TABLEACCESS_DENIED_ERROR
create trigger trg2_2 before UPDATE on t2 for each row
set new.f1 = 'trig 2_2-no';
create trigger trg1_4 before UPDATE on t1 for each row
......@@ -193,10 +193,10 @@ let $message= use table with trigger privilege and without...:;
connection yes_privs;
select current_user;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg2_1;
drop trigger trg1_3;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg2_2;
drop trigger trg1_4;
......
......@@ -56,7 +56,7 @@ let $message= ######### Testcase for transactions: ########;
commit work;
drop trigger trg1_1;
rollback work;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg1_1;
drop trigger trg1_2;
commit work;
......
......@@ -64,7 +64,7 @@ let $message= Testcase 3.5.4.1:;
--disable_warnings
connection con1_super;
--disable_warnings
--error 0,1360
--error 0,ER_TRG_DOES_NOT_EXIST
drop trigger trg1;
drop database if exists db_drop;
revoke ALL PRIVILEGES, GRANT OPTION FROM 'test_general'@'localhost';
......@@ -83,7 +83,7 @@ let $message= Testcase 3.5.4.2:;
drop table if exists t1_432 ;
--enable_warnings
eval create table t1_432 (f1 char (30)) engine=$engine_type;
--error 1360
--error ER_TRG_DOES_NOT_EXIST
Drop trigger tr_does_not_exit;
#cleanup
--disable_warnings
......@@ -111,19 +111,19 @@ let $message= Testcase 3.5.4.3:;
set new.f1 = 'Trigger 3.5.4.3';
# Using table
--error 1064
--error ER_PARSE_ERROR
Drop trigger t1.433.trg3;
# Using database.table
--error 1064
--error ER_PARSE_ERROR
Drop trigger db_drop3.t1.433.trg3;
# wrong database
--error 1360
--error ER_TRG_DOES_NOT_EXIST
Drop trigger mysql.trg3;
# database does not exist
--error 1360
--error ER_TRG_DOES_NOT_EXIST
Drop trigger tbx.trg3;
#cleanup
......@@ -166,7 +166,7 @@ let $message= Testcase 3.5.4.4:;
#Cleanup
connection con1_super;
--disable_warnings
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg4;
drop database if exists db_drop4;
--enable_warnings
......@@ -204,7 +204,7 @@ let $message= Testcase 3.5.4.5:;
#Cleanup
connection con1_super;
--disable_warnings
--error 1360
--error ER_TRG_DOES_NOT_EXIST
drop trigger trg5;
drop database if exists db_drop5;
--enable_warnings
......@@ -228,7 +228,7 @@ let $message= Testcase 3.5.5:;
let $message= Testcase 3.5.5.1:;
--source include/show_msg.inc
--error 1146
--error ER_NO_SUCH_TABLE
Create trigger trg1 before INSERT on t100 for each row set new.f2=1000;
......@@ -240,7 +240,7 @@ let $message= Testcase 3.5.5.2:;
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
--error 1361
--error ER_TRG_ON_VIEW_OR_TEMP_TABLE
Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999;
......@@ -258,8 +258,8 @@ let $message= Testcase 3.5.5.3:;
Create view vw3 as select f118 from tb3;
# OBN Not sure why the server is returning error 1347
--error 1347
# OBN Not sure why the server is returning error ER_WRONG_OBJECT
--error ER_WRONG_OBJECT
Create trigger trg3 before INSERT
on vw3 for each row set new.f118='s';
......@@ -283,7 +283,7 @@ let $message= Testcase 3.5.5.4:;
use dbtest_two;
eval create table t2 (f1 char(15)) engine=$engine_type;
use dbtest_one;
--error 1435
--error ER_TRG_IN_WRONG_SCHEMA
create trigger trg4 before INSERT
on dbtest_two.t2 for each row set new.f1='trig 3.5.5.4';
grant INSERT, SELECT on dbtest_two.t2 to test_general;
......@@ -334,9 +334,9 @@ let $message= Testcase 3.5.6.2 (see Testcase 3.5.1.1);
let $message= Testcase 3.5.6.3:;
--source include/show_msg.inc
--error 1064
--error ER_PARSE_ERROR
Create trigger trg3_1 DURING UPDATE on tb3 for each row set new.f132=25;
--error 1064
--error ER_PARSE_ERROR
Create trigger trg3_2 TIME INSERT on tb3 for each row set new.f132=15;
#Cleanup
......@@ -344,9 +344,9 @@ let $message= Testcase 3.5.6.3:;
# since if they have been created, not dropping them will affect following
# tests.
--disable_warnings
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger tb3.trg3_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger tb3.trg3_2;
--enable_warnings
......@@ -390,9 +390,9 @@ let $message= Testcase 3.5.7.3 (see Testcase 3.5.1.1);
let $message= Testcase 3.5.7.4:;
--source include/show_msg.inc
--error 1064
--error ER_PARSE_ERROR
Create trigger trg4_1 BEFORE SELECT on tb3 for each row set new.f132=5;
--error 1064
--error ER_PARSE_ERROR
Create trigger trg4_2 AFTER VALUE on tb3 for each row set new.f132=1;
#Cleanup
......@@ -400,9 +400,9 @@ let $message= Testcase 3.5.7.4:;
# since if they have been created, not dropping them will affect following
# tests.
--disable_warnings
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger tb3.trg4_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger tb3.trg4_2;
--enable_warnings
......@@ -428,7 +428,7 @@ let $message= Testcase 3.5.7.5 / 3.5.7.6:;
#Cleanup
--disable_warnings
drop trigger trg5_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg5_2;
delete from tb3 where f121='Test 3.5.7.5/6';
--enable_warnings
......@@ -460,7 +460,7 @@ let $message= Testcase 3.5.7.7 / 3.5.7.8:;
#Cleanup
--disable_warnings
drop trigger trg6_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg6_2;
delete from tb3 where f121='Test 3.5.7.7/8';
--enable_warnings
......@@ -488,7 +488,7 @@ let $message= Testcase 3.5.7.9/10:;
#Cleanup
--disable_warnings
drop trigger trg7_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg7_2;
delete from tb3 where f121='Test 3.5.7.9/10';
......@@ -520,7 +520,7 @@ let $message= Testcase 3.5.7.11/12:;
#Cleanup
--disable_warnings
drop trigger trg8_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg8_2;
delete from tb3 where f121='Test 3.5.7.11/12';
......@@ -552,7 +552,7 @@ let $message= Testcase 3.5.7.13/14:;
#Cleanup
--disable_warnings
drop trigger trg9_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg9_2;
delete from tb3 where f121='Test 3.5.7.13/14';
......@@ -571,7 +571,7 @@ let $message= Testcase 3.5.7.15/16:;
Create trigger trg_3_406010_2 AFTER DELETE
on tb3 for each row set @test_var=@test_var+50;
--error 1359
--error ER_TRG_ALREADY_EXISTS
Create trigger trg_3_406010_1 AFTER INSERT
on tb3 for each row set @test_var=@test_var+1;
......@@ -588,7 +588,7 @@ let $message= Testcase 3.5.7.15/16:;
#Cleanup
--disable_warnings
drop trigger trg_3_406010_1;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg_3_406010_2;
delete from tb3 where f121='Test 3.5.7.15/16';
--enable_warnings
......
......@@ -248,16 +248,16 @@ let $message= Testcase 3.5.8.5 (IF):;
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
delimiter //;
--error 1064
--error ER_PARSE_ERROR
create trigger trg3 before update on tb3 for each row
BEGIN
ELSEIF new.f120='2' then
END IF;
END//
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg3//
--error 1064
--error ER_PARSE_ERROR
create trigger trg4 before update on tb3 for each row
BEGIN
IF (new.f120='4') and (new.f136=10) then
......@@ -266,7 +266,7 @@ let $message= Testcase 3.5.8.5 (IF):;
set @test_var2='2nd else', new.f120='D';
END//
delimiter ;//
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg4;
#Cleanup
......@@ -338,14 +338,14 @@ let $message= Testcase 3.5.8.5-case:;
values ('e', 'Test 3.5.8.5-case', 200, 8);
select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
--error 0, 1339
--error 0, ER_SP_CASE_NOT_FOUND
Insert into tb3 (f120, f122, f136, f144)
values ('f', 'Test 3.5.8.5-case', 100, 8);
select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
delimiter //;
--error 1064
--error ER_PARSE_ERROR
create trigger trg3a before update on tb3 for each row
BEGIN
CASE
......@@ -353,7 +353,7 @@ let $message= Testcase 3.5.8.5-case:;
END//
delimiter ;//
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg3a;
#Cleanup
......@@ -399,7 +399,7 @@ let $message= Testcase 3.5.8.5-loop/leave:;
delimiter //;
--error 1064
--error ER_PARSE_ERROR
Create trigger trg4_2 after update on tb3 for each row
BEGIN
Label1: loop
......@@ -407,7 +407,7 @@ let $message= Testcase 3.5.8.5-loop/leave:;
END;
END//
delimiter ;//
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg4_2;
#Cleanup
......@@ -442,7 +442,7 @@ let $message= Testcase 3.5.8.5-repeat:;
delimiter //;
--error 1064
--error ER_PARSE_ERROR
Create trigger trg6_2 after update on tb3 for each row
BEGIN
REPEAT
......@@ -479,7 +479,7 @@ let $message= Testcase 3.5.8.5-while:;
values ('Test 3.5.8.5-while', 7);
select @counter1, @counter2;
delimiter //;
--error 1064
--error ER_PARSE_ERROR
Create trigger trg7_2 after update on tb3 for each row
BEGIN
WHILE @counter1 < new.f136
......
......@@ -211,18 +211,18 @@ let $message= Testcase 3.5.9.5: (implied in previous tests);
let $message= Testcase 3.5.9.6:;
--source include/show_msg.inc
--error 1363
--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg4a before insert on tb3 for each row
set @temp1= old.f120;
--error 1362
--error ER_TRG_CANT_CHANGE_ROW
create trigger trg4b after insert on tb3 for each row
set old.f120= 'test';
#Cleanup
--disable_warnings
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg4a;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg4b;
--enable_warnings
......@@ -245,20 +245,18 @@ let $message= Testcase 3.5.9.8: (implied in previous tests);
let $message= Testcase 3.5.9.9:;
--source include/show_msg.inc
--error 1363
--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg5a before DELETE on tb3 for each row
set @temp1=new.f122;
--error 1363
--error ER_TRG_NO_SUCH_ROW_IN_TRG
create trigger trg5b after DELETE on tb3 for each row
set new.f122='test';
let $message= The above returns the wrong error, should be error 1362 (Bug 11648)
--source include/show_msg.inc
#Cleanup
--disable_warnings
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg5a;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg5b;
--enable_warnings
......@@ -292,23 +290,23 @@ let $message= Testcase 3.5.9.12: covered by 3.5.9.6;
let $message= Testcase 3.5.9.13:;
--source include/show_msg.inc
--error 1362
--error ER_TRG_CANT_CHANGE_ROW
create trigger trg6a before UPDATE on tb3 for each row
set old.f118='C', new.f118='U';
--error 1362
--error ER_TRG_CANT_CHANGE_ROW
create trigger trg6b after INSERT on tb3 for each row
set old.f136=163, new.f118='U';
--error 1362
--error ER_TRG_CANT_CHANGE_ROW
create trigger trg6c after UPDATE on tb3 for each row
set old.f136=NULL;
#Cleanup
--disable_warnings
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg6a;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg6b;
--error 0, 1360
--error 0, ER_TRG_DOES_NOT_EXIST
drop trigger trg6c;
--enable_warnings
......
......@@ -3,9 +3,9 @@
# Functions within VIEWs #
# #
###################################################
# 2006-12-08 ML Maintenance + refinements
# 2005-09-14 ML Create this test
# 2007-11-09 HHunger enabled all disabled parts belonging to fixed bugs.
# 2006-12-08 mleich Maintenance + refinements
# 2005-09-14 mleich Create this test
#
# 0. Some notes about this test:
# #################################################################
......@@ -595,6 +595,7 @@ let $col_type= my_time;
let $col_type= my_year;
--source suite/funcs_1/views/fv_cast.inc
# 1.1.6. CAST --> DECIMAL
--echo ##### 1.1.6. CAST --> DECIMAL
# Set the following to (37,2) since the default was changed to (10,0) - OBN
......@@ -1038,10 +1039,11 @@ $col_type, id FROM t1_values';
# If the file doesn't exist or cannot be read ... ,
# the function returns NULL.
# SELECT LOADFILE
# Prepare a file:
SELECT 'äÄ@' INTO OUTFILE '../tmp/func_view.dat';
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval SET @my_select =
'SELECT LOAD_FILE(''../tmp/func_view.dat''), id FROM t1_values';
'SELECT LOAD_FILE(''$MYSQLTEST_VARDIR/std_data_ln/funcs_1/load_file.txt'')
AS my_col,
id FROM t1_values';
--source suite/funcs_1/views/fv1.inc
......@@ -1262,6 +1264,7 @@ while ($select_id)
if ($view_select_result)
{
# Create the VIEW
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval CREATE VIEW v1 AS $my_select;
--disable_query_log
eval set @got_errno= $mysql_errno ;
......@@ -1285,6 +1288,7 @@ while ($select_id)
{
--disable_result_log
}
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval $my_select
WHERE select_id = $select_id OR select_id IS NULL order by id;
if ($run_no_result)
......@@ -1304,6 +1308,7 @@ while ($select_id)
if ($run0)
{
# Check the CREATE VIEW statement
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
SHOW CREATE VIEW v1;
if ($mysql_errno)
{
......@@ -1347,4 +1352,3 @@ while ($select_id)
--enable_ps_protocol
DROP TABLE t1_selects, t1_modes, t1_values;
--exec rm $MYSQLTEST_VARDIR/tmp/func_view.dat
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