summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <joerg@debian.(none)>2007-07-26 15:37:45 +0200
committerunknown <joerg@debian.(none)>2007-07-26 15:37:45 +0200
commit690f0df5a2b7550ace8e2c0ea9b9a14845e2e412 (patch)
tree9a0b9c43e9587febbd7f468bc4a9ce7ae89d1275
parent2df3b7b0ea0681c6fafeda7d6c017404691d5cb9 (diff)
parent78207030bb8f5dde7d5a0d3e6b84b099b4a8dfba (diff)
downloadmariadb-git-690f0df5a2b7550ace8e2c0ea9b9a14845e2e412.tar.gz
Merge debian.(none):/M50/mysql-5.0
into debian.(none):/M50/push-5.0
-rw-r--r--mysql-test/suite/funcs_1/datadict/datadict_master.inc15
-rw-r--r--mysql-test/suite/funcs_1/r/innodb__datadict.result3
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_func_view.result332
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_08.result5
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result3
-rw-r--r--mysql-test/suite/funcs_1/r/memory__datadict.result3
-rw-r--r--mysql-test/suite/funcs_1/r/memory_func_view.result332
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_08.result5
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result3
-rw-r--r--mysql-test/suite/funcs_1/r/myisam__datadict.result3
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_func_view.result332
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_0102.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_08.result5
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_views.result3
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_0102.inc2
-rw-r--r--mysql-test/suite/funcs_1/views/func_view.inc3
21 files changed, 402 insertions, 659 deletions
diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc
index 03d3eeb3777..2c8ceb4e68e 100644
--- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc
+++ b/mysql-test/suite/funcs_1/datadict/datadict_master.inc
@@ -437,19 +437,23 @@ eval SELECT *
# check also with a 'simple' user
CREATE USER user_3212@localhost;
GRANT ALL ON db_datadict.* TO user_3212@localhost;
+# OBN: The following line was added following the fix to bug 28181
+# where queries to information_schema will fail if exporting to
+# a file without having the FILE attribute
+GRANT FILE ON *.* TO user_3212@localhost;
+
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
connect (u3212,localhost,user_3212,,db_datadict);
--source suite/funcs_1/include/show_connection.inc
# no db given --> db_datadict.schema does not exist
---error 1045
+--error 1146
eval SELECT *
INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user.file'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM schemata LIMIT 0, 5;
-# FIXME 3.2.1.2: why do we get different error numbers with and without OUTFILE ?
--error 1146
eval SELECT *
FROM schemata LIMIT 0, 5;
@@ -460,8 +464,6 @@ eval SELECT *
LINES TERMINATED BY '\n'
FROM information_schema.schemata
WHERE schema_name LIKE 'db_%';
-# The above will fail with access error as long as
-# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
eval SELECT *
FROM information_schema.schemata
@@ -469,14 +471,11 @@ eval SELECT *
USE information_schema;
-# no db given --> db_datadict.schema does not exist
eval SELECT *
INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user_2.file'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM schemata LIMIT 0, 5;
-# The above will fail with access error as long as
-# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
eval SELECT *
FROM schemata LIMIT 0, 5;
@@ -487,8 +486,6 @@ eval SELECT *
LINES TERMINATED BY '\n'
FROM information_schema.schemata
WHERE schema_name LIKE 'db_%';
-# The above will fail with access error as long as
-# BUBG#28181 - a regression introduced in 5.0.42 is not fixed
eval SELECT *
FROM information_schema.schemata
diff --git a/mysql-test/suite/funcs_1/r/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result
index 675f30da14a..bbaef83ea59 100644
--- a/mysql-test/suite/funcs_1/r/innodb__datadict.result
+++ b/mysql-test/suite/funcs_1/r/innodb__datadict.result
@@ -4859,6 +4859,7 @@ INTO OUTFILE '../tmp/out.innodb.db.file'
WHERE schema_name LIKE 'db_%';
CREATE USER user_3212@localhost;
GRANT ALL ON db_datadict.* TO user_3212@localhost;
+GRANT FILE ON *.* TO user_3212@localhost;
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
user_3212@localhost db_datadict
@@ -4867,7 +4868,7 @@ INTO OUTFILE '../tmp/out.innodb.user.file'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM schemata LIMIT 0, 5;
-ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
+ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
SELECT *
FROM schemata LIMIT 0, 5;
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result
index 5fac88b8f14..f901bcf8246 100644
--- a/mysql-test/suite/funcs_1/r/innodb_func_view.result
+++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result
@@ -2400,16 +2400,10 @@ my_time, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2418,16 +2412,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL);
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2438,16 +2426,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL;
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2456,16 +2438,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL);
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2476,15 +2452,10 @@ my_date, id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL;
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2493,15 +2464,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL);
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2512,15 +2478,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL;
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2529,15 +2490,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL);
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2780,15 +2736,10 @@ my_time, id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL;
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2797,15 +2748,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL);
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2816,16 +2762,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL;
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2834,16 +2774,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL);
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2854,15 +2788,10 @@ my_date, id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL;
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2871,15 +2800,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL);
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2890,15 +2814,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL;
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2907,15 +2826,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL);
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2926,8 +2840,8 @@ my_decimal, id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL;
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -2941,8 +2855,8 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL);
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -3115,12 +3029,12 @@ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values;
-SELECT CAST(my_year AS DECIMAL),
+SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL;
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3128,11 +3042,11 @@ NULL NULL 1
2005.00 2005 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal) AS `CAST(my_year AS DECIMAL)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL);
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3141,12 +3055,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values;
-SELECT CAST(my_time AS DECIMAL),
+SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL;
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3154,11 +3068,11 @@ NULL NULL 1
100000.00 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal) AS `CAST(my_time AS DECIMAL)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL);
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3167,12 +3081,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values;
-SELECT CAST(my_timestamp AS DECIMAL),
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL;
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3180,11 +3094,11 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal) AS `CAST(my_timestamp AS DECIMAL)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL);
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3193,12 +3107,12 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values;
-SELECT CAST(my_date AS DECIMAL),
+SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL;
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3206,11 +3120,11 @@ NULL NULL 1
20050628.00 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal) AS `CAST(my_date AS DECIMAL)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL);
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3219,12 +3133,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values;
-SELECT CAST(my_datetime AS DECIMAL),
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL;
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3232,11 +3146,11 @@ NULL NULL 1
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal) AS `CAST(my_datetime AS DECIMAL)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL);
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3245,12 +3159,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values;
-SELECT CAST(my_decimal AS DECIMAL),
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL;
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3258,11 +3172,11 @@ NULL NULL 1
-1.00 -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal) AS `CAST(my_decimal AS DECIMAL)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL);
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3271,12 +3185,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values;
-SELECT CAST(my_bigint AS DECIMAL),
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL;
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3284,11 +3198,11 @@ NULL NULL 1
-1.00 -1 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal) AS `CAST(my_bigint AS DECIMAL)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL);
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3297,12 +3211,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values;
-SELECT CAST(my_varbinary_1000 AS DECIMAL),
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL;
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3315,11 +3229,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal) AS `CAST(my_varbinary_1000 AS DECIMAL)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL);
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3333,12 +3247,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values;
-SELECT CAST(my_binary_30 AS DECIMAL),
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL;
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3356,11 +3270,11 @@ Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal) AS `CAST(my_binary_30 AS DECIMAL)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL);
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3379,12 +3293,12 @@ Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values;
-SELECT CAST(my_varchar_1000 AS DECIMAL),
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL;
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3397,11 +3311,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal) AS `CAST(my_varchar_1000 AS DECIMAL)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL);
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3415,12 +3329,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values;
-SELECT CAST(my_char_30 AS DECIMAL),
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL;
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
@@ -3436,11 +3350,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal) AS `CAST(my_char_30 AS DECIMAL)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL);
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
index a2bb203b294..56f20781995 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result
@@ -237,7 +237,7 @@ create table t1 (f1 integer) engine = innodb;
use test;
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
-ERROR HY000: Trigger in wrong schema
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
index 0f2d54f01ba..bb087d5882e 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result
@@ -484,9 +484,8 @@ BEGIN
WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END//
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136
-SET @counter1 = @counter1 + 1;
-END' at line 3
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
+END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7;
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
index 54b191e401e..685de95db51 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
@@ -194,7 +194,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
-Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'f136' at row 11
+Warning 1048 Column 'f136' cannot be null
select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig';
f118 f121 f122 f136 f151 f163
diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result
index 63d1c8a3131..3bb56a82612 100644
--- a/mysql-test/suite/funcs_1/r/innodb_views.result
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result
@@ -10202,7 +10202,8 @@ SHOW FIELDS FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
CHECK TABLE v1;
Table Op Msg_type Msg_text
-test.v1 check error Table 'test.v1' doesn't exist
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check error Corrupt
DESCRIBE v1;
ERROR 42S02: Table 'test.v1' doesn't exist
EXPLAIN SELECT * FROM v1;
diff --git a/mysql-test/suite/funcs_1/r/memory__datadict.result b/mysql-test/suite/funcs_1/r/memory__datadict.result
index 1dea8a5f4a9..fda7cc6e76e 100644
--- a/mysql-test/suite/funcs_1/r/memory__datadict.result
+++ b/mysql-test/suite/funcs_1/r/memory__datadict.result
@@ -4842,6 +4842,7 @@ INTO OUTFILE '../tmp/out.memory.db.file'
WHERE schema_name LIKE 'db_%';
CREATE USER user_3212@localhost;
GRANT ALL ON db_datadict.* TO user_3212@localhost;
+GRANT FILE ON *.* TO user_3212@localhost;
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
user_3212@localhost db_datadict
@@ -4850,7 +4851,7 @@ INTO OUTFILE '../tmp/out.memory.user.file'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM schemata LIMIT 0, 5;
-ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
+ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
SELECT *
FROM schemata LIMIT 0, 5;
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result
index 08e49d1bf6f..552b549a1a0 100644
--- a/mysql-test/suite/funcs_1/r/memory_func_view.result
+++ b/mysql-test/suite/funcs_1/r/memory_func_view.result
@@ -2400,16 +2400,10 @@ my_time, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2418,16 +2412,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL);
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2438,16 +2426,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL;
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2456,16 +2438,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL);
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2476,15 +2452,10 @@ my_date, id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL;
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2493,15 +2464,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL);
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2512,15 +2478,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL;
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2529,15 +2490,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL);
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2780,15 +2736,10 @@ my_time, id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL;
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2797,15 +2748,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL);
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2816,16 +2762,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL;
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2834,16 +2774,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL);
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2854,15 +2788,10 @@ my_date, id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL;
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2871,15 +2800,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL);
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2890,15 +2814,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL;
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2907,15 +2826,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL);
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2926,8 +2840,8 @@ my_decimal, id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL;
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -2941,8 +2855,8 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL);
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -3115,12 +3029,12 @@ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values;
-SELECT CAST(my_year AS DECIMAL),
+SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL;
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3128,11 +3042,11 @@ NULL NULL 1
2005.00 2005 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal) AS `CAST(my_year AS DECIMAL)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL);
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3141,12 +3055,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values;
-SELECT CAST(my_time AS DECIMAL),
+SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL;
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3154,11 +3068,11 @@ NULL NULL 1
100000.00 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal) AS `CAST(my_time AS DECIMAL)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL);
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3167,12 +3081,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values;
-SELECT CAST(my_timestamp AS DECIMAL),
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL;
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3180,11 +3094,11 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal) AS `CAST(my_timestamp AS DECIMAL)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL);
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3193,12 +3107,12 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values;
-SELECT CAST(my_date AS DECIMAL),
+SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL;
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3206,11 +3120,11 @@ NULL NULL 1
20050628.00 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal) AS `CAST(my_date AS DECIMAL)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL);
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3219,12 +3133,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values;
-SELECT CAST(my_datetime AS DECIMAL),
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL;
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3232,11 +3146,11 @@ NULL NULL 1
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal) AS `CAST(my_datetime AS DECIMAL)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL);
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3245,12 +3159,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values;
-SELECT CAST(my_decimal AS DECIMAL),
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL;
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3258,11 +3172,11 @@ NULL NULL 1
-1.00 -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal) AS `CAST(my_decimal AS DECIMAL)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL);
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3271,12 +3185,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values;
-SELECT CAST(my_bigint AS DECIMAL),
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL;
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3284,11 +3198,11 @@ NULL NULL 1
-1.00 -1 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal) AS `CAST(my_bigint AS DECIMAL)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL);
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3297,12 +3211,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values;
-SELECT CAST(my_varbinary_1000 AS DECIMAL),
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL;
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3315,11 +3229,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal) AS `CAST(my_varbinary_1000 AS DECIMAL)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL);
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3333,12 +3247,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values;
-SELECT CAST(my_binary_30 AS DECIMAL),
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL;
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3356,11 +3270,11 @@ Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal) AS `CAST(my_binary_30 AS DECIMAL)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL);
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3379,12 +3293,12 @@ Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values;
-SELECT CAST(my_varchar_1000 AS DECIMAL),
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL;
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3397,11 +3311,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal) AS `CAST(my_varchar_1000 AS DECIMAL)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL);
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3415,12 +3329,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values;
-SELECT CAST(my_char_30 AS DECIMAL),
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL;
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
@@ -3436,11 +3350,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal) AS `CAST(my_char_30 AS DECIMAL)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL);
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
index 0a640201d76..e7fec297ca7 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result
@@ -233,7 +233,7 @@ create table t1 (f1 integer) engine = memory;
use test;
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
-ERROR HY000: Trigger in wrong schema
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result
index 9a14845d0eb..a842bbc3ac7 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result
@@ -480,9 +480,8 @@ BEGIN
WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END//
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136
-SET @counter1 = @counter1 + 1;
-END' at line 3
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
+END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7;
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result
index c1b9ec6d33f..3dbe64958e3 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result
@@ -190,7 +190,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
-Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'f136' at row 11
+Warning 1048 Column 'f136' cannot be null
select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig';
f118 f121 f122 f136 f151 f163
diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result
index 516eef24439..69dee081446 100644
--- a/mysql-test/suite/funcs_1/r/memory_views.result
+++ b/mysql-test/suite/funcs_1/r/memory_views.result
@@ -10207,7 +10207,8 @@ SHOW FIELDS FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
CHECK TABLE v1;
Table Op Msg_type Msg_text
-test.v1 check error Table 'test.v1' doesn't exist
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check error Corrupt
DESCRIBE v1;
ERROR 42S02: Table 'test.v1' doesn't exist
EXPLAIN SELECT * FROM v1;
diff --git a/mysql-test/suite/funcs_1/r/myisam__datadict.result b/mysql-test/suite/funcs_1/r/myisam__datadict.result
index e9082e7aee7..b95d51f3801 100644
--- a/mysql-test/suite/funcs_1/r/myisam__datadict.result
+++ b/mysql-test/suite/funcs_1/r/myisam__datadict.result
@@ -4912,6 +4912,7 @@ INTO OUTFILE '../tmp/out.myisam.db.file'
WHERE schema_name LIKE 'db_%';
CREATE USER user_3212@localhost;
GRANT ALL ON db_datadict.* TO user_3212@localhost;
+GRANT FILE ON *.* TO user_3212@localhost;
connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK);
user_3212@localhost db_datadict
@@ -4920,7 +4921,7 @@ INTO OUTFILE '../tmp/out.myisam.user.file'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM schemata LIMIT 0, 5;
-ERROR 28000: Access denied for user 'user_3212'@'localhost' (using password: NO)
+ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
SELECT *
FROM schemata LIMIT 0, 5;
ERROR 42S02: Table 'db_datadict.schemata' doesn't exist
diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result
index 4f8a1b23bc0..94cba9796a2 100644
--- a/mysql-test/suite/funcs_1/r/myisam_func_view.result
+++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result
@@ -2400,16 +2400,10 @@ my_time, id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL;
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as unsigned) AS `CAST(my_time AS UNSIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2418,16 +2412,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 89 OR select_id IS NULL);
CAST(my_time AS UNSIGNED INTEGER) my_time id
NULL NULL 1
-18446744073709550778 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1105 Cast to unsigned converted negative integer to it's positive complement
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+18446744073701165657 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2438,16 +2426,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL;
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as unsigned) AS `CAST(my_timestamp AS UNSIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2456,16 +2438,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 88 OR select_id IS NULL);
CAST(my_timestamp AS UNSIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2476,15 +2452,10 @@ my_date, id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL;
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as unsigned) AS `CAST(my_date AS UNSIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2493,15 +2464,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 87 OR select_id IS NULL);
CAST(my_date AS UNSIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2512,15 +2478,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL;
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as unsigned) AS `CAST(my_datetime AS UNSIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2529,15 +2490,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 86 OR select_id IS NULL);
CAST(my_datetime AS UNSIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2780,15 +2736,10 @@ my_time, id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL;
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as signed) AS `CAST(my_time AS SIGNED INTEGER)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2797,15 +2748,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 78 OR select_id IS NULL);
CAST(my_time AS SIGNED INTEGER) my_time id
NULL NULL 1
--838 -838:59:59 2
-838 838:59:59 3
-13 13:00:00 4
-10 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '-838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '838:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '13:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '10:00:00'
+-8385959 -838:59:59 2
+8385959 838:59:59 3
+130000 13:00:00 4
+100000 10:00:00 5
DROP VIEW v1;
@@ -2816,16 +2762,10 @@ my_timestamp, id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL;
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as signed) AS `CAST(my_timestamp AS SIGNED INTEGER)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2834,16 +2774,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 77 OR select_id IS NULL);
CAST(my_timestamp AS SIGNED INTEGER) my_timestamp id
0 0000-00-00 00:00:00 1
-1970 1970-01-01 03:00:01 2
-2038 2038-01-01 02:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0000-00-00 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '1970-01-01 03:00:01'
-Warning 1292 Truncated incorrect INTEGER value: '2038-01-01 02:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+19700101030001 1970-01-01 03:00:01 2
+20380101025959 2038-01-01 02:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2854,15 +2788,10 @@ my_date, id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL;
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as signed) AS `CAST(my_date AS SIGNED INTEGER)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2871,15 +2800,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 76 OR select_id IS NULL);
CAST(my_date AS SIGNED INTEGER) my_date id
NULL NULL 1
-1 0001-01-01 2
-9999 9999-12-31 3
-2004 2004-02-29 4
-2005 2005-06-28 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28'
+10101 0001-01-01 2
+99991231 9999-12-31 3
+20040229 2004-02-29 4
+20050628 2005-06-28 5
DROP VIEW v1;
@@ -2890,15 +2814,10 @@ my_datetime, id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL;
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as signed) AS `CAST(my_datetime AS SIGNED INTEGER)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
@@ -2907,15 +2826,10 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 75 OR select_id IS NULL);
CAST(my_datetime AS SIGNED INTEGER) my_datetime id
NULL NULL 1
-1 0001-01-01 00:00:00 2
-9999 9999-12-31 23:59:59 3
-2004 2004-02-29 23:59:59 4
-2005 2005-06-28 10:00:00 5
-Warnings:
-Warning 1292 Truncated incorrect INTEGER value: '0001-01-01 00:00:00'
-Warning 1292 Truncated incorrect INTEGER value: '9999-12-31 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2004-02-29 23:59:59'
-Warning 1292 Truncated incorrect INTEGER value: '2005-06-28 10:00:00'
+10101000000 0001-01-01 00:00:00 2
+99991231235959 9999-12-31 23:59:59 3
+20040229235959 2004-02-29 23:59:59 4
+20050628100000 2005-06-28 10:00:00 5
DROP VIEW v1;
@@ -2926,8 +2840,8 @@ my_decimal, id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL;
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -2941,8 +2855,8 @@ WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 74 OR select_id IS NULL);
CAST(my_decimal AS SIGNED INTEGER) my_decimal id
NULL NULL 1
--10000000000000000 -9999999999999999999999999999999999.999999999999999999999999999999 2
-10000000000000000 9999999999999999999999999999999999.999999999999999999999999999999 3
+-9223372036854775808 -9999999999999999999999999999999999.999999999999999999999999999999 2
+9223372036854775807 9999999999999999999999999999999999.999999999999999999999999999999 3
0 0.000000000000000000000000000000 4
-1 -1.000000000000000000000000000000 5
Warnings:
@@ -3115,12 +3029,12 @@ Warning 1292 Truncated incorrect INTEGER value: ' ---äÖüß@µ*$--'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values;
-SELECT CAST(my_year AS DECIMAL),
+SELECT CAST(my_year AS DECIMAL(37,2)),
my_year, id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL;
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3128,11 +3042,11 @@ NULL NULL 1
2005.00 2005 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal) AS `CAST(my_year AS DECIMAL)`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_year` as decimal(37,2)) AS `CAST(my_year AS DECIMAL(37,2))`,`t1_values`.`my_year` AS `my_year`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 68 OR select_id IS NULL);
-CAST(my_year AS DECIMAL) my_year id
+CAST(my_year AS DECIMAL(37,2)) my_year id
NULL NULL 1
1901.00 1901 2
2155.00 2155 3
@@ -3141,12 +3055,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values;
-SELECT CAST(my_time AS DECIMAL),
+SELECT CAST(my_time AS DECIMAL(37,2)),
my_time, id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL;
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3154,11 +3068,11 @@ NULL NULL 1
100000.00 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal) AS `CAST(my_time AS DECIMAL)`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_time` as decimal(37,2)) AS `CAST(my_time AS DECIMAL(37,2))`,`t1_values`.`my_time` AS `my_time`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 67 OR select_id IS NULL);
-CAST(my_time AS DECIMAL) my_time id
+CAST(my_time AS DECIMAL(37,2)) my_time id
NULL NULL 1
-8385959.00 -838:59:59 2
8385959.00 838:59:59 3
@@ -3167,12 +3081,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values;
-SELECT CAST(my_timestamp AS DECIMAL),
+SELECT CAST(my_timestamp AS DECIMAL(37,2)),
my_timestamp, id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL;
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3180,11 +3094,11 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal) AS `CAST(my_timestamp AS DECIMAL)`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_timestamp` as decimal(37,2)) AS `CAST(my_timestamp AS DECIMAL(37,2))`,`t1_values`.`my_timestamp` AS `my_timestamp`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 66 OR select_id IS NULL);
-CAST(my_timestamp AS DECIMAL) my_timestamp id
+CAST(my_timestamp AS DECIMAL(37,2)) my_timestamp id
0.00 0000-00-00 00:00:00 1
19700101030001.00 1970-01-01 03:00:01 2
20380101025959.00 2038-01-01 02:59:59 3
@@ -3193,12 +3107,12 @@ CAST(my_timestamp AS DECIMAL) my_timestamp id
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values;
-SELECT CAST(my_date AS DECIMAL),
+SELECT CAST(my_date AS DECIMAL(37,2)),
my_date, id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL;
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3206,11 +3120,11 @@ NULL NULL 1
20050628.00 2005-06-28 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal) AS `CAST(my_date AS DECIMAL)`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_date` as decimal(37,2)) AS `CAST(my_date AS DECIMAL(37,2))`,`t1_values`.`my_date` AS `my_date`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 65 OR select_id IS NULL);
-CAST(my_date AS DECIMAL) my_date id
+CAST(my_date AS DECIMAL(37,2)) my_date id
NULL NULL 1
10101.00 0001-01-01 2
99991231.00 9999-12-31 3
@@ -3219,12 +3133,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values;
-SELECT CAST(my_datetime AS DECIMAL),
+SELECT CAST(my_datetime AS DECIMAL(37,2)),
my_datetime, id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL;
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3232,11 +3146,11 @@ NULL NULL 1
20050628100000.00 2005-06-28 10:00:00 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal) AS `CAST(my_datetime AS DECIMAL)`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_datetime` as decimal(37,2)) AS `CAST(my_datetime AS DECIMAL(37,2))`,`t1_values`.`my_datetime` AS `my_datetime`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 64 OR select_id IS NULL);
-CAST(my_datetime AS DECIMAL) my_datetime id
+CAST(my_datetime AS DECIMAL(37,2)) my_datetime id
NULL NULL 1
10101000000.00 0001-01-01 00:00:00 2
99991231235959.00 9999-12-31 23:59:59 3
@@ -3245,12 +3159,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values;
-SELECT CAST(my_decimal AS DECIMAL),
+SELECT CAST(my_decimal AS DECIMAL(37,2)),
my_decimal, id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL;
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3258,11 +3172,11 @@ NULL NULL 1
-1.00 -1.000000000000000000000000000000 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal) AS `CAST(my_decimal AS DECIMAL)`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_decimal` as decimal(37,2)) AS `CAST(my_decimal AS DECIMAL(37,2))`,`t1_values`.`my_decimal` AS `my_decimal`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 63 OR select_id IS NULL);
-CAST(my_decimal AS DECIMAL) my_decimal id
+CAST(my_decimal AS DECIMAL(37,2)) my_decimal id
NULL NULL 1
-10000000000000000000000000000000000.00 -9999999999999999999999999999999999.999999999999999999999999999999 2
10000000000000000000000000000000000.00 9999999999999999999999999999999999.999999999999999999999999999999 3
@@ -3271,12 +3185,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values;
-SELECT CAST(my_bigint AS DECIMAL),
+SELECT CAST(my_bigint AS DECIMAL(37,2)),
my_bigint, id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL;
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3284,11 +3198,11 @@ NULL NULL 1
-1.00 -1 5
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal) AS `CAST(my_bigint AS DECIMAL)`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_bigint` as decimal(37,2)) AS `CAST(my_bigint AS DECIMAL(37,2))`,`t1_values`.`my_bigint` AS `my_bigint`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 62 OR select_id IS NULL);
-CAST(my_bigint AS DECIMAL) my_bigint id
+CAST(my_bigint AS DECIMAL(37,2)) my_bigint id
NULL NULL 1
-9223372036854775808.00 -9223372036854775808 2
9223372036854775807.00 9223372036854775807 3
@@ -3297,12 +3211,12 @@ NULL NULL 1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values;
-SELECT CAST(my_varbinary_1000 AS DECIMAL),
+SELECT CAST(my_varbinary_1000 AS DECIMAL(37,2)),
my_varbinary_1000, id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL;
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3315,11 +3229,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal) AS `CAST(my_varbinary_1000 AS DECIMAL)`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varbinary_1000` as decimal(37,2)) AS `CAST(my_varbinary_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varbinary_1000` AS `my_varbinary_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 61 OR select_id IS NULL);
-CAST(my_varbinary_1000 AS DECIMAL) my_varbinary_1000 id
+CAST(my_varbinary_1000 AS DECIMAL(37,2)) my_varbinary_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3333,12 +3247,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values;
-SELECT CAST(my_binary_30 AS DECIMAL),
+SELECT CAST(my_binary_30 AS DECIMAL(37,2)),
my_binary_30, id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL;
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3356,11 +3270,11 @@ Warning 1292 Truncated incorrect DECIMAL value: '-1'
Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal) AS `CAST(my_binary_30 AS DECIMAL)`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_binary_30` as decimal(37,2)) AS `CAST(my_binary_30 AS DECIMAL(37,2))`,`t1_values`.`my_binary_30` AS `my_binary_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 60 OR select_id IS NULL);
-CAST(my_binary_30 AS DECIMAL) my_binary_30 id
+CAST(my_binary_30 AS DECIMAL(37,2)) my_binary_30 id
NULL NULL 1
0.00
0.00 <--------30 characters-------> 3
@@ -3379,12 +3293,12 @@ Warning 1292 Truncated incorrect DECIMAL value: '-3333.3333'
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values;
-SELECT CAST(my_varchar_1000 AS DECIMAL),
+SELECT CAST(my_varchar_1000 AS DECIMAL(37,2)),
my_varchar_1000, id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL;
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3397,11 +3311,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Error 1366 Incorrect decimal value: '' for column '' at row -1
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal) AS `CAST(my_varchar_1000 AS DECIMAL)`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_varchar_1000` as decimal(37,2)) AS `CAST(my_varchar_1000 AS DECIMAL(37,2))`,`t1_values`.`my_varchar_1000` AS `my_varchar_1000`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 59 OR select_id IS NULL);
-CAST(my_varchar_1000 AS DECIMAL) my_varchar_1000 id
+CAST(my_varchar_1000 AS DECIMAL(37,2)) my_varchar_1000 id
NULL NULL 1
0.00 2
0.00 <---------1000 characters--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 3
@@ -3415,12 +3329,12 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
DROP VIEW v1;
-CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL),
+CREATE VIEW v1 AS SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values;
-SELECT CAST(my_char_30 AS DECIMAL),
+SELECT CAST(my_char_30 AS DECIMAL(37,2)),
my_char_30, id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL;
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
@@ -3436,11 +3350,11 @@ Error 1366 Incorrect decimal value: '' for column '' at row -1
Warning 1292 Truncated incorrect DECIMAL value: ' ---äÖüß@µ*$-- '
SHOW CREATE VIEW v1;
View Create View
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal) AS `CAST(my_char_30 AS DECIMAL)`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select cast(`t1_values`.`my_char_30` as decimal(37,2)) AS `CAST(my_char_30 AS DECIMAL(37,2))`,`t1_values`.`my_char_30` AS `my_char_30`,`t1_values`.`id` AS `id` from `t1_values`
SELECT v1.* FROM v1
WHERE v1.id IN (SELECT id FROM t1_values
WHERE select_id = 58 OR select_id IS NULL);
-CAST(my_char_30 AS DECIMAL) my_char_30 id
+CAST(my_char_30 AS DECIMAL(37,2)) my_char_30 id
NULL NULL 1
0.00 2
0.00 <--------30 characters-------> 3
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
index 4bbee8aa133..6dd56a1e912 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result
@@ -237,7 +237,7 @@ create table t1 (f1 integer) engine = myisam;
use test;
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
-ERROR HY000: Trigger in wrong schema
+ERROR 42S02: Table 'trig_db.tb3' doesn't exist
use trig_db;
CREATE TRIGGER trg6_3 AFTER INSERT on test.tb3
for each row set @ret_trg6_3 = 18;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
index ec8e12ff32d..8a13e91d71d 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result
@@ -484,9 +484,8 @@ BEGIN
WHILE @counter1 < new.f136
SET @counter1 = @counter1 + 1;
END//
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @counter1 < new.f136
-SET @counter1 = @counter1 + 1;
-END' at line 3
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET @counter1 = @counter1 + 1;
+END' at line 4
delete from tb3 where f122='Test 3.5.8.5-while';
drop trigger trg7;
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
index 9643aa567e3..b7a5933e2f7 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
@@ -194,7 +194,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
-Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'f136' at row 11
+Warning 1048 Column 'f136' cannot be null
select f118, f121, f122, f136, f151, f163 from tb3
where f122 like 'Test 3.5.9.4-trig';
f118 f121 f122 f136 f151 f163
diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result
index 1dbebbccb29..83af04dcd2c 100644
--- a/mysql-test/suite/funcs_1/r/myisam_views.result
+++ b/mysql-test/suite/funcs_1/r/myisam_views.result
@@ -10224,7 +10224,8 @@ SHOW FIELDS FROM v1;
ERROR 42S02: Table 'test.v1' doesn't exist
CHECK TABLE v1;
Table Op Msg_type Msg_text
-test.v1 check error Table 'test.v1' doesn't exist
+test.v1 check Error Table 'test.v1' doesn't exist
+test.v1 check error Corrupt
DESCRIBE v1;
ERROR 42S02: Table 'test.v1' doesn't exist
EXPLAIN SELECT * FROM v1;
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc
index 26a5dab3370..b11455c07d3 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_0102.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_0102.inc
@@ -265,7 +265,7 @@ let $message= Testcase 3.5.1.8:;
# Can't create a trigger in a different database
use test;
- --error 1435
+ --error 1146
CREATE TRIGGER trig_db.trg6_2 AFTER INSERT on tb3
for each row set @ret_trg6_2 = 5;
diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc
index 4479db22e70..c477eafc610 100644
--- a/mysql-test/suite/funcs_1/views/func_view.inc
+++ b/mysql-test/suite/funcs_1/views/func_view.inc
@@ -609,7 +609,8 @@ let $col_type= my_year;
# 1.1.6. CAST --> DECIMAL
-let $target_type= DECIMAL;
+# Set the following to (37,2) since the default was changed to (10,0) - OBN
+let $target_type= DECIMAL(37,2);
#
let $col_type= my_char_30;
--source suite/funcs_1/views/fv_cast.inc