diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/cast.result | 27 | ||||
-rw-r--r-- | mysql-test/r/derived.result | 8 | ||||
-rw-r--r-- | mysql-test/r/mysqldump.result | 23 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 9 | ||||
-rw-r--r-- | mysql-test/r/rpl_until.result | 2 | ||||
-rw-r--r-- | mysql-test/r/sql_mode.result | 2 | ||||
-rw-r--r-- | mysql-test/r/subselect.result | 68 |
7 files changed, 82 insertions, 57 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 893452290b2..c60d8e19fb4 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -24,6 +24,12 @@ Note 1003 select high_priority ~(5) AS `~5`,cast(~(5) as signed) AS `cast(~5 as select cast(5 as unsigned) -6.0; cast(5 as unsigned) -6.0 -1.0 +select cast(NULL as signed), cast(1/0 as signed); +cast(NULL as signed) cast(1/0 as signed) +NULL NULL +select cast(NULL as unsigned), cast(1/0 as unsigned); +cast(NULL as unsigned) cast(1/0 as unsigned) +NULL NULL select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; cast("A" as binary) = "a" cast(BINARY "a" as CHAR) = "A" 0 1 @@ -36,6 +42,21 @@ cast("1:2:3" as TIME) select CONVERT("2004-01-22 21:45:33",DATE); CONVERT("2004-01-22 21:45:33",DATE) 2004-01-22 +select CONVERT(DATE "2004-01-22 21:45:33" USING latin1); +CONVERT(DATE "2004-01-22 21:45:33" USING latin1) +2004-01-22 21:45:33 +select CONVERT(DATE "2004-01-22 21:45:33",CHAR); +CONVERT(DATE "2004-01-22 21:45:33",CHAR) +2004-01-22 21:45:33 +select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)); +CONVERT(DATE "2004-01-22 21:45:33",CHAR(4)) +2004 +select CONVERT(DATE "2004-01-22 21:45:33",CHAR(4) BINARY); +CONVERT(DATE "2004-01-22 21:45:33",CHAR(4) BINARY) +2004 +select CAST(DATE "2004-01-22 21:45:33" AS CHAR(4) BINARY); +CAST(DATE "2004-01-22 21:45:33" AS CHAR(4) BINARY) +2004 set names binary; select cast(_latin1'test' as char character set latin2); cast(_latin1'test' as char character set latin2) @@ -43,6 +64,12 @@ test select cast(_koi8r'ΤΕΣΤ' as char character set cp1251); cast(_koi8r'ΤΕΣΤ' as char character set cp1251) ςερς +select convert(_latin1'test', "latin1_german1_ci", "latin1_swedish_ci"); +convert(_latin1'test', "latin1_german1_ci", "latin1_swedish_ci") +test +select convert(_koi8r'ΤΕΣΤ', "koi8r_general_ci", "cp1251_general_ci"); +convert(_koi8r'ΤΕΣΤ', "koi8r_general_ci", "cp1251_general_ci") +ςερς create table t1 select cast(_koi8r'ΤΕΣΤ' as char character set cp1251) as t; show create table t1; Table Create Table diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 170c393524b..44d35148f87 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -252,9 +252,7 @@ drop table t1; CREATE TABLE `t1` ( `N` int(11) unsigned NOT NULL default '0', `M` tinyint(1) default '0', -) TYPE=MyISAM DEFAULT CHARSET=latin1; -Warnings: -Warning 1286 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. +) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `t1` (N, M) VALUES (1, 0),(1, 0),(1, 0),(2, 0),(2, 0),(3, 0); UPDATE `t1` AS P1 INNER JOIN (SELECT N FROM `t1` GROUP BY N HAVING Count(M) > 1) AS P2 ON P1.N = P2.N SET P1.M = 2; select * from t1; @@ -279,9 +277,7 @@ OBJECTID int(11) NOT NULL default '0', SORTORDER int(11) NOT NULL auto_increment, KEY t1_SortIndex (SORTORDER), KEY t1_IdIndex (OBJECTID) -) TYPE=MyISAM DEFAULT CHARSET=latin1; -Warnings: -Warning 1286 'TYPE=storage_engine' is deprecated. Use 'ENGINE=storage_engine' instead. +) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE t2 ( ID int(11) default NULL, PARID int(11) default NULL, diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index bdcdb0532f7..0414d6fa738 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -21,6 +21,11 @@ DROP TABLE t1; CREATE TABLE t1 (a decimal(240, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` decimal(240,20) default NULL @@ -41,6 +46,11 @@ UNLOCK TABLES; DROP TABLE t1; CREATE TABLE t1 (a double); INSERT INTO t1 VALUES (-9e999999); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` double default NULL @@ -105,6 +115,11 @@ INSERT INTO t1 VALUES ("1\""), ("\"2"); DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=utf8 */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` varchar(255) default NULL @@ -125,6 +140,9 @@ UNLOCK TABLES; DROP TABLE t1; CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -140,8 +158,10 @@ UNLOCK TABLES; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -157,6 +177,5 @@ UNLOCK TABLES; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; DROP TABLE t1; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 49ae082dead..04bcb56d48d 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -696,17 +696,22 @@ word show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 -load data infile '../../std_data/words.dat' into table t1; +load data infile 'TEST_DIR/std_data/words.dat' into table t1; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 +select count(*) from t1; +count(*) +70 drop table t1; create table t1 (a int); insert into t1 values (1),(2),(3); show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 -select * from t1 into outfile "query_caceh.out.file"; +select * from t1 into outfile "query_cache.out.file"; +select * from t1 into outfile "query_cache.out.file"; +ERROR HY000: File 'query_cache.out.file' already exists select * from t1 limit 1 into dumpfile "query_cache.dump.file"; show status like "Qcache_queries_in_cache"; Variable_name Value diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 82b1ed233ec..cb60ccfb1c9 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -55,7 +55,7 @@ stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=561; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 561 # Master master-bin.000001 561 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes # 0 0 561 # Master master-bin.000001 561 No # start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index ddc848af1ed..77fe5d06bb0 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -70,7 +70,7 @@ t1 CREATE TABLE `t1` ( `email` varchar(60) NOT NULL default '', PRIMARY KEY (`a`), UNIQUE KEY `email` (`email`) -) ENGINE=HEAP ROW_FORMAT=DYNAMIC +) TYPE=HEAP ROW_FORMAT=DYNAMIC set sql_mode="postgresql,oracle,mssql,db2,maxdb"; select @@sql_mode; @@sql_mode diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index c06c9824b33..b5ebc8d80db 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1578,50 +1578,28 @@ select * from t1; a b 1 0.123 drop table t1; -CREATE TABLE t1 ( -id int(11) NOT NULL auto_increment, -ts timestamp NOT NULL, -id_cns tinyint(3) unsigned NOT NULL default '0', -id_desc_nota int(11) NOT NULL default '1', -id_publ_uff int(11) NOT NULL default '0', -tipo enum('','UNO','DUE') NOT NULL default '', -f_aggiunte set('TRE','TRETRE','QUATTRO','CINQUE','SEI','SETTE') NOT NULL -default '', -anno_dep smallint(4) unsigned zerofill NOT NULL default '0000', -data_dep smallint(4) unsigned zerofill NOT NULL default '0000', -particolare mediumint(8) unsigned NOT NULL default '0', -generale mediumint(8) unsigned NOT NULL default '0', -bis tinyint(3) unsigned NOT NULL default '0', -PRIMARY KEY(id), -UNIQUE KEY idx_cns_gen_anno (anno_dep,id_cns,generale,particolare), -UNIQUE KEY idx_cns_par_anno (id_cns,anno_dep,tipo,particolare,bis) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=1; -INSERT INTO t1 (id, ts, id_cns, id_desc_nota, id_publ_uff, tipo, f_aggiunte, -anno_dep, data_dep, particolare, generale, bis) VALUES -(NULL, NULL, 16, 29, 622, 'UNO', '', 1987, 1218, 2048, 9681, 0), -(NULL, NULL, 50, 23, 1717, 'UNO', '', 1987, 1126, 1536, 13987, 0), -(NULL, NULL, 16, 123, 123, 'UNO', '', 1987, 1221, 2432, 14594, 0), -(NULL, NULL, 16, 124, 124, 'UNO', '', 1987, 1201, 1792, 13422, 0), -(NULL, NULL, 16, 125, 125, 'UNO', '', 1987, 0723, 1025, 10240, 0), -(NULL, NULL, 16, 126, 126, 'UNO', '', 1987, 1204, 1026, 7089, 0); -CREATE TABLE t2 ( -id tinyint(3) unsigned NOT NULL auto_increment, -descr varchar(40) NOT NULL default '', -f_servizi set('UNO','DUE') NOT NULL default '', -data_uno_min int(8) unsigned NOT NULL default '0', -data_due_min int(8) unsigned NOT NULL default '0', -max_anno_dep smallint(6) unsigned NOT NULL default '0', -data_agg int(8) unsigned NOT NULL default '0', -PRIMARY KEY (id) +CREATE TABLE `t1` ( +`id` int(11) NOT NULL auto_increment, +`id_cns` tinyint(3) unsigned NOT NULL default '0', +`tipo` enum('','UNO','DUE') NOT NULL default '', +`anno_dep` smallint(4) unsigned zerofill NOT NULL default '0000', +`particolare` mediumint(8) unsigned NOT NULL default '0', +`generale` mediumint(8) unsigned NOT NULL default '0', +`bis` tinyint(3) unsigned NOT NULL default '0', +PRIMARY KEY (`id`), +UNIQUE KEY `idx_cns_gen_anno` (`anno_dep`,`id_cns`,`generale`,`particolare`), +UNIQUE KEY `idx_cns_par_anno` (`id_cns`,`anno_dep`,`tipo`,`particolare`,`bis`) ); -INSERT INTO t2 (id, descr, f_servizi, data_uno_min, data_due_min, -max_anno_dep, data_agg) VALUES -(16, 'C_UNO', 'UNO,DUE', 19000000, 30000000, 1987, 0), -(50, 'C_TRE', 'UNO', 19000000, 30000000, 1990, 0); -SELECT cns.max_anno_dep = (SELECT s.anno_dep FROM t1 AS s WHERE -s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM -t2 AS cns; -PIPPO -1 -NULL +INSERT INTO `t1` VALUES (1,16,'UNO',1987,2048,9681,0),(2,50,'UNO',1987,1536,13987,0),(3,16,'UNO',1987,2432,14594,0),(4,16,'UNO',1987,1792,13422,0),(5,16,'UNO',1987,1025,10240,0),(6,16,'UNO',1987,1026,7089,0); +CREATE TABLE `t2` ( +`id` tinyint(3) unsigned NOT NULL auto_increment, +`max_anno_dep` smallint(6) unsigned NOT NULL default '0', +PRIMARY KEY (`id`) +); +INSERT INTO `t2` VALUES (16,1987),(50,1990),(51,1990); +SELECT cns.id, cns.max_anno_dep, cns.max_anno_dep = (SELECT s.anno_dep FROM t1 AS s WHERE s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM t2 AS cns; +id max_anno_dep PIPPO +16 1987 1 +50 1990 0 +51 1990 NULL DROP TABLE t1, t2; |