summaryrefslogtreecommitdiff
path: root/mysql-test/r/case.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/case.result')
-rw-r--r--mysql-test/r/case.result52
1 files changed, 26 insertions, 26 deletions
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result
index cf358e6a404..9ee64ee6dbd 100644
--- a/mysql-test/r/case.result
+++ b/mysql-test/r/case.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t2;
select CASE "b" when "a" then 1 when "b" then 2 END;
CASE "b" when "a" then 1 when "b" then 2 END
2
@@ -24,8 +24,8 @@ select CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END;
CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END
one
explain extended select CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select (case 1 when 1 then _latin1'one' when 2 then _latin1'two' else _latin1'more' end) AS `CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END`
select CASE 2.0 when 1 then "one" WHEN 2.0 then "two" ELSE "more" END;
@@ -63,8 +63,8 @@ fcase count(*)
2 1
3 1
explain extended select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Using temporary; Using filesort
Warnings:
Note 1003 select (case `test`.`t1`.`a` when 1 then 2 when 2 then 3 else 0 end) AS `fcase`,count(0) AS `count(*)` from `test`.`t1` group by (case `test`.`t1`.`a` when 1 then 2 when 2 then 3 else 0 end)
select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase;
@@ -99,18 +99,18 @@ CASE WHEN 1 THEN 0.1e1 else '1' END AS c12
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
- `c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
- `c3` varbinary(1) NOT NULL default '',
- `c4` varbinary(1) NOT NULL default '',
- `c5` varbinary(4) NOT NULL default '',
- `c6` varbinary(4) NOT NULL default '',
- `c7` decimal(2,1) NOT NULL default '0.0',
- `c8` decimal(2,1) NOT NULL default '0.0',
- `c9` decimal(2,1) default NULL,
- `c10` double NOT NULL default '0',
- `c11` double NOT NULL default '0',
- `c12` varbinary(5) NOT NULL default ''
+ `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
+ `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL DEFAULT '',
+ `c3` varbinary(1) NOT NULL DEFAULT '',
+ `c4` varbinary(1) NOT NULL DEFAULT '',
+ `c5` varbinary(4) NOT NULL DEFAULT '',
+ `c6` varbinary(4) NOT NULL DEFAULT '',
+ `c7` decimal(2,1) NOT NULL DEFAULT '0.0',
+ `c8` decimal(2,1) NOT NULL DEFAULT '0.0',
+ `c9` decimal(2,1) DEFAULT NULL,
+ `c10` double NOT NULL DEFAULT '0',
+ `c11` double NOT NULL DEFAULT '0',
+ `c12` varbinary(5) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
@@ -144,20 +144,20 @@ explain extended SELECT
COALESCE(1), COALESCE(1.0),COALESCE('a'),
COALESCE(1,1.0), COALESCE(1,'1'),COALESCE(1.1,'1'),
COALESCE('a' COLLATE latin1_bin,'b');
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select coalesce(1) AS `COALESCE(1)`,coalesce(1.0) AS `COALESCE(1.0)`,coalesce(_latin1'a') AS `COALESCE('a')`,coalesce(1,1.0) AS `COALESCE(1,1.0)`,coalesce(1,_latin1'1') AS `COALESCE(1,'1')`,coalesce(1.1,_latin1'1') AS `COALESCE(1.1,'1')`,coalesce((_latin1'a' collate latin1_bin),_latin1'b') AS `COALESCE('a' COLLATE latin1_bin,'b')`
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `COALESCE(1)` int(1) NOT NULL default '0',
- `COALESCE(1.0)` decimal(2,1) NOT NULL default '0.0',
- `COALESCE('a')` varchar(1) NOT NULL default '',
- `COALESCE(1,1.0)` decimal(2,1) NOT NULL default '0.0',
- `COALESCE(1,'1')` varbinary(1) NOT NULL default '',
- `COALESCE(1.1,'1')` varbinary(4) NOT NULL default '',
- `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default ''
+ `COALESCE(1)` int(1) NOT NULL DEFAULT '0',
+ `COALESCE(1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
+ `COALESCE('a')` varchar(1) NOT NULL DEFAULT '',
+ `COALESCE(1,1.0)` decimal(2,1) NOT NULL DEFAULT '0.0',
+ `COALESCE(1,'1')` varbinary(1) NOT NULL DEFAULT '',
+ `COALESCE(1.1,'1')` varbinary(4) NOT NULL DEFAULT '',
+ `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT 'case+union+test'