summaryrefslogtreecommitdiff
path: root/mysql-test/r/dyncol.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
committerSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
commit6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d (patch)
tree5a7e05e0a9abb5f5cc2672bc3d545ac3f5f7fa43 /mysql-test/r/dyncol.result
parent102a7a2a763dc5f2da8dd1f9ca9a53664c5aad6a (diff)
parente308d7417bc4ceb1b3b72cac2642015b88f310ff (diff)
downloadmariadb-git-6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d.tar.gz
5.3 merge
Diffstat (limited to 'mysql-test/r/dyncol.result')
-rw-r--r--mysql-test/r/dyncol.result91
1 files changed, 81 insertions, 10 deletions
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 13543223ad8..2411f1070d9 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -182,13 +182,13 @@ select column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int);
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 cast(column_get(column_create(1,1212 AS unsigned int),1) as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int)`
+Note 1003 select column_get(column_create(1,1212 AS unsigned int),1 as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int)`
explain extended
select column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned);
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 cast(column_get(column_create(1,1212 AS unsigned int),1) as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned)`
+Note 1003 select column_get(column_create(1,1212 AS unsigned int),1 as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned)`
select column_get(column_create(1, 1212 AS decimal), 1 as unsigned int);
column_get(column_create(1, 1212 AS decimal), 1 as unsigned int)
1212
@@ -261,13 +261,13 @@ select column_get(column_create(1, 1212 AS int), 1 as int);
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 cast(column_get(column_create(1,1212 AS int),1) as signed) AS `column_get(column_create(1, 1212 AS int), 1 as int)`
+Note 1003 select column_get(column_create(1,1212 AS int),1 as signed) AS `column_get(column_create(1, 1212 AS int), 1 as int)`
explain extended
select column_get(column_create(1, 1212 AS int), 1 as signed int);
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 cast(column_get(column_create(1,1212 AS int),1) as signed) AS `column_get(column_create(1, 1212 AS int), 1 as signed int)`
+Note 1003 select column_get(column_create(1,1212 AS int),1 as signed) AS `column_get(column_create(1, 1212 AS int), 1 as signed int)`
select column_get(column_create(1, -1212 AS int), 1 as int);
column_get(column_create(1, -1212 AS int), 1 as int)
-1212
@@ -368,7 +368,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
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 cast(column_get(column_create(1,'1212' AS char charset utf8 ),1) as char charset utf8) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset utf8)`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8 ),1 as char charset utf8) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset utf8)`
select column_get(column_create(1, 1212 AS unsigned int), 1 as char charset utf8);
column_get(column_create(1, 1212 AS unsigned int), 1 as char charset utf8)
1212
@@ -428,7 +428,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
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 cast(column_get(column_create(1,'1212' AS char charset utf8 ),1) as char charset binary) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset binary)`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8 ),1 as char charset binary) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset binary)`
#
# column get real
#
@@ -440,13 +440,13 @@ select column_get(column_create(1, 1212.12 AS double), 1 as double);
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 cast(column_get(column_create(1,1212.12 AS double),1) as double) AS `column_get(column_create(1, 1212.12 AS double), 1 as double)`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as double) AS `column_get(column_create(1, 1212.12 AS double), 1 as double)`
explain extended
select column_get(column_create(1, 1212.12 AS double), 1 as double(6,2));
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 cast(column_get(column_create(1,1212.12 AS double),1) as double(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as double(6,2))`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as double(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as double(6,2))`
select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as double);
column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as double)
1.8446744073709552e19
@@ -521,13 +521,13 @@ select column_get(column_create(1, 1212.12 AS double), 1 as decimal);
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 cast(column_get(column_create(1,1212.12 AS double),1) as decimal(10,0)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal)`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as decimal(10,0)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal)`
explain extended
select column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2));
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 cast(column_get(column_create(1,1212.12 AS double),1) as decimal(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2))`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as decimal(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2))`
select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as decimal(20,0));
column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as decimal(20,0))
18446744073709551615
@@ -1335,3 +1335,74 @@ hex(COLUMN_CREATE(0, COLUMN_GET(COLUMN_CREATE(0, 0.0 as decimal), 0 as decimal))
select hex(COLUMN_CREATE(0, 0.0 as decimal));
hex(COLUMN_CREATE(0, 0.0 as decimal))
000100000004
+#
+# MDEV-4292: parse error when selecting on views using dynamic column
+#
+create table t1 (i int, d blob);
+create view v1 as select i, column_get(d, 1 as binary) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as char charset binary) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as int) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as signed) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as unsigned int) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as unsigned) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as date) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as date) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as time) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as time) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as datetime) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as datetime) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as decimal) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as decimal(10,0)) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as double) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as double) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as char) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as char charset latin1) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+drop table t1;
+#
+# end of 5.3 tests
+#