1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge five.local.lan:/work/merge/mysql-5.1-Bug

into  five.local.lan:/work/trees/mysql-5.1-build-src-clean
This commit is contained in:
mleich@five.local.lan
2008-04-01 23:19:37 +02:00
161 changed files with 7804 additions and 9965 deletions

View File

@@ -46,6 +46,7 @@ dist-hook:
$(distdir)/std_data/ndb_backup51_data_le \ $(distdir)/std_data/ndb_backup51_data_le \
$(distdir)/std_data/parts \ $(distdir)/std_data/parts \
$(distdir)/lib \ $(distdir)/lib \
$(distdir)/funcs_1 \
$(distdir)/lib/My $(distdir)/lib/My
-$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t -$(INSTALL_DATA) $(srcdir)/t/*.def $(distdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.test $(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_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/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/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/*.pl $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My $(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(distdir)/lib/My
-rm -rf `find $(distdir)/suite -type d -name SCCS` $(distdir)/suite/row_lock -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/ndb_backup51_data_le \
$(DESTDIR)$(testdir)/std_data/parts \ $(DESTDIR)$(testdir)/std_data/parts \
$(DESTDIR)$(testdir)/lib \ $(DESTDIR)$(testdir)/lib \
$(DESTDIR)$(testdir)/funcs_1 \
$(DESTDIR)$(testdir)/lib/My $(DESTDIR)$(testdir)/lib/My
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir) $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
-$(INSTALL_DATA) $(srcdir)/t/*.def $(DESTDIR)$(testdir)/t -$(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_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/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/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/*.pl $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My $(INSTALL_DATA) $(srcdir)/lib/My/*.pm $(DESTDIR)$(testdir)/lib/My
for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \ for f in `(cd $(srcdir); find suite -type f | egrep -v 'SCCS|row_lock')`; \

View File

@@ -0,0 +1 @@
Here is content from load_file

View File

@@ -25,7 +25,7 @@
SESSION_STATUS SESSION_STATUS
SESSION_VARIABLES SESSION_VARIABLES
3. Some hints: 3. Some hints for maintainers of this suite:
- SHOW TABLES ... LIKE '<pattern>' - SHOW TABLES ... LIKE '<pattern>'
does a case sensitive comparison between the tablename and does a case sensitive comparison between the tablename and
the pattern. the pattern.
@@ -43,4 +43,12 @@
ERROR 42000: Access denied for user ... to database 'information_schema' ERROR 42000: Access denied for user ... to database 'information_schema'
DROP DATABASE INFORMATION_SCHEMA; DROP DATABASE INFORMATION_SCHEMA;
ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA' ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA'
- Try to unify results by
--replace_result $engine_type <engine_to_be_tested>
if we could expect that the results for storage engine variants of a
test differ only in the engine names.
This makes future maintenance easier.
- Avoid the use of include/show_msg*.inc.
They produce "SQL" noise which annoys during server debugging and can be
easy replaced by "--echo ...".

View File

@@ -2,7 +2,7 @@
# #
# columns in INFORMATION_SCHEMA with VARCHAR(4096) on Linux and Intel or AMD # columns in INFORMATION_SCHEMA with VARCHAR(4096) on Linux and Intel or AMD
# processor are shown as VARCHAR(512) on Windows, VARCHAR(1023) on AIX and HPUX, # processor are shown as VARCHAR(512) on Windows, VARCHAR(1023) on AIX and HPUX,
# VARCHAR(1024) on Solaris10, ... see below and in bug #12777 for details. # VARCHAR(1024) on Solaris10, ... see below and in bug #12777 for details.
# So we need to replace the output for these systems. There may be other still # So we need to replace the output for these systems. There may be other still
# not tested / detected systems. # not tested / detected systems.
@@ -10,10 +10,10 @@
# Setting the variables used below has been moved to the beginning of the datadict # Setting the variables used below has been moved to the beginning of the datadict
# tests to "suite/funcs_1/datadict/datadict_load.inc". # tests to "suite/funcs_1/datadict/datadict_load.inc".
# #
# SELECT character_maximum_length INTO @CML # SELECT character_maximum_length INTO @CML
# FROM information_schema.columns # FROM information_schema.columns
# WHERE table_schema = 'information_schema' # WHERE table_schema = 'information_schema'
# AND table_name = 'columns' # AND table_name = 'columns'
# AND column_name = 'table_catalog'; # AND column_name = 'table_catalog';
# this enables the --replace_result only if needed, using this we never replace # this enables the --replace_result only if needed, using this we never replace
@@ -31,7 +31,7 @@ if ($bug_12777_0512)
--replace_result 512 4096 1536 12288 --replace_result 512 4096 1536 12288
} }
# aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit, # aix52, aix52-64bit, hp3750, hp3750-64bit, hpux11, hpux11-64bit,
if ($bug_12777_1023) if ($bug_12777_1023)
{ {
# nnnn 3*n # nnnn 3*n

View File

@@ -12,14 +12,14 @@
--disable_query_log --disable_query_log
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Get the size of ONE known colum and check the size against some values to # Get the size of ONE known colum and check the size against some values to
# be able to use the correct --replace_result statement. Using this only the # be able to use the correct --replace_result statement. Using this only the
# one pair of 'wrong' values is replaced and not all occurrencies of all # one pair of 'wrong' values is replaced and not all occurrencies of all
# possible pairs of values. See bug #12777 for details. # possible pairs of values. See bug #12777 for details.
SELECT character_maximum_length INTO @CML SELECT character_maximum_length INTO @CML
FROM information_schema.columns FROM information_schema.columns
WHERE table_schema = 'information_schema' WHERE table_schema = 'information_schema'
AND table_name = 'columns' AND table_name = 'columns'
AND column_name = 'table_catalog'; AND column_name = 'table_catalog';
let $bug_12777_0512= `SELECT @CML = 512`; let $bug_12777_0512= `SELECT @CML = 512`;
@@ -53,7 +53,7 @@ let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host NOT In ("loca
# load tables # load tables
# ----------- # -----------
# #
# this was part of the 4 files $<engine>_datadict.test, but it has been moved # this was part of the 4 files $<engine>_datadict.test, but it has been moved
# here to have only one place where all preparation for the test is done. # here to have only one place where all preparation for the test is done.
# #
################################################################################ ################################################################################

View File

@@ -123,7 +123,7 @@ let $wait_timeout= 4;
let $wait_condition= SELECT id,user,host,db,command,@time2:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST let $wait_condition= SELECT id,user,host,db,command,@time2:=time,state,info FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE TIME > @time; WHERE TIME > @time;
--source include/wait_condition.inc --source include/wait_condition.inc
# #
# Expect to hit TIME > @time # Expect to hit TIME > @time
SELECT @time < @time2; SELECT @time < @time2;
# #

View File

@@ -4,66 +4,67 @@
drop table if exists tb1 ; drop table if exists tb1 ;
--enable_warnings --enable_warnings
create table tb1 ( create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal, f33 decimal,
f34 decimal unsigned, f34 decimal unsigned,
f35 decimal zerofill, f35 decimal zerofill,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = innodb; ) engine = innodb;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb1.txt'
into table tb1;

View File

@@ -4,58 +4,60 @@
drop table if exists tb2 ; drop table if exists tb2 ;
--enable_warnings --enable_warnings
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;

View File

@@ -4,65 +4,67 @@
drop table if exists tb3 ; drop table if exists tb3 ;
--enable_warnings --enable_warnings
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;

View File

@@ -4,56 +4,56 @@
drop table if exists tb4; drop table if exists tb4;
--enable_warnings --enable_warnings
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0) unicode,
f236 char(90), f236 char(90),
@@ -64,5 +64,7 @@ f240 varchar(2000) unicode,
f241 char(100) unicode f241 char(100) unicode
) engine = innodb; ) engine = innodb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/innodb_tb4.txt'
into table tb4;

View File

@@ -4,57 +4,59 @@
drop table if exists tb1 ; drop table if exists tb1 ;
--enable_warnings --enable_warnings
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = memory; ) engine = memory;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb1.txt'
into table tb1;

View File

@@ -4,58 +4,60 @@
drop table if exists tb2 ; drop table if exists tb2 ;
--enable_warnings --enable_warnings
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;

View File

@@ -4,60 +4,61 @@
drop table if exists tb3; drop table if exists tb3;
--enable_warnings --enable_warnings
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;

View File

@@ -4,56 +4,56 @@
drop table if exists tb4 ; drop table if exists tb4 ;
--enable_warnings --enable_warnings
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f236 char(95) unicode, f236 char(95) unicode,
f241 char(255) unicode, f241 char(255) unicode,
@@ -63,5 +63,7 @@ f239 varbinary(0),
f240 varchar(1200) unicode f240 varchar(1200) unicode
) engine = memory; ) engine = memory;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/memory_tb4.txt'
into table tb4;

View File

@@ -4,65 +4,67 @@
drop table if exists tb1 ; drop table if exists tb1 ;
--enable_warnings --enable_warnings
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = myisam; ) engine = myisam;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb1.txt'
into table tb1;

View File

@@ -4,77 +4,79 @@
drop table if exists tb2 ; drop table if exists tb2 ;
--enable_warnings --enable_warnings
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
# The original columns. They are replaced by varbinary, because the funcs_1 tests should # The original columns. They are replaced by varbinary, because the funcs_1 tests should
# not depend on the optional availability of the geometry feature. # not depend on the optional availability of the geometry feature.
# f110 geometry null, # f110 geometry null,
# f111 point null , # f111 point null ,
# f112 linestring null , # f112 linestring null ,
# f113 polygon null , # f113 polygon null ,
# f114 geometrycollection , # f114 geometrycollection ,
# f115 multipoint null , # f115 multipoint null ,
# f116 multilinestring null, # f116 multilinestring null,
# f117 multipolygon null # f117 multipolygon null
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;

View File

@@ -4,65 +4,67 @@
drop table if exists tb3 ; drop table if exists tb3 ;
--enable_warnings --enable_warnings
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;

View File

@@ -4,64 +4,64 @@
drop table if exists tb4 ; drop table if exists tb4 ;
--enable_warnings --enable_warnings
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f227 VARBINARY(64), f227 VARBINARY(64),
f228 VARBINARY(27), f228 VARBINARY(27),
f229 VARBINARY(64), f229 VARBINARY(64),
f230 VARBINARY(192), f230 VARBINARY(192),
f231 VARBINARY(192), f231 VARBINARY(192),
f232 VARBINARY(27), f232 VARBINARY(27),
f233 VARBINARY(64), f233 VARBINARY(64),
f234 VARBINARY(192), f234 VARBINARY(192),
f235 char(255) unicode, f235 char(255) unicode,
f236 char(60) ascii, f236 char(60) ascii,
@@ -75,14 +75,16 @@ f242 bit(30)
# The original columns. They are replaced by varbinary, because the funcs_1 tests should # The original columns. They are replaced by varbinary, because the funcs_1 tests should
# not depend on the optional availability of the geometry feature. # not depend on the optional availability of the geometry feature.
# f227 geometry, # f227 geometry,
# f228 point, # f228 point,
# f229 linestring, # f229 linestring,
# f230 polygon, # f230 polygon,
# f231 geometrycollection, # f231 geometrycollection,
# f232 multipoint, # f232 multipoint,
# f233 multilinestring, # f233 multilinestring,
# f234 multipolygon, # f234 multipolygon,
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/myisam_tb4.txt'
into table tb4;

View File

@@ -4,66 +4,67 @@
drop table if exists tb1 ; drop table if exists tb1 ;
--enable_warnings --enable_warnings
create table tb1 ( create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal, f33 decimal,
f34 decimal unsigned, f34 decimal unsigned,
f35 decimal zerofill, f35 decimal zerofill,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = ndb; ) engine = ndb;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ; load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb1.txt'
into table tb1 ;

View File

@@ -4,58 +4,60 @@
drop table if exists tb2 ; drop table if exists tb2 ;
--enable_warnings --enable_warnings
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = ndb; ) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb2.txt' into table tb2 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb2.txt'
into table tb2 ;

View File

@@ -4,65 +4,67 @@
drop table if exists tb3 ; drop table if exists tb3 ;
--enable_warnings --enable_warnings
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb3.txt' into table tb3 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb3.txt'
into table tb3;

View File

@@ -4,56 +4,56 @@
drop table if exists tb4; drop table if exists tb4;
--enable_warnings --enable_warnings
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0) unicode,
f236 char(90), f236 char(90),
@@ -64,5 +64,7 @@ f240 varchar(2000) unicode,
f241 char(100) unicode f241 char(100) unicode
) engine = ndb; ) engine = ndb;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval load data infile '$MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb4.txt' into table tb4 ; eval
load data infile '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/ndb_tb4.txt'
into table tb4 ;

View File

@@ -5,29 +5,46 @@ USE test;
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
--enable_warnings --enable_warnings
eval CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; eval
eval CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
eval CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; ENGINE = $engine_type;
eval CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; eval
eval CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ENGINE = $engine_type;
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; eval
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; ENGINE = $engine_type;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ENGINE = $engine_type;
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; eval
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = $engine_type;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
--disable_warnings --disable_warnings
drop TABLE if exists t3; drop TABLE if exists t3;
--enable_warnings --enable_warnings
eval CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type; eval
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type;
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
#--------------------------- #---------------------------
@@ -37,9 +54,12 @@ drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
eval CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = $engine_type; eval
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = $engine_type;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
#--------------------------- #---------------------------
use test; use test;
@@ -47,18 +67,23 @@ use test;
--disable_warnings --disable_warnings
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
--enable_warnings --enable_warnings
eval CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = $engine_type; eval
eval CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = $engine_type; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = $engine_type;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = $engine_type;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
--disable_warnings --disable_warnings
drop TABLE if exists t9; drop TABLE if exists t9;
--enable_warnings --enable_warnings
eval CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = $engine_type; eval CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = $engine_type;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval LOAD DATA INFILE '$MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;

View File

@@ -35,10 +35,10 @@ my_bigint = -9223372036854775808,
my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = -1.7976931348623E+308; my_double = -1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '<--------30 characters------->', my_char_30 = '<--------30 characters------->',
my_varchar_1000 = CONCAT('<---------1000 characters', my_varchar_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_binary_30 = '<--------30 characters------->', my_binary_30 = '<--------30 characters------->',
my_varbinary_1000 = CONCAT('<---------1000 characters', my_varbinary_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_datetime = '9999-12-31 23:59:59', my_datetime = '9999-12-31 23:59:59',
@@ -50,23 +50,23 @@ my_bigint = 9223372036854775807,
my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = 1.7976931348623E+308; my_double = 1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = ' ---äÖüß@µ*$-- ', my_char_30 = ' ---äÖüß@µ*$-- ',
my_varchar_1000 = ' ---äÖüß@µ*$-- ', my_varchar_1000 = ' ---äÖüß@µ*$-- ',
my_binary_30 = ' ---äÖüß@µ*$-- ', my_binary_30 = ' ---äÖüß@µ*$-- ',
my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
my_datetime = '2004-02-29 23:59:59', my_datetime = '2004-02-29 23:59:59',
my_date = '2004-02-29', my_date = '2004-02-29',
my_timestamp = '2004-02-29 23:59:59', my_timestamp = '2004-02-29 23:59:59',
my_time = '13:00:00', my_time = '13:00:00',
my_year = 2000, my_year = 2000,
my_bigint = 0, my_bigint = 0,
my_decimal = 0.0, my_decimal = 0.0,
my_double = 0; my_double = 0;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '-1', my_char_30 = '-1',
my_varchar_1000 = '-1', my_varchar_1000 = '-1',
my_binary_30 = '-1', my_binary_30 = '-1',
my_varbinary_1000 = '-1', my_varbinary_1000 = '-1',
my_datetime = '2005-06-28 10:00:00', my_datetime = '2005-06-28 10:00:00',
my_date = '2005-06-28', my_date = '2005-06-28',
my_timestamp = '2005-06-28 10:00:00', my_timestamp = '2005-06-28 10:00:00',
@@ -152,21 +152,21 @@ my_double = -0.33333333E+4;
some statements disabled because of some statements disabled because of
Bug#5913 Traditional mode: BIGINT range not correctly delimited Bug#5913 Traditional mode: BIGINT range not correctly delimited
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_char_30), SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
@@ -180,15 +180,15 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LCASE(my_varchar_1000), SET @my_select = 'SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
@@ -202,9 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varbinary_1000), SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SELECT 'äÄ@' INTO OUTFILE '../tmp/func_view.dat'; SET @my_select =
SET @my_select = 'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'')
'SELECT LOAD_FILE(''../tmp/func_view.dat''), id FROM t1_values'; AS my_col,
id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_char_30), SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
@@ -810,36 +811,40 @@ WHERE select_id = 157 OR select_id IS NULL) order by id;
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values AS my_col,
id FROM t1_values;
SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
AS my_col,
id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL order by id; WHERE select_id = 156 OR select_id IS NULL order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1 SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL) order by id; WHERE select_id = 156 OR select_id IS NULL) order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
DROP VIEW v1; DROP VIEW v1;
@@ -1013,10 +1018,10 @@ SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
WHERE select_id = 147 OR select_id IS NULL order by id; WHERE select_id = 147 OR select_id IS NULL order by id;
LEFT(my_binary_30, 2) my_binary_30 id LEFT(my_binary_30, 2) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<- <--------30 characters-------> 3 <- <--------30 characters-------> 3
- ---äÖüß@µ*$-- 4 - ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1141,10 +1146,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 141 OR select_id IS NULL order by id; WHERE select_id = 141 OR select_id IS NULL order by id;
BIT_LENGTH(my_binary_30) my_binary_30 id BIT_LENGTH(my_binary_30) my_binary_30 id
NULL NULL 1 NULL NULL 1
240 2 240 2
240 <--------30 characters-------> 3 240 <--------30 characters-------> 3
240 ---äÖüß@µ*$-- 4 240 ---äÖüß@µ*$-- 4
240 -1 5 240 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1453,10 +1458,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL order by id; WHERE select_id = 129 OR select_id IS NULL order by id;
IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
IS_NULL NULL 1 IS_NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1793,10 +1798,10 @@ WHERE select_id = 117 OR select_id IS NULL order by id;
IF(my_binary_30 IS NULL, 'IS NULL', IF(my_binary_30 IS NULL, 'IS NULL',
'IS NOT NULL') my_binary_30 id 'IS NOT NULL') my_binary_30 id
IS NULL NULL 1 IS NULL NULL 1
IS NOT NULL 2 IS NOT NULL 2
IS NOT NULL <--------30 characters-------> 3 IS NOT NULL <--------30 characters-------> 3
IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5 IS NOT NULL -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
@@ -2113,10 +2118,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL order by id; WHERE select_id = 105 OR select_id IS NULL order by id;
IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
IS NOT TRUE NULL 1 IS NOT TRUE NULL 1
IS NOT TRUE 2 IS NOT TRUE 2
IS NOT TRUE <--------30 characters-------> 3 IS NOT TRUE <--------30 characters-------> 3
IS NOT TRUE ---äÖüß@µ*$-- 4 IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5 IS TRUE -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
@@ -2200,9 +2205,9 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING koi8r), SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 102 OR select_id IS NULL order by id; WHERE select_id = 102 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
@@ -2226,17 +2231,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING koi8r), SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 101 OR select_id IS NULL order by id; WHERE select_id = 101 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING koi8r) my_binary_30 id CONVERT(my_binary_30 USING koi8r) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---???????<3F>@??*$-- ---äÖüß@µ*$-- 4 ---???????<3F>@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2252,9 +2257,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING koi8r), SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 100 OR select_id IS NULL order by id; WHERE select_id = 100 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
@@ -2278,9 +2283,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING koi8r), SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 99 OR select_id IS NULL order by id; WHERE select_id = 99 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING koi8r) my_char_30 id CONVERT(my_char_30 USING koi8r) my_char_30 id
@@ -2304,9 +2309,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING utf8), SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 98 OR select_id IS NULL order by id; WHERE select_id = 98 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
@@ -2330,17 +2335,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING utf8), SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 97 OR select_id IS NULL order by id; WHERE select_id = 97 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING utf8) my_binary_30 id CONVERT(my_binary_30 USING utf8) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4 ---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2356,9 +2361,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING utf8), SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 96 OR select_id IS NULL order by id; WHERE select_id = 96 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
@@ -2382,9 +2387,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING utf8), SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 95 OR select_id IS NULL order by id; WHERE select_id = 95 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING utf8) my_char_30 id CONVERT(my_char_30 USING utf8) my_char_30 id
@@ -2673,10 +2678,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 85 OR select_id IS NULL order by id; WHERE select_id = 85 OR select_id IS NULL order by id;
CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
18446744073709551615 -1 5 18446744073709551615 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3037,10 +3042,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 73 OR select_id IS NULL order by id; WHERE select_id = 73 OR select_id IS NULL order by id;
CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3397,11 +3402,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL order by id; WHERE select_id = 61 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1 NULL NULL 1
0.00 2 0.00 2
0.00 <--------30 characters-------> 3 0.00 <--------30 characters-------> 3
0.00 ---äÖüß@µ*$-- 4 0.00 ---äÖüß@µ*$-- 4
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
@@ -3755,11 +3760,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id; WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
00:00:00 2 00:00:00 2
00:00:00 <--------30 characters-------> 3 00:00:00 <--------30 characters-------> 3
-00:00:00 ---äÖüß@µ*$-- 4 -00:00:00 ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
41:58:00 1 17:58 22 41:58:00 1 17:58 22
Warnings: Warnings:
Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
@@ -4131,11 +4136,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 39 OR select_id IS NULL order by id; WHERE select_id = 39 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATETIME) my_binary_30 id CAST(my_binary_30 AS DATETIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 17:58:00 2005-06-27 17:58 16 2005-06-27 17:58:00 2005-06-27 17:58 16
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4501,11 +4506,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 28 OR select_id IS NULL order by id; WHERE select_id = 28 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATE) my_binary_30 id CAST(my_binary_30 AS DATE) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 2005-06-27 10 2005-06-27 2005-06-27 10
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4851,10 +4856,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 16 OR select_id IS NULL order by id; WHERE select_id = 16 OR select_id IS NULL order by id;
CAST(my_binary_30 AS CHAR) my_binary_30 id CAST(my_binary_30 AS CHAR) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -5163,10 +5168,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 4 OR select_id IS NULL order by id; WHERE select_id = 4 OR select_id IS NULL order by id;
CAST(my_binary_30 AS BINARY) my_binary_30 id CAST(my_binary_30 AS BINARY) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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.1 - Syntax checks for the CREATE PROCEDURE, CREATE Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
@@ -14949,46 +14957,47 @@ USE db_storedproc;
Testcase 4.3.1: Testcase 4.3.1:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1; 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;
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
middleinitial CHAR, middleinitial CHAR, lastname VARCHAR(50),
lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
age_averylongfieldname_averylongname_1234569 int, ENGINE=<engine_to_be_tested>;
COMMENT TEXT) ENGINE=innodb;
INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
CREATE PROCEDURE sp1(a int) CREATE PROCEDURE sp1(a INT)
BEGIN BEGIN
declare itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx char; DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
declare itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx varchar(100); DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
declare itisjustamediumsizeintintegervariablename integer; DECLARE itisjustamediumsizeintintegervariablename INTEGER;
set itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b'; SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
set itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%'; SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
set itisjustamediumsizeintintegervariablename = 5; = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
set @comment='a'; SET itisjustamediumsizeintintegervariablename = 5;
label1: loop SET @comment='a';
if a>100 then label1: LOOP
set @comment='value of a is greater than 100'; IF a > 100 THEN
elseif a<100 then SET @comment = 'value of a is greater than 100';
if a<50 then ELSEIF a < 100 THEN
set @comment='value of a is less than 50'; IF a < 50 THEN
elseif a<25 then SET @comment = 'value of a is less than 50';
set @comment='value of a is less than 25'; ELSEIF a < 25 THEN
else SET @comment = 'value of a is less than 25';
set @comment='value of a is greater than 50 and less than 100'; ELSE
END if; SET @comment = 'value of a is greater than 50 and less than 100';
else END IF;
set @comment='value of a is 100'; ELSE
END if; SET @comment = 'value of a is 100';
if itisjustamediumsizeintintegervariablename = 0 then leave label1; END IF;
END if; IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 END IF;
values( itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx, INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
concat(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx, ' ', a), VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
a, @comment ); CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
set itisjustamediumsizeintintegervariablename = itisjustamediumsizeintintegervariablename - 1; ' ', a), a, @comment);
iterate label1; SET itisjustamediumsizeintintegervariablename
END loop label1; = itisjustamediumsizeintintegervariablename - 1;
ITERATE label1;
END LOOP label1;
END// END//
CALL sp1(101); CALL sp1(101);
CALL sp1(100); CALL sp1(100);

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.2 - Syntax checks for the stored procedure-specific
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING “01“ is always exactly equivalent in action to a handler with an SQLWARNING
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND “02“ is always exactly equivalent in action to a handler with a NOT FOUND
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a anything other that “01“ or “02“ is always exactly equivalent in action to a
handler with an SQLEXCEPTION condition. handler with an SQLEXCEPTION condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 cur1;
open cur2; open cur2;
BEGIN 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; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5; SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5); insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4; set count = 4;
BEGIN BEGIN
while count> 0 do while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5; SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1; set count = count - 1;
END while; END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4; SELECT '-3-', count, newf1, newf2, newf4, newf4;
END; END;

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.3 - Syntax checks for the stored procedure-specific flow
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.6 - Privilege Checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.7 - SQL mode checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.8 - SHOW statement checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = innodb; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = innodb; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = innodb; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = innodb; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.10 - CALL checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@@ -383,7 +391,7 @@ DROP TABLE temp;
Testcase 3.1.10.8: Testcase 3.1.10.8:
------------------ ------------------
Ensure that the mysql_affected_rows() C API function always returns the correct Ensure that the mysql_affected_rows() C API function always returns the correct
number of rows affected by the execution of a stored procedure. number of rows affected by the execution of a stored procedure.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -1,96 +1,97 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
use test; use test;
Create trigger trg1_1 BEFORE INSERT Create trigger trg1_1 BEFORE INSERT
on tb3 for each row set @test_before = 2, new.f142 = @test_before; on tb3 for each row set @test_before = 2, new.f142 = @test_before;
Create trigger trg1_2 AFTER INSERT Create trigger trg1_2 AFTER INSERT
on tb3 for each row set @test_after = 6; on tb3 for each row set @test_after = 6;
Create trigger trg1_4 BEFORE UPDATE Create trigger trg1_4 BEFORE UPDATE
on tb3 for each row set @test_before = 27, on tb3 for each row set @test_before = 27,
new.f142 = @test_before, new.f142 = @test_before,
new.f122 = 'Before Update Trigger'; new.f122 = 'Before Update Trigger';
Create trigger trg1_3 AFTER UPDATE Create trigger trg1_3 AFTER UPDATE
on tb3 for each row set @test_after = '15'; on tb3 for each row set @test_after = '15';
Create trigger trg1_5 BEFORE DELETE on tb3 for each row Create trigger trg1_5 BEFORE DELETE on tb3 for each row
select count(*) into @test_before from tb3 as tr_tb3 select count(*) into @test_before from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
Create trigger trg1_6 AFTER DELETE on tb3 for each row Create trigger trg1_6 AFTER DELETE on tb3 for each row
select count(*) into @test_after from tb3 as tr_tb3 select count(*) into @test_after from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
set @test_before = 1; set @test_before = 1;
set @test_after = 5; set @test_after = 5;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
1 5 1 5
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; 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
@@ -103,9 +104,9 @@ set @test_after = 8;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
18 8 18 8
Update tb3 set tb3.f122 = 'Update', Update tb3 set tb3.f122 = 'Update',
tb3.f142 = @test_before, tb3.f142 = @test_before,
tb3.f144 = @test_after tb3.f144 = @test_after
where tb3.f121 = 'Test 3.5.1.1'; where tb3.f121 = 'Test 3.5.1.1';
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
@@ -113,7 +114,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
27 15 27 15
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
set @test_before = 0; set @test_before = 0;
set @test_after = 0; set @test_after = 0;
@@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1';
Testcase: 3.5.1.2: Testcase: 3.5.1.2:
------------------ ------------------
Create trigger trg_1 after insert Create trigger trg_1 after insert
on tb3 for each statement set @x= 1; on tb3 for each statement set @x= 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
drop trigger trg_1; drop trigger trg_1;
@@ -194,7 +195,7 @@ 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=innodb;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
@@ -231,7 +232,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
for each row set new.f120 ='X'; for each row set new.f120 ='X';
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
@@ -239,11 +240,11 @@ create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = innodb; create table t1 (f1 integer) engine = innodb;
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;
ERROR 42S02: Table 'trig_db.tb3' doesn't exist ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db; use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18; for each row set @ret_trg6_3 = 18;
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
use test; use test;
@@ -267,9 +268,9 @@ 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 = innodb;
create table t2 (f1 char(50), f2 integer) engine = innodb; create table t2 (f1 char(50), f2 integer) engine = innodb;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
for each row set new.f1 ='trig t2'; for each row set new.f1 ='trig t2';
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
insert into t1 value ('insert to t1',1); insert into t1 value ('insert to t1',1);
@@ -299,15 +300,15 @@ 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 = innodb;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; 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 = innodb;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; 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 = innodb;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
use trig_db1; use trig_db1;
@@ -346,11 +347,11 @@ 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 = innodb;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb; create table trig_db2.t1 (f1 char(50), f2 integer) engine = innodb;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; for each row set @test_var1='trig1_b';
create trigger trig_db1.trig1_a after insert on t1 create trigger trig_db1.trig1_a after insert on t1
for each row set @test_var2='trig1_a'; for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers order by trigger_name;

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 '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: Testcase 3.5.3:
--------------- ---------------
@@ -103,7 +104,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no'; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no'); insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1; select f1 from t1 order by f1;
@@ -135,7 +136,7 @@ Testcase 3.5.3.6:
----------------- -----------------
use priv_db; use priv_db;
drop trigger trg1_2; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes'); insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;

View File

@@ -989,7 +989,7 @@ root@localhost
show triggers; show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost on priv_db.t1 to test_yesprivs@localhost
with grant option; with grant option;
grant select grant select
on priv_db.t1 to test_useprivs@localhost; on priv_db.t1 to test_useprivs@localhost;
@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: 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; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
@@ -1252,7 +1252,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
create definer=current_user trigger trg1_1 create definer=current_user trigger trg1_1
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes'; set new.f1 = 'trig 1_1-yes';
insert into t1 (f1) values ('insert-no'); insert into t1 (f1) values ('insert-no');
@@ -1318,7 +1318,7 @@ current_user
test_yesprivs@localhost test_yesprivs@localhost
use priv_db; use priv_db;
set autocommit=0; set autocommit=0;
create definer=current_user trigger trg1_1 create definer=current_user trigger trg1_1
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes'; set new.f1 = 'trig 1_1-yes';
rollback work; rollback work;
@@ -1564,7 +1564,7 @@ select current_user;
current_user current_user
root@localhost root@localhost
revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost; revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
to test_yesprivs@localhost; to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -88,7 +89,7 @@ Use db_drop;
create table t1 (f1 char(30)) engine=innodb; create table t1 (f1 char(30)) engine=innodb;
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
for each row set new.f1='Trigger 3.5.4.1'; for each row set new.f1='Trigger 3.5.4.1';
Use db_drop; Use db_drop;
Insert into t1 values ('Insert error 3.5.4.1'); Insert into t1 values ('Insert error 3.5.4.1');
@@ -127,7 +128,7 @@ 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=innodb;
create table t1_433a (f1a char (5)) engine=innodb; create table t1_433a (f1a char (5)) engine=innodb;
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
set new.f1 = 'Trigger 3.5.4.3'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
@@ -148,7 +149,7 @@ create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=innodb; create table t1 (f1 char(30)) engine=innodb;
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';
Use db_drop4; Use db_drop4;
Insert into t1 values ('Insert 3.5.4.4'); Insert into t1 values ('Insert 3.5.4.4');
@@ -184,7 +185,7 @@ 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=innodb;
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';
Use db_drop5; Use db_drop5;
Insert into t1 values ('Insert 3.5.4.5'); Insert into t1 values ('Insert 3.5.4.5');
@@ -221,7 +222,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
Testcase 3.5.5.2: Testcase 3.5.5.2:
----------------- -----------------
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999; on t1_temp for each row set new.f2=9999;
ERROR HY000: Trigger's 't1_temp' is view or temporary table ERROR HY000: Trigger's 't1_temp' is view or temporary table
drop table t1_temp; drop table t1_temp;
@@ -229,7 +230,7 @@ drop table t1_temp;
Testcase 3.5.5.3: Testcase 3.5.5.3:
----------------- -----------------
Create view vw3 as select f118 from tb3; Create view vw3 as select f118 from tb3;
Create trigger trg3 before INSERT Create trigger trg3 before INSERT
on vw3 for each row set new.f118='s'; on vw3 for each row set new.f118='s';
ERROR HY000: 'test.vw3' is not BASE TABLE ERROR HY000: 'test.vw3' is not BASE TABLE
drop view vw3; drop view vw3;
@@ -310,9 +311,9 @@ drop trigger tb3.trg4_2;
Testcase 3.5.7.5 / 3.5.7.6: Testcase 3.5.7.5 / 3.5.7.6:
--------------------------- ---------------------------
Create trigger trg5_1 BEFORE INSERT Create trigger trg5_1 BEFORE INSERT
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
Create trigger trg5_2 BEFORE INSERT Create trigger trg5_2 BEFORE INSERT
on tb3 for each row set new.f122='Trigger2 3.5.7.5'; on tb3 for each row set new.f122='Trigger2 3.5.7.5';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
@@ -330,9 +331,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
Testcase 3.5.7.7 / 3.5.7.8: Testcase 3.5.7.7 / 3.5.7.8:
--------------------------- ---------------------------
set @test_var='Before trig 3.5.7.7'; set @test_var='Before trig 3.5.7.7';
Create trigger trg6_1 AFTER INSERT Create trigger trg6_1 AFTER INSERT
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
Create trigger trg6_2 AFTER INSERT Create trigger trg6_2 AFTER INSERT
on tb3 for each row set @test_var='Trigger2 3.5.7.7'; on tb3 for each row set @test_var='Trigger2 3.5.7.7';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
Testcase 3.5.7.9/10: Testcase 3.5.7.9/10:
-------------------- --------------------
Create trigger trg7_1 BEFORE UPDATE Create trigger trg7_1 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
Create trigger trg7_2 BEFORE UPDATE Create trigger trg7_2 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger2 3.5.7.9'; on tb3 for each row set new.f122='Trigger2 3.5.7.9';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
@@ -378,9 +379,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
Testcase 3.5.7.11/12: Testcase 3.5.7.11/12:
--------------------- ---------------------
set @test_var='Before trig 3.5.7.11'; set @test_var='Before trig 3.5.7.11';
Create trigger trg8_1 AFTER UPDATE Create trigger trg8_1 AFTER UPDATE
on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
Create trigger trg8_2 AFTER UPDATE Create trigger trg8_2 AFTER UPDATE
on tb3 for each row set @test_var='Trigger2 3.5.7.11'; on tb3 for each row set @test_var='Trigger2 3.5.7.11';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -408,9 +409,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
Testcase 3.5.7.13/14: Testcase 3.5.7.13/14:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg9_1 BEFORE DELETE Create trigger trg9_1 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
Create trigger trg9_2 BEFORE DELETE Create trigger trg9_2 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+10; on tb3 for each row set @test_var=@test_var+10;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -440,12 +441,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
Testcase 3.5.7.15/16: Testcase 3.5.7.15/16:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg_3_406010_1 AFTER DELETE Create trigger trg_3_406010_1 AFTER DELETE
on tb3 for each row set @test_var=@test_var+5; on tb3 for each row set @test_var=@test_var+5;
Create trigger trg_3_406010_2 AFTER DELETE Create trigger trg_3_406010_2 AFTER DELETE
on tb3 for each row set @test_var=@test_var+50; on tb3 for each row set @test_var=@test_var+50;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Create trigger trg_3_406010_1 AFTER INSERT Create trigger trg_3_406010_1 AFTER INSERT
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
select @test_var; select @test_var;

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -89,17 +90,17 @@ create database db_test;
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
grant LOCK TABLES on db_test.* to test_general; grant LOCK TABLES on db_test.* to test_general;
Use db_test; Use db_test;
create table t1_i ( 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=innodb;
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=innodb;
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,
@@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99);
use test; use test;
Create trigger trg1 AFTER INSERT on tb3 for each row Create trigger trg1 AFTER INSERT on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
update db_test.t1_u update db_test.t1_u
set u144=new.f144, u163=new.f163 set u144=new.f144, u163=new.f163
where u136=new.f136; where u136=new.f136;
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
END// END//
Use test; Use test;
set @test_var=0; set @test_var=0;
Insert into tb3 (f120, f122, f136, f144, f163) Insert into tb3 (f120, f122, f136, f144, f163)
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
f120 f122 f136 f144 f163 f120 f122 f136 f144 f163
@@ -162,7 +163,7 @@ select @test_var;
----------------------------- -----------------------------
Create trigger trg2 BEFORE UPDATE on tb3 for each row Create trigger trg2 BEFORE UPDATE on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
END// END//
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -185,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000
----------------------------- -----------------------------
drop trigger trg2; drop trigger trg2;
Create trigger trg3 BEFORE UPDATE on tb3 for each row Create trigger trg3 BEFORE UPDATE on tb3 for each row
update db_test.t1_u update db_test.t1_u
set u120=new.f120 set u120=new.f120
where u136=new.f136; where u136=new.f136;
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
@@ -207,7 +208,7 @@ U 00222 0000023456 1.050000000000000000000000000000
drop trigger trg3; drop trigger trg3;
Create trigger trg4 AFTER UPDATE on tb3 for each row Create trigger trg4 AFTER UPDATE on tb3 for each row
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
update tb3 set f120='D', f136=444, update tb3 set f120='D', f136=444,
f122='Test 3.5.8.4-Single Delete' f122='Test 3.5.8.4-Single Delete'
where f122='Test 3.5.8.4-Single Update'; where f122='Test 3.5.8.4-Single Update';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -222,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000
------------------------------- -------------------------------
drop trigger trg4; drop trigger trg4;
Create trigger trg5 AFTER UPDATE on tb3 for each row Create trigger trg5 AFTER UPDATE on tb3 for each row
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
set @test_var=0; set @test_var=0;
update tb3 set f120='S', f136=111, update tb3 set f120='S', f136=111,
f122='Test 3.5.8.4-Single Select' f122='Test 3.5.8.4-Single Select'
where f122='Test 3.5.8.4-Single Delete'; where f122='Test 3.5.8.4-Single Delete';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -253,31 +254,31 @@ set @test_var='three', new.f120='4';
END IF; END IF;
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END IF; END IF;
END// END//
set @test_var='Empty', @test_var2=0; set @test_var='Empty', @test_var2=0;
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 one 2nd else D Test 3.5.8.5-if 00101 one 2nd else
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 two 2nd else D Test 3.5.8.5-if 00101 two 2nd else
D Test 3.5.8.5-if 00102 two 2nd else D Test 3.5.8.5-if 00102 two 2nd else
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd if d Test 3.5.8.5-if 00010 three 2nd if
D Test 3.5.8.5-if 00101 three 2nd if D Test 3.5.8.5-if 00101 three 2nd if
D Test 3.5.8.5-if 00102 three 2nd if D Test 3.5.8.5-if 00102 three 2nd if
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd else d Test 3.5.8.5-if 00010 three 2nd else
@@ -297,7 +298,7 @@ create trigger trg4 before update on tb3 for each row
BEGIN BEGIN
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
@@ -339,43 +340,43 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
END case; END case;
END// END//
set @test_var='Empty'; set @test_var='Empty';
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('a', 'Test 3.5.8.5-case', 5, 7); values ('a', 'Test 3.5.8.5-case', 5, 7);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 A*seven A Test 3.5.8.5-case 00125 0000000007 A*seven
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('b', 'Test 3.5.8.5-case', 71,16); values ('b', 'Test 3.5.8.5-case', 71,16);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 B*0000000016 A Test 3.5.8.5-case 00125 0000000007 B*0000000016
B Test 3.5.8.5-case 00191 0000000016 B*0000000016 B Test 3.5.8.5-case 00191 0000000016 B*0000000016
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('c', 'Test 3.5.8.5-case', 80,1); values ('c', 'Test 3.5.8.5-case', 80,1);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 C=one A Test 3.5.8.5-case 00125 0000000007 C=one
B Test 3.5.8.5-case 00191 0000000016 C=one B Test 3.5.8.5-case 00191 0000000016 C=one
C Test 3.5.8.5-case 00200 0000000001 C=one C Test 3.5.8.5-case 00200 0000000001 C=one
Insert into tb3 (f120, f122, f136) Insert into tb3 (f120, f122, f136)
values ('d', 'Test 3.5.8.5-case', 152); values ('d', 'Test 3.5.8.5-case', 152);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
A Test 3.5.8.5-case 00125 0000000007 1*0000099999 A Test 3.5.8.5-case 00125 0000000007 1*0000099999
B Test 3.5.8.5-case 00191 0000000016 1*0000099999 B Test 3.5.8.5-case 00191 0000000016 1*0000099999
C Test 3.5.8.5-case 00200 0000000001 1*0000099999 C Test 3.5.8.5-case 00200 0000000001 1*0000099999
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('e', 'Test 3.5.8.5-case', 200, 8); values ('e', 'Test 3.5.8.5-case', 200, 8);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -383,9 +384,9 @@ f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 1=eight A Test 3.5.8.5-case 00125 0000000007 1=eight
B Test 3.5.8.5-case 00191 0000000016 1=eight B Test 3.5.8.5-case 00191 0000000016 1=eight
C Test 3.5.8.5-case 00200 0000000001 1=eight C Test 3.5.8.5-case 00200 0000000001 1=eight
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('f', 'Test 3.5.8.5-case', 100, 8); values ('f', 'Test 3.5.8.5-case', 100, 8);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -406,40 +407,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
Testcase 3.5.8.5-loop/leave: Testcase 3.5.8.5-loop/leave:
---------------------------- ----------------------------
Create trigger trg4 after insert on tb3 for each row Create trigger trg4 after insert on tb3 for each row
BEGIN BEGIN
set @counter=0, @flag='Initial'; set @counter=0, @flag='Initial';
Label1: loop Label1: loop
if new.f136<new.f144 then if new.f136<new.f144 then
set @counter='Nothing to loop'; set @counter='Nothing to loop';
leave Label1; leave Label1;
else else
set @counter=@counter+1; set @counter=@counter+1;
if new.f136=new.f144+@counter then if new.f136=new.f144+@counter then
set @counter=concat(@counter, ' loops'); set @counter=concat(@counter, ' loops');
leave Label1; leave Label1;
end if; end if;
end if; end if;
iterate label1; iterate label1;
set @flag='Final'; set @flag='Final';
END loop Label1; END loop Label1;
END// END//
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 2, 8); values ('Test 3.5.8.5-loop', 2, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
Nothing to loop Initial Nothing to loop Initial
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 11, 8); values ('Test 3.5.8.5-loop', 11, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
3 loops Initial 3 loops Initial
Create trigger trg4_2 after update on tb3 for each row Create trigger trg4_2 after update on tb3 for each row
BEGIN BEGIN
Label1: loop Label1: loop
set @counter=@counter+1; set @counter=@counter+1;
END; END;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
END' at line 5 END' at line 5
drop trigger trg4_2; drop trigger trg4_2;
drop trigger trg4; drop trigger trg4;
@@ -449,23 +450,23 @@ Testcase 3.5.8.5-repeat:
------------------------ ------------------------
Create trigger trg6 after insert on tb3 for each row Create trigger trg6 after insert on tb3 for each row
BEGIN BEGIN
rp_label: REPEAT rp_label: REPEAT
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
UNTIL @counter1> new.f136 END REPEAT rp_label; UNTIL @counter1> new.f136 END REPEAT rp_label;
END// END//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-repeat', 13); values ('Test 3.5.8.5-repeat', 13);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
15 8 15 8
Create trigger trg6_2 after update on tb3 for each row Create trigger trg6_2 after update on tb3 for each row
BEGIN BEGIN
REPEAT REPEAT
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
drop trigger trg6; drop trigger trg6;
@@ -474,24 +475,24 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
Testcase 3.5.8.5-while: Testcase 3.5.8.5-while:
----------------------- -----------------------
Create trigger trg7 after insert on tb3 for each row Create trigger trg7 after insert on tb3 for each row
wl_label: WHILE @counter1 < new.f136 DO wl_label: WHILE @counter1 < new.f136 DO
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END WHILE wl_label// END WHILE wl_label//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-while', 7); values ('Test 3.5.8.5-while', 7);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
7 4 7 4
Create trigger trg7_2 after update on tb3 for each row Create trigger trg7_2 after update on tb3 for each row
BEGIN BEGIN
WHILE @counter1 < new.f136 WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
END' at line 4 END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while'; delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7; drop trigger trg7;

View File

@@ -1,74 +1,75 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 '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: Testcase 3.5.9.1/2:
------------------- -------------------
Create trigger trg1 BEFORE UPDATE on tb3 for each row Create trigger trg1 BEFORE UPDATE on tb3 for each row
set new.f142 = 94087, @counter=@counter+1; set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
@@ -80,15 +81,15 @@ NewValuew
0 0
set @counter=0; set @counter=0;
Update tb3 Set f142='1' where f130<100; 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 8 8
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
0 0
select count(*) as NonExpectedChanged from tb3 select count(*) as NonExpectedChanged from tb3
where f130>=130 and f142=94087; where f130>=130 and f142=94087;
NonExpectedChanged NonExpectedChanged
0 0
@@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f163) Insert into tb3 (f122, f136, f163)
values ('Test 3.5.9.3', 7, 123.17); values ('Test 3.5.9.3', 7, 123.17);
Update tb3 Set f136=8 where f122='Test 3.5.9.3'; Update tb3 Set f136=8 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
@@ -137,11 +138,11 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
delete from tb3 where f122='Test 3.5.9.3'; delete from tb3 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
@@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
0 0 0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f151, f163) Insert into tb3 (f122, f136, f151, f163)
values ('Test 3.5.9.4', 7, DEFAULT, 995.24); values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4%' order by f163; where f122 like 'Test 3.5.9.4%' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
@@ -195,15 +196,15 @@ where f122='Test 3.5.9.4';
ERROR 23000: Column 'f136' cannot be null ERROR 23000: Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4'; where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig' order by f163; where f122 like 'Test 3.5.9.4-trig' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4-trig 00000 999 NULL a NULL Test 3.5.9.4-trig 00000 999 NULL
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
@@ -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 create trigger trg5b after DELETE on tb3 for each row
set new.f122='test'; set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b; drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests) Testcase 3.5.9.10: (implied in previous tests)

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
---------------------- ----------------------
@@ -141,7 +142,7 @@ set @counter= 0;
select @counter as 'Rows Loaded Before'; select @counter as 'Rows Loaded Before';
Rows Loaded Before Rows Loaded Before
0 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'; select @counter as 'Rows Loaded After';
Rows Loaded After Rows Loaded After
10 10

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
Testcase x.x.x.1: Testcase x.x.x.1:
----------------- -----------------

View File

@@ -1,117 +1,119 @@
USE test; USE test;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
DROP DATABASE IF EXISTS test1; DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1; CREATE DATABASE test1;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
USE test; USE test;
! Attention: The file with the expected results is not ! Attention: The file with the expected results is not

View File

@@ -3,63 +3,63 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal, f33 decimal,
f34 decimal unsigned, f34 decimal unsigned,
f35 decimal zerofill, f35 decimal zerofill,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = innodb; ) engine = innodb;
Warnings: Warnings:
@@ -76,180 +76,183 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
drop table if exists tb3 ; 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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
drop table if exists tb4; drop table if exists tb4;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0) unicode,
f236 char(90), f236 char(90),
@@ -259,89 +262,97 @@ f239 varchar(20000) binary,
f240 varchar(2000) unicode, f240 varchar(2000) unicode,
f241 char(100) unicode f241 char(100) unicode
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; ENGINE = InnoDB;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; ENGINE = InnoDB;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -353,7 +364,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
SELECT * FROM information_schema.columns SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%' WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name; ORDER BY table_schema, table_name, column_name;

View File

@@ -4,55 +4,55 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = memory; ) engine = memory;
Warnings: Warnings:
@@ -72,174 +72,177 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
drop table if exists tb3; 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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
drop table if exists tb4 ; drop table if exists tb4 ;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f236 char(95) unicode, f236 char(95) unicode,
f241 char(255) unicode, f241 char(255) unicode,
@@ -248,89 +251,97 @@ f238 varchar(25000) binary,
f239 varbinary(0), f239 varbinary(0),
f240 varchar(1200) unicode f240 varchar(1200) unicode
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; ENGINE = MEMORY;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; ENGINE = MEMORY;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = MEMORY;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = MEMORY;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -342,7 +353,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
SELECT * FROM information_schema.columns SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%' WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name; ORDER BY table_schema, table_name, column_name;

View File

@@ -4,63 +4,63 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = myisam; ) engine = myisam;
Warnings: Warnings:
@@ -80,196 +80,199 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
drop table if exists tb3 ; 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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
drop table if exists tb4 ; drop table if exists tb4 ;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f227 VARBINARY(64), f227 VARBINARY(64),
f228 VARBINARY(27), f228 VARBINARY(27),
f229 VARBINARY(64), f229 VARBINARY(64),
f230 VARBINARY(192), f230 VARBINARY(192),
f231 VARBINARY(192), f231 VARBINARY(192),
f232 VARBINARY(27), f232 VARBINARY(27),
f233 VARBINARY(64), f233 VARBINARY(64),
f234 VARBINARY(192), f234 VARBINARY(192),
f235 char(255) unicode, f235 char(255) unicode,
f236 char(60) ascii, f236 char(60) ascii,
@@ -280,97 +283,105 @@ f240 varchar(120) unicode,
f241 char(100) unicode, f241 char(100) unicode,
f242 bit(30) f242 bit(30)
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; ENGINE = MyISAM;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; ENGINE = MyISAM;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = MyISAM;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = MyISAM;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -382,7 +393,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
SELECT * FROM information_schema.columns SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%' WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name; ORDER BY table_schema, table_name, column_name;

View File

@@ -4,29 +4,35 @@ USE test;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; ENGINE = ndb;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; ENGINE = ndb;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; 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)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = ndb;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = ndb; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = ndb;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = ndb; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -38,7 +44,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = ndb;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
SELECT * FROM information_schema.columns SELECT * FROM information_schema.columns
WHERE table_schema LIKE 'test%' WHERE table_schema LIKE 'test%'
ORDER BY table_schema, table_name, column_name; ORDER BY table_schema, table_name, column_name;

View File

@@ -3,63 +3,63 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char(0), f1 char(0),
f2 char(0) binary, f2 char(0) binary,
f3 char(0) ascii, f3 char(0) ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal, f33 decimal,
f34 decimal unsigned, f34 decimal unsigned,
f35 decimal zerofill, f35 decimal zerofill,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = innodb; ) engine = innodb;
Warnings: Warnings:
@@ -76,180 +76,183 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
drop table if exists tb3 ; 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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = innodb;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb3.txt'
into table tb3;
drop table if exists tb4; drop table if exists tb4;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f235 char(0) unicode, f235 char(0) unicode,
f236 char(90), f236 char(90),
@@ -259,89 +262,97 @@ f239 varchar(20000) binary,
f240 varchar(2000) unicode, f240 varchar(2000) unicode,
f241 char(100) unicode f241 char(100) unicode
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = innodb; ) engine = innodb;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/innodb_tb2.txt'
into table tb2;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; ENGINE = InnoDB;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; ENGINE = InnoDB;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -353,7 +364,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -367,7 +378,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT *, SELECT *,

View File

@@ -4,55 +4,55 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = memory; ) engine = memory;
Warnings: Warnings:
@@ -72,174 +72,177 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
drop table if exists tb3; 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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
drop table if exists tb4 ; drop table if exists tb4 ;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f236 char(95) unicode, f236 char(95) unicode,
f241 char(255) unicode, f241 char(255) unicode,
@@ -248,89 +251,97 @@ f238 varchar(25000) binary,
f239 varbinary(0), f239 varbinary(0),
f240 varchar(1200) unicode f240 varchar(1200) unicode
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; ENGINE = MEMORY;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; ENGINE = MEMORY;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = MEMORY;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = MEMORY;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -342,7 +353,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -356,7 +367,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MEMORY;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT *, SELECT *,

View File

@@ -4,63 +4,63 @@ CREATE DATABASE test1;
USE test; USE test;
drop table if exists tb1 ; drop table if exists tb1 ;
create table tb1 ( create table tb1 (
f1 char, f1 char,
f2 char binary, f2 char binary,
f3 char ascii, f3 char ascii,
f4 tinytext unicode, f4 tinytext unicode,
f5 text, f5 text,
f6 mediumtext, f6 mediumtext,
f7 longtext, f7 longtext,
f8 tinyblob, f8 tinyblob,
f9 blob, f9 blob,
f10 mediumblob, f10 mediumblob,
f11 longblob, f11 longblob,
f12 binary, f12 binary,
f13 tinyint, f13 tinyint,
f14 tinyint unsigned, f14 tinyint unsigned,
f15 tinyint zerofill, f15 tinyint zerofill,
f16 tinyint unsigned zerofill, f16 tinyint unsigned zerofill,
f17 smallint, f17 smallint,
f18 smallint unsigned, f18 smallint unsigned,
f19 smallint zerofill, f19 smallint zerofill,
f20 smallint unsigned zerofill, f20 smallint unsigned zerofill,
f21 mediumint, f21 mediumint,
f22 mediumint unsigned, f22 mediumint unsigned,
f23 mediumint zerofill, f23 mediumint zerofill,
f24 mediumint unsigned zerofill, f24 mediumint unsigned zerofill,
f25 int, f25 int,
f26 int unsigned, f26 int unsigned,
f27 int zerofill, f27 int zerofill,
f28 int unsigned zerofill, f28 int unsigned zerofill,
f29 bigint, f29 bigint,
f30 bigint unsigned, f30 bigint unsigned,
f31 bigint zerofill, f31 bigint zerofill,
f32 bigint unsigned zerofill, f32 bigint unsigned zerofill,
f33 decimal not null DEFAULT 9.9, f33 decimal not null DEFAULT 9.9,
f34 decimal unsigned not null DEFAULT 9.9, f34 decimal unsigned not null DEFAULT 9.9,
f35 decimal zerofill not null DEFAULT 9.9, f35 decimal zerofill not null DEFAULT 9.9,
f36 decimal unsigned zerofill not null DEFAULT 9.9, f36 decimal unsigned zerofill not null DEFAULT 9.9,
f37 decimal (0) not null DEFAULT 9.9, f37 decimal (0) not null DEFAULT 9.9,
f38 decimal (64) not null DEFAULT 9.9, f38 decimal (64) not null DEFAULT 9.9,
f39 decimal (0) unsigned not null DEFAULT 9.9, f39 decimal (0) unsigned not null DEFAULT 9.9,
f40 decimal (64) unsigned not null DEFAULT 9.9, f40 decimal (64) unsigned not null DEFAULT 9.9,
f41 decimal (0) zerofill not null DEFAULT 9.9, f41 decimal (0) zerofill not null DEFAULT 9.9,
f42 decimal (64) zerofill not null DEFAULT 9.9, f42 decimal (64) zerofill not null DEFAULT 9.9,
f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, f43 decimal (0) unsigned zerofill not null DEFAULT 9.9,
f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, f44 decimal (64) unsigned zerofill not null DEFAULT 9.9,
f45 decimal (0,0) not null DEFAULT 9.9, f45 decimal (0,0) not null DEFAULT 9.9,
f46 decimal (63,30) not null DEFAULT 9.9, f46 decimal (63,30) not null DEFAULT 9.9,
f47 decimal (0,0) unsigned not null DEFAULT 9.9, f47 decimal (0,0) unsigned not null DEFAULT 9.9,
f48 decimal (63,30) unsigned not null DEFAULT 9.9, f48 decimal (63,30) unsigned not null DEFAULT 9.9,
f49 decimal (0,0) zerofill not null DEFAULT 9.9, f49 decimal (0,0) zerofill not null DEFAULT 9.9,
f50 decimal (63,30) zerofill not null DEFAULT 9.9, f50 decimal (63,30) zerofill not null DEFAULT 9.9,
f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9,
f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9,
f53 numeric not null DEFAULT 99, f53 numeric not null DEFAULT 99,
f54 numeric unsigned not null DEFAULT 99, f54 numeric unsigned not null DEFAULT 99,
f55 numeric zerofill not null DEFAULT 99, f55 numeric zerofill not null DEFAULT 99,
f56 numeric unsigned zerofill not null DEFAULT 99, f56 numeric unsigned zerofill not null DEFAULT 99,
f57 numeric (0) not null DEFAULT 99, f57 numeric (0) not null DEFAULT 99,
f58 numeric (64) not null DEFAULT 99 f58 numeric (64) not null DEFAULT 99
) engine = myisam; ) engine = myisam;
Warnings: Warnings:
@@ -80,196 +80,199 @@ Note 1265 Data truncated for column 'f45' at row 1
Note 1265 Data truncated for column 'f47' at row 1 Note 1265 Data truncated for column 'f47' at row 1
Note 1265 Data truncated for column 'f49' at row 1 Note 1265 Data truncated for column 'f49' at row 1
Note 1265 Data truncated for column 'f51' at row 1 Note 1265 Data truncated for column 'f51' at row 1
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb1.txt'
into table tb1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
drop table if exists tb3 ; 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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
drop table if exists tb4 ; drop table if exists tb4 ;
create table tb4 ( create table tb4 (
f176 numeric (0) unsigned not null DEFAULT 9, f176 numeric (0) unsigned not null DEFAULT 9,
f177 numeric (64) unsigned not null DEFAULT 9, f177 numeric (64) unsigned not null DEFAULT 9,
f178 numeric (0) zerofill not null DEFAULT 9, f178 numeric (0) zerofill not null DEFAULT 9,
f179 numeric (64) zerofill not null DEFAULT 9, f179 numeric (64) zerofill not null DEFAULT 9,
f180 numeric (0) unsigned zerofill not null DEFAULT 9, f180 numeric (0) unsigned zerofill not null DEFAULT 9,
f181 numeric (64) unsigned zerofill not null DEFAULT 9, f181 numeric (64) unsigned zerofill not null DEFAULT 9,
f182 numeric (0,0) not null DEFAULT 9, f182 numeric (0,0) not null DEFAULT 9,
f183 numeric (63,30) not null DEFAULT 9, f183 numeric (63,30) not null DEFAULT 9,
f184 numeric (0,0) unsigned not null DEFAULT 9, f184 numeric (0,0) unsigned not null DEFAULT 9,
f185 numeric (63,30) unsigned not null DEFAULT 9, f185 numeric (63,30) unsigned not null DEFAULT 9,
f186 numeric (0,0) zerofill not null DEFAULT 9, f186 numeric (0,0) zerofill not null DEFAULT 9,
f187 numeric (63,30) zerofill not null DEFAULT 9, f187 numeric (63,30) zerofill not null DEFAULT 9,
f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, f188 numeric (0,0) unsigned zerofill not null DEFAULT 9,
f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, f189 numeric (63,30) unsigned zerofill not null DEFAULT 9,
f190 real not null DEFAULT 88.8, f190 real not null DEFAULT 88.8,
f191 real unsigned not null DEFAULT 88.8, f191 real unsigned not null DEFAULT 88.8,
f192 real zerofill not null DEFAULT 88.8, f192 real zerofill not null DEFAULT 88.8,
f193 real unsigned zerofill not null DEFAULT 88.8, f193 real unsigned zerofill not null DEFAULT 88.8,
f194 double not null DEFAULT 55.5, f194 double not null DEFAULT 55.5,
f195 double unsigned not null DEFAULT 55.5, f195 double unsigned not null DEFAULT 55.5,
f196 double zerofill not null DEFAULT 55.5, f196 double zerofill not null DEFAULT 55.5,
f197 double unsigned zerofill not null DEFAULT 55.5, f197 double unsigned zerofill not null DEFAULT 55.5,
f198 float, f198 float,
f199 float unsigned, f199 float unsigned,
f200 float zerofill, f200 float zerofill,
f201 float unsigned zerofill, f201 float unsigned zerofill,
f202 float(0), f202 float(0),
f203 float(23), f203 float(23),
f204 float(0) unsigned, f204 float(0) unsigned,
f205 float(23) unsigned, f205 float(23) unsigned,
f206 float(0) zerofill, f206 float(0) zerofill,
f207 float(23) zerofill, f207 float(23) zerofill,
f208 float(0) unsigned zerofill, f208 float(0) unsigned zerofill,
f209 float(23) unsigned zerofill, f209 float(23) unsigned zerofill,
f210 float(24), f210 float(24),
f211 float(53), f211 float(53),
f212 float(24) unsigned, f212 float(24) unsigned,
f213 float(53) unsigned, f213 float(53) unsigned,
f214 float(24) zerofill, f214 float(24) zerofill,
f215 float(53) zerofill, f215 float(53) zerofill,
f216 float(24) unsigned zerofill, f216 float(24) unsigned zerofill,
f217 float(53) unsigned zerofill, f217 float(53) unsigned zerofill,
f218 date, f218 date,
f219 time, f219 time,
f220 datetime, f220 datetime,
f221 timestamp, f221 timestamp,
f222 year, f222 year,
f223 year(3), f223 year(3),
f224 year(4), f224 year(4),
f225 enum("1enum","2enum"), f225 enum("1enum","2enum"),
f226 set("1set","2set"), f226 set("1set","2set"),
f227 VARBINARY(64), f227 VARBINARY(64),
f228 VARBINARY(27), f228 VARBINARY(27),
f229 VARBINARY(64), f229 VARBINARY(64),
f230 VARBINARY(192), f230 VARBINARY(192),
f231 VARBINARY(192), f231 VARBINARY(192),
f232 VARBINARY(27), f232 VARBINARY(27),
f233 VARBINARY(64), f233 VARBINARY(64),
f234 VARBINARY(192), f234 VARBINARY(192),
f235 char(255) unicode, f235 char(255) unicode,
f236 char(60) ascii, f236 char(60) ascii,
@@ -280,97 +283,105 @@ f240 varchar(120) unicode,
f241 char(100) unicode, f241 char(100) unicode,
f242 bit(30) f242 bit(30)
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb4.txt'
into table tb4;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; ENGINE = MyISAM;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; ENGINE = MyISAM;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = MyISAM;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = MyISAM;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -382,7 +393,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -396,7 +407,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = MyISAM;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT *, SELECT *,

View File

@@ -4,29 +4,35 @@ USE test;
USE test; USE test;
USE test; USE test;
DROP TABLE IF EXISTS t1, t2, t4, t10, t11; DROP TABLE IF EXISTS t1, t2, t4, t10, t11;
CREATE TABLE t1 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; CREATE TABLE t1 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; ENGINE = NDB;
CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; ENGINE = NDB;
CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; ENGINE = NDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; CREATE TABLE t10 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; 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)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; ENGINE = NDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t1;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t2;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t4;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t10;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t11;
drop TABLE if exists t3; drop TABLE if exists t3;
CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = NDB; CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = NDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' INTO TABLE t3; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t3.txt' INTO TABLE t3;
drop database if exists test4; drop database if exists test4;
CREATE database test4; CREATE database test4;
use test4; use test4;
CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = NDB; CREATE TABLE t6 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int)
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t6; ENGINE = NDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' INTO TABLE t6;
use test; use test;
drop TABLE if exists t7, t8; drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB; CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB;
CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = NDB; CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = NDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t7; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -38,7 +44,7 @@ Warning 1265 Data truncated for column 'f3' at row 7
Warning 1265 Data truncated for column 'f3' at row 8 Warning 1265 Data truncated for column 'f3' at row 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' INTO TABLE t8; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' INTO TABLE t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 Warning 1265 Data truncated for column 'f3' at row 2
@@ -52,7 +58,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
drop TABLE if exists t9; drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = NDB; CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = NDB;
LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' INTO TABLE t9;
DROP DATABASE IF EXISTS db_datadict; DROP DATABASE IF EXISTS db_datadict;
CREATE DATABASE db_datadict; CREATE DATABASE db_datadict;
SELECT *, SELECT *,

View File

@@ -35,10 +35,10 @@ my_bigint = -9223372036854775808,
my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = -1.7976931348623E+308; my_double = -1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '<--------30 characters------->', my_char_30 = '<--------30 characters------->',
my_varchar_1000 = CONCAT('<---------1000 characters', my_varchar_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_binary_30 = '<--------30 characters------->', my_binary_30 = '<--------30 characters------->',
my_varbinary_1000 = CONCAT('<---------1000 characters', my_varbinary_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_datetime = '9999-12-31 23:59:59', my_datetime = '9999-12-31 23:59:59',
@@ -50,23 +50,23 @@ my_bigint = 9223372036854775807,
my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = 1.7976931348623E+308; my_double = 1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = ' ---äÖüß@µ*$-- ', my_char_30 = ' ---äÖüß@µ*$-- ',
my_varchar_1000 = ' ---äÖüß@µ*$-- ', my_varchar_1000 = ' ---äÖüß@µ*$-- ',
my_binary_30 = ' ---äÖüß@µ*$-- ', my_binary_30 = ' ---äÖüß@µ*$-- ',
my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
my_datetime = '2004-02-29 23:59:59', my_datetime = '2004-02-29 23:59:59',
my_date = '2004-02-29', my_date = '2004-02-29',
my_timestamp = '2004-02-29 23:59:59', my_timestamp = '2004-02-29 23:59:59',
my_time = '13:00:00', my_time = '13:00:00',
my_year = 2000, my_year = 2000,
my_bigint = 0, my_bigint = 0,
my_decimal = 0.0, my_decimal = 0.0,
my_double = 0; my_double = 0;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '-1', my_char_30 = '-1',
my_varchar_1000 = '-1', my_varchar_1000 = '-1',
my_binary_30 = '-1', my_binary_30 = '-1',
my_varbinary_1000 = '-1', my_varbinary_1000 = '-1',
my_datetime = '2005-06-28 10:00:00', my_datetime = '2005-06-28 10:00:00',
my_date = '2005-06-28', my_date = '2005-06-28',
my_timestamp = '2005-06-28 10:00:00', my_timestamp = '2005-06-28 10:00:00',
@@ -152,21 +152,21 @@ my_double = -0.33333333E+4;
some statements disabled because of some statements disabled because of
Bug#5913 Traditional mode: BIGINT range not correctly delimited Bug#5913 Traditional mode: BIGINT range not correctly delimited
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_char_30), SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
@@ -180,15 +180,15 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LCASE(my_varchar_1000), SET @my_select = 'SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
@@ -202,9 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varbinary_1000), SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SELECT 'äÄ@' INTO OUTFILE '../tmp/func_view.dat'; SET @my_select =
SET @my_select = 'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'')
'SELECT LOAD_FILE(''../tmp/func_view.dat''), id FROM t1_values'; AS my_col,
id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_char_30), SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
@@ -810,36 +811,40 @@ WHERE select_id = 157 OR select_id IS NULL) order by id;
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values AS my_col,
id FROM t1_values;
SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
AS my_col,
id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL order by id; WHERE select_id = 156 OR select_id IS NULL order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1 SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL) order by id; WHERE select_id = 156 OR select_id IS NULL) order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
DROP VIEW v1; DROP VIEW v1;
@@ -1013,10 +1018,10 @@ SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
WHERE select_id = 147 OR select_id IS NULL order by id; WHERE select_id = 147 OR select_id IS NULL order by id;
LEFT(my_binary_30, 2) my_binary_30 id LEFT(my_binary_30, 2) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<- <--------30 characters-------> 3 <- <--------30 characters-------> 3
- ---äÖüß@µ*$-- 4 - ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1141,10 +1146,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 141 OR select_id IS NULL order by id; WHERE select_id = 141 OR select_id IS NULL order by id;
BIT_LENGTH(my_binary_30) my_binary_30 id BIT_LENGTH(my_binary_30) my_binary_30 id
NULL NULL 1 NULL NULL 1
240 2 240 2
240 <--------30 characters-------> 3 240 <--------30 characters-------> 3
240 ---äÖüß@µ*$-- 4 240 ---äÖüß@µ*$-- 4
240 -1 5 240 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1453,10 +1458,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL order by id; WHERE select_id = 129 OR select_id IS NULL order by id;
IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
IS_NULL NULL 1 IS_NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1793,10 +1798,10 @@ WHERE select_id = 117 OR select_id IS NULL order by id;
IF(my_binary_30 IS NULL, 'IS NULL', IF(my_binary_30 IS NULL, 'IS NULL',
'IS NOT NULL') my_binary_30 id 'IS NOT NULL') my_binary_30 id
IS NULL NULL 1 IS NULL NULL 1
IS NOT NULL 2 IS NOT NULL 2
IS NOT NULL <--------30 characters-------> 3 IS NOT NULL <--------30 characters-------> 3
IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5 IS NOT NULL -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
@@ -2113,10 +2118,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL order by id; WHERE select_id = 105 OR select_id IS NULL order by id;
IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
IS NOT TRUE NULL 1 IS NOT TRUE NULL 1
IS NOT TRUE 2 IS NOT TRUE 2
IS NOT TRUE <--------30 characters-------> 3 IS NOT TRUE <--------30 characters-------> 3
IS NOT TRUE ---äÖüß@µ*$-- 4 IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5 IS TRUE -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
@@ -2200,9 +2205,9 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING koi8r), SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 102 OR select_id IS NULL order by id; WHERE select_id = 102 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
@@ -2226,17 +2231,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING koi8r), SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 101 OR select_id IS NULL order by id; WHERE select_id = 101 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING koi8r) my_binary_30 id CONVERT(my_binary_30 USING koi8r) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---???????<3F>@??*$-- ---äÖüß@µ*$-- 4 ---???????<3F>@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2252,9 +2257,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING koi8r), SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 100 OR select_id IS NULL order by id; WHERE select_id = 100 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
@@ -2278,9 +2283,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING koi8r), SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 99 OR select_id IS NULL order by id; WHERE select_id = 99 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING koi8r) my_char_30 id CONVERT(my_char_30 USING koi8r) my_char_30 id
@@ -2304,9 +2309,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING utf8), SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 98 OR select_id IS NULL order by id; WHERE select_id = 98 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
@@ -2330,17 +2335,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING utf8), SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 97 OR select_id IS NULL order by id; WHERE select_id = 97 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING utf8) my_binary_30 id CONVERT(my_binary_30 USING utf8) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4 ---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2356,9 +2361,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING utf8), SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 96 OR select_id IS NULL order by id; WHERE select_id = 96 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
@@ -2382,9 +2387,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING utf8), SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 95 OR select_id IS NULL order by id; WHERE select_id = 95 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING utf8) my_char_30 id CONVERT(my_char_30 USING utf8) my_char_30 id
@@ -2673,10 +2678,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 85 OR select_id IS NULL order by id; WHERE select_id = 85 OR select_id IS NULL order by id;
CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
18446744073709551615 -1 5 18446744073709551615 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3037,10 +3042,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 73 OR select_id IS NULL order by id; WHERE select_id = 73 OR select_id IS NULL order by id;
CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3397,11 +3402,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL order by id; WHERE select_id = 61 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1 NULL NULL 1
0.00 2 0.00 2
0.00 <--------30 characters-------> 3 0.00 <--------30 characters-------> 3
0.00 ---äÖüß@µ*$-- 4 0.00 ---äÖüß@µ*$-- 4
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
@@ -3755,11 +3760,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id; WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
00:00:00 2 00:00:00 2
00:00:00 <--------30 characters-------> 3 00:00:00 <--------30 characters-------> 3
-00:00:00 ---äÖüß@µ*$-- 4 -00:00:00 ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
41:58:00 1 17:58 22 41:58:00 1 17:58 22
Warnings: Warnings:
Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
@@ -4131,11 +4136,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 39 OR select_id IS NULL order by id; WHERE select_id = 39 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATETIME) my_binary_30 id CAST(my_binary_30 AS DATETIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 17:58:00 2005-06-27 17:58 16 2005-06-27 17:58:00 2005-06-27 17:58 16
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4501,11 +4506,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 28 OR select_id IS NULL order by id; WHERE select_id = 28 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATE) my_binary_30 id CAST(my_binary_30 AS DATE) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 2005-06-27 10 2005-06-27 2005-06-27 10
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4851,10 +4856,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 16 OR select_id IS NULL order by id; WHERE select_id = 16 OR select_id IS NULL order by id;
CAST(my_binary_30 AS CHAR) my_binary_30 id CAST(my_binary_30 AS CHAR) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -5163,10 +5168,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 4 OR select_id IS NULL order by id; WHERE select_id = 4 OR select_id IS NULL order by id;
CAST(my_binary_30 AS BINARY) my_binary_30 id CAST(my_binary_30 AS BINARY) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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.1 - Syntax checks for the CREATE PROCEDURE, CREATE Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
@@ -14949,66 +14957,89 @@ USE db_storedproc;
Testcase 4.3.1: Testcase 4.3.1:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1; 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;
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
middleinitial CHAR, middleinitial CHAR, lastname VARCHAR(50),
lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
age_averylongfieldname_averylongname_1234569 int, ENGINE=<engine_to_be_tested>;
COMMENT TEXT) ENGINE=memory;
ERROR 42000: The used table type doesn't support BLOB/TEXT columns
INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CREATE PROCEDURE sp1(a INT)
CREATE PROCEDURE sp1(a int)
BEGIN BEGIN
declare itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx char; DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
declare itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx varchar(100); DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
declare itisjustamediumsizeintintegervariablename integer; DECLARE itisjustamediumsizeintintegervariablename INTEGER;
set itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b'; SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
set itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%'; SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
set itisjustamediumsizeintintegervariablename = 5; = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
set @comment='a'; SET itisjustamediumsizeintintegervariablename = 5;
label1: loop SET @comment='a';
if a>100 then label1: LOOP
set @comment='value of a is greater than 100'; IF a > 100 THEN
elseif a<100 then SET @comment = 'value of a is greater than 100';
if a<50 then ELSEIF a < 100 THEN
set @comment='value of a is less than 50'; IF a < 50 THEN
elseif a<25 then SET @comment = 'value of a is less than 50';
set @comment='value of a is less than 25'; ELSEIF a < 25 THEN
else SET @comment = 'value of a is less than 25';
set @comment='value of a is greater than 50 and less than 100'; ELSE
END if; SET @comment = 'value of a is greater than 50 and less than 100';
else END IF;
set @comment='value of a is 100'; ELSE
END if; SET @comment = 'value of a is 100';
if itisjustamediumsizeintintegervariablename = 0 then leave label1; END IF;
END if; IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 END IF;
values( itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx, INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
concat(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx, ' ', a), VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
a, @comment ); CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
set itisjustamediumsizeintintegervariablename = itisjustamediumsizeintintegervariablename - 1; ' ', a), a, @comment);
iterate label1; SET itisjustamediumsizeintintegervariablename
END loop label1; = itisjustamediumsizeintintegervariablename - 1;
ITERATE label1;
END LOOP label1;
END// END//
CALL sp1(101); CALL sp1(101);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
CALL sp1(100); CALL sp1(100);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
CALL sp1(75); CALL sp1(75);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
CALL sp1(40); CALL sp1(40);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
CALL sp1(20); CALL sp1(20);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
CALL sp1(-1); CALL sp1(-1);
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist
SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742
ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569; ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569;
ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist middleinitial lastname age_averylongfieldname_averylongname_1234569 COMMENT
a aaaaaaaaaabbbbbbbbc 0 default
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100
drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742;
ERROR 42S02: Unknown table 'res_t3_itisalongname_1381742_itsaverylongname_1381742'
DROP PROCEDURE sp1; DROP PROCEDURE sp1;
Testcase 4.3.2: Testcase 4.3.2:

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.2 - Syntax checks for the stored procedure-specific
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING “01“ is always exactly equivalent in action to a handler with an SQLWARNING
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND “02“ is always exactly equivalent in action to a handler with a NOT FOUND
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a anything other that “01“ or “02“ is always exactly equivalent in action to a
handler with an SQLEXCEPTION condition. handler with an SQLEXCEPTION condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 cur1;
open cur2; open cur2;
BEGIN 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; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5; SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5); insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4; set count = 4;
BEGIN BEGIN
while count> 0 do while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5; SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1; set count = count - 1;
END while; END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4; SELECT '-3-', count, newf1, newf2, newf4, newf4;
END; END;

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.3 - Syntax checks for the stored procedure-specific flow
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.6 - Privilege Checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.7 - SQL mode checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.8 - SHOW statement checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = memory; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = memory; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = memory; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = memory; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.10 - CALL checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@@ -383,7 +391,7 @@ DROP TABLE temp;
Testcase 3.1.10.8: Testcase 3.1.10.8:
------------------ ------------------
Ensure that the mysql_affected_rows() C API function always returns the correct Ensure that the mysql_affected_rows() C API function always returns the correct
number of rows affected by the execution of a stored procedure. number of rows affected by the execution of a stored procedure.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -1,90 +1,91 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
use test; use test;
Create trigger trg1_1 BEFORE INSERT Create trigger trg1_1 BEFORE INSERT
on tb3 for each row set @test_before = 2, new.f142 = @test_before; on tb3 for each row set @test_before = 2, new.f142 = @test_before;
Create trigger trg1_2 AFTER INSERT Create trigger trg1_2 AFTER INSERT
on tb3 for each row set @test_after = 6; on tb3 for each row set @test_after = 6;
Create trigger trg1_4 BEFORE UPDATE Create trigger trg1_4 BEFORE UPDATE
on tb3 for each row set @test_before = 27, on tb3 for each row set @test_before = 27,
new.f142 = @test_before, new.f142 = @test_before,
new.f122 = 'Before Update Trigger'; new.f122 = 'Before Update Trigger';
Create trigger trg1_3 AFTER UPDATE Create trigger trg1_3 AFTER UPDATE
on tb3 for each row set @test_after = '15'; on tb3 for each row set @test_after = '15';
Create trigger trg1_5 BEFORE DELETE on tb3 for each row Create trigger trg1_5 BEFORE DELETE on tb3 for each row
select count(*) into @test_before from tb3 as tr_tb3 select count(*) into @test_before from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
Create trigger trg1_6 AFTER DELETE on tb3 for each row Create trigger trg1_6 AFTER DELETE on tb3 for each row
select count(*) into @test_after from tb3 as tr_tb3 select count(*) into @test_after from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
set @test_before = 1; set @test_before = 1;
set @test_after = 5; set @test_after = 5;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
1 5 1 5
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; 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
@@ -97,9 +98,9 @@ set @test_after = 8;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
18 8 18 8
Update tb3 set tb3.f122 = 'Update', Update tb3 set tb3.f122 = 'Update',
tb3.f142 = @test_before, tb3.f142 = @test_before,
tb3.f144 = @test_after tb3.f144 = @test_after
where tb3.f121 = 'Test 3.5.1.1'; where tb3.f121 = 'Test 3.5.1.1';
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
@@ -107,7 +108,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
27 15 27 15
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
set @test_before = 0; set @test_before = 0;
set @test_after = 0; set @test_after = 0;
@@ -135,7 +136,7 @@ delete from tb3 where f121='Test 3.5.1.1';
Testcase: 3.5.1.2: Testcase: 3.5.1.2:
------------------ ------------------
Create trigger trg_1 after insert Create trigger trg_1 after insert
on tb3 for each statement set @x= 1; on tb3 for each statement set @x= 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
drop trigger trg_1; drop trigger trg_1;
@@ -188,7 +189,7 @@ 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=memory;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
@@ -225,7 +226,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
for each row set new.f120 ='X'; for each row set new.f120 ='X';
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
@@ -233,11 +234,11 @@ create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = memory; create table t1 (f1 integer) engine = memory;
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;
ERROR 42S02: Table 'trig_db.tb3' doesn't exist ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db; use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18; for each row set @ret_trg6_3 = 18;
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
use test; use test;
@@ -261,9 +262,9 @@ 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 = memory;
create table t2 (f1 char(50), f2 integer) engine = memory; create table t2 (f1 char(50), f2 integer) engine = memory;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
for each row set new.f1 ='trig t2'; for each row set new.f1 ='trig t2';
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
insert into t1 value ('insert to t1',1); insert into t1 value ('insert to t1',1);
@@ -293,15 +294,15 @@ 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 = memory;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; 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 = memory;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; 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 = memory;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
use trig_db1; use trig_db1;
@@ -340,11 +341,11 @@ 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 = memory;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory; create table trig_db2.t1 (f1 char(50), f2 integer) engine = memory;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; for each row set @test_var1='trig1_b';
create trigger trig_db1.trig1_a after insert on t1 create trigger trig_db1.trig1_a after insert on t1
for each row set @test_var2='trig1_a'; for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers order by trigger_name;

View File

@@ -1,64 +1,65 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 '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: Testcase 3.5.3:
--------------- ---------------
@@ -97,7 +98,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no'; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no'); insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1; select f1 from t1 order by f1;
@@ -129,7 +130,7 @@ Testcase 3.5.3.6:
----------------- -----------------
use priv_db; use priv_db;
drop trigger trg1_2; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes'); insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;

View File

@@ -989,7 +989,7 @@ root@localhost
show triggers; show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost on priv_db.t1 to test_yesprivs@localhost
with grant option; with grant option;
grant select grant select
on priv_db.t1 to test_useprivs@localhost; on priv_db.t1 to test_useprivs@localhost;
@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: 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; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
@@ -1252,7 +1252,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
create definer=current_user trigger trg1_1 create definer=current_user trigger trg1_1
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes'; set new.f1 = 'trig 1_1-yes';
insert into t1 (f1) values ('insert-no'); insert into t1 (f1) values ('insert-no');
@@ -1507,7 +1507,7 @@ select current_user;
current_user current_user
root@localhost root@localhost
revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost; revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
to test_yesprivs@localhost; to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost

View File

@@ -1,64 +1,65 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -82,7 +83,7 @@ Use db_drop;
create table t1 (f1 char(30)) engine=memory; create table t1 (f1 char(30)) engine=memory;
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
for each row set new.f1='Trigger 3.5.4.1'; for each row set new.f1='Trigger 3.5.4.1';
Use db_drop; Use db_drop;
Insert into t1 values ('Insert error 3.5.4.1'); Insert into t1 values ('Insert error 3.5.4.1');
@@ -121,7 +122,7 @@ 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=memory;
create table t1_433a (f1a char (5)) engine=memory; create table t1_433a (f1a char (5)) engine=memory;
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
set new.f1 = 'Trigger 3.5.4.3'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
@@ -142,7 +143,7 @@ create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=memory; create table t1 (f1 char(30)) engine=memory;
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';
Use db_drop4; Use db_drop4;
Insert into t1 values ('Insert 3.5.4.4'); Insert into t1 values ('Insert 3.5.4.4');
@@ -178,7 +179,7 @@ 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=memory;
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';
Use db_drop5; Use db_drop5;
Insert into t1 values ('Insert 3.5.4.5'); Insert into t1 values ('Insert 3.5.4.5');
@@ -215,7 +216,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
Testcase 3.5.5.2: Testcase 3.5.5.2:
----------------- -----------------
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999; on t1_temp for each row set new.f2=9999;
ERROR HY000: Trigger's 't1_temp' is view or temporary table ERROR HY000: Trigger's 't1_temp' is view or temporary table
drop table t1_temp; drop table t1_temp;
@@ -223,7 +224,7 @@ drop table t1_temp;
Testcase 3.5.5.3: Testcase 3.5.5.3:
----------------- -----------------
Create view vw3 as select f118 from tb3; Create view vw3 as select f118 from tb3;
Create trigger trg3 before INSERT Create trigger trg3 before INSERT
on vw3 for each row set new.f118='s'; on vw3 for each row set new.f118='s';
ERROR HY000: 'test.vw3' is not BASE TABLE ERROR HY000: 'test.vw3' is not BASE TABLE
drop view vw3; drop view vw3;
@@ -304,9 +305,9 @@ drop trigger tb3.trg4_2;
Testcase 3.5.7.5 / 3.5.7.6: Testcase 3.5.7.5 / 3.5.7.6:
--------------------------- ---------------------------
Create trigger trg5_1 BEFORE INSERT Create trigger trg5_1 BEFORE INSERT
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
Create trigger trg5_2 BEFORE INSERT Create trigger trg5_2 BEFORE INSERT
on tb3 for each row set new.f122='Trigger2 3.5.7.5'; on tb3 for each row set new.f122='Trigger2 3.5.7.5';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
@@ -324,9 +325,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
Testcase 3.5.7.7 / 3.5.7.8: Testcase 3.5.7.7 / 3.5.7.8:
--------------------------- ---------------------------
set @test_var='Before trig 3.5.7.7'; set @test_var='Before trig 3.5.7.7';
Create trigger trg6_1 AFTER INSERT Create trigger trg6_1 AFTER INSERT
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
Create trigger trg6_2 AFTER INSERT Create trigger trg6_2 AFTER INSERT
on tb3 for each row set @test_var='Trigger2 3.5.7.7'; on tb3 for each row set @test_var='Trigger2 3.5.7.7';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -352,9 +353,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
Testcase 3.5.7.9/10: Testcase 3.5.7.9/10:
-------------------- --------------------
Create trigger trg7_1 BEFORE UPDATE Create trigger trg7_1 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
Create trigger trg7_2 BEFORE UPDATE Create trigger trg7_2 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger2 3.5.7.9'; on tb3 for each row set new.f122='Trigger2 3.5.7.9';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
@@ -372,9 +373,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
Testcase 3.5.7.11/12: Testcase 3.5.7.11/12:
--------------------- ---------------------
set @test_var='Before trig 3.5.7.11'; set @test_var='Before trig 3.5.7.11';
Create trigger trg8_1 AFTER UPDATE Create trigger trg8_1 AFTER UPDATE
on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
Create trigger trg8_2 AFTER UPDATE Create trigger trg8_2 AFTER UPDATE
on tb3 for each row set @test_var='Trigger2 3.5.7.11'; on tb3 for each row set @test_var='Trigger2 3.5.7.11';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -402,9 +403,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
Testcase 3.5.7.13/14: Testcase 3.5.7.13/14:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg9_1 BEFORE DELETE Create trigger trg9_1 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
Create trigger trg9_2 BEFORE DELETE Create trigger trg9_2 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+10; on tb3 for each row set @test_var=@test_var+10;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -434,12 +435,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
Testcase 3.5.7.15/16: Testcase 3.5.7.15/16:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg_3_406010_1 AFTER DELETE Create trigger trg_3_406010_1 AFTER DELETE
on tb3 for each row set @test_var=@test_var+5; on tb3 for each row set @test_var=@test_var+5;
Create trigger trg_3_406010_2 AFTER DELETE Create trigger trg_3_406010_2 AFTER DELETE
on tb3 for each row set @test_var=@test_var+50; on tb3 for each row set @test_var=@test_var+50;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Create trigger trg_3_406010_1 AFTER INSERT Create trigger trg_3_406010_1 AFTER INSERT
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
select @test_var; select @test_var;

View File

@@ -1,64 +1,65 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -83,17 +84,17 @@ create database db_test;
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
grant LOCK TABLES on db_test.* to test_general; grant LOCK TABLES on db_test.* to test_general;
Use db_test; Use db_test;
create table t1_i ( 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=memory;
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=memory;
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,
@@ -116,18 +117,18 @@ Insert into t1_d values ('f',222,99999,999.99);
use test; use test;
Create trigger trg1 AFTER INSERT on tb3 for each row Create trigger trg1 AFTER INSERT on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
update db_test.t1_u update db_test.t1_u
set u144=new.f144, u163=new.f163 set u144=new.f144, u163=new.f163
where u136=new.f136; where u136=new.f136;
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
END// END//
Use test; Use test;
set @test_var=0; set @test_var=0;
Insert into tb3 (f120, f122, f136, f144, f163) Insert into tb3 (f120, f122, f136, f144, f163)
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
f120 f122 f136 f144 f163 f120 f122 f136 f144 f163
@@ -156,7 +157,7 @@ select @test_var;
----------------------------- -----------------------------
Create trigger trg2 BEFORE UPDATE on tb3 for each row Create trigger trg2 BEFORE UPDATE on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
END// END//
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -179,7 +180,7 @@ I 00222 0000023456 1.050000000000000000000000000000
----------------------------- -----------------------------
drop trigger trg2; drop trigger trg2;
Create trigger trg3 BEFORE UPDATE on tb3 for each row Create trigger trg3 BEFORE UPDATE on tb3 for each row
update db_test.t1_u update db_test.t1_u
set u120=new.f120 set u120=new.f120
where u136=new.f136; where u136=new.f136;
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
@@ -201,7 +202,7 @@ U 00222 0000023456 1.050000000000000000000000000000
drop trigger trg3; drop trigger trg3;
Create trigger trg4 AFTER UPDATE on tb3 for each row Create trigger trg4 AFTER UPDATE on tb3 for each row
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
update tb3 set f120='D', f136=444, update tb3 set f120='D', f136=444,
f122='Test 3.5.8.4-Single Delete' f122='Test 3.5.8.4-Single Delete'
where f122='Test 3.5.8.4-Single Update'; where f122='Test 3.5.8.4-Single Update';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -216,10 +217,10 @@ c 00333 0000099999 999.990000000000000000000000000000
------------------------------- -------------------------------
drop trigger trg4; drop trigger trg4;
Create trigger trg5 AFTER UPDATE on tb3 for each row Create trigger trg5 AFTER UPDATE on tb3 for each row
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
set @test_var=0; set @test_var=0;
update tb3 set f120='S', f136=111, update tb3 set f120='S', f136=111,
f122='Test 3.5.8.4-Single Select' f122='Test 3.5.8.4-Single Select'
where f122='Test 3.5.8.4-Single Delete'; where f122='Test 3.5.8.4-Single Delete';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -247,31 +248,31 @@ set @test_var='three', new.f120='4';
END IF; END IF;
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END IF; END IF;
END// END//
set @test_var='Empty', @test_var2=0; set @test_var='Empty', @test_var2=0;
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 one 2nd else D Test 3.5.8.5-if 00101 one 2nd else
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 two 2nd else D Test 3.5.8.5-if 00101 two 2nd else
D Test 3.5.8.5-if 00102 two 2nd else D Test 3.5.8.5-if 00102 two 2nd else
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd if d Test 3.5.8.5-if 00010 three 2nd if
D Test 3.5.8.5-if 00101 three 2nd if D Test 3.5.8.5-if 00101 three 2nd if
D Test 3.5.8.5-if 00102 three 2nd if D Test 3.5.8.5-if 00102 three 2nd if
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd else d Test 3.5.8.5-if 00010 three 2nd else
@@ -291,7 +292,7 @@ create trigger trg4 before update on tb3 for each row
BEGIN BEGIN
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
@@ -333,43 +334,43 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
END case; END case;
END// END//
set @test_var='Empty'; set @test_var='Empty';
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('a', 'Test 3.5.8.5-case', 5, 7); values ('a', 'Test 3.5.8.5-case', 5, 7);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 A*seven A Test 3.5.8.5-case 00125 0000000007 A*seven
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('b', 'Test 3.5.8.5-case', 71,16); values ('b', 'Test 3.5.8.5-case', 71,16);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 B*0000000016 A Test 3.5.8.5-case 00125 0000000007 B*0000000016
B Test 3.5.8.5-case 00191 0000000016 B*0000000016 B Test 3.5.8.5-case 00191 0000000016 B*0000000016
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('c', 'Test 3.5.8.5-case', 80,1); values ('c', 'Test 3.5.8.5-case', 80,1);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 C=one A Test 3.5.8.5-case 00125 0000000007 C=one
B Test 3.5.8.5-case 00191 0000000016 C=one B Test 3.5.8.5-case 00191 0000000016 C=one
C Test 3.5.8.5-case 00200 0000000001 C=one C Test 3.5.8.5-case 00200 0000000001 C=one
Insert into tb3 (f120, f122, f136) Insert into tb3 (f120, f122, f136)
values ('d', 'Test 3.5.8.5-case', 152); values ('d', 'Test 3.5.8.5-case', 152);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
A Test 3.5.8.5-case 00125 0000000007 1*0000099999 A Test 3.5.8.5-case 00125 0000000007 1*0000099999
B Test 3.5.8.5-case 00191 0000000016 1*0000099999 B Test 3.5.8.5-case 00191 0000000016 1*0000099999
C Test 3.5.8.5-case 00200 0000000001 1*0000099999 C Test 3.5.8.5-case 00200 0000000001 1*0000099999
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('e', 'Test 3.5.8.5-case', 200, 8); values ('e', 'Test 3.5.8.5-case', 200, 8);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -377,9 +378,9 @@ f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 1=eight A Test 3.5.8.5-case 00125 0000000007 1=eight
B Test 3.5.8.5-case 00191 0000000016 1=eight B Test 3.5.8.5-case 00191 0000000016 1=eight
C Test 3.5.8.5-case 00200 0000000001 1=eight C Test 3.5.8.5-case 00200 0000000001 1=eight
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('f', 'Test 3.5.8.5-case', 100, 8); values ('f', 'Test 3.5.8.5-case', 100, 8);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -400,40 +401,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
Testcase 3.5.8.5-loop/leave: Testcase 3.5.8.5-loop/leave:
---------------------------- ----------------------------
Create trigger trg4 after insert on tb3 for each row Create trigger trg4 after insert on tb3 for each row
BEGIN BEGIN
set @counter=0, @flag='Initial'; set @counter=0, @flag='Initial';
Label1: loop Label1: loop
if new.f136<new.f144 then if new.f136<new.f144 then
set @counter='Nothing to loop'; set @counter='Nothing to loop';
leave Label1; leave Label1;
else else
set @counter=@counter+1; set @counter=@counter+1;
if new.f136=new.f144+@counter then if new.f136=new.f144+@counter then
set @counter=concat(@counter, ' loops'); set @counter=concat(@counter, ' loops');
leave Label1; leave Label1;
end if; end if;
end if; end if;
iterate label1; iterate label1;
set @flag='Final'; set @flag='Final';
END loop Label1; END loop Label1;
END// END//
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 2, 8); values ('Test 3.5.8.5-loop', 2, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
Nothing to loop Initial Nothing to loop Initial
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 11, 8); values ('Test 3.5.8.5-loop', 11, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
3 loops Initial 3 loops Initial
Create trigger trg4_2 after update on tb3 for each row Create trigger trg4_2 after update on tb3 for each row
BEGIN BEGIN
Label1: loop Label1: loop
set @counter=@counter+1; set @counter=@counter+1;
END; END;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
END' at line 5 END' at line 5
drop trigger trg4_2; drop trigger trg4_2;
drop trigger trg4; drop trigger trg4;
@@ -443,23 +444,23 @@ Testcase 3.5.8.5-repeat:
------------------------ ------------------------
Create trigger trg6 after insert on tb3 for each row Create trigger trg6 after insert on tb3 for each row
BEGIN BEGIN
rp_label: REPEAT rp_label: REPEAT
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
UNTIL @counter1> new.f136 END REPEAT rp_label; UNTIL @counter1> new.f136 END REPEAT rp_label;
END// END//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-repeat', 13); values ('Test 3.5.8.5-repeat', 13);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
15 8 15 8
Create trigger trg6_2 after update on tb3 for each row Create trigger trg6_2 after update on tb3 for each row
BEGIN BEGIN
REPEAT REPEAT
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
drop trigger trg6; drop trigger trg6;
@@ -468,24 +469,24 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
Testcase 3.5.8.5-while: Testcase 3.5.8.5-while:
----------------------- -----------------------
Create trigger trg7 after insert on tb3 for each row Create trigger trg7 after insert on tb3 for each row
wl_label: WHILE @counter1 < new.f136 DO wl_label: WHILE @counter1 < new.f136 DO
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END WHILE wl_label// END WHILE wl_label//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-while', 7); values ('Test 3.5.8.5-while', 7);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
7 4 7 4
Create trigger trg7_2 after update on tb3 for each row Create trigger trg7_2 after update on tb3 for each row
BEGIN BEGIN
WHILE @counter1 < new.f136 WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
END' at line 4 END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while'; delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7; drop trigger trg7;

View File

@@ -1,68 +1,69 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 '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: Testcase 3.5.9.1/2:
------------------- -------------------
Create trigger trg1 BEFORE UPDATE on tb3 for each row Create trigger trg1 BEFORE UPDATE on tb3 for each row
set new.f142 = 94087, @counter=@counter+1; set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
@@ -74,15 +75,15 @@ NewValuew
0 0
set @counter=0; set @counter=0;
Update tb3 Set f142='1' where f130<100; 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
9 9 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
0 0
select count(*) as NonExpectedChanged from tb3 select count(*) as NonExpectedChanged from tb3
where f130>=130 and f142=94087; where f130>=130 and f142=94087;
NonExpectedChanged NonExpectedChanged
0 0
@@ -110,17 +111,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f163) Insert into tb3 (f122, f136, f163)
values ('Test 3.5.9.3', 7, 123.17); values ('Test 3.5.9.3', 7, 123.17);
Update tb3 Set f136=8 where f122='Test 3.5.9.3'; Update tb3 Set f136=8 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
@@ -131,11 +132,11 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
delete from tb3 where f122='Test 3.5.9.3'; delete from tb3 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
@@ -166,17 +167,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
0 0 0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f151, f163) Insert into tb3 (f122, f136, f151, f163)
values ('Test 3.5.9.4', 7, DEFAULT, 995.24); values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4%' order by f163; where f122 like 'Test 3.5.9.4%' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
@@ -189,15 +190,15 @@ where f122='Test 3.5.9.4';
ERROR 23000: Column 'f136' cannot be null ERROR 23000: Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4'; where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig' order by f163; where f122 like 'Test 3.5.9.4-trig' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4-trig 00000 999 NULL a NULL Test 3.5.9.4-trig 00000 999 NULL
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
@@ -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 create trigger trg5b after DELETE on tb3 for each row
set new.f122='test'; set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b; drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests) Testcase 3.5.9.10: (implied in previous tests)

View File

@@ -1,64 +1,65 @@
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 char(50), f121 char(50),
f122 char(50), f122 char(50),
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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = memory;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb3.txt'
into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
---------------------- ----------------------
@@ -135,7 +136,7 @@ set @counter= 0;
select @counter as 'Rows Loaded Before'; select @counter as 'Rows Loaded Before';
Rows Loaded Before Rows Loaded Before
0 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'; select @counter as 'Rows Loaded After';
Rows Loaded After Rows Loaded After
10 10

View File

@@ -1,117 +1,119 @@
USE test; USE test;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
DROP DATABASE IF EXISTS test1; DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1; CREATE DATABASE test1;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set" f109 set("1set","2set") not null default "1set"
) engine = memory; ) engine = memory;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/memory_tb2.txt'
into table tb2 ;
USE test; USE test;
! Attention: The file with the expected results is not ! Attention: The file with the expected results is not

View File

@@ -35,10 +35,10 @@ my_bigint = -9223372036854775808,
my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = -1.7976931348623E+308; my_double = -1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '<--------30 characters------->', my_char_30 = '<--------30 characters------->',
my_varchar_1000 = CONCAT('<---------1000 characters', my_varchar_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_binary_30 = '<--------30 characters------->', my_binary_30 = '<--------30 characters------->',
my_varbinary_1000 = CONCAT('<---------1000 characters', my_varbinary_1000 = CONCAT('<---------1000 characters',
RPAD('',965,'-'),'--------->'), RPAD('',965,'-'),'--------->'),
my_datetime = '9999-12-31 23:59:59', my_datetime = '9999-12-31 23:59:59',
@@ -50,23 +50,23 @@ my_bigint = 9223372036854775807,
my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 ,
my_double = 1.7976931348623E+308; my_double = 1.7976931348623E+308;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = ' ---äÖüß@µ*$-- ', my_char_30 = ' ---äÖüß@µ*$-- ',
my_varchar_1000 = ' ---äÖüß@µ*$-- ', my_varchar_1000 = ' ---äÖüß@µ*$-- ',
my_binary_30 = ' ---äÖüß@µ*$-- ', my_binary_30 = ' ---äÖüß@µ*$-- ',
my_varbinary_1000 = ' ---äÖüß@µ*$-- ', my_varbinary_1000 = ' ---äÖüß@µ*$-- ',
my_datetime = '2004-02-29 23:59:59', my_datetime = '2004-02-29 23:59:59',
my_date = '2004-02-29', my_date = '2004-02-29',
my_timestamp = '2004-02-29 23:59:59', my_timestamp = '2004-02-29 23:59:59',
my_time = '13:00:00', my_time = '13:00:00',
my_year = 2000, my_year = 2000,
my_bigint = 0, my_bigint = 0,
my_decimal = 0.0, my_decimal = 0.0,
my_double = 0; my_double = 0;
INSERT INTO t1_values SET INSERT INTO t1_values SET
my_char_30 = '-1', my_char_30 = '-1',
my_varchar_1000 = '-1', my_varchar_1000 = '-1',
my_binary_30 = '-1', my_binary_30 = '-1',
my_varbinary_1000 = '-1', my_varbinary_1000 = '-1',
my_datetime = '2005-06-28 10:00:00', my_datetime = '2005-06-28 10:00:00',
my_date = '2005-06-28', my_date = '2005-06-28',
my_timestamp = '2005-06-28 10:00:00', my_timestamp = '2005-06-28 10:00:00',
@@ -152,21 +152,21 @@ my_double = -0.33333333E+4;
some statements disabled because of some statements disabled because of
Bug#5913 Traditional mode: BIGINT range not correctly delimited Bug#5913 Traditional mode: BIGINT range not correctly delimited
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8), SET @my_select = 'SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r), SET @my_select = 'SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r), SET @my_select = 'SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SET @my_select = 'SELECT BIT_LENGTH(my_char_30), SET @my_select = 'SELECT BIT_LENGTH(my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
@@ -180,15 +180,15 @@ SET @my_select = 'SELECT INSTR(my_char_30, ''char''),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LCASE(my_varchar_1000), SET @my_select = 'SELECT LCASE(my_varchar_1000),
my_varchar_1000, id FROM t1_values'; my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values'; 'SELECT LEFT(my_char_30, 2), my_char_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values'; 'SELECT LEFT(my_varchar_1000, 2), my_varchar_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values'; 'SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values'; 'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
SET @my_select = SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values'; 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
@@ -202,9 +202,10 @@ SET @my_select = 'SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values'; my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varbinary_1000), SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values'; my_varbinary_1000, id FROM t1_values';
SELECT 'äÄ@' INTO OUTFILE '../tmp/func_view.dat'; SET @my_select =
SET @my_select = 'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'')
'SELECT LOAD_FILE(''../tmp/func_view.dat''), id FROM t1_values'; AS my_col,
id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_char_30), SET @my_select = 'SELECT LOCATE(''char'', my_char_30),
my_char_30, id FROM t1_values'; my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000), SET @my_select = 'SELECT LOCATE(''char'', my_varchar_1000),
@@ -810,36 +811,40 @@ WHERE select_id = 157 OR select_id IS NULL) order by id;
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; CREATE VIEW v1 AS SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values AS my_col,
id FROM t1_values;
SELECT LOAD_FILE('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt')
AS my_col,
id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL order by id; WHERE select_id = 156 OR select_id IS NULL order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt') AS `my_col`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
SELECT v1.* FROM v1 SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 156 OR select_id IS NULL) order by id; WHERE select_id = 156 OR select_id IS NULL) order by id;
LOAD_FILE('../tmp/func_view.dat') id my_col id
äÄ@ Here is content from load_file
1 1
äÄ@ Here is content from load_file
2 2
äÄ@ Here is content from load_file
3 3
äÄ@ Here is content from load_file
4 4
äÄ@ Here is content from load_file
5 5
DROP VIEW v1; DROP VIEW v1;
@@ -1013,10 +1018,10 @@ SELECT LEFT(my_binary_30, 2), my_binary_30, id FROM t1_values
WHERE select_id = 147 OR select_id IS NULL order by id; WHERE select_id = 147 OR select_id IS NULL order by id;
LEFT(my_binary_30, 2) my_binary_30 id LEFT(my_binary_30, 2) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<- <--------30 characters-------> 3 <- <--------30 characters-------> 3
- ---äÖüß@µ*$-- 4 - ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(`t1_values`.`my_binary_30`,2) AS `LEFT(my_binary_30, 2)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1141,10 +1146,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 141 OR select_id IS NULL order by id; WHERE select_id = 141 OR select_id IS NULL order by id;
BIT_LENGTH(my_binary_30) my_binary_30 id BIT_LENGTH(my_binary_30) my_binary_30 id
NULL NULL 1 NULL NULL 1
240 2 240 2
240 <--------30 characters-------> 3 240 <--------30 characters-------> 3
240 ---äÖüß@µ*$-- 4 240 ---äÖüß@µ*$-- 4
240 -1 5 240 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select bit_length(`t1_values`.`my_binary_30`) AS `BIT_LENGTH(my_binary_30)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1453,10 +1458,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 129 OR select_id IS NULL order by id; WHERE select_id = 129 OR select_id IS NULL order by id;
IFNULL(my_binary_30,'IS_NULL') my_binary_30 id IFNULL(my_binary_30,'IS_NULL') my_binary_30 id
IS_NULL NULL 1 IS_NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select ifnull(`t1_values`.`my_binary_30`,'IS_NULL') AS `IFNULL(my_binary_30,'IS_NULL')`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -1793,10 +1798,10 @@ WHERE select_id = 117 OR select_id IS NULL order by id;
IF(my_binary_30 IS NULL, 'IS NULL', IF(my_binary_30 IS NULL, 'IS NULL',
'IS NOT NULL') my_binary_30 id 'IS NOT NULL') my_binary_30 id
IS NULL NULL 1 IS NULL NULL 1
IS NOT NULL 2 IS NOT NULL 2
IS NOT NULL <--------30 characters-------> 3 IS NOT NULL <--------30 characters-------> 3
IS NOT NULL ---äÖüß@µ*$-- 4 IS NOT NULL ---äÖüß@µ*$-- 4
IS NOT NULL -1 5 IS NOT NULL -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select if(isnull(`t1_values`.`my_binary_30`),'IS NULL','IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL',
@@ -2113,10 +2118,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 105 OR select_id IS NULL order by id; WHERE select_id = 105 OR select_id IS NULL order by id;
IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id IF(my_binary_30, 'IS TRUE', 'IS NOT TRUE') my_binary_30 id
IS NOT TRUE NULL 1 IS NOT TRUE NULL 1
IS NOT TRUE 2 IS NOT TRUE 2
IS NOT TRUE <--------30 characters-------> 3 IS NOT TRUE <--------30 characters-------> 3
IS NOT TRUE ---äÖüß@µ*$-- 4 IS NOT TRUE ---äÖüß@µ*$-- 4
IS TRUE -1 5 IS TRUE -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->' Warning 1292 Truncated incorrect DOUBLE value: '<--------30 characters------->'
@@ -2200,9 +2205,9 @@ Warning 1292 Truncated incorrect DOUBLE value: ' ---
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING koi8r), SELECT CONVERT(my_varbinary_1000 USING koi8r),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 102 OR select_id IS NULL order by id; WHERE select_id = 102 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING koi8r) my_varbinary_1000 id
@@ -2226,17 +2231,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING koi8r), SELECT CONVERT(my_binary_30 USING koi8r),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 101 OR select_id IS NULL order by id; WHERE select_id = 101 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING koi8r) my_binary_30 id CONVERT(my_binary_30 USING koi8r) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---???????<3F>@??*$-- ---äÖüß@µ*$-- 4 ---???????<3F>@??*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using koi8r) AS `CONVERT(my_binary_30 USING koi8r)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2252,9 +2257,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING koi8r), SELECT CONVERT(my_varchar_1000 USING koi8r),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 100 OR select_id IS NULL order by id; WHERE select_id = 100 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id CONVERT(my_varchar_1000 USING koi8r) my_varchar_1000 id
@@ -2278,9 +2283,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING koi8r), SELECT CONVERT(my_char_30 USING koi8r),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 99 OR select_id IS NULL order by id; WHERE select_id = 99 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING koi8r) my_char_30 id CONVERT(my_char_30 USING koi8r) my_char_30 id
@@ -2304,9 +2309,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values; my_varbinary_1000, id FROM t1_values;
SELECT CONVERT(my_varbinary_1000 USING utf8), SELECT CONVERT(my_varbinary_1000 USING utf8),
my_varbinary_1000, id FROM t1_values my_varbinary_1000, id FROM t1_values
WHERE select_id = 98 OR select_id IS NULL order by id; WHERE select_id = 98 OR select_id IS NULL order by id;
CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id CONVERT(my_varbinary_1000 USING utf8) my_varbinary_1000 id
@@ -2330,17 +2335,17 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values; my_binary_30, id FROM t1_values;
SELECT CONVERT(my_binary_30 USING utf8), SELECT CONVERT(my_binary_30 USING utf8),
my_binary_30, id FROM t1_values my_binary_30, id FROM t1_values
WHERE select_id = 97 OR select_id IS NULL order by id; WHERE select_id = 97 OR select_id IS NULL order by id;
CONVERT(my_binary_30 USING utf8) my_binary_30 id CONVERT(my_binary_30 USING utf8) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4 ---<2D><><EFBFBD><EFBFBD>@<40>*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select convert(`t1_values`.`my_binary_30` using utf8) AS `CONVERT(my_binary_30 USING utf8)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -2356,9 +2361,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values; my_varchar_1000, id FROM t1_values;
SELECT CONVERT(my_varchar_1000 USING utf8), SELECT CONVERT(my_varchar_1000 USING utf8),
my_varchar_1000, id FROM t1_values my_varchar_1000, id FROM t1_values
WHERE select_id = 96 OR select_id IS NULL order by id; WHERE select_id = 96 OR select_id IS NULL order by id;
CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id CONVERT(my_varchar_1000 USING utf8) my_varchar_1000 id
@@ -2382,9 +2387,9 @@ NULL NULL 1
DROP VIEW v1; DROP VIEW v1;
CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8), CREATE VIEW v1 AS SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values; my_char_30, id FROM t1_values;
SELECT CONVERT(my_char_30 USING utf8), SELECT CONVERT(my_char_30 USING utf8),
my_char_30, id FROM t1_values my_char_30, id FROM t1_values
WHERE select_id = 95 OR select_id IS NULL order by id; WHERE select_id = 95 OR select_id IS NULL order by id;
CONVERT(my_char_30 USING utf8) my_char_30 id CONVERT(my_char_30 USING utf8) my_char_30 id
@@ -2673,10 +2678,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 85 OR select_id IS NULL order by id; WHERE select_id = 85 OR select_id IS NULL order by id;
CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS UNSIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
18446744073709551615 -1 5 18446744073709551615 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3037,10 +3042,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 73 OR select_id IS NULL order by id; WHERE select_id = 73 OR select_id IS NULL order by id;
CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id CAST(my_binary_30 AS SIGNED INTEGER) my_binary_30 id
NULL NULL 1 NULL NULL 1
0 2 0 2
0 <--------30 characters-------> 3 0 <--------30 characters-------> 3
0 ---äÖüß@µ*$-- 4 0 ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: '' Warning 1292 Truncated incorrect INTEGER value: ''
Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->' Warning 1292 Truncated incorrect INTEGER value: '<--------30 characters------->'
@@ -3397,11 +3402,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL order by id; WHERE select_id = 61 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1 NULL NULL 1
0.00 2 0.00 2
0.00 <--------30 characters-------> 3 0.00 <--------30 characters-------> 3
0.00 ---äÖüß@µ*$-- 4 0.00 ---äÖüß@µ*$-- 4
-1.00 -1 5 -1.00 -1 5
-3333.33 -3333.3333 28 -3333.33 -3333.3333 28
Warnings: Warnings:
Error 1366 Incorrect decimal value: '' for column '' at row -1 Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: '' Warning 1292 Truncated incorrect DECIMAL value: ''
@@ -3755,11 +3760,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 50 OR select_id IS NULL order by id; WHERE select_id = 50 OR select_id IS NULL order by id;
CAST(my_binary_30 AS TIME) my_binary_30 id CAST(my_binary_30 AS TIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
00:00:00 2 00:00:00 2
00:00:00 <--------30 characters-------> 3 00:00:00 <--------30 characters-------> 3
-00:00:00 ---äÖüß@µ*$-- 4 -00:00:00 ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
41:58:00 1 17:58 22 41:58:00 1 17:58 22
Warnings: Warnings:
Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: '<--------30 characters------->' Warning 1292 Truncated incorrect time value: '<--------30 characters------->'
@@ -4131,11 +4136,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 39 OR select_id IS NULL order by id; WHERE select_id = 39 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATETIME) my_binary_30 id CAST(my_binary_30 AS DATETIME) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 17:58:00 2005-06-27 17:58 16 2005-06-27 17:58:00 2005-06-27 17:58 16
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4501,11 +4506,11 @@ my_binary_30, id FROM t1_values
WHERE select_id = 28 OR select_id IS NULL order by id; WHERE select_id = 28 OR select_id IS NULL order by id;
CAST(my_binary_30 AS DATE) my_binary_30 id CAST(my_binary_30 AS DATE) my_binary_30 id
NULL NULL 1 NULL NULL 1
NULL 2 NULL 2
NULL <--------30 characters-------> 3 NULL <--------30 characters-------> 3
NULL ---äÖüß@µ*$-- 4 NULL ---äÖüß@µ*$-- 4
NULL -1 5 NULL -1 5
2005-06-27 2005-06-27 10 2005-06-27 2005-06-27 10
Warnings: Warnings:
Warning 1292 Incorrect datetime value: '' Warning 1292 Incorrect datetime value: ''
Warning 1292 Incorrect datetime value: '<--------30 characters------->' Warning 1292 Incorrect datetime value: '<--------30 characters------->'
@@ -4851,10 +4856,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 16 OR select_id IS NULL order by id; WHERE select_id = 16 OR select_id IS NULL order by id;
CAST(my_binary_30 AS CHAR) my_binary_30 id CAST(my_binary_30 AS CHAR) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset latin1) AS `CAST(my_binary_30 AS CHAR)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci
@@ -5163,10 +5168,10 @@ my_binary_30, id FROM t1_values
WHERE select_id = 4 OR select_id IS NULL order by id; WHERE select_id = 4 OR select_id IS NULL order by id;
CAST(my_binary_30 AS BINARY) my_binary_30 id CAST(my_binary_30 AS BINARY) my_binary_30 id
NULL NULL 1 NULL NULL 1
2 2
<--------30 characters-------> <--------30 characters-------> 3 <--------30 characters-------> <--------30 characters-------> 3
---äÖüß@µ*$-- ---äÖüß@µ*$-- 4 ---äÖüß@µ*$-- ---äÖüß@µ*$-- 4
-1 -1 5 -1 -1 5
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as char charset binary) AS `CAST(my_binary_30 AS BINARY)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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.1 - Syntax checks for the CREATE PROCEDURE, CREATE Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE
FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW
@@ -14949,46 +14957,47 @@ USE db_storedproc;
Testcase 4.3.1: Testcase 4.3.1:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1; 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;
CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742(
middleinitial CHAR, middleinitial CHAR, lastname VARCHAR(50),
lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 INT, COMMENT VARCHAR(100))
age_averylongfieldname_averylongname_1234569 int, ENGINE=<engine_to_be_tested>;
COMMENT TEXT) ENGINE=myisam;
INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default');
CREATE PROCEDURE sp1(a int) CREATE PROCEDURE sp1(a INT)
BEGIN BEGIN
declare itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx char; DECLARE itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx CHAR;
declare itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx varchar(100); DECLARE itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx VARCHAR(100);
declare itisjustamediumsizeintintegervariablename integer; DECLARE itisjustamediumsizeintintegervariablename INTEGER;
set itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b'; SET itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx = 'b';
set itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%'; SET itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx
set itisjustamediumsizeintintegervariablename = 5; = 'oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@%';
set @comment='a'; SET itisjustamediumsizeintintegervariablename = 5;
label1: loop SET @comment='a';
if a>100 then label1: LOOP
set @comment='value of a is greater than 100'; IF a > 100 THEN
elseif a<100 then SET @comment = 'value of a is greater than 100';
if a<50 then ELSEIF a < 100 THEN
set @comment='value of a is less than 50'; IF a < 50 THEN
elseif a<25 then SET @comment = 'value of a is less than 50';
set @comment='value of a is less than 25'; ELSEIF a < 25 THEN
else SET @comment = 'value of a is less than 25';
set @comment='value of a is greater than 50 and less than 100'; ELSE
END if; SET @comment = 'value of a is greater than 50 and less than 100';
else END IF;
set @comment='value of a is 100'; ELSE
END if; SET @comment = 'value of a is 100';
if itisjustamediumsizeintintegervariablename = 0 then leave label1; END IF;
END if; IF itisjustamediumsizeintintegervariablename = 0 THEN LEAVE label1;
insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 END IF;
values( itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx, INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742
concat(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx, ' ', a), VALUES(itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx,
a, @comment ); CONCAT(itisjustaverylargevarcharvariablename_xxxxxxxxxxxxxxxxxxxxx,
set itisjustamediumsizeintintegervariablename = itisjustamediumsizeintintegervariablename - 1; ' ', a), a, @comment);
iterate label1; SET itisjustamediumsizeintintegervariablename
END loop label1; = itisjustamediumsizeintintegervariablename - 1;
ITERATE label1;
END LOOP label1;
END// END//
CALL sp1(101); CALL sp1(101);
CALL sp1(100); CALL sp1(100);

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.2 - Syntax checks for the stored procedure-specific
programming statements BEGIN/END, DECLARE, SET, SELECT/INTO, OPEN, FETCH, CLOSE: 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>01<EFBFBD> is always exactly equivalent in action to a handler with an SQLWARNING “01“ is always exactly equivalent in action to a handler with an SQLWARNING
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
<EFBFBD>02<EFBFBD> is always exactly equivalent in action to a handler with a NOT FOUND “02“ is always exactly equivalent in action to a handler with a NOT FOUND
condition. condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 Ensure that a handler with a condition defined with an SQLSTATE that begins with
anything other that <EFBFBD>01<EFBFBD> or <EFBFBD>02<EFBFBD> is always exactly equivalent in action to a anything other that “01“ or “02“ is always exactly equivalent in action to a
handler with an SQLEXCEPTION condition. handler with an SQLEXCEPTION condition.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp0; 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 cur1;
open cur2; open cur2;
BEGIN 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; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-1-', count, newf1, newf2, newf4, newf5; SELECT '-1-', count, newf1, newf2, newf4, newf5;
insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5); insert into temp1 values ('cur1_out', newf1, newf2, newf4, newf5);
set count= 4; set count = 4;
BEGIN BEGIN
while count> 0 do while count > 0 do
fetch cur1 into newf1, newf2, newf4, newf5; fetch cur1 into newf1, newf2, newf4, newf5;
SELECT '-2-', count, newf1, newf2, newf4, newf5; SELECT '-2-', count, newf1, newf2, newf4, newf5;
set count = count- 1; set count = count - 1;
END while; END while;
SELECT '-3-', count, newf1, newf2, newf4, newf4; SELECT '-3-', count, newf1, newf2, newf4, newf4;
END; END;

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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 Section 3.1.3 - Syntax checks for the stored procedure-specific flow
control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE: control statements IF, CASE, LOOP, LEAVE, ITERATE, REPEAT, WHILE:

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.6 - Privilege Checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.7 - SQL mode checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.8 - SHOW statement checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -9,20 +9,25 @@ DROP DATABASE IF EXISTS db_storedproc_1;
CREATE DATABASE db_storedproc; CREATE DATABASE db_storedproc;
CREATE DATABASE db_storedproc_1; CREATE DATABASE db_storedproc_1;
USE db_storedproc; USE db_storedproc;
create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t1(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t1; engine = <engine_to_be_tested>;
create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t1;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t2; create table t2(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
create table t3(f1 char(20),f2 char(20),f3 integer) engine = myisam; engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t3.txt' into table t3; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t2;
create table t4(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t3(f1 char(20),f2 char(20),f3 integer) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t4; 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; USE db_storedproc_1;
create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t6(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t6; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t6;
USE db_storedproc; USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t7; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t7;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int) engine = myisam; create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t7.txt' into table t8; engine = <engine_to_be_tested>;
load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t7.txt' into table t8;
Warnings: Warnings:
Warning 1265 Data truncated for column 'f3' at row 1 Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2 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 8
Warning 1265 Data truncated for column 'f3' at row 9 Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10 Warning 1265 Data truncated for column 'f3' at row 10
create table t9(f1 int, f2 char(25), f3 int) engine = myisam; create table t9(f1 int, f2 char(25), f3 int) engine = <engine_to_be_tested>;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' into table t9; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t9.txt' into table t9;
create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; create table t10(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int)
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t10; engine = <engine_to_be_tested>;
create table t11(f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) engine = myisam; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/t4.txt' into table t10;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; 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: Section 3.1.10 - CALL checks:
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@@ -383,7 +391,7 @@ DROP TABLE temp;
Testcase 3.1.10.8: Testcase 3.1.10.8:
------------------ ------------------
Ensure that the mysql_affected_rows() C API function always returns the correct Ensure that the mysql_affected_rows() C API function always returns the correct
number of rows affected by the execution of a stored procedure. number of rows affected by the execution of a stored procedure.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@@ -1,96 +1,97 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase: 3.5.1.1: Testcase: 3.5.1.1:
------------------ ------------------
use test; use test;
Create trigger trg1_1 BEFORE INSERT Create trigger trg1_1 BEFORE INSERT
on tb3 for each row set @test_before = 2, new.f142 = @test_before; on tb3 for each row set @test_before = 2, new.f142 = @test_before;
Create trigger trg1_2 AFTER INSERT Create trigger trg1_2 AFTER INSERT
on tb3 for each row set @test_after = 6; on tb3 for each row set @test_after = 6;
Create trigger trg1_4 BEFORE UPDATE Create trigger trg1_4 BEFORE UPDATE
on tb3 for each row set @test_before = 27, on tb3 for each row set @test_before = 27,
new.f142 = @test_before, new.f142 = @test_before,
new.f122 = 'Before Update Trigger'; new.f122 = 'Before Update Trigger';
Create trigger trg1_3 AFTER UPDATE Create trigger trg1_3 AFTER UPDATE
on tb3 for each row set @test_after = '15'; on tb3 for each row set @test_after = '15';
Create trigger trg1_5 BEFORE DELETE on tb3 for each row Create trigger trg1_5 BEFORE DELETE on tb3 for each row
select count(*) into @test_before from tb3 as tr_tb3 select count(*) into @test_before from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
Create trigger trg1_6 AFTER DELETE on tb3 for each row Create trigger trg1_6 AFTER DELETE on tb3 for each row
select count(*) into @test_after from tb3 as tr_tb3 select count(*) into @test_after from tb3 as tr_tb3
where f121 = 'Test 3.5.1.1'; where f121 = 'Test 3.5.1.1';
set @test_before = 1; set @test_before = 1;
set @test_after = 5; set @test_after = 5;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
1 5 1 5
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1); values ('Test 3.5.1.1', 'First Row', @test_before, @test_after, 1);
select f121, f122, f142, f144, f134 from tb3 where f121 = 'Test 3.5.1.1'; 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
@@ -103,9 +104,9 @@ set @test_after = 8;
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
18 8 18 8
Update tb3 set tb3.f122 = 'Update', Update tb3 set tb3.f122 = 'Update',
tb3.f142 = @test_before, tb3.f142 = @test_before,
tb3.f144 = @test_after tb3.f144 = @test_after
where tb3.f121 = 'Test 3.5.1.1'; where tb3.f121 = 'Test 3.5.1.1';
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
@@ -113,7 +114,7 @@ Test 3.5.1.1 Before Update Trigger 27 0000000008 1
select @test_before, @test_after; select @test_before, @test_after;
@test_before @test_after @test_before @test_after
27 15 27 15
Insert into tb3 (f121, f122, f142, f144, f134) Insert into tb3 (f121, f122, f142, f144, f134)
values ('Test 3.5.1.1', 'Second Row', 5, 6, 2); values ('Test 3.5.1.1', 'Second Row', 5, 6, 2);
set @test_before = 0; set @test_before = 0;
set @test_after = 0; set @test_after = 0;
@@ -141,7 +142,7 @@ delete from tb3 where f121='Test 3.5.1.1';
Testcase: 3.5.1.2: Testcase: 3.5.1.2:
------------------ ------------------
Create trigger trg_1 after insert Create trigger trg_1 after insert
on tb3 for each statement set @x= 1; on tb3 for each statement set @x= 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'statement set @x= 1' at line 2
drop trigger trg_1; drop trigger trg_1;
@@ -194,7 +195,7 @@ 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=myisam;
CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1 CREATE TRIGGER trg5_1 BEFORE INSERT on test.t1
for each row set new.f3 = '14'; for each row set new.f3 = '14';
CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ CREATE TRIGGER trg_abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
BEFORE UPDATE on test.t1 for each row set new.f3 = '42'; BEFORE UPDATE on test.t1 for each row set new.f3 = '42';
@@ -231,7 +232,7 @@ CREATE TRIGGER @@view before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@@view before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't'; CREATE TRIGGER @name before insert on tb3 for each row set new.f120 = 't';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@name before insert on tb3 for each row set new.f120 = 't'' at line 1
CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3 CREATE TRIGGER tb3.trg6_1 BEFORE INSERT on test.tb3
for each row set new.f120 ='X'; for each row set new.f120 ='X';
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
drop database if exists trig_db; drop database if exists trig_db;
@@ -239,11 +240,11 @@ create database trig_db;
use trig_db; use trig_db;
create table t1 (f1 integer) engine = myisam; create table t1 (f1 integer) engine = myisam;
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;
ERROR 42S02: Table 'trig_db.tb3' doesn't exist ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db; use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3 CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18; for each row set @ret_trg6_3 = 18;
ERROR HY000: Trigger in wrong schema ERROR HY000: Trigger in wrong schema
use test; use test;
@@ -267,9 +268,9 @@ 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 = myisam;
create table t2 (f1 char(50), f2 integer) engine = myisam; create table t2 (f1 char(50), f2 integer) engine = myisam;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig t1'; for each row set new.f1 ='trig t1';
create trigger trig before update on t2 create trigger trig before update on t2
for each row set new.f1 ='trig t2'; for each row set new.f1 ='trig t2';
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
insert into t1 value ('insert to t1',1); insert into t1 value ('insert to t1',1);
@@ -299,15 +300,15 @@ 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 = myisam;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig1', @test_var1='trig1'; 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 = myisam;
create trigger trig before insert on t2 create trigger trig before insert on t2
for each row set new.f1 ='trig2', @test_var2='trig2'; 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 = myisam;
create trigger trig before insert on t1 create trigger trig before insert on t1
for each row set new.f1 ='trig3', @test_var3='trig3'; for each row set new.f1 ='trig3', @test_var3='trig3';
set @test_var1= '', @test_var2= '', @test_var3= ''; set @test_var1= '', @test_var2= '', @test_var3= '';
use trig_db1; use trig_db1;
@@ -346,11 +347,11 @@ 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 = myisam;
create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam; create table trig_db2.t1 (f1 char(50), f2 integer) engine = myisam;
create trigger trig1_b before insert on t1 create trigger trig1_b before insert on t1
for each row set @test_var1='trig1_b'; for each row set @test_var1='trig1_b';
create trigger trig_db1.trig1_a after insert on t1 create trigger trig_db1.trig1_a after insert on t1
for each row set @test_var2='trig1_a'; for each row set @test_var2='trig1_a';
create trigger trig_db2.trig2 before insert on trig_db2.t1 create trigger trig_db2.trig2 before insert on trig_db2.t1
for each row set @test_var3='trig2'; for each row set @test_var3='trig2';
select trigger_schema, trigger_name, event_object_table select trigger_schema, trigger_name, event_object_table
from information_schema.triggers order by trigger_name; from information_schema.triggers order by trigger_name;

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 '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: Testcase 3.5.3:
--------------- ---------------
@@ -103,7 +104,7 @@ test_noprivs@localhost
use priv_db; use priv_db;
create trigger trg1_1 before INSERT on t1 for each row create trigger trg1_1 before INSERT on t1 for each row
set new.f1 = 'trig 3.5.3.2_1-no'; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.2-no'); insert into t1 (f1) values ('insert 3.5.3.2-no');
select f1 from t1 order by f1; select f1 from t1 order by f1;
@@ -135,7 +136,7 @@ Testcase 3.5.3.6:
----------------- -----------------
use priv_db; use priv_db;
drop trigger trg1_2; 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; use priv_db;
insert into t1 (f1) values ('insert 3.5.3.6-yes'); insert into t1 (f1) values ('insert 3.5.3.6-yes');
select f1 from t1 order by f1; select f1 from t1 order by f1;

View File

@@ -989,7 +989,7 @@ root@localhost
show triggers; show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
grant select, insert, update ,trigger grant select, insert, update ,trigger
on priv_db.t1 to test_yesprivs@localhost on priv_db.t1 to test_yesprivs@localhost
with grant option; with grant option;
grant select grant select
on priv_db.t1 to test_useprivs@localhost; on priv_db.t1 to test_useprivs@localhost;
@@ -1214,7 +1214,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
Warnings: 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; drop trigger trg1_0;
create definer=test_yesprivs@localhost trigger trg1_0 create definer=test_yesprivs@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
@@ -1252,7 +1252,7 @@ create definer=not_ex_user@localhost trigger trg1_0
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_0-yes'; set new.f1 = 'trig 1_0-yes';
ERROR 42000: Access denied; you need the SUPER privilege for this operation ERROR 42000: Access denied; you need the SUPER privilege for this operation
create definer=current_user trigger trg1_1 create definer=current_user trigger trg1_1
before INSERT on t1 for each row before INSERT on t1 for each row
set new.f1 = 'trig 1_1-yes'; set new.f1 = 'trig 1_1-yes';
insert into t1 (f1) values ('insert-no'); insert into t1 (f1) values ('insert-no');
@@ -1507,7 +1507,7 @@ select current_user;
current_user current_user
root@localhost root@localhost
revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost; revoke UPDATE(f1) on priv_db.t1 from test_yesprivs@localhost;
grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1
to test_yesprivs@localhost; to test_yesprivs@localhost;
show grants for test_yesprivs@localhost; show grants for test_yesprivs@localhost;
Grants for test_yesprivs@localhost Grants for test_yesprivs@localhost

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -88,7 +89,7 @@ Use db_drop;
create table t1 (f1 char(30)) engine=myisam; create table t1 (f1 char(30)) engine=myisam;
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
for each row set new.f1='Trigger 3.5.4.1'; for each row set new.f1='Trigger 3.5.4.1';
Use db_drop; Use db_drop;
Insert into t1 values ('Insert error 3.5.4.1'); Insert into t1 values ('Insert error 3.5.4.1');
@@ -127,7 +128,7 @@ 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=myisam;
create table t1_433a (f1a char (5)) engine=myisam; create table t1_433a (f1a char (5)) engine=myisam;
CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row CREATE TRIGGER trg3 BEFORE INSERT on t1_433 for each row
set new.f1 = 'Trigger 3.5.4.3'; set new.f1 = 'Trigger 3.5.4.3';
Drop trigger t1.433.trg3; Drop trigger t1.433.trg3;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.trg3' at line 1
@@ -148,7 +149,7 @@ create database db_drop4;
Use db_drop4; Use db_drop4;
create table t1 (f1 char(30)) engine=myisam; create table t1 (f1 char(30)) engine=myisam;
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';
Use db_drop4; Use db_drop4;
Insert into t1 values ('Insert 3.5.4.4'); Insert into t1 values ('Insert 3.5.4.4');
@@ -184,7 +185,7 @@ 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=myisam;
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';
Use db_drop5; Use db_drop5;
Insert into t1 values ('Insert 3.5.4.5'); Insert into t1 values ('Insert 3.5.4.5');
@@ -221,7 +222,7 @@ ERROR 42S02: Table 'test.t100' doesn't exist
Testcase 3.5.5.2: Testcase 3.5.5.2:
----------------- -----------------
Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned); Create temporary table t1_temp (f1 bigint signed, f2 bigint unsigned);
Create trigger trg2 before INSERT Create trigger trg2 before INSERT
on t1_temp for each row set new.f2=9999; on t1_temp for each row set new.f2=9999;
ERROR HY000: Trigger's 't1_temp' is view or temporary table ERROR HY000: Trigger's 't1_temp' is view or temporary table
drop table t1_temp; drop table t1_temp;
@@ -229,7 +230,7 @@ drop table t1_temp;
Testcase 3.5.5.3: Testcase 3.5.5.3:
----------------- -----------------
Create view vw3 as select f118 from tb3; Create view vw3 as select f118 from tb3;
Create trigger trg3 before INSERT Create trigger trg3 before INSERT
on vw3 for each row set new.f118='s'; on vw3 for each row set new.f118='s';
ERROR HY000: 'test.vw3' is not BASE TABLE ERROR HY000: 'test.vw3' is not BASE TABLE
drop view vw3; drop view vw3;
@@ -310,9 +311,9 @@ drop trigger tb3.trg4_2;
Testcase 3.5.7.5 / 3.5.7.6: Testcase 3.5.7.5 / 3.5.7.6:
--------------------------- ---------------------------
Create trigger trg5_1 BEFORE INSERT Create trigger trg5_1 BEFORE INSERT
on tb3 for each row set new.f122='Trigger1 3.5.7.5/6'; on tb3 for each row set new.f122='Trigger1 3.5.7.5/6';
Create trigger trg5_2 BEFORE INSERT Create trigger trg5_2 BEFORE INSERT
on tb3 for each row set new.f122='Trigger2 3.5.7.5'; on tb3 for each row set new.f122='Trigger2 3.5.7.5';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5'); Insert into tb3 (f121,f122) values ('Test 3.5.7.5/6','Insert 3.5.7.5');
@@ -330,9 +331,9 @@ delete from tb3 where f121='Test 3.5.7.5/6';
Testcase 3.5.7.7 / 3.5.7.8: Testcase 3.5.7.7 / 3.5.7.8:
--------------------------- ---------------------------
set @test_var='Before trig 3.5.7.7'; set @test_var='Before trig 3.5.7.7';
Create trigger trg6_1 AFTER INSERT Create trigger trg6_1 AFTER INSERT
on tb3 for each row set @test_var='Trigger1 3.5.7.7/8'; on tb3 for each row set @test_var='Trigger1 3.5.7.7/8';
Create trigger trg6_2 AFTER INSERT Create trigger trg6_2 AFTER INSERT
on tb3 for each row set @test_var='Trigger2 3.5.7.7'; on tb3 for each row set @test_var='Trigger2 3.5.7.7';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -358,9 +359,9 @@ delete from tb3 where f121='Test 3.5.7.7/8';
Testcase 3.5.7.9/10: Testcase 3.5.7.9/10:
-------------------- --------------------
Create trigger trg7_1 BEFORE UPDATE Create trigger trg7_1 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger1 3.5.7.9/10'; on tb3 for each row set new.f122='Trigger1 3.5.7.9/10';
Create trigger trg7_2 BEFORE UPDATE Create trigger trg7_2 BEFORE UPDATE
on tb3 for each row set new.f122='Trigger2 3.5.7.9'; on tb3 for each row set new.f122='Trigger2 3.5.7.9';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9'); Insert into tb3 (f121,f122) values ('Test 3.5.7.9/10','Insert 3.5.7.9');
@@ -378,9 +379,9 @@ delete from tb3 where f121='Test 3.5.7.9/10';
Testcase 3.5.7.11/12: Testcase 3.5.7.11/12:
--------------------- ---------------------
set @test_var='Before trig 3.5.7.11'; set @test_var='Before trig 3.5.7.11';
Create trigger trg8_1 AFTER UPDATE Create trigger trg8_1 AFTER UPDATE
on tb3 for each row set @test_var='Trigger 3.5.7.11/12'; on tb3 for each row set @test_var='Trigger 3.5.7.11/12';
Create trigger trg8_2 AFTER UPDATE Create trigger trg8_2 AFTER UPDATE
on tb3 for each row set @test_var='Trigger2 3.5.7.11'; on tb3 for each row set @test_var='Trigger2 3.5.7.11';
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -408,9 +409,9 @@ delete from tb3 where f121='Test 3.5.7.11/12';
Testcase 3.5.7.13/14: Testcase 3.5.7.13/14:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg9_1 BEFORE DELETE Create trigger trg9_1 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
Create trigger trg9_2 BEFORE DELETE Create trigger trg9_2 BEFORE DELETE
on tb3 for each row set @test_var=@test_var+10; on tb3 for each row set @test_var=@test_var+10;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
select @test_var; select @test_var;
@@ -440,12 +441,12 @@ delete from tb3 where f121='Test 3.5.7.13/14';
Testcase 3.5.7.15/16: Testcase 3.5.7.15/16:
--------------------- ---------------------
set @test_var=1; set @test_var=1;
Create trigger trg_3_406010_1 AFTER DELETE Create trigger trg_3_406010_1 AFTER DELETE
on tb3 for each row set @test_var=@test_var+5; on tb3 for each row set @test_var=@test_var+5;
Create trigger trg_3_406010_2 AFTER DELETE Create trigger trg_3_406010_2 AFTER DELETE
on tb3 for each row set @test_var=@test_var+50; on tb3 for each row set @test_var=@test_var+50;
ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' ERROR 42000: This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
Create trigger trg_3_406010_1 AFTER INSERT Create trigger trg_3_406010_1 AFTER INSERT
on tb3 for each row set @test_var=@test_var+1; on tb3 for each row set @test_var=@test_var+1;
ERROR HY000: Trigger already exists ERROR HY000: Trigger already exists
select @test_var; select @test_var;

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 '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: Testcase: 3.5:
-------------- --------------
@@ -89,17 +90,17 @@ create database db_test;
grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general; grant SELECT, INSERT, UPDATE, DELETE on db_test.* to test_general;
grant LOCK TABLES on db_test.* to test_general; grant LOCK TABLES on db_test.* to test_general;
Use db_test; Use db_test;
create table t1_i ( 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=myisam;
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=myisam;
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,
@@ -122,18 +123,18 @@ Insert into t1_d values ('f',222,99999,999.99);
use test; use test;
Create trigger trg1 AFTER INSERT on tb3 for each row Create trigger trg1 AFTER INSERT on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
update db_test.t1_u update db_test.t1_u
set u144=new.f144, u163=new.f163 set u144=new.f144, u163=new.f163
where u136=new.f136; where u136=new.f136;
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
END// END//
Use test; Use test;
set @test_var=0; set @test_var=0;
Insert into tb3 (f120, f122, f136, f144, f163) Insert into tb3 (f120, f122, f136, f144, f163)
values ('1', 'Test 3.5.8.4', 222, 23456, 1.05); values ('1', 'Test 3.5.8.4', 222, 23456, 1.05);
Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4'; Select f120, f122, f136, f144, f163 from tb3 where f122= 'Test 3.5.8.4';
f120 f122 f136 f144 f163 f120 f122 f136 f144 f163
@@ -162,7 +163,7 @@ select @test_var;
----------------------------- -----------------------------
Create trigger trg2 BEFORE UPDATE on tb3 for each row Create trigger trg2 BEFORE UPDATE on tb3 for each row
BEGIN BEGIN
insert into db_test.t1_i insert into db_test.t1_i
values (new.f120, new.f136, new.f144, new.f163); values (new.f120, new.f136, new.f144, new.f163);
END// END//
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -185,7 +186,7 @@ I 00222 0000023456 1.050000000000000000000000000000
----------------------------- -----------------------------
drop trigger trg2; drop trigger trg2;
Create trigger trg3 BEFORE UPDATE on tb3 for each row Create trigger trg3 BEFORE UPDATE on tb3 for each row
update db_test.t1_u update db_test.t1_u
set u120=new.f120 set u120=new.f120
where u136=new.f136; where u136=new.f136;
update tb3 set f120='U', f122='Test 3.5.8.4-Single Update' update tb3 set f120='U', f122='Test 3.5.8.4-Single Update'
@@ -207,7 +208,7 @@ U 00222 0000023456 1.050000000000000000000000000000
drop trigger trg3; drop trigger trg3;
Create trigger trg4 AFTER UPDATE on tb3 for each row Create trigger trg4 AFTER UPDATE on tb3 for each row
delete from db_test.t1_d where d136= new.f136; delete from db_test.t1_d where d136= new.f136;
update tb3 set f120='D', f136=444, update tb3 set f120='D', f136=444,
f122='Test 3.5.8.4-Single Delete' f122='Test 3.5.8.4-Single Delete'
where f122='Test 3.5.8.4-Single Update'; where f122='Test 3.5.8.4-Single Update';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -222,10 +223,10 @@ c 00333 0000099999 999.990000000000000000000000000000
------------------------------- -------------------------------
drop trigger trg4; drop trigger trg4;
Create trigger trg5 AFTER UPDATE on tb3 for each row Create trigger trg5 AFTER UPDATE on tb3 for each row
select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u select sum(db_test.t1_u.u163) into @test_var from db_test.t1_u
where u136= new.f136; where u136= new.f136;
set @test_var=0; set @test_var=0;
update tb3 set f120='S', f136=111, update tb3 set f120='S', f136=111,
f122='Test 3.5.8.4-Single Select' f122='Test 3.5.8.4-Single Select'
where f122='Test 3.5.8.4-Single Delete'; where f122='Test 3.5.8.4-Single Delete';
Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%'; Select f120, f122, f136, f144, f163 from tb3 where f122 like 'Test 3.5.8.4%';
@@ -253,31 +254,31 @@ set @test_var='three', new.f120='4';
END IF; END IF;
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END IF; END IF;
END// END//
set @test_var='Empty', @test_var2=0; set @test_var='Empty', @test_var2=0;
Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101); Insert into tb3 (f120, f122, f136) values ('1', 'Test 3.5.8.5-if', 101);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 one 2nd else D Test 3.5.8.5-if 00101 one 2nd else
Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102); Insert into tb3 (f120, f122, f136) values ('2', 'Test 3.5.8.5-if', 102);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
D Test 3.5.8.5-if 00101 two 2nd else D Test 3.5.8.5-if 00101 two 2nd else
D Test 3.5.8.5-if 00102 two 2nd else D Test 3.5.8.5-if 00102 two 2nd else
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 10);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd if d Test 3.5.8.5-if 00010 three 2nd if
D Test 3.5.8.5-if 00101 three 2nd if D Test 3.5.8.5-if 00101 three 2nd if
D Test 3.5.8.5-if 00102 three 2nd if D Test 3.5.8.5-if 00102 three 2nd if
Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103); Insert into tb3 (f120, f122, f136) values ('3', 'Test 3.5.8.5-if', 103);
select f120, f122, f136, @test_var, @test_var2 select f120, f122, f136, @test_var, @test_var2
from tb3 where f122 = 'Test 3.5.8.5-if' order by f136; from tb3 where f122 = 'Test 3.5.8.5-if' order by f136;
f120 f122 f136 @test_var @test_var2 f120 f122 f136 @test_var @test_var2
d Test 3.5.8.5-if 00010 three 2nd else d Test 3.5.8.5-if 00010 three 2nd else
@@ -297,7 +298,7 @@ create trigger trg4 before update on tb3 for each row
BEGIN BEGIN
IF (new.f120='4') and (new.f136=10) then IF (new.f120='4') and (new.f136=10) then
set @test_var2='2nd if', new.f120='d'; set @test_var2='2nd if', new.f120='d';
ELSE ELSE
set @test_var2='2nd else', new.f120='D'; set @test_var2='2nd else', new.f120='D';
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 7
@@ -339,43 +340,43 @@ ELSE set @test_var=CONCAT(new.f120, '*', new.f144);
END case; END case;
END// END//
set @test_var='Empty'; set @test_var='Empty';
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('a', 'Test 3.5.8.5-case', 5, 7); values ('a', 'Test 3.5.8.5-case', 5, 7);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 A*seven A Test 3.5.8.5-case 00125 0000000007 A*seven
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('b', 'Test 3.5.8.5-case', 71,16); values ('b', 'Test 3.5.8.5-case', 71,16);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 B*0000000016 A Test 3.5.8.5-case 00125 0000000007 B*0000000016
B Test 3.5.8.5-case 00191 0000000016 B*0000000016 B Test 3.5.8.5-case 00191 0000000016 B*0000000016
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('c', 'Test 3.5.8.5-case', 80,1); values ('c', 'Test 3.5.8.5-case', 80,1);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 C=one A Test 3.5.8.5-case 00125 0000000007 C=one
B Test 3.5.8.5-case 00191 0000000016 C=one B Test 3.5.8.5-case 00191 0000000016 C=one
C Test 3.5.8.5-case 00200 0000000001 C=one C Test 3.5.8.5-case 00200 0000000001 C=one
Insert into tb3 (f120, f122, f136) Insert into tb3 (f120, f122, f136)
values ('d', 'Test 3.5.8.5-case', 152); values ('d', 'Test 3.5.8.5-case', 152);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1*0000099999 1 Test 3.5.8.5-case 00152 0000099999 1*0000099999
A Test 3.5.8.5-case 00125 0000000007 1*0000099999 A Test 3.5.8.5-case 00125 0000000007 1*0000099999
B Test 3.5.8.5-case 00191 0000000016 1*0000099999 B Test 3.5.8.5-case 00191 0000000016 1*0000099999
C Test 3.5.8.5-case 00200 0000000001 1*0000099999 C Test 3.5.8.5-case 00200 0000000001 1*0000099999
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('e', 'Test 3.5.8.5-case', 200, 8); values ('e', 'Test 3.5.8.5-case', 200, 8);
Warnings: Warnings:
Warning 1265 Data truncated for column 'f120' at row 1 Warning 1265 Data truncated for column 'f120' at row 1
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -383,9 +384,9 @@ f120 f122 f136 f144 @test_var
A Test 3.5.8.5-case 00125 0000000007 1=eight A Test 3.5.8.5-case 00125 0000000007 1=eight
B Test 3.5.8.5-case 00191 0000000016 1=eight B Test 3.5.8.5-case 00191 0000000016 1=eight
C Test 3.5.8.5-case 00200 0000000001 1=eight C Test 3.5.8.5-case 00200 0000000001 1=eight
Insert into tb3 (f120, f122, f136, f144) Insert into tb3 (f120, f122, f136, f144)
values ('f', 'Test 3.5.8.5-case', 100, 8); values ('f', 'Test 3.5.8.5-case', 100, 8);
select f120, f122, f136, f144, @test_var select f120, f122, f136, f144, @test_var
from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136;
f120 f122 f136 f144 @test_var f120 f122 f136 f144 @test_var
1 Test 3.5.8.5-case 00152 0000099999 1=eight 1 Test 3.5.8.5-case 00152 0000099999 1=eight
@@ -406,40 +407,40 @@ delete from tb3 where f121='Test 3.5.8.5-case';
Testcase 3.5.8.5-loop/leave: Testcase 3.5.8.5-loop/leave:
---------------------------- ----------------------------
Create trigger trg4 after insert on tb3 for each row Create trigger trg4 after insert on tb3 for each row
BEGIN BEGIN
set @counter=0, @flag='Initial'; set @counter=0, @flag='Initial';
Label1: loop Label1: loop
if new.f136<new.f144 then if new.f136<new.f144 then
set @counter='Nothing to loop'; set @counter='Nothing to loop';
leave Label1; leave Label1;
else else
set @counter=@counter+1; set @counter=@counter+1;
if new.f136=new.f144+@counter then if new.f136=new.f144+@counter then
set @counter=concat(@counter, ' loops'); set @counter=concat(@counter, ' loops');
leave Label1; leave Label1;
end if; end if;
end if; end if;
iterate label1; iterate label1;
set @flag='Final'; set @flag='Final';
END loop Label1; END loop Label1;
END// END//
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 2, 8); values ('Test 3.5.8.5-loop', 2, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
Nothing to loop Initial Nothing to loop Initial
Insert into tb3 (f122, f136, f144) Insert into tb3 (f122, f136, f144)
values ('Test 3.5.8.5-loop', 11, 8); values ('Test 3.5.8.5-loop', 11, 8);
select @counter, @flag; select @counter, @flag;
@counter @flag @counter @flag
3 loops Initial 3 loops Initial
Create trigger trg4_2 after update on tb3 for each row Create trigger trg4_2 after update on tb3 for each row
BEGIN BEGIN
Label1: loop Label1: loop
set @counter=@counter+1; set @counter=@counter+1;
END; END;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
END' at line 5 END' at line 5
drop trigger trg4_2; drop trigger trg4_2;
drop trigger trg4; drop trigger trg4;
@@ -449,23 +450,23 @@ Testcase 3.5.8.5-repeat:
------------------------ ------------------------
Create trigger trg6 after insert on tb3 for each row Create trigger trg6 after insert on tb3 for each row
BEGIN BEGIN
rp_label: REPEAT rp_label: REPEAT
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label; IF (@counter1 MOD 2 = 0) THEN ITERATE rp_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
UNTIL @counter1> new.f136 END REPEAT rp_label; UNTIL @counter1> new.f136 END REPEAT rp_label;
END// END//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-repeat', 13); values ('Test 3.5.8.5-repeat', 13);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
15 8 15 8
Create trigger trg6_2 after update on tb3 for each row Create trigger trg6_2 after update on tb3 for each row
BEGIN BEGIN
REPEAT REPEAT
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 5
drop trigger trg6; drop trigger trg6;
@@ -474,24 +475,24 @@ delete from tb3 where f122='Test 3.5.8.5-repeat';
Testcase 3.5.8.5-while: Testcase 3.5.8.5-while:
----------------------- -----------------------
Create trigger trg7 after insert on tb3 for each row Create trigger trg7 after insert on tb3 for each row
wl_label: WHILE @counter1 < new.f136 DO wl_label: WHILE @counter1 < new.f136 DO
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label; IF (@counter1 MOD 2 = 0) THEN ITERATE wl_label;
END IF; END IF;
SET @counter2 = @counter2 + 1; SET @counter2 = @counter2 + 1;
END WHILE wl_label// END WHILE wl_label//
set @counter1= 0, @counter2= 0; set @counter1= 0, @counter2= 0;
Insert into tb3 (f122, f136) Insert into tb3 (f122, f136)
values ('Test 3.5.8.5-while', 7); values ('Test 3.5.8.5-while', 7);
select @counter1, @counter2; select @counter1, @counter2;
@counter1 @counter2 @counter1 @counter2
7 4 7 4
Create trigger trg7_2 after update on tb3 for each row Create trigger trg7_2 after update on tb3 for each row
BEGIN BEGIN
WHILE @counter1 < new.f136 WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1; SET @counter1 = @counter1 + 1;
END// END//
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
END' at line 4 END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while'; delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7; drop trigger trg7;

View File

@@ -1,74 +1,75 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 '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: Testcase 3.5.9.1/2:
------------------- -------------------
Create trigger trg1 BEFORE UPDATE on tb3 for each row Create trigger trg1 BEFORE UPDATE on tb3 for each row
set new.f142 = 94087, @counter=@counter+1; set new.f142 = 94087, @counter=@counter+1;
TotalRows TotalRows
10 10
@@ -80,15 +81,15 @@ NewValuew
0 0
set @counter=0; set @counter=0;
Update tb3 Set f142='1' where f130<100; 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 8 8
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
0 0
select count(*) as NonExpectedChanged from tb3 select count(*) as NonExpectedChanged from tb3
where f130>=130 and f142=94087; where f130>=130 and f142=94087;
NonExpectedChanged NonExpectedChanged
0 0
@@ -116,17 +117,17 @@ set @tr_var_af_118=old.f118, @tr_var_af_121=old.f121,
0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f163) Insert into tb3 (f122, f136, f163)
values ('Test 3.5.9.3', 7, 123.17); values ('Test 3.5.9.3', 7, 123.17);
Update tb3 Set f136=8 where f122='Test 3.5.9.3'; Update tb3 Set f136=8 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000 a NULL Test 3.5.9.3 00008 123.170000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 7 123.170000000000000000000000000000 a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
@@ -137,11 +138,11 @@ a NULL Test 3.5.9.3 7 123.170000000000000000000000000000
delete from tb3 where f122='Test 3.5.9.3'; delete from tb3 where f122='Test 3.5.9.3';
select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136; select f118, f121, f122, f136, f163 from tb3 where f122='Test 3.5.9.3' order by f136;
f118 f121 f122 f136 f163 f118 f121 f122 f136 f163
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_163; @tr_var_af_136, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_163
a NULL Test 3.5.9.3 8 123.170000000000000000000000000000 a NULL Test 3.5.9.3 8 123.170000000000000000000000000000
@@ -172,17 +173,17 @@ set @tr_var_af_118=new.f118, @tr_var_af_121=new.f121,
0 0 0 0 0 0 0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0 0 0 0 0 0 0
Insert into tb3 (f122, f136, f151, f163) Insert into tb3 (f122, f136, f151, f163)
values ('Test 3.5.9.4', 7, DEFAULT, 995.24); values ('Test 3.5.9.4', 7, DEFAULT, 995.24);
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4%' order by f163; where f122 like 'Test 3.5.9.4%' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 00007 999 995.240000000000000000000000000000
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000 a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
@@ -195,15 +196,15 @@ where f122='Test 3.5.9.4';
ERROR 23000: Column 'f136' cannot be null ERROR 23000: Column 'f136' cannot be null
Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL Update tb3 Set f122='Test 3.5.9.4-trig', f136=0, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4'; where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3 select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig' order by f163; where f122 like 'Test 3.5.9.4-trig' order by f163;
f118 f121 f122 f136 f151 f163 f118 f121 f122 f136 f151 f163
a NULL Test 3.5.9.4-trig 00000 999 NULL a NULL Test 3.5.9.4-trig 00000 999 NULL
select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122, select @tr_var_b4_118, @tr_var_b4_121, @tr_var_b4_122,
@tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163; @tr_var_b4_136, @tr_var_b4_151, @tr_var_b4_163;
@tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163 @tr_var_b4_118 @tr_var_b4_121 @tr_var_b4_122 @tr_var_b4_136 @tr_var_b4_151 @tr_var_b4_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122, select @tr_var_af_118, @tr_var_af_121, @tr_var_af_122,
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163; @tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163 @tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
a NULL Test 3.5.9.4-trig 0 999 NULL a NULL Test 3.5.9.4-trig 0 999 NULL
@@ -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 create trigger trg5b after DELETE on tb3 for each row
set new.f122='test'; set new.f122='test';
ERROR HY000: There is no NEW row in on DELETE trigger ERROR HY000: There is no NEW row in on DELETE trigger
drop trigger trg5a;
drop trigger trg5b; drop trigger trg5b;
Testcase 3.5.9.10: (implied in previous tests) Testcase 3.5.9.10: (implied in previous tests)

View File

@@ -1,70 +1,71 @@
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 tinytext,
f122 text, f122 text,
f123 mediumtext, f123 mediumtext,
f124 longtext unicode, f124 longtext unicode,
f125 tinyblob, f125 tinyblob,
f126 blob, f126 blob,
f127 mediumblob, f127 mediumblob,
f128 longblob, 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,
f132 tinyint zerofill not null DEFAULT 99, f132 tinyint zerofill not null DEFAULT 99,
f133 tinyint unsigned zerofill not null DEFAULT 99, f133 tinyint unsigned zerofill not null DEFAULT 99,
f134 smallint not null DEFAULT 999, f134 smallint not null DEFAULT 999,
f135 smallint unsigned not null DEFAULT 999, f135 smallint unsigned not null DEFAULT 999,
f136 smallint zerofill not null DEFAULT 999, f136 smallint zerofill not null DEFAULT 999,
f137 smallint unsigned zerofill not null DEFAULT 999, f137 smallint unsigned zerofill not null DEFAULT 999,
f138 mediumint not null DEFAULT 9999, f138 mediumint not null DEFAULT 9999,
f139 mediumint unsigned not null DEFAULT 9999, f139 mediumint unsigned not null DEFAULT 9999,
f140 mediumint zerofill not null DEFAULT 9999, f140 mediumint zerofill not null DEFAULT 9999,
f141 mediumint unsigned zerofill not null DEFAULT 9999, f141 mediumint unsigned zerofill not null DEFAULT 9999,
f142 int not null DEFAULT 99999, f142 int not null DEFAULT 99999,
f143 int unsigned not null DEFAULT 99999, f143 int unsigned not null DEFAULT 99999,
f144 int zerofill not null DEFAULT 99999, f144 int zerofill not null DEFAULT 99999,
f145 int unsigned zerofill not null DEFAULT 99999, f145 int unsigned zerofill not null DEFAULT 99999,
f146 bigint not null DEFAULT 999999, f146 bigint not null DEFAULT 999999,
f147 bigint unsigned not null DEFAULT 999999, f147 bigint unsigned not null DEFAULT 999999,
f148 bigint zerofill not null DEFAULT 999999, f148 bigint zerofill not null DEFAULT 999999,
f149 bigint unsigned zerofill not null DEFAULT 999999, f149 bigint unsigned zerofill not null DEFAULT 999999,
f150 decimal not null DEFAULT 999.999, f150 decimal not null DEFAULT 999.999,
f151 decimal unsigned not null DEFAULT 999.17, f151 decimal unsigned not null DEFAULT 999.17,
f152 decimal zerofill not null DEFAULT 999.999, f152 decimal zerofill not null DEFAULT 999.999,
f153 decimal unsigned zerofill, f153 decimal unsigned zerofill,
f154 decimal (0), f154 decimal (0),
f155 decimal (64), f155 decimal (64),
f156 decimal (0) unsigned, f156 decimal (0) unsigned,
f157 decimal (64) unsigned, f157 decimal (64) unsigned,
f158 decimal (0) zerofill, f158 decimal (0) zerofill,
f159 decimal (64) zerofill, f159 decimal (64) zerofill,
f160 decimal (0) unsigned zerofill, f160 decimal (0) unsigned zerofill,
f161 decimal (64) unsigned zerofill, f161 decimal (64) unsigned zerofill,
f162 decimal (0,0), f162 decimal (0,0),
f163 decimal (63,30), f163 decimal (63,30),
f164 decimal (0,0) unsigned, f164 decimal (0,0) unsigned,
f165 decimal (63,30) unsigned, f165 decimal (63,30) unsigned,
f166 decimal (0,0) zerofill, f166 decimal (0,0) zerofill,
f167 decimal (63,30) zerofill, f167 decimal (63,30) zerofill,
f168 decimal (0,0) unsigned zerofill, f168 decimal (0,0) unsigned zerofill,
f169 decimal (63,30) unsigned zerofill, f169 decimal (63,30) unsigned zerofill,
f170 numeric, f170 numeric,
f171 numeric unsigned, f171 numeric unsigned,
f172 numeric zerofill, 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 = myisam;
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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb3.txt'
into table tb3;
Testcase 3.5.10.1/2/3: Testcase 3.5.10.1/2/3:
---------------------- ----------------------
@@ -141,7 +142,7 @@ set @counter= 0;
select @counter as 'Rows Loaded Before'; select @counter as 'Rows Loaded Before';
Rows Loaded Before Rows Loaded Before
0 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'; select @counter as 'Rows Loaded After';
Rows Loaded After Rows Loaded After
10 10

View File

@@ -1,133 +1,135 @@
USE test; USE test;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
DROP DATABASE IF EXISTS test1; DROP DATABASE IF EXISTS test1;
CREATE DATABASE test1; CREATE DATABASE test1;
USE test1; USE test1;
drop table if exists tb2 ; drop table if exists tb2 ;
create table tb2 ( create table tb2 (
f59 numeric (0) unsigned, f59 numeric (0) unsigned,
f60 numeric (64) unsigned, f60 numeric (64) unsigned,
f61 numeric (0) zerofill, f61 numeric (0) zerofill,
f62 numeric (64) zerofill, f62 numeric (64) zerofill,
f63 numeric (0) unsigned zerofill, f63 numeric (0) unsigned zerofill,
f64 numeric (64) unsigned zerofill, f64 numeric (64) unsigned zerofill,
f65 numeric (0,0), f65 numeric (0,0),
f66 numeric (63,30), f66 numeric (63,30),
f67 numeric (0,0) unsigned, f67 numeric (0,0) unsigned,
f68 numeric (63,30) unsigned, f68 numeric (63,30) unsigned,
f69 numeric (0,0) zerofill, f69 numeric (0,0) zerofill,
f70 numeric (63,30) zerofill, f70 numeric (63,30) zerofill,
f71 numeric (0,0) unsigned zerofill, f71 numeric (0,0) unsigned zerofill,
f72 numeric (63,30) unsigned zerofill, f72 numeric (63,30) unsigned zerofill,
f73 real, f73 real,
f74 real unsigned, f74 real unsigned,
f75 real zerofill, f75 real zerofill,
f76 real unsigned zerofill, f76 real unsigned zerofill,
f77 double default 7.7, f77 double default 7.7,
f78 double unsigned default 7.7, f78 double unsigned default 7.7,
f79 double zerofill default 7.7, f79 double zerofill default 7.7,
f80 double unsigned zerofill default 8.8, f80 double unsigned zerofill default 8.8,
f81 float not null default 8.8, f81 float not null default 8.8,
f82 float unsigned not null default 8.8, f82 float unsigned not null default 8.8,
f83 float zerofill not null default 8.8, f83 float zerofill not null default 8.8,
f84 float unsigned zerofill not null default 8.8, f84 float unsigned zerofill not null default 8.8,
f85 float(0) not null default 8.8, f85 float(0) not null default 8.8,
f86 float(23) not null default 8.8, f86 float(23) not null default 8.8,
f87 float(0) unsigned not null default 8.8, f87 float(0) unsigned not null default 8.8,
f88 float(23) unsigned not null default 8.8, f88 float(23) unsigned not null default 8.8,
f89 float(0) zerofill not null default 8.8, f89 float(0) zerofill not null default 8.8,
f90 float(23) zerofill not null default 8.8, f90 float(23) zerofill not null default 8.8,
f91 float(0) unsigned zerofill not null default 8.8, f91 float(0) unsigned zerofill not null default 8.8,
f92 float(23) unsigned zerofill not null default 8.8, f92 float(23) unsigned zerofill not null default 8.8,
f93 float(24) not null default 8.8, f93 float(24) not null default 8.8,
f94 float(53) not null default 8.8, f94 float(53) not null default 8.8,
f95 float(24) unsigned not null default 8.8, f95 float(24) unsigned not null default 8.8,
f96 float(53) unsigned not null default 8.8, f96 float(53) unsigned not null default 8.8,
f97 float(24) zerofill not null default 8.8, f97 float(24) zerofill not null default 8.8,
f98 float(53) zerofill not null default 8.8, f98 float(53) zerofill not null default 8.8,
f99 float(24) unsigned zerofill not null default 8.8, f99 float(24) unsigned zerofill not null default 8.8,
f100 float(53) unsigned zerofill not null default 8.8, f100 float(53) unsigned zerofill not null default 8.8,
f101 date not null default '2000-01-01', f101 date not null default '2000-01-01',
f102 time not null default 20, f102 time not null default 20,
f103 datetime not null default '2/2/2', f103 datetime not null default '2/2/2',
f104 timestamp not null default 20001231235959, f104 timestamp not null default 20001231235959,
f105 year not null default 2000, f105 year not null default 2000,
f106 year(3) not null default 2000, f106 year(3) not null default 2000,
f107 year(4) not null default 2000, f107 year(4) not null default 2000,
f108 enum("1enum","2enum") not null default "1enum", f108 enum("1enum","2enum") not null default "1enum",
f109 set("1set","2set") not null default "1set", f109 set("1set","2set") not null default "1set",
f110 VARBINARY(64) null, f110 VARBINARY(64) null,
f111 VARBINARY(27) null , f111 VARBINARY(27) null ,
f112 VARBINARY(64) null , f112 VARBINARY(64) null ,
f113 VARBINARY(192) null , f113 VARBINARY(192) null ,
f114 VARBINARY(192) , f114 VARBINARY(192) ,
f115 VARBINARY(27) null , f115 VARBINARY(27) null ,
f116 VARBINARY(64) null, f116 VARBINARY(64) null,
f117 VARBINARY(192) null f117 VARBINARY(192) null
) engine = myisam; ) engine = myisam;
load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; load data infile '<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/myisam_tb2.txt'
into table tb2;
USE test; USE test;
Attention: The nesting level @max_level in Testcase 3.3.1.A6 Attention: The nesting level @max_level in Testcase 3.3.1.A6

Some files were not shown because too many files have changed in this diff Show More