From dab880274afbae01571257feebb819d94b861c01 Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Wed, 22 Jun 2005 16:14:14 -0700 Subject: Fix LOAD DATA to handle having the escape and enclosed-by character be the same. (Bug #11203) --- mysql-test/t/loaddata.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index aa0ea0a2f55..2afd710c694 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -31,3 +31,11 @@ load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated select * from t1; drop table t1; +# +# Bug #11203: LOAD DATA does not accept same characters for ESCAPED and +# ENCLOSED +# +create table t1 (a varchar(20), b varchar(20)); +load data infile '../../std_data/loaddata5.dat' into table t1 fields terminated by ',' enclosed by '"' escaped by '"' (a,b); +select * from t1; +drop table t1; -- cgit v1.2.1 From 836bc2638e1939c0f65748f219e5613cc0f0af06 Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Mon, 26 Sep 2005 14:55:52 +0500 Subject: Fix for bug #12267 (primary key over GEOMETRY field) --- mysql-test/t/gis.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index aba2f33833a..1f30407c2b7 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -395,3 +395,11 @@ show create function fn3; select astext(fn3()); drop function fn3; +# +# Bug #12267 (primary key over GIS) +# +create table t1(pt POINT); +--error 1170 +alter table t1 add primary key pti(pt); +alter table t1 add primary key pti(pt(20)); +drop table t1; -- cgit v1.2.1 From 40bd22ef6932430ae86f1f41a621d07cb2a7b2cd Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Tue, 11 Oct 2005 21:18:04 +0500 Subject: Fix for bug #13667 (Inconsistency for decimal(m,d) specification. --- mysql-test/t/type_newdecimal.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index 3f04aa931d2..a7087d46dca 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1044,3 +1044,9 @@ drop procedure wg2; # select cast(@non_existing_user_var/2 as DECIMAL); + +# +# Bug #13667 (Inconsistency for decimal(m,d) specification +# +--error 1427 +create table t (d decimal(0,10)); -- cgit v1.2.1 From bae115423598ae7019a18cb8a8377987c0faca30 Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Thu, 13 Oct 2005 15:32:31 -0700 Subject: Fix calculation of TIMESTAMPDIFF() of months and years. (Bug #13534) --- mysql-test/t/func_time.test | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 3dd7f7276fb..3a2eea59bed 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -404,4 +404,28 @@ delimiter ;// call t_sysdate(); drop procedure t_sysdate; +# +# Bug #13534: timestampdiff() returned incorrect results across leap years +# +select timestampdiff(month,'2004-09-11','2004-09-11'); +select timestampdiff(month,'2004-09-11','2005-09-11'); +select timestampdiff(month,'2004-09-11','2006-09-11'); +select timestampdiff(month,'2004-09-11','2007-09-11'); +select timestampdiff(month,'2005-09-11','2004-09-11'); +select timestampdiff(month,'2005-09-11','2003-09-11'); + +select timestampdiff(month,'2004-02-28','2005-02-28'); +select timestampdiff(month,'2004-02-29','2005-02-28'); +select timestampdiff(month,'2004-02-28','2005-02-28'); +select timestampdiff(month,'2004-03-29','2005-03-28'); +select timestampdiff(month,'2003-02-28','2004-02-29'); +select timestampdiff(month,'2003-02-28','2005-02-28'); + +select timestampdiff(month,'1999-09-11','2001-10-10'); +select timestampdiff(month,'1999-09-11','2001-9-11'); + +select timestampdiff(year,'1999-09-11','2001-9-11'); +select timestampdiff(year,'2004-02-28','2005-02-28'); +select timestampdiff(year,'2004-02-29','2005-02-28'); + # End of 5.0 tests -- cgit v1.2.1 From 9910198aafe774d6ad50b47339a127ebc43a5d2d Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Sat, 15 Oct 2005 22:23:13 +0500 Subject: Additional fix for bug #12267 (Can't use POINT for primary key) --- mysql-test/t/gis.test | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 1f30407c2b7..142bd29fa2d 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -399,6 +399,9 @@ drop function fn3; # Bug #12267 (primary key over GIS) # create table t1(pt POINT); +alter table t1 add primary key pti(pt); +drop table t1; +create table t1(pt GEOMETRY); --error 1170 alter table t1 add primary key pti(pt); alter table t1 add primary key pti(pt(20)); -- cgit v1.2.1 From 15fbd07a2215c0a93a47826e66b6c98199c125ea Mon Sep 17 00:00:00 2001 From: "hf@deer.(none)" <> Date: Mon, 17 Oct 2005 12:32:22 +0500 Subject: Fix for bug #13820 (No warning on log(NEGATIVE)) --- mysql-test/t/func_math.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 633e36f51ab..2935f24f2d7 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -117,3 +117,15 @@ select rand(i) from t1; drop table t1; # End of 4.1 tests + +# +# Bug #13820 (No warning on log(negative) +# +set sql_mode='traditional'; +select ln(-1); +select log10(-1); +select log2(-1); +select log(2,-1); +select log(-2,1); +set sql_mode=''; + -- cgit v1.2.1 From 7510c45423af35a11a6c8942501e4a0a8d0c3da7 Mon Sep 17 00:00:00 2001 From: "jimw@mysql.com" <> Date: Fri, 21 Oct 2005 19:54:34 -0700 Subject: Fix merge of test that left out a drop table. --- mysql-test/t/loaddata.test | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 340801e6a01..e989cb0b2ac 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -56,6 +56,7 @@ enable_query_log; select * from t1; --exec rm $MYSQL_TEST_DIR/var/tmp/t1 SET @@SQL_MODE=@OLD_SQL_MODE; +drop table t1; # # Bug #11203: LOAD DATA does not accept same characters for ESCAPED and -- cgit v1.2.1 From 82bcb8b369c4d95d15108e2990fd08bdffa6395e Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Mon, 24 Oct 2005 23:20:39 -0700 Subject: This patch add support for storing Geometry types to Archive, Innodb, NDB, and BDB. --- mysql-test/t/archive_gis.test | 4 ++++ mysql-test/t/bdb_gis.test | 4 ++++ mysql-test/t/innodb_gis.test | 4 ++++ mysql-test/t/ndb_gis.test | 4 ++++ 4 files changed, 16 insertions(+) create mode 100644 mysql-test/t/archive_gis.test create mode 100644 mysql-test/t/bdb_gis.test create mode 100644 mysql-test/t/innodb_gis.test create mode 100644 mysql-test/t/ndb_gis.test (limited to 'mysql-test/t') diff --git a/mysql-test/t/archive_gis.test b/mysql-test/t/archive_gis.test new file mode 100644 index 00000000000..eb47561e52c --- /dev/null +++ b/mysql-test/t/archive_gis.test @@ -0,0 +1,4 @@ +source include/have_geometry.inc; +source include/have_archive.inc; +SET storage_engine=archive; +--source include/gis_generic.inc diff --git a/mysql-test/t/bdb_gis.test b/mysql-test/t/bdb_gis.test new file mode 100644 index 00000000000..76fa5d9015f --- /dev/null +++ b/mysql-test/t/bdb_gis.test @@ -0,0 +1,4 @@ +source include/have_geometry.inc; +-- source include/have_bdb.inc +SET storage_engine=bdb; +--source include/gis_generic.inc diff --git a/mysql-test/t/innodb_gis.test b/mysql-test/t/innodb_gis.test new file mode 100644 index 00000000000..c79e0278d16 --- /dev/null +++ b/mysql-test/t/innodb_gis.test @@ -0,0 +1,4 @@ +source include/have_geometry.inc; +-- source include/have_innodb.inc +SET storage_engine=innodb; +--source include/gis_generic.inc diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test new file mode 100644 index 00000000000..985b6ce81e9 --- /dev/null +++ b/mysql-test/t/ndb_gis.test @@ -0,0 +1,4 @@ +source include/have_geometry.inc; +--source include/have_ndb.inc +SET storage_engine=ndbcluster; +--source include/gis_generic.inc -- cgit v1.2.1 From 068f082960aca5784108fdadce07d6421cca2167 Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Mon, 24 Oct 2005 23:55:44 -0700 Subject: Additional test request by Jonas. We check pushdown conditions for GEOM types. --- mysql-test/t/ndb_gis.test | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test index 985b6ce81e9..f72a379dc36 100644 --- a/mysql-test/t/ndb_gis.test +++ b/mysql-test/t/ndb_gis.test @@ -1,4 +1,5 @@ source include/have_geometry.inc; --source include/have_ndb.inc SET storage_engine=ndbcluster; +set engine_condition_pushdown = on; --source include/gis_generic.inc -- cgit v1.2.1 From feca138e46a6359684a2a6db3511320edc1faffe Mon Sep 17 00:00:00 2001 From: "pgalbraith@mysql.com" <> Date: Tue, 25 Oct 2005 19:04:31 +0200 Subject: This cset fixes BUG# 12838, 14061, 12129 mysqldump.result: BUG# 12838 New test results for mysqldump -x on a DB with views mysqldump.test: sqldump.test: BUG# 12838 New test to run mysqldump -x on a DB with views mysqldump.c: BUG# 12838 Removed/Changed code which created tables to be put into the dump (For loading views of views) by creating temp tables and then using the CREATE TABLE information in those temp tables. The problem with this is that when mysqldump -x is called, it locks all tables, so the temp tables could not be created, causing the mysqldump to exit with failure. The code was changed to use SHOW FIELDS to get the column names and type to build CREATE TABLE text used to create these tables that views need in the dump. --- mysql-test/t/mysqldump.test | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'mysql-test/t') diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 377a8c8179e..31957e0db0d 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -962,3 +962,26 @@ DROP TRIGGER `test trig`; DROP TABLE `t1 test`; DROP TABLE `t2 test`; --enable_warnings +# +# BUG# 12838 mysqldump -x with views exits with error +# + +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a int, b varchar(32), c varchar(32)); +insert into t1 values (1, 'first value', 'xxxx'); +insert into t1 values (2, 'second value', 'tttt'); +insert into t1 values (3, 'third value', 'vvv vvv'); + +create view v1 as select * from t1; +create view v0 as select * from v1; +create view v2 as select * from v0; + +select * from v2; +--exec $MYSQL_DUMP -x --skip-comments --databases test + +drop view v2; +drop view v0; +drop view v1; +drop table t1; -- cgit v1.2.1 From ff6cfe6d660a30457e91a96c915f539da229eb64 Mon Sep 17 00:00:00 2001 From: "brian@zim.(none)" <> Date: Wed, 26 Oct 2005 13:55:08 -0700 Subject: Change in gis test to allow NDB to be able to call generic tests. Fix for Archive so that ALTER TABLE doesn't issue a warning. Also added test case for alter table. --- mysql-test/t/archive.test | 5 +++++ mysql-test/t/archive_gis.test | 2 +- mysql-test/t/ndb_gis.test | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'mysql-test/t') diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index ac2061eeb0b..ba2ad3ed8aa 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1347,6 +1347,11 @@ SELECT * FROM t2; # Just test syntax, we will never know if the output is right or wrong # Must be the last test INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily',''); + +# Adding test for alter table +ALTER TABLE t2 DROP COLUMN fld6; +SHOW CREATE TABLE t2; +SELECT * from t2; # # Cleanup, test is over # diff --git a/mysql-test/t/archive_gis.test b/mysql-test/t/archive_gis.test index eb47561e52c..feb3fb22f00 100644 --- a/mysql-test/t/archive_gis.test +++ b/mysql-test/t/archive_gis.test @@ -1,4 +1,4 @@ source include/have_geometry.inc; source include/have_archive.inc; SET storage_engine=archive; ---source include/gis_generic.inc +-- source include/gis_generic.inc diff --git a/mysql-test/t/ndb_gis.test b/mysql-test/t/ndb_gis.test index f72a379dc36..f14bf546363 100644 --- a/mysql-test/t/ndb_gis.test +++ b/mysql-test/t/ndb_gis.test @@ -1,5 +1,6 @@ source include/have_geometry.inc; --source include/have_ndb.inc SET storage_engine=ndbcluster; +--source include/gis_generic.inc set engine_condition_pushdown = on; --source include/gis_generic.inc -- cgit v1.2.1