From afb07566181f3bca7f49f3ac5f7fc0deadccf0c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 14 Dec 2003 06:39:52 +0200 Subject: Extend max_allowed_packet to 2G in mysql and mysqldump (Bug #2105) Don't dump data for MRG_ISAM or MRG_MYISAM tables. (Bug #1846) Ensure that 'lower_case_table_names' is always set on case insensitive file systems. (Bug #1812) One can now configure MySQL as windows service as a normal user. (Bug #1802) Database names is now compared with lower case in ON clause when lower_case_table_names is set. (Bug #1736) IGNORE ... LINES option didn't work when used with fixed length rows. (Bug #1704) Change INSERT DELAYED ... SELECT... to INSERT .... SELECT (Bug #1983) Safety fix for service 'mysql start' (Bug #1815) client/mysql.cc: Extend max_allowed_packet to 2G (Bug #2105) client/mysqldump.c: Extend max_allowed_packet to 2G (Bug #2105) Don't dump data for MRG_ISAM or MRG_MYISAM tables. (Bug #1846) configure.in: Test for file linux/config.h include/my_global.h: Portability fix (Bug #1924) mysql-test/r/insert.result: Update test results mysql-test/r/loaddata.result: Update test results mysql-test/r/lowercase_table.result: Update test results mysql-test/t/insert.test: Test INSERT ... DELAYED ... SELECT mysql-test/t/loaddata.test: Added test of LOAD DATA INFILE ... IGNORE # LINES for fixed size tables mysql-test/t/lowercase_table.test: Test mixed lower/uppercase database names sql/item.cc: Made function not inline (to make it easier to modify it without recompilation of all files) sql/item.h: Moved function to item.cc sql/mysqld.cc: Merge pidfile create code Ensure that 'lower_case_table_names' is always set on case insensitive file systems. (Bug #1812) sql/nt_servc.cc: One can now configure MySQL as windows service as a normal user. (Bug #1802) sql/sql_base.cc: Database names is now compared with lower case in ON clause when lower_case_table_names is set. (Bug #1736) sql/sql_class.h: Fixed type sql/sql_load.cc: IGNORE ... LINES option didn't work when used with fixed length rows. (Bug #1704) sql/sql_parse.cc: Change INSERT DELAYED ... SELECT... to INSERT .... SELECT strings/ctype-tis620.c: Ensure that memory is freed properly (Partly becasue of bug #1770) Bar should check the proposed patch in #1770 if we can use it support-files/mysql.server.sh: Safety fix (Bug #1815) --- mysql-test/r/insert.result | 2 +- mysql-test/r/loaddata.result | 18 ++++++++++++++++++ mysql-test/r/lowercase_table.result | 10 ++++++++-- mysql-test/std_data/loaddata3.dat | 6 ++++++ mysql-test/std_data/loaddata4.dat | 1 + mysql-test/t/insert.test | 2 +- mysql-test/t/loaddata.test | 11 +++++++++++ mysql-test/t/lowercase_table.test | 7 +++++-- 8 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 mysql-test/std_data/loaddata3.dat create mode 100644 mysql-test/std_data/loaddata4.dat (limited to 'mysql-test') diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 270994e3998..7520fd7e6cc 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -71,7 +71,7 @@ drop table t1; create table t1 (email varchar(50)); insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com'); create table t2(id int not null auto_increment primary key, t2 varchar(50), unique(t2)); -insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; +insert delayed into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; select * from t2; id t2 1 mysql.com diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0b7925de1c5..1730d7b5c25 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -26,3 +26,21 @@ Field 3,'Field 4| |Field 5' ,'Field 6| NULL |Field 6| | 'Field 7'| drop table t1; +create table t1 (a int, b char(10)); +load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +select * from t1; +a b +1 row 1 +2 row 2 +0 1234567890 +3 row 3 +0 1234567890 +truncate table t1; +load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; +select * from t1; +a b +1 row 1 +2 row 2 +3 row 3 +0 +drop table t1; diff --git a/mysql-test/r/lowercase_table.result b/mysql-test/r/lowercase_table.result index 8edf43a51ad..16bc92cb711 100644 --- a/mysql-test/r/lowercase_table.result +++ b/mysql-test/r/lowercase_table.result @@ -1,6 +1,8 @@ -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4,T1; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); +create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +INSERT INTO T4 VALUES(1,'match'); SELECT * FROM t1; id Word 1 a @@ -12,6 +14,9 @@ id SELECT T2.id from t1 as T2 LIMIT 1; id 1 +SELECT * from t1 left join t4 on (test.t1.id= TEST.t4.id) where TEST.t1.id >= test.t4.id; +id Word id Word +1 a 1 match SELECT T2.id from t1 as t2 LIMIT 1; Unknown table 'T2' in field list RENAME TABLE T1 TO T2; @@ -20,7 +25,8 @@ ALTER TABLE T2 RENAME T3; show tables like 't_'; Tables_in_test (t_) t3 -drop table t3; +t4 +drop table t3,t4; create table t1 (a int); select count(*) from T1; count(*) diff --git a/mysql-test/std_data/loaddata3.dat b/mysql-test/std_data/loaddata3.dat new file mode 100644 index 00000000000..4c82f1396c5 --- /dev/null +++ b/mysql-test/std_data/loaddata3.dat @@ -0,0 +1,6 @@ +number row data +1 row 1 +2 row 2 +error 12345678901234567890123456789012345678901234567890 +3 row 3 +wrong end 12345678901234567890123456789012345678901234567890 diff --git a/mysql-test/std_data/loaddata4.dat b/mysql-test/std_data/loaddata4.dat new file mode 100644 index 00000000000..9c0d744438c --- /dev/null +++ b/mysql-test/std_data/loaddata4.dat @@ -0,0 +1 @@ +test row data 1 row 1 2 row 2 3 row 3 diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index fbb9134ff7f..12dfe6e50a9 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -68,7 +68,7 @@ drop table t1; create table t1 (email varchar(50)); insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com'); create table t2(id int not null auto_increment primary key, t2 varchar(50), unique(t2)); -insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; +insert delayed into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1; select * from t2; drop table t1,t2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 732ed248702..9269eb19b05 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -18,3 +18,14 @@ create table t1 (a text, b text); load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by ''''; select concat('|',a,'|'), concat('|',b,'|') from t1; drop table t1; + +create table t1 (a int, b char(10)); +load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; +select * from t1; +truncate table t1; +load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines; + +# The empty line last comes from the end line field in the file +select * from t1; +drop table t1; + diff --git a/mysql-test/t/lowercase_table.test b/mysql-test/t/lowercase_table.test index 86ea2918fd2..5bc19f26c0e 100644 --- a/mysql-test/t/lowercase_table.test +++ b/mysql-test/t/lowercase_table.test @@ -2,19 +2,22 @@ # Test of --lower-case-table-names # -drop table if exists t1,t2,t3; +drop table if exists t1,t2,t3,t4,T1; create table T1 (id int primary key, Word varchar(40) not null, Index(Word)); +create table t4 (id int primary key, Word varchar(40) not null); INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c'); +INSERT INTO T4 VALUES(1,'match'); SELECT * FROM t1; SELECT T1.id from T1 LIMIT 1; SELECT T2.id from t1 as T2 LIMIT 1; +SELECT * from t1 left join t4 on (test.t1.id= TEST.t4.id) where TEST.t1.id >= test.t4.id; --error 1109 SELECT T2.id from t1 as t2 LIMIT 1; RENAME TABLE T1 TO T2; ALTER TABLE T2 ADD new_col int not null; ALTER TABLE T2 RENAME T3; show tables like 't_'; -drop table t3; +drop table t3,t4; # # Test alias -- cgit v1.2.1