diff options
author | unknown <monty@mysql.com> | 2004-02-17 01:35:17 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-02-17 01:35:17 +0200 |
commit | 709356d47343af2951cdcd02419c71fc49c35f85 (patch) | |
tree | 7e3324032ecc97c6af3771a6904e8ae32dbf7a48 /mysql-test | |
parent | 0c259c54b062f065e375fa185556cdf7fd419c13 (diff) | |
download | mariadb-git-709356d47343af2951cdcd02419c71fc49c35f85.tar.gz |
Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
include/m_ctype.h:
Changed wellformedlen to well_formed_len
include/mysql.h:
Fixed comment
libmysql/libmysql.c:
Fixed indentation
libmysqld/lib_sql.cc:
Fixed indentation
mysql-test/r/ctype_utf8.result:
updated warning numbers
mysql-test/r/innodb.result:
Moved test to right place
mysql-test/r/myisam-blob.result:
More test for blobs
mysql-test/r/rpl000002.result:
Move test to better place
mysql-test/r/rpl_log.result:
Move test to better place
mysql-test/r/union.result:
Move test to better place
mysql-test/t/innodb.test:
Moved test to right place
mysql-test/t/myisam-blob.test:
More test of blobs
mysql-test/t/rpl000002.test:
Move test to better place
mysql-test/t/rpl_log.test:
Move test to better place
mysql-test/t/union.test:
Move test to better place
sql/field.cc:
Changed wellformedlen to well_formed_len.
Fixed that blobs >16M can be inserted/updated (new bug)
sql/field.h:
Code optimization
sql/sql_lex.cc:
Changed short variable names
sql/sql_show.cc:
Optimized quote handling
sql/sql_table.cc:
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
sql/sql_union.cc:
Added comment
strings/ctype-big5.c:
Changed wellformedlen to well_formed_len
strings/ctype-bin.c:
Changed wellformedlen to well_formed_len
strings/ctype-euc_kr.c:
Changed wellformedlen to well_formed_len
strings/ctype-gb2312.c:
Changed wellformedlen to well_formed_len
strings/ctype-gbk.c:
Changed wellformedlen to well_formed_len
strings/ctype-latin1.c:
Changed wellformedlen to well_formed_len
strings/ctype-mb.c:
Changed wellformedlen to well_formed_len
strings/ctype-simple.c:
Changed wellformedlen to well_formed_len
strings/ctype-sjis.c:
Changed wellformedlen to well_formed_len
strings/ctype-tis620.c:
Changed wellformedlen to well_formed_len
strings/ctype-ucs2.c:
Changed wellformedlen to well_formed_len
Indentation changes
strings/ctype-ujis.c:
Changed wellformedlen to well_formed_len
strings/ctype-utf8.c:
Changed wellformedlen to well_formed_len
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_utf8.result | 26 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 14 | ||||
-rw-r--r-- | mysql-test/r/myisam-blob.result | 17 | ||||
-rw-r--r-- | mysql-test/r/rpl000002.result | 18 | ||||
-rw-r--r-- | mysql-test/r/rpl_log.result | 22 | ||||
-rw-r--r-- | mysql-test/r/union.result | 14 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 8 | ||||
-rw-r--r-- | mysql-test/t/myisam-blob.test | 11 | ||||
-rw-r--r-- | mysql-test/t/rpl000002.test | 15 | ||||
-rw-r--r-- | mysql-test/t/rpl_log.test | 2 | ||||
-rw-r--r-- | mysql-test/t/union.test | 11 |
11 files changed, 101 insertions, 57 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index c2c2f548de7..b7498ab2bc7 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -91,19 +91,19 @@ drop table t1; create table t1 (s1 tinytext character set utf8); insert into t1 select repeat('a',300); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('Ñ',300); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('aÑ',300); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('Ña',300); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('ÑÑ',300); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; hex(s1) 616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 @@ -122,19 +122,19 @@ drop table t1; create table t1 (s1 text character set utf8); insert into t1 select repeat('a',66000); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('Ñ',66000); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('aÑ',66000); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('Ña',66000); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 insert into t1 select repeat('ÑÑ',66000); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select length(s1),char_length(s1) from t1; length(s1) char_length(s1) 65535 65535 @@ -146,7 +146,7 @@ drop table t1; create table t1 (s1 char(10) character set utf8); insert into t1 values (0x41FF); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; hex(s1) 41 @@ -154,7 +154,7 @@ drop table t1; create table t1 (s1 varchar(10) character set utf8); insert into t1 values (0x41FF); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; hex(s1) 41 @@ -162,7 +162,7 @@ drop table t1; create table t1 (s1 text character set utf8); insert into t1 values (0x41FF); Warnings: -Warning 1264 Data truncated for column 's1' at row 1 +Warning 1265 Data truncated for column 's1' at row 1 select hex(s1) from t1; hex(s1) 41 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 95dc2ca3a2a..57ad5ef79a2 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1413,3 +1413,17 @@ test.t2 968604391 test.t3 968604391 test.t4 NULL drop table t1,t2,t3; +create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb; +insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); +select name2 from t1 union all select name from t1 union all select id from t1; +name2 +fff +sss +ttt +first +second +third +1 +2 +3 +drop table t1; diff --git a/mysql-test/r/myisam-blob.result b/mysql-test/r/myisam-blob.result index 743d4dac254..43db7c8badd 100644 --- a/mysql-test/r/myisam-blob.result +++ b/mysql-test/r/myisam-blob.result @@ -24,4 +24,21 @@ delete from t1 where left(data,1)='c'; check table t1; Table Op Msg_type Msg_text test.t1 check status OK +INSERT INTO t1 set data=repeat('a',18*1024*1024); +select length(data) from t1; +length(data) +18874368 +alter table t1 modify data blob; +select length(data) from t1; +length(data) +0 +drop table t1; +CREATE TABLE t1 (data BLOB) ENGINE=myisam; +INSERT INTO t1 (data) VALUES (NULL); +UPDATE t1 set data=repeat('a',18*1024*1024); +Warnings: +Warning 1265 Data truncated for column 'data' at row 1 +select length(data) from t1; +length(data) +65535 drop table t1; diff --git a/mysql-test/r/rpl000002.result b/mysql-test/r/rpl000002.result index 56e34b4874f..e5e661795fe 100644 --- a/mysql-test/r/rpl000002.result +++ b/mysql-test/r/rpl000002.result @@ -23,8 +23,24 @@ insert into t2 set created=now(); select * from t2; id created 1 1970-01-01 06:25:45 +create table t3 like t2; +create temporary table t4 like t2; +create table t5 select * from t4; start slave; select * from t2; id created 1 1970-01-01 06:25:45 -drop table t2; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `id` int(11) NOT NULL auto_increment, + `created` datetime default NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table t5; +Table Create Table +t5 CREATE TABLE `t5` ( + `id` int(11) NOT NULL default '0', + `created` datetime default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2,t3,t5; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 34d41c5dfac..2f8a54369c9 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -16,7 +16,6 @@ load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; select count(*) from t1; count(*) 69 -create table t2 like t1; drop table t1; show binlog events; Log_name Pos Event_type Server_id Orig_log_pos Info @@ -28,8 +27,7 @@ master-bin.000001 263 Query 1 263 use `test`; drop table t1 master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 master-bin.000001 1056 Exec_load 1 1056 ;file_id=1 -master-bin.000001 1079 Query 1 1079 use `test`; create table t2 like t1 -master-bin.000001 1137 Query 1 1137 use `test`; drop table t1 +master-bin.000001 1079 Query 1 1079 use `test`; drop table t1 show binlog events from 79 limit 1; Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) @@ -40,10 +38,6 @@ master-bin.000001 172 Intvar 1 172 INSERT_ID=1 show binlog events from 79 limit 2,1; Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) -show binlog events from 79 limit 2,2; -Log_name Pos Event_type Server_id Orig_log_pos Info -master-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) -master-bin.000001 263 Query 1 263 use `test`; drop table t1 flush logs; create table t5 (a int); drop table t5; @@ -63,9 +57,8 @@ master-bin.000001 263 Query 1 263 use `test`; drop table t1 master-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) master-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 master-bin.000001 1056 Exec_load 1 1056 ;file_id=1 -master-bin.000001 1079 Query 1 1079 use `test`; create table t2 like t1 -master-bin.000001 1137 Query 1 1137 use `test`; drop table t1 -master-bin.000001 1185 Rotate 1 1185 master-bin.000002;pos=4 +master-bin.000001 1079 Query 1 1079 use `test`; drop table t1 +master-bin.000001 1127 Rotate 1 1127 master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id Orig_log_pos Info master-bin.000002 4 Query 1 4 use `test`; create table t5 (a int) @@ -92,11 +85,10 @@ slave-bin.000001 263 Query 1 263 use `test`; drop table t1 slave-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) slave-bin.000001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581 slave-bin.000001 1065 Exec_load 1 1065 ;file_id=1 -slave-bin.000001 1088 Query 1 1088 use `test`; create table t2 like t1 -slave-bin.000001 1146 Query 1 1146 use `test`; drop table t1 -slave-bin.000001 1194 Query 1 1194 use `test`; create table t5 (a int) -slave-bin.000001 1252 Query 1 1252 use `test`; drop table t5 -slave-bin.000001 1300 Rotate 2 1300 slave-bin.000002;pos=4 +slave-bin.000001 1088 Query 1 1088 use `test`; drop table t1 +slave-bin.000001 1136 Query 1 1136 use `test`; create table t5 (a int) +slave-bin.000001 1194 Query 1 1194 use `test`; drop table t5 +slave-bin.000001 1242 Rotate 2 1242 slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id Orig_log_pos Info slave-bin.000002 4 Query 1 4 use `test`; create table t1 (n int) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 23ed06dee6a..512517991e6 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -879,17 +879,3 @@ d 444 d 454 NULL NULL f 666 NULL NULL g 777 drop table t1; -create table t1 ( id int, name char(10) not null, name2 char(10) not null ) engine=innodb; -insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); -select name2 from t1 union all select name from t1 union all select id from t1; -name2 -fff -sss -ttt -first -second -third -1 -2 -3 -drop table t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index ada2771fdc2..f931b4bb798 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1011,3 +1011,11 @@ checksum table t1, t2, t3, t4 extended; #show table status; drop table t1,t2,t3; +# +# Test problem with refering to different fields in same table in UNION +# (Bug #2552) +# +create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb; +insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); +select name2 from t1 union all select name from t1 union all select id from t1; +drop table t1; diff --git a/mysql-test/t/myisam-blob.test b/mysql-test/t/myisam-blob.test index d58222ec8bf..7af8c661c02 100644 --- a/mysql-test/t/myisam-blob.test +++ b/mysql-test/t/myisam-blob.test @@ -27,4 +27,15 @@ UPDATE t1 set data=repeat('c',17*1024*1024); check table t1; delete from t1 where left(data,1)='c'; check table t1; + +INSERT INTO t1 set data=repeat('a',18*1024*1024); +select length(data) from t1; +alter table t1 modify data blob; +select length(data) from t1; +drop table t1; + +CREATE TABLE t1 (data BLOB) ENGINE=myisam; +INSERT INTO t1 (data) VALUES (NULL); +UPDATE t1 set data=repeat('a',18*1024*1024); +select length(data) from t1; drop table t1; diff --git a/mysql-test/t/rpl000002.test b/mysql-test/t/rpl000002.test index 803eb069b66..4fbb6a595a4 100644 --- a/mysql-test/t/rpl000002.test +++ b/mysql-test/t/rpl000002.test @@ -1,5 +1,7 @@ source include/master-slave.inc; +# Test replication of auto_increment + create table t1 (n int auto_increment primary key); set insert_id = 2000; insert into t1 values (NULL),(NULL),(NULL); @@ -12,15 +14,26 @@ drop table t1; sync_slave_with_master; stop slave; connection master; + +# Test replication of timestamp + create table t2(id int auto_increment primary key, created datetime); set timestamp=12345; insert into t2 set created=now(); select * from t2; + +# Test replication of CREATE .. LIKE (Bug #2557) + +create table t3 like t2; +create temporary table t4 like t2; +create table t5 select * from t4; save_master_pos; connection slave; start slave; sync_with_master; select * from t2; +show create table t3; +show create table t5; connection master; -drop table t2; +drop table t2,t3,t5; sync_slave_with_master; diff --git a/mysql-test/t/rpl_log.test b/mysql-test/t/rpl_log.test index 5f59b1034dc..7ae0a4dc3c2 100644 --- a/mysql-test/t/rpl_log.test +++ b/mysql-test/t/rpl_log.test @@ -35,14 +35,12 @@ drop table t1; create table t1 (word char(20) not null); load data infile '../../std_data/words.dat' into table t1 ignore 1 lines; select count(*) from t1; -create table t2 like t1; drop table t1; --replace_result $VERSION VERSION show binlog events; show binlog events from 79 limit 1; show binlog events from 79 limit 2; show binlog events from 79 limit 2,1; -show binlog events from 79 limit 2,2; flush logs; # We need an extra update before doing save_master_pos. diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index c88ac4e70d8..60963548eed 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -473,14 +473,3 @@ create table t1 ( RID int(11) not null default '0', IID int(11) not null def insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777'); select A.NAME, A.PHONE, B.NAME, B.PHONE from t1 A left join t1 B on A.NAME = B.NAME and B.IID = 2 where A.IID = 1 and (A.PHONE <> B.PHONE or B.NAME is null) union select A.NAME, A.PHONE, B.NAME, B.PHONE from t1 B left join t1 A on B.NAME = A.NAME and A.IID = 1 where B.IID = 2 and (A.PHONE <> B.PHONE or A.NAME is null); drop table t1; - -# -# bug #2552 -# ---disable_warnings -create table t1 ( id int, name char(10) not null, name2 char(10) not null ) engine=innodb; ---enable_warnings -insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); -select name2 from t1 union all select name from t1 union all select id from t1; -drop table t1; - |