diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/funcs_1/include | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/funcs_1/include')
17 files changed, 1057 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/include/bug28309_skip.inc b/mysql-test/suite/funcs_1/include/bug28309_skip.inc new file mode 100644 index 00000000..18ba6641 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/bug28309_skip.inc @@ -0,0 +1,13 @@ +# Skip tests which suffer from +# Bug#28309 First insert violates unique constraint +# - was "memory" table empty? +# if the folowing conditions are fulfilled: +# - MySQL Version is 5.0 (Bug is fixed in 5.1 and up) +# - use of embedded server +# - run on a case insensitive filesystem +# +let $value= query_get_value(SHOW VARIABLES LIKE 'lower_case_file_system', Value, 1); +if (`SELECT '$value' = 'ON' AND VERSION() LIKE '5.0%embedded%'`) +{ + skip # Test requires backport of fix for Bug#28309 First insert violates unique constraint - was "memory" table empty ?; +} diff --git a/mysql-test/suite/funcs_1/include/cleanup.inc b/mysql-test/suite/funcs_1/include/cleanup.inc new file mode 100644 index 00000000..ef8b8f01 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/cleanup.inc @@ -0,0 +1,21 @@ +# suite/funcs_1/include/cleanup.inc +# +# Remove all objects created by sourcing +# suite/funcs_1/datadict/datadict_load.inc +# +DROP DATABASE test1; +DROP DATABASE test4; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP TABLE test.t3; +DROP TABLE test.t4; +DROP TABLE test.t7; +DROP TABLE test.t8; +DROP TABLE test.t9; +DROP TABLE test.t10; +DROP TABLE test.t11; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; + diff --git a/mysql-test/suite/funcs_1/include/innodb_tb1.inc b/mysql-test/suite/funcs_1/include/innodb_tb1.inc new file mode 100644 index 00000000..02d17ece --- /dev/null +++ b/mysql-test/suite/funcs_1/include/innodb_tb1.inc @@ -0,0 +1,70 @@ +##### suite/funcs_1/include/innodb_tb1.inc + +--disable_warnings +drop table if exists tb1 ; +--enable_warnings +create table tb1 ( +f1 char(0), +f2 char(0) binary, +f3 char(0) ascii, +f4 tinytext, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal, +f34 decimal unsigned, +f35 decimal zerofill, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = innodb; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/innodb_tb2.inc b/mysql-test/suite/funcs_1/include/innodb_tb2.inc new file mode 100644 index 00000000..1a5896cb --- /dev/null +++ b/mysql-test/suite/funcs_1/include/innodb_tb2.inc @@ -0,0 +1,65 @@ +##### suite/funcs_1/include/innodb_tb2.inc + +--disable_warnings +drop table if exists tb2 ; +--enable_warnings +--enable_prepare_warnings +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set" +) engine = innodb; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb2.txt' +into table tb2; +--disable_prepare_warnings diff --git a/mysql-test/suite/funcs_1/include/innodb_tb3.inc b/mysql-test/suite/funcs_1/include/innodb_tb3.inc new file mode 100644 index 00000000..a9968632 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/innodb_tb3.inc @@ -0,0 +1,70 @@ +##### suite/funcs_1/include/innodb_tb3.inc + +--disable_warnings +drop table if exists tb3 ; +--enable_warnings +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 tinytext, +f122 text, +f123 mediumtext, +f124 longtext, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = innodb; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/innodb_tb4.inc b/mysql-test/suite/funcs_1/include/innodb_tb4.inc new file mode 100644 index 00000000..95a0b8af --- /dev/null +++ b/mysql-test/suite/funcs_1/include/innodb_tb4.inc @@ -0,0 +1,72 @@ +##### suite/funcs_1/include/innodb_tb4.inc + +--disable_warnings +drop table if exists tb4; +--enable_warnings +--enable_prepare_warnings +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f235 char(0), +f236 char(90), +f237 char(255) ascii, +f238 varchar(0), +f239 varchar(20000) binary, +f240 varchar(2000), +f241 char(100) +) engine = innodb; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb4.txt' +into table tb4; +--disable_prepare_warnings diff --git a/mysql-test/suite/funcs_1/include/memory_tb1.inc b/mysql-test/suite/funcs_1/include/memory_tb1.inc new file mode 100644 index 00000000..e15f14bf --- /dev/null +++ b/mysql-test/suite/funcs_1/include/memory_tb1.inc @@ -0,0 +1,62 @@ +##### suite/funcs_1/include/memory_tb1.inc + +--disable_warnings +drop table if exists tb1 ; +--enable_warnings +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = memory; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/memory_tb2.inc b/mysql-test/suite/funcs_1/include/memory_tb2.inc new file mode 100644 index 00000000..b9e6bd72 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/memory_tb2.inc @@ -0,0 +1,68 @@ +##### suite/funcs_1/include/memory_tb2.inc + +--disable_warnings +drop table if exists tb2 ; +--enable_warnings + +--enable_prepare_warnings + +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set" +) engine = memory; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb2.txt' +into table tb2 ; + +--disable_prepare_warnings diff --git a/mysql-test/suite/funcs_1/include/memory_tb3.inc b/mysql-test/suite/funcs_1/include/memory_tb3.inc new file mode 100644 index 00000000..f384c1b5 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/memory_tb3.inc @@ -0,0 +1,64 @@ +##### suite/funcs_1/include/memory_tb3.inc + +--disable_warnings +drop table if exists tb3; +--enable_warnings +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = memory; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/memory_tb4.inc b/mysql-test/suite/funcs_1/include/memory_tb4.inc new file mode 100644 index 00000000..786e2772 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/memory_tb4.inc @@ -0,0 +1,71 @@ +##### suite/funcs_1/include/memory_tb4.inc + +--disable_warnings +drop table if exists tb4 ; +--enable_warnings +--enable_prepare_warnings +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f236 char(95), +f241 char(255), +f237 char(130) binary, +f238 varchar(25000) binary, +f239 varbinary(0), +f240 varchar(1200) +) engine = memory; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb4.txt' +into table tb4; +--disable_prepare_warnings diff --git a/mysql-test/suite/funcs_1/include/myisam_tb1.inc b/mysql-test/suite/funcs_1/include/myisam_tb1.inc new file mode 100644 index 00000000..261e6e92 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/myisam_tb1.inc @@ -0,0 +1,70 @@ +##### suite/funcs_1/include/myisam_tb1.inc + +--disable_warnings +drop table if exists tb1 ; +--enable_warnings +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f4 tinytext, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = myisam; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb1.txt' +into table tb1; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb2.inc b/mysql-test/suite/funcs_1/include/myisam_tb2.inc new file mode 100644 index 00000000..2a558408 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/myisam_tb2.inc @@ -0,0 +1,82 @@ +###### suite/funcs_1/include/myisam_tb2.inc + +--disable_warnings +drop table if exists tb2 ; +--enable_warnings +create table tb2 ( +f59 numeric (0) unsigned, +f60 numeric (64) unsigned, +f61 numeric (0) zerofill, +f62 numeric (64) zerofill, +f63 numeric (0) unsigned zerofill, +f64 numeric (64) unsigned zerofill, +f65 numeric (0,0), +f66 numeric (63,30), +f67 numeric (0,0) unsigned, +f68 numeric (63,30) unsigned, +f69 numeric (0,0) zerofill, +f70 numeric (63,30) zerofill, +f71 numeric (0,0) unsigned zerofill, +f72 numeric (63,30) unsigned zerofill, +f73 real, +f74 real unsigned, +f75 real zerofill, +f76 real unsigned zerofill, +f77 double default 7.7, +f78 double unsigned default 7.7, +f79 double zerofill default 7.7, +f80 double unsigned zerofill default 8.8, +f81 float not null default 8.8, +f82 float unsigned not null default 8.8, +f83 float zerofill not null default 8.8, +f84 float unsigned zerofill not null default 8.8, +f85 float(0) not null default 8.8, +f86 float(23) not null default 8.8, +f87 float(0) unsigned not null default 8.8, +f88 float(23) unsigned not null default 8.8, +f89 float(0) zerofill not null default 8.8, +f90 float(23) zerofill not null default 8.8, +f91 float(0) unsigned zerofill not null default 8.8, +f92 float(23) unsigned zerofill not null default 8.8, +f93 float(24) not null default 8.8, +f94 float(53) not null default 8.8, +f95 float(24) unsigned not null default 8.8, +f96 float(53) unsigned not null default 8.8, +f97 float(24) zerofill not null default 8.8, +f98 float(53) zerofill not null default 8.8, +f99 float(24) unsigned zerofill not null default 8.8, +f100 float(53) unsigned zerofill not null default 8.8, +f101 date not null default '2000-01-01', +f102 time not null default 20, +f103 datetime not null default '2/2/2', +f104 timestamp not null default 20001231235959, +f105 year not null default 2000, +f106 year(3) not null default 2000, +f107 year(4) not null default 2000, +f108 enum("1enum","2enum") not null default "1enum", +f109 set("1set","2set") not null default "1set", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; + +# The original columns. They are replaced by varbinary, because the funcs_1 tests should +# not depend on the optional availability of the geometry feature. +# f110 geometry null, +# f111 point null , +# f112 linestring null , +# f113 polygon null , +# f114 geometrycollection , +# f115 multipoint null , +# f116 multilinestring null, +# f117 multipolygon null + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb2.txt' +into table tb2; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb3.inc b/mysql-test/suite/funcs_1/include/myisam_tb3.inc new file mode 100644 index 00000000..aa0bb5bb --- /dev/null +++ b/mysql-test/suite/funcs_1/include/myisam_tb3.inc @@ -0,0 +1,70 @@ +##### suite/funcs_1/include/myisam_tb3.inc + +--disable_warnings +drop table if exists tb3 ; +--enable_warnings +create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 tinytext, +f122 text, +f123 mediumtext, +f124 longtext, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) Engine = myisam; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb3.txt' +into table tb3; diff --git a/mysql-test/suite/funcs_1/include/myisam_tb4.inc b/mysql-test/suite/funcs_1/include/myisam_tb4.inc new file mode 100644 index 00000000..da934e6d --- /dev/null +++ b/mysql-test/suite/funcs_1/include/myisam_tb4.inc @@ -0,0 +1,90 @@ +##### suite/funcs_1/include/myisam_tb4.inc + +--disable_warnings +drop table if exists tb4 ; +--enable_warnings +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f227 VARBINARY(64), +f228 VARBINARY(27), +f229 VARBINARY(64), +f230 VARBINARY(192), +f231 VARBINARY(192), +f232 VARBINARY(27), +f233 VARBINARY(64), +f234 VARBINARY(192), +f235 char(255), +f236 char(60) ascii, +f237 char(255) binary, +f238 varchar(0) binary, +f239 varbinary(1000), +f240 varchar(120), +f241 char(100), +f242 bit(30) +) engine = myisam; + +# The original columns. They are replaced by varbinary, because the funcs_1 tests should +# not depend on the optional availability of the geometry feature. +# f227 geometry, +# f228 point, +# f229 linestring, +# f230 polygon, +# f231 geometrycollection, +# f232 multipoint, +# f233 multilinestring, +# f234 multipolygon, + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/myisam_tb4.txt' +into table tb4; diff --git a/mysql-test/suite/funcs_1/include/show_connection.inc b/mysql-test/suite/funcs_1/include/show_connection.inc new file mode 100644 index 00000000..1cc2dd19 --- /dev/null +++ b/mysql-test/suite/funcs_1/include/show_connection.inc @@ -0,0 +1,14 @@ +#### suite/funcs_1/include/show_connection.inc +# +# This file shows the current connection information into the result file +# By using the '... AS "" ' an empty line will separate this in the result. +# +# Usage: +# Add the following to any *.test file: +# : +# --source suite/funcs_1/include/show_connection.inc +# : + +--disable_query_log +SELECT USER() AS "", DATABASE() AS ""; +--enable_query_log diff --git a/mysql-test/suite/funcs_1/include/sp_tb.inc b/mysql-test/suite/funcs_1/include/sp_tb.inc new file mode 100644 index 00000000..53ee9ded --- /dev/null +++ b/mysql-test/suite/funcs_1/include/sp_tb.inc @@ -0,0 +1,89 @@ +--disable_abort_on_error + +USE test; + +--disable_warnings +DROP TABLE IF EXISTS t1, t2, t4, t10, t11; +--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 +CREATE TABLE t2 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = $engine_type; +eval +CREATE TABLE t4 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +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 +CREATE TABLE t11 (f1 char(20),f2 char(25),f3 date,f4 int,f5 char(25),f6 int) +ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t1; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t2; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t4; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t10; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t11; + + +--disable_warnings +drop TABLE if exists t3; +--enable_warnings +eval +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t3.txt' INTO TABLE t3; + +#--------------------------- + +--disable_warnings +drop database if exists test4; +--enable_warnings +CREATE database 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; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t4.txt' INTO TABLE t6; +#--------------------------- + +use test; + +--disable_warnings +drop TABLE if exists t7, t8; +--enable_warnings +eval +CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = $engine_type; +eval +CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' INTO TABLE t7; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' INTO TABLE t8; + + +--disable_warnings +drop TABLE if exists t9; +--enable_warnings +eval CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = $engine_type; +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval +LOAD DATA INFILE '$MYSQLTEST_VARDIR/std_data/funcs_1/t9.txt' INTO TABLE t9; + diff --git a/mysql-test/suite/funcs_1/include/tb3.inc b/mysql-test/suite/funcs_1/include/tb3.inc new file mode 100644 index 00000000..0f73c39c --- /dev/null +++ b/mysql-test/suite/funcs_1/include/tb3.inc @@ -0,0 +1,66 @@ +##### suite/funcs_1/include/tb3.inc +# +# This auxiliary script is used in several Trigger tests. +# +# If the table need data than the file std_data/funcs_1/memory_tb3.txt +# could be used. +# + +--disable_warnings +drop table if exists tb3; +--enable_warnings +--replace_result $engine_type <engine_to_be_used> +eval create table tb3 ( +f118 char not null DEFAULT 'a', +f119 char binary not null DEFAULT b'101', +f120 char ascii not null DEFAULT b'101', +f121 char(50), +f122 char(50), +f129 binary not null DEFAULT b'101', +f130 tinyint not null DEFAULT 99, +f131 tinyint unsigned not null DEFAULT 99, +f132 tinyint zerofill not null DEFAULT 99, +f133 tinyint unsigned zerofill not null DEFAULT 99, +f134 smallint not null DEFAULT 999, +f135 smallint unsigned not null DEFAULT 999, +f136 smallint zerofill not null DEFAULT 999, +f137 smallint unsigned zerofill not null DEFAULT 999, +f138 mediumint not null DEFAULT 9999, +f139 mediumint unsigned not null DEFAULT 9999, +f140 mediumint zerofill not null DEFAULT 9999, +f141 mediumint unsigned zerofill not null DEFAULT 9999, +f142 int not null DEFAULT 99999, +f143 int unsigned not null DEFAULT 99999, +f144 int zerofill not null DEFAULT 99999, +f145 int unsigned zerofill not null DEFAULT 99999, +f146 bigint not null DEFAULT 999999, +f147 bigint unsigned not null DEFAULT 999999, +f148 bigint zerofill not null DEFAULT 999999, +f149 bigint unsigned zerofill not null DEFAULT 999999, +f150 decimal not null DEFAULT 999.999, +f151 decimal unsigned not null DEFAULT 999.17, +f152 decimal zerofill not null DEFAULT 999.999, +f153 decimal unsigned zerofill, +f154 decimal (0), +f155 decimal (64), +f156 decimal (0) unsigned, +f157 decimal (64) unsigned, +f158 decimal (0) zerofill, +f159 decimal (64) zerofill, +f160 decimal (0) unsigned zerofill, +f161 decimal (64) unsigned zerofill, +f162 decimal (0,0), +f163 decimal (63,30), +f164 decimal (0,0) unsigned, +f165 decimal (63,30) unsigned, +f166 decimal (0,0) zerofill, +f167 decimal (63,30) zerofill, +f168 decimal (0,0) unsigned zerofill, +f169 decimal (63,30) unsigned zerofill, +f170 numeric, +f171 numeric unsigned, +f172 numeric zerofill, +f173 numeric unsigned zerofill, +f174 numeric (0), +f175 numeric (64) +) engine = $engine_type; |