summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-11-07 17:17:40 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 20:35:41 +0100
commita411d7f4f670c24b43b50f7d2a1129e10218f4a7 (patch)
treecc1e9cdf6b85bdcec8c0369e502d4d211b2f7263 /mysql-test
parent8b3b6dc377c548b1b72978a015af999cf6e99760 (diff)
downloadmariadb-git-a411d7f4f670c24b43b50f7d2a1129e10218f4a7.tar.gz
store/show vcols as item->print()
otherwise we'd need to store sql_mode *per vcol* (consider CREATE INDEX...) and how SHOW CREATE TABLE would support that? Additionally, get rid of vcol::expr_str, just to make sure the string is always generated and never leaked in the original form.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/alter_table.result4
-rw-r--r--mysql-test/r/cast.result2
-rw-r--r--mysql-test/r/check_constraint.result54
-rw-r--r--mysql-test/r/constraints.result6
-rw-r--r--mysql-test/r/create.result6
-rw-r--r--mysql-test/r/ctype_binary.result4
-rw-r--r--mysql-test/r/ctype_cp1251.result4
-rw-r--r--mysql-test/r/ctype_latin1.result4
-rw-r--r--mysql-test/r/ctype_like_range.result4
-rw-r--r--mysql-test/r/ctype_ucs.result4
-rw-r--r--mysql-test/r/ctype_utf8.result18
-rw-r--r--mysql-test/r/default.result551
-rw-r--r--mysql-test/r/dyncol.result20
-rw-r--r--mysql-test/r/func_compress.result6
-rw-r--r--mysql-test/r/func_crypt.result2
-rw-r--r--mysql-test/r/func_digest.result4
-rw-r--r--mysql-test/r/func_encrypt.result4
-rw-r--r--mysql-test/r/func_hybrid_type.result2
-rw-r--r--mysql-test/r/func_misc.result16
-rw-r--r--mysql-test/r/func_time.result4
-rw-r--r--mysql-test/r/func_time_hires.result2
-rw-r--r--mysql-test/r/function_defaults.result200
-rw-r--r--mysql-test/r/function_defaults_innodb.result200
-rw-r--r--mysql-test/r/gis.result62
-rw-r--r--mysql-test/r/grant.result4
-rw-r--r--mysql-test/r/key.result4
-rw-r--r--mysql-test/r/log_slow.result2
-rw-r--r--mysql-test/r/log_tables.result16
-rw-r--r--mysql-test/r/mysql5613mysql.result12
-rw-r--r--mysql-test/r/mysql57_virtual.result4
-rw-r--r--mysql-test/r/mysqldump.result8
-rw-r--r--mysql-test/r/partition.result2
-rw-r--r--mysql-test/r/partition_bug18198.result3
-rw-r--r--mysql-test/r/plugin_auth.result2
-rw-r--r--mysql-test/r/show_check.result12
-rw-r--r--mysql-test/r/sql_mode.result4
-rw-r--r--mysql-test/r/statistics.result2
-rw-r--r--mysql-test/r/strict.result2
-rw-r--r--mysql-test/r/system_mysql_db.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix40123.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix50030.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix50117.result14
-rw-r--r--mysql-test/r/type_blob.result4
-rw-r--r--mysql-test/r/type_ranges.result6
-rw-r--r--mysql-test/r/type_temporal_mysql56.result2
-rw-r--r--mysql-test/r/type_timestamp.result30
-rw-r--r--mysql-test/r/type_timestamp_hires.result30
-rw-r--r--mysql-test/r/udf.result2
-rw-r--r--mysql-test/r/view.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns.result6
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_innodb.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_memory.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql.result16
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result16
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result5
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result36
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result36
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_innodb.result8
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_myisam.result14
-rw-r--r--mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result10
-rw-r--r--mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result10
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result368
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result368
-rw-r--r--mysql-test/suite/gcol/r/rpl_gcol.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-virtual-columns.result150
-rw-r--r--mysql-test/suite/parts/r/partition_datetime_innodb.result4
-rw-r--r--mysql-test/suite/parts/r/partition_datetime_myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_default.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_multi_engine.result24
-rw-r--r--mysql-test/suite/rpl/r/rpl_partition_innodb.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_partition_memory.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_partition_myisam.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result4
-rw-r--r--mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result38
-rw-r--r--mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result12
-rw-r--r--mysql-test/suite/vcol/r/delayed.result7
-rw-r--r--mysql-test/suite/vcol/r/innodb_autoinc_vcol.result2
-rw-r--r--mysql-test/suite/vcol/r/rpl_vcol.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result16
-rw-r--r--mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_innodb.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result8
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result22
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result354
-rw-r--r--mysql-test/suite/vcol/r/vcol_syntax.result12
-rw-r--r--mysql-test/suite/vcol/t/delayed.test5
-rw-r--r--mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc2
-rw-r--r--mysql-test/t/default.test25
-rw-r--r--mysql-test/t/partition_bug18198.test2
98 files changed, 1525 insertions, 1559 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index f3e41e1b246..dbfe2e8e162 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -2073,8 +2073,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `min` CHECK (a+b > 100),
- CONSTRAINT `mini` CHECK (a+b > 100)
+ CONSTRAINT `min` CHECK (((`a` + `b`) > 100)),
+ CONSTRAINT `mini` CHECK (((`a` + `b`) > 100))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1(a INT, b INT, CONSTRAINT min check (a>5),
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index 9f653a17ce8..ac90a6ec68b 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -804,7 +804,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` char(5) AS (cast("a" as char(10) binary) + a) VIRTUAL
+ `b` char(5) AS ((cast('a' as char(10) charset latin1) + `a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select collation(cast("a" as char(10) binary));
diff --git a/mysql-test/r/check_constraint.result b/mysql-test/r/check_constraint.result
index f3c1fda1eee..ddca2ea1393 100644
--- a/mysql-test/r/check_constraint.result
+++ b/mysql-test/r/check_constraint.result
@@ -3,10 +3,10 @@ create table t1 (a int check(a>10), b int check (b > 20), constraint `min` check
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL CHECK (a>10),
- `b` int(11) DEFAULT NULL CHECK (b > 20),
- CONSTRAINT `min` CHECK (a+b > 100),
- CONSTRAINT `max` CHECK (a+b <500)
+ `a` int(11) DEFAULT NULL CHECK ((`a` > 10)),
+ `b` int(11) DEFAULT NULL CHECK ((`b` > 20)),
+ CONSTRAINT `min` CHECK (((`a` + `b`) > 100)),
+ CONSTRAINT `max` CHECK (((`a` + `b`) < 500))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (100,100);
insert into t1 values (1,1);
@@ -52,12 +52,12 @@ set check_constraint_checks=@save_check_constraint;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL CHECK (a>10),
- `b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT 0 CHECK (c < 10),
- CONSTRAINT `min` CHECK (a+b > 100),
- CONSTRAINT `max` CHECK (a+b <500),
- CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
+ `a` int(11) DEFAULT NULL CHECK ((`a` > 10)),
+ `b` int(11) DEFAULT NULL CHECK ((`b` > 20)),
+ `c` int(11) DEFAULT 0 CHECK ((`c` < 10)),
+ CONSTRAINT `min` CHECK (((`a` + `b`) > 100)),
+ CONSTRAINT `max` CHECK (((`a` + `b`) < 500)),
+ CONSTRAINT `CONSTRAINT_1` CHECK ((((`a` + `b`) + `c`) < 500))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values(105,105,105);
ERROR 23000: CONSTRAINT `c` failed for `test`.`t1`
@@ -75,12 +75,12 @@ create table t2 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL CHECK (a>10),
- `b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT 0 CHECK (c < 10),
- CONSTRAINT `min` CHECK (a+b > 100),
- CONSTRAINT `max` CHECK (a+b <500),
- CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
+ `a` int(11) DEFAULT NULL CHECK ((`a` > 10)),
+ `b` int(11) DEFAULT NULL CHECK ((`b` > 20)),
+ `c` int(11) DEFAULT 0 CHECK ((`c` < 10)),
+ CONSTRAINT `min` CHECK (((`a` + `b`) > 100)),
+ CONSTRAINT `max` CHECK (((`a` + `b`) < 500)),
+ CONSTRAINT `CONSTRAINT_1` CHECK ((((`a` + `b`) + `c`) < 500))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t2 drop constraint c;
ERROR 42000: Can't DROP CONSTRAINT `c`; check that it exists
@@ -91,11 +91,11 @@ alter table t2 drop constraint min;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT NULL CHECK (a>10),
- `b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT 0 CHECK (c < 10),
- CONSTRAINT `max` CHECK (a+b <500),
- CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
+ `a` int(11) DEFAULT NULL CHECK ((`a` > 10)),
+ `b` int(11) DEFAULT NULL CHECK ((`b` > 20)),
+ `c` int(11) DEFAULT 0 CHECK ((`c` < 10)),
+ CONSTRAINT `max` CHECK (((`a` + `b`) < 500)),
+ CONSTRAINT `CONSTRAINT_1` CHECK ((((`a` + `b`) + `c`) < 500))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2;
create or replace table t1 (a int, b int, constraint check (a>b));
@@ -104,7 +104,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `CONSTRAINT_1` CHECK (a>b)
+ CONSTRAINT `CONSTRAINT_1` CHECK ((`a` > `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a int, b int,
constraint CONSTRAINT_1 check (a>1),
@@ -114,8 +114,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `CONSTRAINT_1` CHECK (a>1),
- CONSTRAINT `CONSTRAINT_2` CHECK (b>1)
+ CONSTRAINT `CONSTRAINT_1` CHECK ((`a` > 1)),
+ CONSTRAINT `CONSTRAINT_2` CHECK ((`b` > 1))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a int, b int,
constraint CONSTRAINT_1 check (a>1),
@@ -126,8 +126,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `CONSTRAINT_1` CHECK (a>1),
- CONSTRAINT `CONSTRAINT_3` CHECK (b>1),
- CONSTRAINT `CONSTRAINT_2` CHECK (a>b)
+ CONSTRAINT `CONSTRAINT_1` CHECK ((`a` > 1)),
+ CONSTRAINT `CONSTRAINT_3` CHECK ((`b` > 1)),
+ CONSTRAINT `CONSTRAINT_2` CHECK ((`a` > `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result
index 8ab38bf1f35..017d03f7e67 100644
--- a/mysql-test/r/constraints.result
+++ b/mysql-test/r/constraints.result
@@ -3,7 +3,7 @@ create table t1 (a int check (a>0));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT NULL CHECK (a>0)
+ `a` int(11) DEFAULT NULL CHECK ((`a` > 0))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1);
insert into t1 values (0);
@@ -15,7 +15,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `CONSTRAINT_1` CHECK (a>b)
+ CONSTRAINT `CONSTRAINT_1` CHECK ((`a` > `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,0);
insert into t1 values (0,1);
@@ -27,7 +27,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- CONSTRAINT `abc` CHECK (a>b)
+ CONSTRAINT `abc` CHECK ((`a` > `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,0);
insert into t1 values (0,1);
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 801a500345e..4baa254a966 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1866,8 +1866,8 @@ Thinkpad Laptop black ttt
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `color` char(32) AS (COLUMN_GET(dynamic_cols, 1 as char)) PERSISTENT,
- `cl` char(32) AS (COLUMN_GET(COLUMN_ADD(COLUMN_CREATE(1 , 'blue' as char), 2, 'ttt'), i as char)) PERSISTENT,
+ `color` char(32) AS (column_get(`dynamic_cols`,1 as char charset latin1)) PERSISTENT,
+ `cl` char(32) AS (column_get(column_add(column_create(1,'blue' AS char charset latin1 ),2,'ttt'),`i` as char charset latin1)) PERSISTENT,
`item_name` varchar(32) NOT NULL,
`i` int(11) DEFAULT NULL,
`dynamic_cols` blob DEFAULT NULL,
@@ -1888,7 +1888,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`n` int(11) DEFAULT NULL,
- `c` char(32) AS (convert(cast(n as char), char)) PERSISTENT
+ `c` char(32) AS (cast(cast(`n` as char charset latin1) as char charset latin1)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set @@session.collation_server=filename;
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index eb1746b933b..77e1224fa83 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -2869,11 +2869,11 @@ NULL
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Level Code Message
-Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
+Note 1003 select (v_LastPaymentDate@0 < current_timestamp()) AS `v_LastPaymentDate < NOW()`
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
+Note 1003 select concat(v_LastPaymentDate@0,current_timestamp()) AS `CONCAT(v_LastPaymentDate, NOW())`
DROP PROCEDURE p1;
#
# Bug#52159 returning time type from function and empty left join causes debug assertion
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 36dc23f33be..3f8dae4e03d 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -3278,11 +3278,11 @@ NULL
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Level Code Message
-Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
+Note 1003 select (v_LastPaymentDate@0 < current_timestamp()) AS `v_LastPaymentDate < NOW()`
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select concat(convert(v_LastPaymentDate@0 using cp1251),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
+Note 1003 select concat(convert(v_LastPaymentDate@0 using cp1251),current_timestamp()) AS `CONCAT(v_LastPaymentDate, NOW())`
DROP PROCEDURE p1;
#
# Bug#52159 returning time type from function and empty left join causes debug assertion
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 5ed8e9e8868..1a155a1c63d 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -3575,11 +3575,11 @@ NULL
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Level Code Message
-Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
+Note 1003 select (v_LastPaymentDate@0 < current_timestamp()) AS `v_LastPaymentDate < NOW()`
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select concat(v_LastPaymentDate@0,now()) AS `CONCAT(v_LastPaymentDate, NOW())`
+Note 1003 select concat(v_LastPaymentDate@0,current_timestamp()) AS `CONCAT(v_LastPaymentDate, NOW())`
DROP PROCEDURE p1;
#
# Bug#52159 returning time type from function and empty left join causes debug assertion
diff --git a/mysql-test/r/ctype_like_range.result b/mysql-test/r/ctype_like_range.result
index 176cfe3acf0..f8032d0ae86 100644
--- a/mysql-test/r/ctype_like_range.result
+++ b/mysql-test/r/ctype_like_range.result
@@ -4419,8 +4419,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `mn` varchar(10) DEFAULT LIKE_RANGE_MIN(a,10),
- `mx` varchar(10) DEFAULT LIKE_RANGE_MAX(a,10)
+ `mn` varchar(10) DEFAULT like_range_min(`a`,10),
+ `mx` varchar(10) DEFAULT like_range_max(`a`,10)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a'),('a_'),('a%');
SELECT a, HEX(mn), HEX(mx) FROM t1;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 9902a91a2bf..61367cbe081 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -4478,11 +4478,11 @@ NULL
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Level Code Message
-Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
+Note 1003 select (v_LastPaymentDate@0 < current_timestamp()) AS `v_LastPaymentDate < NOW()`
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select concat(convert(v_LastPaymentDate@0 using ucs2),convert(now() using ucs2)) AS `CONCAT(v_LastPaymentDate, NOW())`
+Note 1003 select concat(convert(v_LastPaymentDate@0 using ucs2),convert(current_timestamp() using ucs2)) AS `CONCAT(v_LastPaymentDate, NOW())`
DROP PROCEDURE p1;
#
# Bug#52159 returning time type from function and empty left join causes debug assertion
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 5e76aa2c203..bd148d82ac7 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -5320,11 +5320,11 @@ NULL
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Level Code Message
-Note 1003 select (v_LastPaymentDate@0 < now()) AS `v_LastPaymentDate < NOW()`
+Note 1003 select (v_LastPaymentDate@0 < current_timestamp()) AS `v_LastPaymentDate < NOW()`
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select concat(convert(v_LastPaymentDate@0 using utf8),now()) AS `CONCAT(v_LastPaymentDate, NOW())`
+Note 1003 select concat(convert(v_LastPaymentDate@0 using utf8),current_timestamp()) AS `CONCAT(v_LastPaymentDate, NOW())`
DROP PROCEDURE p1;
#
# Bug#52159 returning time type from function and empty left join causes debug assertion
@@ -10515,7 +10515,7 @@ SET NAMES utf8;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) DEFAULT CONCAT('ß')
+ `a` varchar(30) DEFAULT concat('ß')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT HEX(a),a FROM t1;
@@ -10528,9 +10528,9 @@ ALTER TABLE t1 ADD c VARCHAR(30) CHARACTER SET latin1 DEFAULT CONCAT('ß');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) DEFAULT CONCAT('ß'),
- `b` varchar(30) DEFAULT CONCAT('ß'),
- `c` varchar(30) DEFAULT CONCAT('ß')
+ `a` varchar(30) DEFAULT concat('ß'),
+ `b` varchar(30) DEFAULT concat('ß'),
+ `c` varchar(30) DEFAULT concat('ß')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DELETE FROM t1;
INSERT INTO t1 VALUES();
@@ -10551,7 +10551,7 @@ SET NAMES utf8;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) CHARACTER SET utf8 DEFAULT CONCAT('ß')
+ `a` varchar(30) CHARACTER SET utf8 DEFAULT concat('ß')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT HEX(a), a FROM t1;
@@ -10563,7 +10563,7 @@ CREATE TABLE t1 (a VARCHAR(30) CHARACTER SET latin1 DEFAULT CONCAT('ß'));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) DEFAULT CONCAT('ß')
+ `a` varchar(30) DEFAULT concat('ß')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT HEX(a) FROM t1;
@@ -10575,7 +10575,7 @@ CREATE TABLE t1 (a VARCHAR(30) CHARACTER SET utf8 DEFAULT CONCAT('ß'));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) CHARACTER SET utf8 DEFAULT CONCAT('ß')
+ `a` varchar(30) CHARACTER SET utf8 DEFAULT concat('ß')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT HEX(a) FROM t1;
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index 03a444e6075..7e9fff5fe9d 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -247,19 +247,19 @@ CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIM
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP(6)
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(2) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `event_time` timestamp(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP(6)
+ `event_time` timestamp(6) NOT NULL DEFAULT sysdate(2) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
#
@@ -270,8 +270,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT 1,
- `b` int(11) DEFAULT (a+1),
- `c` int(11) DEFAULT (a+b)
+ `b` int(11) DEFAULT ((`a` + 1)),
+ `c` int(11) DEFAULT ((`a` + `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ();
insert into t1 (a) values (2);
@@ -301,8 +301,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` blob DEFAULT 1,
- `c` blob DEFAULT "hello",
- `t` text DEFAULT concat(a,b,c)
+ `c` blob DEFAULT 'hello',
+ `t` text DEFAULT concat(`a`,`b`,`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 (a) values (2);
insert into t1 (a,b) values (10,"test1");
@@ -345,11 +345,11 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT 1,
`c` int(11) DEFAULT -1,
- `d` int(11) DEFAULT (1+1),
- `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `f` int(11) DEFAULT (1+1+1),
- `g` int(11) NOT NULL DEFAULT (1+1+1+1),
- `h` int(11) DEFAULT (2+2+2+2)
+ `d` int(11) DEFAULT ((1 + 1)),
+ `e` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `f` int(11) DEFAULT (((1 + 1) + 1)),
+ `g` int(11) NOT NULL DEFAULT ((((1 + 1) + 1) + 1)),
+ `h` int(11) DEFAULT ((((2 + 2) + 2) + 2))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create table t2 like t1;
show create table t2;
@@ -358,11 +358,11 @@ t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT 1,
`c` int(11) DEFAULT -1,
- `d` int(11) DEFAULT (1+1),
- `e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `f` int(11) DEFAULT (1+1+1),
- `g` int(11) NOT NULL DEFAULT (1+1+1+1),
- `h` int(11) DEFAULT (2+2+2+2)
+ `d` int(11) DEFAULT ((1 + 1)),
+ `e` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `f` int(11) DEFAULT (((1 + 1) + 1)),
+ `g` int(11) NOT NULL DEFAULT ((((1 + 1) + 1) + 1)),
+ `h` int(11) DEFAULT ((((2 + 2) + 2) + 2))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t2 (a) values (100);
select a,b,c,d,e,f,g,h from t2;
@@ -373,7 +373,7 @@ create table t1 (a int default (1----1), b int default - 1, c int default +1, e
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT (1----1),
+ `a` int(11) DEFAULT ((1 - -1)),
`b` int(11) DEFAULT -1,
`c` int(11) DEFAULT 1,
`e` int(11) DEFAULT 1
@@ -542,11 +542,16 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
DEALLOCATE PREPARE stmt;
-PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?+?))';
+prepare stmt from 'create table t1 (a int default(?+?))';
set @a=1;
execute stmt using @a,@a;
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?+?)' at line 1
-DEALLOCATE PREPARE stmt;
+deallocate prepare stmt;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT ((1 + 1))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
#
# Parenthesized Item_basic_constant
#
@@ -623,20 +628,20 @@ d03 DATETIME DEFAULT COALESCE(TIMESTAMP'2001-01-01 10:20:30')
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `i01` int(11) DEFAULT COALESCE(1),
- `i02` int(11) DEFAULT COALESCE(0x3939),
- `i03` int(11) DEFAULT COALESCE(1.0),
- `i04` int(11) DEFAULT COALESCE(1e0),
- `i05` int(11) DEFAULT COALESCE(NULL),
- `f01` double DEFAULT COALESCE(PI()),
- `s01` varchar(10) DEFAULT COALESCE(_latin1'test'),
- `s02` varchar(10) DEFAULT COALESCE('test'),
- `s03` varchar(10) DEFAULT COALESCE(0x40),
- `s04` varchar(10) DEFAULT COALESCE(X'40'),
- `s05` varchar(10) DEFAULT COALESCE(B'1000000'),
- `d01` time DEFAULT COALESCE(TIME'10:20:30'),
- `d02` date DEFAULT COALESCE(DATE'2001-01-01'),
- `d03` datetime DEFAULT COALESCE(TIMESTAMP'2001-01-01 10:20:30')
+ `i01` int(11) DEFAULT coalesce(1),
+ `i02` int(11) DEFAULT coalesce(0x3939),
+ `i03` int(11) DEFAULT coalesce(1.0),
+ `i04` int(11) DEFAULT coalesce(1e0),
+ `i05` int(11) DEFAULT coalesce(NULL),
+ `f01` double DEFAULT coalesce(pi()),
+ `s01` varchar(10) DEFAULT coalesce(_latin1'test'),
+ `s02` varchar(10) DEFAULT coalesce('test'),
+ `s03` varchar(10) DEFAULT coalesce(0x40),
+ `s04` varchar(10) DEFAULT coalesce(X'40'),
+ `s05` varchar(10) DEFAULT coalesce(0x40),
+ `d01` time DEFAULT coalesce(TIME'10:20:30'),
+ `d02` date DEFAULT coalesce(DATE'2001-01-01'),
+ `d03` datetime DEFAULT coalesce(TIMESTAMP'2001-01-01 10:20:30')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
@@ -682,7 +687,7 @@ CREATE TABLE t1 (a INT DEFAULT COALESCE(1) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT COALESCE(1)
+ `a` int(11) NOT NULL DEFAULT coalesce(1)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -707,7 +712,7 @@ CREATE TABLE t1 (a INT DEFAULT CONCAT('1') NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT CONCAT('1')
+ `a` int(11) NOT NULL DEFAULT concat('1')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -718,7 +723,7 @@ CREATE TABLE t1 (a INT DEFAULT COALESCE('1') NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT COALESCE('1')
+ `a` int(11) NOT NULL DEFAULT coalesce('1')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -767,7 +772,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT CONCAT('1 ')
+ `a` int(11) DEFAULT concat('1 ')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
Warnings:
@@ -782,7 +787,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT COALESCE('1 ')
+ `a` int(11) DEFAULT coalesce('1 ')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
Warnings:
@@ -830,7 +835,7 @@ CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(0x41) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(2) NOT NULL DEFAULT CONCAT(0x41)
+ `a` varchar(2) NOT NULL DEFAULT concat(0x41)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -841,7 +846,7 @@ CREATE TABLE t1 (a VARCHAR(2) DEFAULT COALESCE(0x41) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(2) NOT NULL DEFAULT COALESCE(0x41)
+ `a` varchar(2) NOT NULL DEFAULT coalesce(0x41)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -852,7 +857,7 @@ CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 0x41) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(2) NOT NULL DEFAULT CONCAT(_utf8 0x41)
+ `a` varchar(2) NOT NULL DEFAULT concat(_utf8'A')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -863,7 +868,7 @@ CREATE TABLE t1 (a VARCHAR(2) DEFAULT CONCAT(_utf8 X'41') NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(2) NOT NULL DEFAULT CONCAT(_utf8 X'41')
+ `a` varchar(2) NOT NULL DEFAULT concat(_utf8'A')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -901,7 +906,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT a
+ `b` int(11) DEFAULT `a`
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1, 1);
INSERT INTO t1 VALUES (DEFAULT, DEFAULT);
@@ -921,7 +926,7 @@ CREATE TABLE t1 (a INT DEFAULT(DEFAULT(b)), b INT DEFAULT 1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT DEFAULT(b),
+ `a` int(11) DEFAULT default(`b`),
`b` int(11) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT, DEFAULT);
@@ -934,7 +939,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT 1,
- `b` int(11) DEFAULT DEFAULT(a)
+ `b` int(11) DEFAULT default(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -948,21 +953,21 @@ CREATE TABLE t1 (a DATETIME DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` datetime DEFAULT CURRENT_TIMESTAMP
+ `a` datetime DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIME DEFAULT CURRENT_TIME);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` time DEFAULT CURRENT_TIME
+ `a` time DEFAULT curtime()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DATE DEFAULT CURRENT_DATE);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` date DEFAULT CURRENT_DATE
+ `a` date DEFAULT curdate()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -972,7 +977,7 @@ CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT CURRENT_TIMESTAMP(6));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(30,6) DEFAULT CURRENT_TIMESTAMP(6)
+ `a` decimal(30,6) DEFAULT current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
@@ -983,7 +988,7 @@ CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIMESTAMP(6)));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(30,6) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
+ `a` decimal(30,6) DEFAULT coalesce(current_timestamp(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
Warnings:
@@ -1003,7 +1008,7 @@ CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIME(6)));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(30,6) DEFAULT COALESCE(CURRENT_TIME(6))
+ `a` decimal(30,6) DEFAULT coalesce(curtime(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
Warnings:
@@ -1016,7 +1021,7 @@ CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_DATE));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(30,6) DEFAULT COALESCE(CURRENT_DATE)
+ `a` decimal(30,6) DEFAULT coalesce(curdate())
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
Warnings:
@@ -1029,21 +1034,21 @@ CREATE TABLE t1 (a TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT COALESCE(CURRENT_TIMESTAMP)
+ `a` timestamp NOT NULL DEFAULT coalesce(current_timestamp())
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DATE DEFAULT COALESCE(CURRENT_DATE));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` date DEFAULT COALESCE(CURRENT_DATE)
+ `a` date DEFAULT coalesce(curdate())
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIME DEFAULT COALESCE(CURRENT_TIME));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` time DEFAULT COALESCE(CURRENT_TIME)
+ `a` time DEFAULT coalesce(curtime())
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (
@@ -1053,8 +1058,8 @@ b TIMESTAMP DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
+ `a` timestamp NOT NULL DEFAULT current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT coalesce(current_timestamp(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT CURRENT_TIMESTAMP(6);
@@ -1071,8 +1076,8 @@ b DECIMAL(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(30,0) DEFAULT CURRENT_TIMESTAMP(6),
- `b` decimal(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
+ `a` decimal(30,0) DEFAULT current_timestamp(6),
+ `b` decimal(30,0) DEFAULT coalesce(current_timestamp(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
Warnings:
@@ -1089,7 +1094,7 @@ CREATE TABLE `t1` (`a` int(11) DEFAULT (3+3),`b` int(11) DEFAULT '1000');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT (3+3),
+ `a` int(11) DEFAULT ((3 + 3)),
`b` int(11) DEFAULT 1000
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,1),(2,2);
@@ -1118,7 +1123,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,1) DEFAULT NULL,
- `b` double DEFAULT (CAST(a AS DOUBLE))
+ `b` double DEFAULT (cast(`a` as double))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (10.1, DEFAULT);
SELECT * FROM t1;
@@ -1130,9 +1135,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double DEFAULT EXP(a),
- `c` double DEFAULT LOG(b),
- `d` double DEFAULT LOG(4, b)
+ `b` double DEFAULT exp(`a`),
+ `c` double DEFAULT log(`b`),
+ `d` double DEFAULT log(4,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (2, DEFAULT, DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -1144,8 +1149,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` double DEFAULT LOG2(a),
- `c` double DEFAULT LOG10(a)
+ `b` double DEFAULT log2(`a`),
+ `c` double DEFAULT log10(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (4, DEFAULT, DEFAULT);
INSERT INTO t1 VALUES (100, DEFAULT, DEFAULT);
@@ -1159,8 +1164,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double DEFAULT SQRT(a),
- `c` double DEFAULT POW(a,3)
+ `b` double DEFAULT sqrt(`a`),
+ `c` double DEFAULT pow(`a`,3)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (4, DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -1172,9 +1177,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double DEFAULT ACOS(a),
- `c` double DEFAULT ASIN(a),
- `d` double DEFAULT ATAN(a)
+ `b` double DEFAULT acos(`a`),
+ `c` double DEFAULT asin(`a`),
+ `d` double DEFAULT atan(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1, DEFAULT, DEFAULT, DEFAULT);
SELECT a, b/PI(), c/PI(), d/PI() FROM t1;
@@ -1186,10 +1191,10 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double DEFAULT COS(a),
- `c` double DEFAULT SIN(a),
- `d` double DEFAULT TAN(a),
- `e` double DEFAULT COT(a)
+ `b` double DEFAULT cos(`a`),
+ `c` double DEFAULT sin(`a`),
+ `d` double DEFAULT tan(`a`),
+ `e` double DEFAULT cot(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (PI()/3);
SELECT ROUND(a,3), ROUND(b,3), ROUND(c,3), ROUND(d,3), ROUND(e,3) FROM t1;
@@ -1200,7 +1205,7 @@ CREATE TABLE t1 (a DOUBLE DEFAULT RAND());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` double DEFAULT RAND()
+ `a` double DEFAULT rand()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
@@ -1209,8 +1214,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double DEFAULT DEGREES(a),
- `c` double DEFAULT RADIANS(b)
+ `b` double DEFAULT degrees(`a`),
+ `c` double DEFAULT radians(`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (PI(), DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -1225,7 +1230,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT INTERVAL(a, 10, 20, 30, 40)
+ `b` int(11) DEFAULT interval(`a`,10,20,30,40)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (34);
SELECT * FROM t1;
@@ -1238,7 +1243,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a DIV b)
+ `c` int(11) DEFAULT ((`a` DIV `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a, b) VALUES (13, 3);
SELECT * FROM t1;
@@ -1250,7 +1255,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT SIGN(a)
+ `b` int(11) DEFAULT sign(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (-10),(0), (10);
SELECT * FROM t1;
@@ -1264,7 +1269,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` int(11) DEFAULT FIELD(a, 'Hej', 'ej', 'Heja', 'hej', 'foo')
+ `b` int(11) DEFAULT field(`a`,'Hej','ej','Heja','hej','foo')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('ej');
SELECT * FROM t1;
@@ -1276,7 +1281,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` int(11) DEFAULT FIND_IN_SET(a, 'Hej,ej,Heja,hej,foo')
+ `b` int(11) DEFAULT find_in_set(`a`,'Hej,ej,Heja,hej,foo')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('ej');
SELECT * FROM t1;
@@ -1288,8 +1293,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` int(11) DEFAULT ASCII(a),
- `c` int(11) DEFAULT ORD(a)
+ `b` int(11) DEFAULT ascii(`a`),
+ `c` int(11) DEFAULT ord(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a');
SELECT * FROM t1;
@@ -1300,7 +1305,7 @@ CREATE TABLE t1 (a TEXT DEFAULT UUID_SHORT());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` text DEFAULT UUID_SHORT()
+ `a` text DEFAULT uuid_short()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT a>0 FROM t1;
@@ -1339,7 +1344,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` date DEFAULT (DATE_ADD(a, INTERVAL b DAY))
+ `c` date DEFAULT ((`a` + interval `b` day))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2001-01-01', 30, DEFAULT);
SELECT * FROM t1;
@@ -1352,7 +1357,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` time DEFAULT NULL,
- `c` datetime DEFAULT ADDTIME(a, b)
+ `c` datetime DEFAULT addtime(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2001-01-01', '10:20:30', DEFAULT);
SELECT * FROM t1;
@@ -1365,7 +1370,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(32) DEFAULT NULL,
`b` varchar(32) DEFAULT NULL,
- `c` date DEFAULT STR_TO_DATE(a,b)
+ `c` date DEFAULT str_to_date(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('01,5,2013','%d,%m,%Y', DEFAULT);
SELECT * FROM t1;
@@ -1379,8 +1384,8 @@ CREATE TABLE t1 (a DATE DEFAULT CURDATE(), b DATE DEFAULT UTC_DATE());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` date DEFAULT CURDATE(),
- `b` date DEFAULT UTC_DATE()
+ `a` date DEFAULT curdate(),
+ `b` date DEFAULT utc_date()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
@@ -1393,7 +1398,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` date DEFAULT FROM_DAYS(a)
+ `b` date DEFAULT from_days(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (730669, DEFAULT);
SELECT * FROM t1;
@@ -1405,7 +1410,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` date DEFAULT LAST_DAY(a)
+ `b` date DEFAULT last_day(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2003-02-05', DEFAULT);
SELECT * FROM t1;
@@ -1418,7 +1423,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`yy` int(11) DEFAULT NULL,
`yd` int(11) DEFAULT NULL,
- `d` date DEFAULT MAKEDATE(yy, yd)
+ `d` date DEFAULT makedate(`yy`,`yd`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (2011,32,DEFAULT);
SELECT * FROM t1;
@@ -1432,8 +1437,8 @@ CREATE TABLE t1 (a TIME DEFAULT CURTIME(), b TIME DEFAULT UTC_TIME());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` time DEFAULT CURTIME(),
- `b` time DEFAULT UTC_TIME()
+ `a` time DEFAULT curtime(),
+ `b` time DEFAULT utc_time()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
@@ -1446,7 +1451,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` time DEFAULT SEC_TO_TIME(a)
+ `b` time DEFAULT sec_to_time(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (2378, DEFAULT);
SELECT * FROM t1;
@@ -1459,7 +1464,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` time DEFAULT TIMEDIFF(a,b)
+ `c` time DEFAULT timediff(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2000:01:01 00:00:00', '2000:01:02 10:20:30', DEFAULT);
SELECT * FROM t1;
@@ -1473,7 +1478,7 @@ t1 CREATE TABLE `t1` (
`hh` int(11) DEFAULT NULL,
`mm` int(11) DEFAULT NULL,
`ss` int(11) DEFAULT NULL,
- `t` time DEFAULT MAKETIME(hh,mm,ss)
+ `t` time DEFAULT maketime(`hh`,`mm`,`ss`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (10,20,30,DEFAULT);
SELECT * FROM t1;
@@ -1487,8 +1492,8 @@ CREATE TABLE t1 (a TIMESTAMP DEFAULT NOW(), b TIMESTAMP DEFAULT UTC_TIMESTAMP())
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT UTC_TIMESTAMP()
+ `a` timestamp NOT NULL DEFAULT current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT utc_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
@@ -1500,9 +1505,9 @@ CREATE TABLE t1 (a TIMESTAMP(6) DEFAULT SYSDATE(6), s INT, b TIMESTAMP(6) DEFAUL
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(6) NOT NULL DEFAULT SYSDATE(6),
+ `a` timestamp(6) NOT NULL DEFAULT sysdate(6),
`s` int(11) DEFAULT NULL,
- `b` timestamp(6) NOT NULL DEFAULT SYSDATE(6)
+ `b` timestamp(6) NOT NULL DEFAULT sysdate(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT, SLEEP(0.1), DEFAULT);
SELECT b>a FROM t1;
@@ -1515,7 +1520,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT FROM_UNIXTIME(a)
+ `b` timestamp NOT NULL DEFAULT from_unixtime(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1447430881, DEFAULT);
SELECT * FROM t1;
@@ -1527,8 +1532,8 @@ CREATE TABLE t1 (a TIMESTAMP, b TIMESTAMP DEFAULT CONVERT_TZ(a, '-10:00', '+10:0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT CONVERT_TZ(a, '-10:00', '+10:00')
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT convert_tz(`a`,'-10:00','+10:00')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2001-01-01 10:20:30', DEFAULT);
SELECT * FROM t1;
@@ -1541,7 +1546,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` date DEFAULT CAST(a AS DATE)
+ `b` date DEFAULT cast(`a` as date)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (20010203, DEFAULT);
SELECT * FROM t1;
@@ -1553,7 +1558,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` time DEFAULT CAST(a AS TIME)
+ `b` time DEFAULT cast(`a` as time)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (102030, DEFAULT);
SELECT * FROM t1;
@@ -1565,7 +1570,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` datetime DEFAULT CAST(a AS DATETIME)
+ `b` datetime DEFAULT cast(`a` as datetime)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (20010203102030, DEFAULT);
SELECT * FROM t1;
@@ -1581,7 +1586,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT PERIOD_ADD(a,b)
+ `c` int(11) DEFAULT period_add(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (200801, 2);
SELECT * FROM t1;
@@ -1594,7 +1599,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT PERIOD_DIFF(a,b)
+ `c` int(11) DEFAULT period_diff(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (200802, 200703);
SELECT * FROM t1;
@@ -1606,7 +1611,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT TO_DAYS(a)
+ `b` int(11) DEFAULT to_days(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (950501);
SELECT * FROM t1;
@@ -1618,7 +1623,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT TO_DAYS(a)
+ `b` int(11) DEFAULT to_days(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2007-10-07');
SELECT * FROM t1;
@@ -1630,7 +1635,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` bigint(20) DEFAULT TO_SECONDS(a)
+ `b` bigint(20) DEFAULT to_seconds(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (950501);
SELECT * FROM t1;
@@ -1642,7 +1647,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` bigint(20) DEFAULT TO_SECONDS(a)
+ `b` bigint(20) DEFAULT to_seconds(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-11-29');
SELECT * FROM t1;
@@ -1654,7 +1659,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) DEFAULT TO_SECONDS(a)
+ `b` bigint(20) DEFAULT to_seconds(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-11-29 13:43:32');
SELECT * FROM t1;
@@ -1666,7 +1671,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` bigint(20) DEFAULT DAYOFMONTH(a)
+ `b` bigint(20) DEFAULT dayofmonth(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2007-02-03');
SELECT * FROM t1;
@@ -1678,7 +1683,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` bigint(20) DEFAULT DAYOFWEEK(a)
+ `b` bigint(20) DEFAULT dayofweek(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2007-02-03');
SELECT * FROM t1;
@@ -1690,7 +1695,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` bigint(20) DEFAULT DAYOFYEAR(a)
+ `b` bigint(20) DEFAULT dayofyear(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2007-02-03');
SELECT * FROM t1;
@@ -1702,7 +1707,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` int(11) DEFAULT HOUR(a)
+ `b` int(11) DEFAULT hour(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('10:05:03');
SELECT * FROM t1;
@@ -1714,7 +1719,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` int(11) DEFAULT MINUTE(a)
+ `b` int(11) DEFAULT minute(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('10:05:03');
SELECT * FROM t1;
@@ -1726,7 +1731,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` int(11) DEFAULT SECOND(a)
+ `b` int(11) DEFAULT second(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('10:05:03');
SELECT * FROM t1;
@@ -1738,7 +1743,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime(6) DEFAULT NULL,
- `b` int(11) DEFAULT MICROSECOND(a)
+ `b` int(11) DEFAULT microsecond(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-12-31 23:59:59.000010');
SELECT * FROM t1;
@@ -1750,7 +1755,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT YEAR(a)
+ `b` int(11) DEFAULT year(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('1987-01-01');
SELECT * FROM t1;
@@ -1762,7 +1767,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT MONTH(a)
+ `b` int(11) DEFAULT month(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('1987-01-01');
SELECT * FROM t1;
@@ -1774,7 +1779,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT WEEK(a)
+ `b` int(11) DEFAULT week(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('1987-02-01');
SELECT * FROM t1;
@@ -1786,7 +1791,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT YEARWEEK(a)
+ `b` int(11) DEFAULT yearweek(`a`,0)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2000-01-01');
SELECT * FROM t1;
@@ -1798,7 +1803,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT QUARTER(a)
+ `b` int(11) DEFAULT quarter(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2008-04-01');
SELECT * FROM t1;
@@ -1810,7 +1815,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` int(11) DEFAULT EXTRACT(YEAR FROM a)
+ `b` int(11) DEFAULT extract(year from `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-07-02');
SELECT * FROM t1;
@@ -1822,7 +1827,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) DEFAULT EXTRACT(YEAR_MONTH FROM a)
+ `b` int(11) DEFAULT extract(year_month from `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-07-02 01:02:03');
SELECT * FROM t1;
@@ -1834,7 +1839,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) DEFAULT EXTRACT(DAY_MINUTE FROM a)
+ `b` int(11) DEFAULT extract(day_minute from `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-07-02 01:02:03');
SELECT * FROM t1;
@@ -1846,7 +1851,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime(6) DEFAULT NULL,
- `b` int(11) DEFAULT EXTRACT(MICROSECOND FROM a)
+ `b` int(11) DEFAULT extract(microsecond from `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('2009-07-02 01:02:03.000123');
SELECT * FROM t1;
@@ -1859,7 +1864,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` date DEFAULT NULL,
- `c` int(11) DEFAULT TIMESTAMPDIFF(MONTH,a,b)
+ `c` int(11) DEFAULT timestampdiff(MONTH,`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES ('2003-02-01','2003-05-01');
SELECT * FROM t1;
@@ -1872,7 +1877,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` date DEFAULT NULL,
- `c` int(11) DEFAULT TIMESTAMPDIFF(YEAR,a,b)
+ `c` int(11) DEFAULT timestampdiff(YEAR,`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES ('2002-05-01','2001-01-01');
SELECT * FROM t1;
@@ -1885,7 +1890,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) DEFAULT TIMESTAMPDIFF(MINUTE,a,b)
+ `c` int(11) DEFAULT timestampdiff(MINUTE,`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES ('2003-02-01','2003-05-01 12:05:55');
SELECT * FROM t1;
@@ -1901,7 +1906,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT COALESCE(a,b)
+ `c` int(11) DEFAULT coalesce(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (NULL, 1, DEFAULT);
SELECT * FROM t1;
@@ -1914,7 +1919,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT IFNULL(a,b)
+ `c` int(11) DEFAULT ifnull(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (NULL, 2, DEFAULT);
INSERT INTO t1 VALUES (1, 2, DEFAULT);
@@ -1929,7 +1934,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT NULLIF(a,b)
+ `c` int(11) DEFAULT nullif(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1, 1, DEFAULT);
INSERT INTO t1 VALUES (1, 2, DEFAULT);
@@ -1944,7 +1949,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT IF(a,b,2)
+ `c` int(11) DEFAULT if(`a`,`b`,2)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (0, 1, DEFAULT);
INSERT INTO t1 VALUES (1, 1, DEFAULT);
@@ -1959,7 +1964,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (CASE WHEN a THEN b ELSE 2 END)
+ `c` int(11) DEFAULT ((case when `a` then `b` else 2 end))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (0, 1, DEFAULT);
INSERT INTO t1 VALUES (1, 1, DEFAULT);
@@ -1973,13 +1978,13 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (-a)
+ `b` int(11) DEFAULT (-(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (-a)
+ `b` int(11) DEFAULT (-(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (10, DEFAULT);
SELECT * FROM t1;
@@ -1991,7 +1996,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT ABS(a)
+ `b` int(11) DEFAULT abs(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (-10, DEFAULT);
SELECT * FROM t1;
@@ -2003,9 +2008,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) DEFAULT CEILING(a),
- `c` int(11) DEFAULT FLOOR(a),
- `d` int(11) DEFAULT ROUND(a)
+ `b` int(11) DEFAULT ceiling(`a`),
+ `c` int(11) DEFAULT floor(`a`),
+ `d` int(11) DEFAULT round(`a`,0)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1.5, DEFAULT, DEFAULT, DEFAULT);
INSERT INTO t1 VALUES (-1.5, DEFAULT, DEFAULT, DEFAULT);
@@ -2020,8 +2025,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a+b),
- `d` int(11) DEFAULT (a-b)
+ `c` int(11) DEFAULT ((`a` + `b`)),
+ `d` int(11) DEFAULT ((`a` - `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (2, 1, DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -2034,18 +2039,18 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a*b),
- `d` int(11) DEFAULT (a/b),
- `e` int(11) DEFAULT (a MOD b)
+ `c` int(11) DEFAULT ((`a` * `b`)),
+ `d` int(11) DEFAULT ((`a` / `b`)),
+ `e` int(11) DEFAULT ((`a` % `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a*b),
- `d` int(11) DEFAULT (a/b),
- `e` int(11) DEFAULT (a MOD b)
+ `c` int(11) DEFAULT ((`a` * `b`)),
+ `d` int(11) DEFAULT ((`a` / `b`)),
+ `e` int(11) DEFAULT ((`a` % `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (7, 3, DEFAULT, DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -2058,7 +2063,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) DEFAULT UNIX_TIMESTAMP(a)
+ `b` int(11) DEFAULT unix_timestamp(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('2001-01-01 10:20:30', DEFAULT);
SELECT * FROM t1;
@@ -2071,7 +2076,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` int(11) DEFAULT TIME_TO_SEC(a)
+ `b` int(11) DEFAULT time_to_sec(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('22:23:00', DEFAULT);
SELECT * FROM t1;
@@ -2084,8 +2089,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT LEAST(a,b),
- `d` int(11) DEFAULT GREATEST(a,b)
+ `c` int(11) DEFAULT least(`a`,`b`),
+ `d` int(11) DEFAULT greatest(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (0, 1, DEFAULT, DEFAULT);
INSERT INTO t1 VALUES (1, 1, DEFAULT, DEFAULT);
@@ -2100,7 +2105,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT LAST_VALUE(a,b)
+ `c` int(11) DEFAULT last_value(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1, 2, DEFAULT);
SELECT * FROM t1;
@@ -2115,7 +2120,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` decimal(10,6) DEFAULT (CAST(a AS DECIMAL(10,1)))
+ `b` decimal(10,6) DEFAULT (cast(`a` as decimal(10,1)))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('123.456');
SELECT * FROM t1;
@@ -2129,8 +2134,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(10,3) DEFAULT NULL,
- `b` varchar(10) DEFAULT (CAST(a AS CHAR(10))),
- `c` varchar(10) DEFAULT (CAST(a AS CHAR(4)))
+ `b` varchar(10) DEFAULT (cast(`a` as char(10) charset latin1)),
+ `c` varchar(10) DEFAULT (cast(`a` as char(4) charset latin1))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (123.456);
Warnings:
@@ -2144,7 +2149,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(10) unsigned DEFAULT (CAST(a AS UNSIGNED))
+ `b` int(10) unsigned DEFAULT (cast(`a` as unsigned))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (-1);
Warnings:
@@ -2159,7 +2164,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) unsigned DEFAULT NULL,
- `b` bigint(20) DEFAULT (CAST(a AS SIGNED))
+ `b` bigint(20) DEFAULT (cast(`a` as signed))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (0xFFFFFFFFFFFFFFFF);
SELECT * FROM t1;
@@ -2176,9 +2181,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT a,
- `c` varchar(10) CHARACTER SET utf8 DEFAULT CONVERT(a USING utf8),
- `d` varbinary(10) DEFAULT (BINARY(a))
+ `b` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT `a`,
+ `c` varchar(10) CHARACTER SET utf8 DEFAULT convert(`a` using utf8),
+ `d` varbinary(10) DEFAULT (cast(`a` as char charset binary))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a');
SELECT * FROM t1;
@@ -2193,7 +2198,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT BIT_COUNT(a)
+ `b` int(11) DEFAULT bit_count(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (7);
SELECT * FROM t1;
@@ -2206,7 +2211,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a|b)
+ `c` int(11) DEFAULT ((`a` | `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (1,2);
SELECT * FROM t1;
@@ -2219,7 +2224,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a&b)
+ `c` int(11) DEFAULT ((`a` & `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (5,4);
SELECT * FROM t1;
@@ -2232,7 +2237,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a^b)
+ `c` int(11) DEFAULT ((`a` ^ `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (11,3);
SELECT * FROM t1;
@@ -2245,7 +2250,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a&~b)
+ `c` int(11) DEFAULT ((`a` & ~(`b`)))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (5,1);
SELECT * FROM t1;
@@ -2258,8 +2263,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) DEFAULT (a<<b),
- `d` int(11) DEFAULT (a>>b)
+ `c` int(11) DEFAULT ((`a` << `b`)),
+ `d` int(11) DEFAULT ((`a` >> `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (5,1);
SELECT * FROM t1;
@@ -2274,7 +2279,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) DEFAULT REVERSE(a)
+ `b` varchar(20) DEFAULT reverse(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('abcd');
SELECT * FROM t1;
@@ -2286,8 +2291,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT UPPER(a),
- `c` varchar(10) DEFAULT LOWER(a)
+ `b` varchar(10) DEFAULT ucase(`a`),
+ `c` varchar(10) DEFAULT lcase(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('ABcd');
SELECT * FROM t1;
@@ -2299,9 +2304,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT LEFT(a,1),
- `c` varchar(10) DEFAULT RIGHT(a,1),
- `d` varchar(10) DEFAULT SUBSTR(a,2,2)
+ `b` varchar(10) DEFAULT left(`a`,1),
+ `c` varchar(10) DEFAULT right(`a`,1),
+ `d` varchar(10) DEFAULT substr(`a`,2,2)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('abcd');
SELECT * FROM t1;
@@ -2313,7 +2318,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(20) DEFAULT NULL,
- `b` varchar(20) DEFAULT SUBSTRING_INDEX(a,'.',2)
+ `b` varchar(20) DEFAULT substring_index(`a`,'.',2)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('www.mariadb.org');
SELECT * FROM t1;
@@ -2326,7 +2331,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) DEFAULT CONCAT(a,b)
+ `c` varchar(20) DEFAULT concat(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES ('a','b');
SELECT * FROM t1;
@@ -2339,7 +2344,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) DEFAULT CONCAT_WS(',',a,b)
+ `c` varchar(20) DEFAULT concat_ws(',',`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES ('a','b');
SELECT * FROM t1;
@@ -2351,7 +2356,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT REPLACE(a,'a','A')
+ `b` varchar(10) DEFAULT replace(`a`,'a','A')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('abc');
SELECT * FROM t1;
@@ -2363,7 +2368,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT REGEXP_REPLACE(a,'[0-9]','.')
+ `b` varchar(10) DEFAULT regexp_replace(`a`,'[0-9]','.')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a1b2c');
SELECT * FROM t1;
@@ -2375,7 +2380,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT REGEXP_SUBSTR(a,'[0-9]+')
+ `b` varchar(10) DEFAULT regexp_substr(`a`,'[0-9]+')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('ab12cd');
SELECT * FROM t1;
@@ -2387,7 +2392,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(20) DEFAULT NULL,
- `b` varchar(20) DEFAULT SOUNDEX(a)
+ `b` varchar(20) DEFAULT soundex(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('tester');
SELECT * FROM t1;
@@ -2399,7 +2404,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(20) DEFAULT NULL,
- `b` varchar(20) DEFAULT QUOTE(a)
+ `b` varchar(20) DEFAULT quote(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a\'b');
SELECT * FROM t1;
@@ -2411,8 +2416,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT LPAD(a,10,'.'),
- `c` varchar(10) DEFAULT RPAD(a,10,'.')
+ `b` varchar(10) DEFAULT lpad(`a`,10,'.'),
+ `c` varchar(10) DEFAULT rpad(`a`,10,'.')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('ab');
SELECT * FROM t1;
@@ -2424,8 +2429,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT LTRIM(a),
- `c` varchar(10) DEFAULT RTRIM(a)
+ `b` varchar(10) DEFAULT ltrim(`a`),
+ `c` varchar(10) DEFAULT rtrim(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (' ab ');
SELECT a, HEX(b), HEX(c) FROM t1;
@@ -2437,7 +2442,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT TRIM(BOTH 'a' FROM a)
+ `b` varchar(10) DEFAULT trim(both 'a' from `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('abba');
SELECT a, b FROM t1;
@@ -2449,7 +2454,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) DEFAULT SPACE(a)
+ `b` varchar(10) DEFAULT space(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (3);
SELECT a, HEX(b) FROM t1;
@@ -2462,7 +2467,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(10) DEFAULT REPEAT(b,a)
+ `c` varchar(10) DEFAULT repeat(`b`,`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (3,'x');
SELECT a, b, c FROM t1;
@@ -2477,7 +2482,7 @@ t1 CREATE TABLE `t1` (
`pos` int(11) DEFAULT NULL,
`len` int(11) DEFAULT NULL,
`newstr` varchar(10) DEFAULT NULL,
- `result` varchar(10) DEFAULT INSERT(str,pos,len,newstr)
+ `result` varchar(10) DEFAULT insert(`str`,`pos`,`len`,`newstr`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (str,pos,len,newstr) VALUES ('Quadratic', 3, 4, 'What');
SELECT * FROM t1;
@@ -2489,7 +2494,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`n` int(11) DEFAULT NULL,
- `res` varchar(10) DEFAULT ELT(n,'ej', 'Heja', 'hej', 'foo')
+ `res` varchar(10) DEFAULT elt(`n`,'ej','Heja','hej','foo')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (n) VALUES (1);
SELECT * FROM t1;
@@ -2501,7 +2506,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`bits` int(11) DEFAULT NULL,
- `res` varchar(10) DEFAULT MAKE_SET(bits,'a','b','c','d')
+ `res` varchar(10) DEFAULT make_set(`bits`,'a','b','c','d')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (bits) VALUES (1|4);
SELECT * FROM t1;
@@ -2513,7 +2518,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) DEFAULT CHAR(a)
+ `b` varchar(10) DEFAULT char(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (77);
SELECT * FROM t1;
@@ -2525,7 +2530,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) DEFAULT CONV(a,10,16)
+ `b` varchar(10) DEFAULT conv(`a`,10,16)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (64);
SELECT * FROM t1;
@@ -2538,7 +2543,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` varchar(30) DEFAULT FORMAT(a,b)
+ `c` varchar(30) DEFAULT format(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (10000,3);
SELECT * FROM t1;
@@ -2552,7 +2557,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`l` varchar(10) DEFAULT NULL,
- `c` varchar(30) DEFAULT FORMAT(a,b,l)
+ `c` varchar(30) DEFAULT format(`a`,`b`,`l`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b,l) VALUES (10000,2,'no_NO'),(10000,2,'ru_RU'),(10000,2,'ar_BH');
SELECT * FROM t1;
@@ -2566,7 +2571,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) DEFAULT GET_FORMAT(DATE,a)
+ `b` varchar(20) DEFAULT get_format(DATE, `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('EUR'),('USA'),('JIS'),('ISO'),('INTERNAL');
SELECT * FROM t1;
@@ -2593,7 +2598,7 @@ t1 CREATE TABLE `t1` (
`v_off` varchar(10) DEFAULT NULL,
`v_separator` varchar(10) DEFAULT NULL,
`number_of_bits` int(11) DEFAULT NULL,
- `x` varchar(30) DEFAULT EXPORT_SET(bits, v_on, v_off, v_separator, number_of_bits)
+ `x` varchar(30) DEFAULT export_set(`bits`,`v_on`,`v_off`,`v_separator`,`number_of_bits`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
Warnings:
@@ -2612,7 +2617,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (NOT a)
+ `b` int(11) DEFAULT ((`a` = 0))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(0),(1);
SELECT * FROM t1;
@@ -2627,7 +2632,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `x` int(11) DEFAULT (a XOR b)
+ `x` int(11) DEFAULT ((`a` xor `b`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (0,0),(0,1),(1,0),(1,1);
SELECT * FROM t1;
@@ -2642,8 +2647,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (a IS TRUE),
- `c` int(11) DEFAULT (a IS NOT TRUE)
+ `b` int(11) DEFAULT ((`a` is true)),
+ `c` int(11) DEFAULT ((`a` is not true))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(0),(1);
SELECT * FROM t1;
@@ -2657,8 +2662,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (a IS FALSE),
- `c` int(11) DEFAULT (a IS NOT FALSE)
+ `b` int(11) DEFAULT ((`a` is false)),
+ `c` int(11) DEFAULT ((`a` is not false))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(0),(1);
SELECT * FROM t1;
@@ -2672,8 +2677,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (a IS NULL),
- `c` int(11) DEFAULT (a IS NOT NULL)
+ `b` int(11) DEFAULT (isnull(`a`)),
+ `c` int(11) DEFAULT ((`a` is not null))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(0),(1);
SELECT * FROM t1;
@@ -2687,8 +2692,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT (a IS UNKNOWN),
- `c` int(11) DEFAULT (a IS NOT UNKNOWN)
+ `b` int(11) DEFAULT (isnull(`a`)),
+ `c` int(11) DEFAULT ((`a` is not null))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(0),(1);
SELECT * FROM t1;
@@ -2706,13 +2711,13 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `eq` int(11) DEFAULT (a=0),
- `equal` int(11) DEFAULT (a<=>0),
- `ne` int(11) DEFAULT (a<>0),
- `lt` int(11) DEFAULT (a<0),
- `le` int(11) DEFAULT (a<=0),
- `gt` int(11) DEFAULT (a>0),
- `ge` int(11) DEFAULT (a>=0)
+ `eq` int(11) DEFAULT ((`a` = 0)),
+ `equal` int(11) DEFAULT ((`a` <=> 0)),
+ `ne` int(11) DEFAULT ((`a` <> 0)),
+ `lt` int(11) DEFAULT ((`a` < 0)),
+ `le` int(11) DEFAULT ((`a` <= 0)),
+ `gt` int(11) DEFAULT ((`a` > 0)),
+ `ge` int(11) DEFAULT ((`a` >= 0))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (NULL),(-1),(0),(1);
SELECT * FROM t1;
@@ -2727,7 +2732,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a LIKE 'a%')
+ `b` int(11) DEFAULT ((`a` like 'a%'))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb');
SELECT * FROM t1;
@@ -2741,7 +2746,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a RLIKE 'a$')
+ `b` int(11) DEFAULT ((`a` regexp 'a$'))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb');
SELECT * FROM t1;
@@ -2755,7 +2760,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a IN ('aaa','bbb'))
+ `b` int(11) DEFAULT ((`a` in ('aaa','bbb')))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb'),('ccc');
SELECT * FROM t1;
@@ -2770,7 +2775,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a NOT IN ('aaa','bbb'))
+ `b` int(11) DEFAULT ((`a` not in ('aaa','bbb')))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb'),('ccc');
SELECT * FROM t1;
@@ -2785,7 +2790,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a BETWEEN 'aaa' AND 'bbb')
+ `b` int(11) DEFAULT ((`a` between 'aaa' and 'bbb'))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb'),('ccc');
SELECT * FROM t1;
@@ -2800,7 +2805,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT (a NOT BETWEEN 'aaa' AND 'bbb')
+ `b` int(11) DEFAULT ((`a` not between 'aaa' and 'bbb'))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('AAA'),('aaa'),('bbb'),('ccc');
SELECT * FROM t1;
@@ -2814,7 +2819,7 @@ CREATE TABLE t1 (a TEXT DEFAULT UUID());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` text DEFAULT UUID()
+ `a` text DEFAULT uuid()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
SELECT LENGTH(a)>0 FROM t1;
@@ -2829,7 +2834,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT STRCMP(a,'b')
+ `b` int(11) DEFAULT strcmp(`a`,'b')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('A'),('a'),('B'),('b'),('C'),('c');
SELECT * FROM t1;
@@ -2846,9 +2851,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT LENGTH(a),
- `c` int(11) DEFAULT CHAR_LENGTH(a),
- `d` int(11) DEFAULT BIT_LENGTH(a)
+ `b` int(11) DEFAULT length(`a`),
+ `c` int(11) DEFAULT char_length(`a`),
+ `d` int(11) DEFAULT bit_length(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a'),('aa'),('aaa');
SELECT * FROM t1;
@@ -2862,7 +2867,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT LOCATE('a',a)
+ `b` int(11) DEFAULT locate('a',`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('xa'),('xxa'),('xxxa');
SELECT * FROM t1;
@@ -2876,7 +2881,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT REGEXP_INSTR(a, 'a')
+ `b` int(11) DEFAULT regexp_instr(`a`,'a')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('xa'),('xxa'),('xxxa');
SELECT * FROM t1;
@@ -2898,7 +2903,7 @@ CREATE TABLE t1 (a INT DEFAULT CONNECTION_ID());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT CONNECTION_ID()
+ `a` int(11) DEFAULT connection_id()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
SELECT a>0 FROM t1;
@@ -2910,8 +2915,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) DEFAULT COERCIBILITY(a),
- `c` int(11) DEFAULT COERCIBILITY(b)
+ `b` int(11) DEFAULT coercibility(`a`),
+ `c` int(11) DEFAULT coercibility(`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('test');
SELECT * FROM t1;
@@ -2930,8 +2935,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) DEFAULT CHARSET(a),
- `c` varchar(20) DEFAULT COLLATION(a)
+ `b` varchar(20) DEFAULT charset(`a`),
+ `c` varchar(20) DEFAULT collation(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('test');
SELECT * FROM t1;
@@ -2946,8 +2951,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) DEFAULT CRC32(a),
- `c` text DEFAULT MD5(a)
+ `b` bigint(20) DEFAULT crc32(`a`),
+ `c` text DEFAULT md5(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('a');
SELECT * FROM t1;
@@ -2959,8 +2964,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` text DEFAULT TO_BASE64(a),
- `c` text DEFAULT FROM_BASE64(b)
+ `b` text DEFAULT to_base64(`a`),
+ `c` text DEFAULT from_base64(`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('aaaabbbb');
SELECT * FROM t1;
@@ -2972,8 +2977,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` text DEFAULT HEX(a),
- `c` text DEFAULT UNHEX(b)
+ `b` text DEFAULT hex(`a`),
+ `c` text DEFAULT unhex(`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('aaaabbbb');
SELECT * FROM t1;
@@ -2985,8 +2990,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` text DEFAULT ENCODE(a,'test'),
- `c` text DEFAULT DECODE(b,'test')
+ `b` text DEFAULT encode(`a`,'test'),
+ `c` text DEFAULT decode(`b`,'test')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('aaaabbbb');
SELECT a, HEX(b), c FROM t1;
@@ -2998,7 +3003,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` text DEFAULT PASSWORD(a)
+ `b` text DEFAULT password(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('notagoodpwd');
SELECT * FROM t1;
@@ -3014,8 +3019,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` blob DEFAULT AES_ENCRYPT(a, 'passwd'),
- `c` text DEFAULT AES_DECRYPT(b, 'passwd')
+ `b` blob DEFAULT aes_encrypt(`a`,'passwd'),
+ `c` text DEFAULT aes_decrypt(`b`,'passwd')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('test');
SELECT c FROM t1;
@@ -3047,7 +3052,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT 1,
- `b` int(11) DEFAULT (1+1),
+ `b` int(11) DEFAULT ((1 + 1)),
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
alter table t1 alter a set default (2+3), alter b set default 4,
@@ -3057,9 +3062,9 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT (2+3),
+ `a` int(11) DEFAULT ((2 + 3)),
`b` int(11) DEFAULT 4,
- `c` int(11) DEFAULT (-a)
+ `c` int(11) DEFAULT (-(`a`))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int default 5 check (a>10), b int default (5+5), c int as (a+b));
@@ -3068,8 +3073,8 @@ create table t3 as select max(a), max(b), max(c) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT 5 CHECK (a>10),
- `b` int(11) DEFAULT (5+5),
+ `a` int(11) DEFAULT 5 CHECK ((`a` > 10)),
+ `b` int(11) DEFAULT ((5 + 5)),
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t3;
@@ -3230,3 +3235,35 @@ EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT * FROM t1 WHERE ?+a<=>?+a' USING DEFA
ERROR HY000: Default/ignore value is not supported for such parameter usage
DROP TABLE t1;
# end of 10.2 test
+set sql_mode=ansi_quotes;
+create table t1 (a int, b int default (a+1));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE "t1" (
+ "a" int(11) DEFAULT NULL,
+ "b" int(11) DEFAULT (("a" + 1))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t1 (a) values (10);
+set sql_mode='';
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT ((`a` + 1))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t1 (a) values (20);
+flush tables;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT ((`a` + 1))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t1 (a) values (30);
+select * from t1;
+a b
+10 11
+20 21
+30 31
+drop table t1;
+set sql_mode=default;
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 27547ef9a72..2841f27d45d 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -1908,16 +1908,16 @@ Table Create Table
t1 CREATE TABLE `t1` (
`name` varchar(10) DEFAULT NULL,
`value` varchar(10) DEFAULT NULL,
- `dyncol0` blob DEFAULT COLUMN_CREATE(name, value),
- `value_dyncol0_name0` varchar(10) DEFAULT (COLUMN_GET(dyncol0, 'name0' AS CHAR)),
- `dyncol1` blob DEFAULT COLUMN_ADD(dyncol0, 'name1', 'value1'),
- `value_dyncol1_name1` varchar(10) DEFAULT (COLUMN_GET(dyncol1, 'name1' AS CHAR)),
- `dyncol2` blob DEFAULT COLUMN_DELETE(dyncol1, 'name1'),
- `dyncol2_exists_name0` int(11) DEFAULT COLUMN_EXISTS(dyncol2, 'name0'),
- `dyncol2_exists_name1` int(11) DEFAULT COLUMN_EXISTS(dyncol2, 'name1'),
- `dyncol2_check` int(11) DEFAULT COLUMN_CHECK(dyncol2),
- `dyncol1_list` text DEFAULT COLUMN_LIST(dyncol1),
- `dyncol1_json` text DEFAULT COLUMN_JSON(dyncol1)
+ `dyncol0` blob DEFAULT column_create(`name`,`value`),
+ `value_dyncol0_name0` varchar(10) DEFAULT (column_get(`dyncol0`,'name0' as char charset utf8)),
+ `dyncol1` blob DEFAULT column_add(`dyncol0`,'name1','value1'),
+ `value_dyncol1_name1` varchar(10) DEFAULT (column_get(`dyncol1`,'name1' as char charset utf8)),
+ `dyncol2` blob DEFAULT column_add(`dyncol1`,'name1',NULL AS int),
+ `dyncol2_exists_name0` int(11) DEFAULT column_exists(`dyncol2`,'name0'),
+ `dyncol2_exists_name1` int(11) DEFAULT column_exists(`dyncol2`,'name1'),
+ `dyncol2_check` int(11) DEFAULT column_check(`dyncol2`),
+ `dyncol1_list` text DEFAULT column_list(`dyncol1`),
+ `dyncol1_json` text DEFAULT column_json(`dyncol1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (name,value) VALUES ('name0', 'value0');
SELECT value_dyncol0_name0, value_dyncol1_name1 FROM t1;
diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result
index 9ef7f13487f..b436a3c72b1 100644
--- a/mysql-test/r/func_compress.result
+++ b/mysql-test/r/func_compress.result
@@ -178,9 +178,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text DEFAULT NULL,
- `b` blob DEFAULT COMPRESS(a),
- `bl` int(11) DEFAULT UNCOMPRESSED_LENGTH(b),
- `a1` text DEFAULT UNCOMPRESS(b)
+ `b` blob DEFAULT compress(`a`),
+ `bl` int(11) DEFAULT uncompressed_length(`b`),
+ `a1` text DEFAULT uncompress(`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (REPEAT('a',100));
SELECT bl, a1 FROM t1;
diff --git a/mysql-test/r/func_crypt.result b/mysql-test/r/func_crypt.result
index 85c1cb2ce94..389e92641b3 100644
--- a/mysql-test/r/func_crypt.result
+++ b/mysql-test/r/func_crypt.result
@@ -112,7 +112,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) DEFAULT ENCRYPT(a,123)
+ `b` varchar(30) DEFAULT encrypt(`a`,123)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('hello');
SELECT * FROM t1;
diff --git a/mysql-test/r/func_digest.result b/mysql-test/r/func_digest.result
index 31a32da72ed..43ddcb2ee77 100644
--- a/mysql-test/r/func_digest.result
+++ b/mysql-test/r/func_digest.result
@@ -1441,8 +1441,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` text DEFAULT SHA(a),
- `c` text DEFAULT SHA2(a,224)
+ `b` text DEFAULT sha(`a`),
+ `c` text DEFAULT sha2(`a`,224)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('abc');
SELECT * FROM t1;
diff --git a/mysql-test/r/func_encrypt.result b/mysql-test/r/func_encrypt.result
index 34dff598452..e72e1ff05bb 100644
--- a/mysql-test/r/func_encrypt.result
+++ b/mysql-test/r/func_encrypt.result
@@ -223,8 +223,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` blob DEFAULT DES_ENCRYPT(a, 'passwd'),
- `c` text DEFAULT DES_DECRYPT(b, 'passwd')
+ `b` blob DEFAULT des_encrypt(`a`,'passwd'),
+ `c` text DEFAULT des_decrypt(`b`,'passwd')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('test');
SELECT c FROM t1;
diff --git a/mysql-test/r/func_hybrid_type.result b/mysql-test/r/func_hybrid_type.result
index ea9c203e3f6..746bc55ef85 100644
--- a/mysql-test/r/func_hybrid_type.result
+++ b/mysql-test/r/func_hybrid_type.result
@@ -2397,7 +2397,7 @@ FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `___________a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `___________a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`case_______a` timestamp NULL DEFAULT NULL,
`case_____a_a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`coalesce___a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index f6a04c6fb79..663fc2583e7 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -1457,10 +1457,10 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(30) DEFAULT NULL,
- `b` bigint(20) DEFAULT INET_ATON(a),
- `a1` varchar(30) DEFAULT INET_NTOA(b),
- `c` int(11) DEFAULT IS_IPV4(a),
- `d` int(11) DEFAULT IS_IPV6(a)
+ `b` bigint(20) DEFAULT inet_aton(`a`),
+ `a1` varchar(30) DEFAULT inet_ntoa(`b`),
+ `c` int(11) DEFAULT is_ipv4(`a`),
+ `d` int(11) DEFAULT is_ipv6(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('192.168.001.001'),('::1'),('xxx');
SELECT * FROM t1;
@@ -1480,10 +1480,10 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`str` varchar(128) DEFAULT NULL,
- `addr` varbinary(16) DEFAULT INET6_ATON(str),
- `str1` varchar(128) DEFAULT INET6_NTOA(addr),
- `b` int(11) DEFAULT IS_IPV4_COMPAT(addr),
- `c` int(11) DEFAULT IS_IPV4_MAPPED(addr)
+ `addr` varbinary(16) DEFAULT inet6_aton(`str`),
+ `str1` varchar(128) DEFAULT inet6_ntoa(`addr`),
+ `b` int(11) DEFAULT is_ipv4_compat(`addr`),
+ `c` int(11) DEFAULT is_ipv4_mapped(`addr`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (str) VALUES ('::FFFF:192.168.0.1'),('::10.0.5.9');
SELECT str, str1, b,c FROM t1;
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index f75ec17c702..6ca89082a45 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -874,7 +874,7 @@ explain extended select period_add("9602",-12),period_diff(199505,"9404"),from_d
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select period_add('9602',-12) AS `period_add("9602",-12)`,period_diff(199505,'9404') AS `period_diff(199505,"9404")`,from_days(to_days('960101')) AS `from_days(to_days("960101"))`,dayofmonth('1997-01-02') AS `dayofmonth("1997-01-02")`,month('1997-01-02') AS `month("1997-01-02")`,monthname('1972-03-04') AS `monthname("1972-03-04")`,dayofyear('0000-00-00') AS `dayofyear("0000-00-00")`,hour('1997-03-03 23:03:22') AS `HOUR("1997-03-03 23:03:22")`,minute('23:03:22') AS `MINUTE("23:03:22")`,second(230322) AS `SECOND(230322)`,quarter(980303) AS `QUARTER(980303)`,week('1998-03-03') AS `WEEK("1998-03-03")`,yearweek('2000-01-01',1) AS `yearweek("2000-01-01",1)`,week(19950101,1) AS `week(19950101,1)`,year('98-02-03') AS `year("98-02-03")`,(weekday(curdate()) - weekday(now())) AS `weekday(curdate())-weekday(now())`,dayname('1962-03-03') AS `dayname("1962-03-03")`,unix_timestamp() AS `unix_timestamp()`,sec_to_time((time_to_sec('0:30:47') / 6.21)) AS `sec_to_time(time_to_sec("0:30:47")/6.21)`,curtime() AS `curtime()`,utc_time() AS `utc_time()`,curdate() AS `curdate()`,utc_date() AS `utc_date()`,utc_timestamp() AS `utc_timestamp()`,date_format('1997-01-02 03:04:05','%M %W %D %Y %y %m %d %h %i %s %w') AS `date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w")`,from_unixtime(unix_timestamp('1994-03-02 10:11:12')) AS `from_unixtime(unix_timestamp("1994-03-02 10:11:12"))`,('1997-12-31 23:59:59' + interval 1 second) AS `"1997-12-31 23:59:59" + INTERVAL 1 SECOND`,('1998-01-01 00:00:00' - interval 1 second) AS `"1998-01-01 00:00:00" - INTERVAL 1 SECOND`,('1997-12-31' + interval 1 day) AS `INTERVAL 1 DAY + "1997-12-31"`,extract(year from '1999-01-02 10:11:12') AS `extract(YEAR FROM "1999-01-02 10:11:12")`,('1997-12-31 23:59:59' + interval 1 second) AS `date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND)`
+Note 1003 select period_add('9602',-12) AS `period_add("9602",-12)`,period_diff(199505,'9404') AS `period_diff(199505,"9404")`,from_days(to_days('960101')) AS `from_days(to_days("960101"))`,dayofmonth('1997-01-02') AS `dayofmonth("1997-01-02")`,month('1997-01-02') AS `month("1997-01-02")`,monthname('1972-03-04') AS `monthname("1972-03-04")`,dayofyear('0000-00-00') AS `dayofyear("0000-00-00")`,hour('1997-03-03 23:03:22') AS `HOUR("1997-03-03 23:03:22")`,minute('23:03:22') AS `MINUTE("23:03:22")`,second(230322) AS `SECOND(230322)`,quarter(980303) AS `QUARTER(980303)`,week('1998-03-03') AS `WEEK("1998-03-03")`,yearweek('2000-01-01',1) AS `yearweek("2000-01-01",1)`,week(19950101,1) AS `week(19950101,1)`,year('98-02-03') AS `year("98-02-03")`,(weekday(curdate()) - weekday(current_timestamp())) AS `weekday(curdate())-weekday(now())`,dayname('1962-03-03') AS `dayname("1962-03-03")`,unix_timestamp() AS `unix_timestamp()`,sec_to_time((time_to_sec('0:30:47') / 6.21)) AS `sec_to_time(time_to_sec("0:30:47")/6.21)`,curtime() AS `curtime()`,utc_time() AS `utc_time()`,curdate() AS `curdate()`,utc_date() AS `utc_date()`,utc_timestamp() AS `utc_timestamp()`,date_format('1997-01-02 03:04:05','%M %W %D %Y %y %m %d %h %i %s %w') AS `date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w")`,from_unixtime(unix_timestamp('1994-03-02 10:11:12')) AS `from_unixtime(unix_timestamp("1994-03-02 10:11:12"))`,('1997-12-31 23:59:59' + interval 1 second) AS `"1997-12-31 23:59:59" + INTERVAL 1 SECOND`,('1998-01-01 00:00:00' - interval 1 second) AS `"1998-01-01 00:00:00" - INTERVAL 1 SECOND`,('1997-12-31' + interval 1 day) AS `INTERVAL 1 DAY + "1997-12-31"`,extract(year from '1999-01-02 10:11:12') AS `extract(YEAR FROM "1999-01-02 10:11:12")`,('1997-12-31 23:59:59' + interval 1 second) AS `date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND)`
SET @TMP='2007-08-01 12:22:49';
CREATE TABLE t1 (d DATETIME);
INSERT INTO t1 VALUES ('2007-08-01 12:22:59');
@@ -1976,7 +1976,7 @@ select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010')
microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010')
123456 10
select now(258);
-ERROR 42000: Too big precision 258 specified for 'now'. Maximum is 6
+ERROR 42000: Too big precision 258 specified for 'current_timestamp'. Maximum is 6
SELECT 1 FROM DUAL WHERE YEAR(TIMEDIFF(NULL, '12:12:12'));
1
SELECT 1 FROM DUAL WHERE MONTH(TIMEDIFF(NULL, '12:12:12'));
diff --git a/mysql-test/r/func_time_hires.result b/mysql-test/r/func_time_hires.result
index 7101dc8f121..93119dcb309 100644
--- a/mysql-test/r/func_time_hires.result
+++ b/mysql-test/r/func_time_hires.result
@@ -24,7 +24,7 @@ select time_to_sec(sec_to_time(11111)), time_to_sec(sec_to_time(11111.22222));
time_to_sec(sec_to_time(11111)) 11111
time_to_sec(sec_to_time(11111.22222)) 11111.22222
select current_timestamp(7);
-ERROR 42000: Too big precision 7 specified for 'now'. Maximum is 6
+ERROR 42000: Too big precision 7 specified for 'current_timestamp'. Maximum is 6
select curtime(7);
ERROR 42000: Too big precision 7 specified for 'curtime'. Maximum is 6
drop table if exists t1;
diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result
index 987c505f1fb..4b8694ec838 100644
--- a/mysql-test/r/function_defaults.result
+++ b/mysql-test/r/function_defaults.result
@@ -483,7 +483,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c TIMESTAMP NULL );
@@ -491,7 +491,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -501,7 +501,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -527,7 +527,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE N
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -536,7 +536,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`c` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -546,7 +546,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp NULL DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -554,7 +554,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -563,7 +563,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`c` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -573,7 +573,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp NULL DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -586,7 +586,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -650,7 +650,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -659,7 +659,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -668,7 +668,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
+ `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -695,7 +695,7 @@ CREATE TABLE t7 SELECT f FROM t1;
SHOW CREATE TABLE t7;
Table Create Table
t7 CREATE TABLE `t7` (
- `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t7;
f
@@ -704,7 +704,7 @@ CREATE TABLE t8 SELECT g FROM t1;
SHOW CREATE TABLE t8;
Table Create Table
t8 CREATE TABLE `t8` (
- `g` datetime DEFAULT CURRENT_TIMESTAMP
+ `g` datetime DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t8;
g
@@ -713,7 +713,7 @@ CREATE TABLE t9 SELECT h FROM t1;
SHOW CREATE TABLE t9;
Table Create Table
t9 CREATE TABLE `t9` (
- `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `h` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t9;
h
@@ -753,25 +753,25 @@ SELECT * FROM t1;
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `k` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `l` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `k` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `l` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `m` timestamp NOT NULL DEFAULT current_timestamp(),
+ `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`o` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
`p` timestamp NULL DEFAULT NULL,
- `q` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `r` datetime DEFAULT CURRENT_TIMESTAMP,
- `s` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `q` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `r` datetime DEFAULT current_timestamp(),
+ `s` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`t` datetime DEFAULT NULL,
`u` datetime DEFAULT '1986-09-27 03:00:00',
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT current_timestamp(),
+ `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
`e` timestamp NULL DEFAULT NULL,
- `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `g` datetime DEFAULT CURRENT_TIMESTAMP,
- `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `g` datetime DEFAULT current_timestamp(),
+ `h` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`i` datetime DEFAULT NULL,
`j` datetime DEFAULT '1986-09-27 03:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -792,7 +792,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -801,7 +801,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` datetime DEFAULT CURRENT_TIMESTAMP
+ `b` datetime DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -810,7 +810,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `c` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -847,7 +847,7 @@ CREATE TABLE t2 ( b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SET TIMESTAMP = 2000.876543;
@@ -1224,12 +1224,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NOT NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1276,12 +1276,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1343,12 +1343,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NOT NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1381,12 +1381,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1429,7 +1429,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 ( a ) VALUES ( 1 );
SELECT * FROM t1;
@@ -2029,7 +2029,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), c TIMESTAMP(6) NULL );
@@ -2037,7 +2037,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2047,7 +2047,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2073,7 +2073,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDAT
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2082,7 +2082,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2092,7 +2092,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp(6) NULL DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2100,7 +2100,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMES
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2109,7 +2109,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2119,7 +2119,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp(6) NULL DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2132,7 +2132,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -2196,7 +2196,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -2205,7 +2205,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -2214,7 +2214,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6)
+ `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -2241,7 +2241,7 @@ CREATE TABLE t7 SELECT f FROM t1;
SHOW CREATE TABLE t7;
Table Create Table
t7 CREATE TABLE `t7` (
- `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t7;
f
@@ -2250,7 +2250,7 @@ CREATE TABLE t8 SELECT g FROM t1;
SHOW CREATE TABLE t8;
Table Create Table
t8 CREATE TABLE `t8` (
- `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
+ `g` datetime(6) DEFAULT current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t8;
g
@@ -2259,7 +2259,7 @@ CREATE TABLE t9 SELECT h FROM t1;
SHOW CREATE TABLE t9;
Table Create Table
t9 CREATE TABLE `t9` (
- `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
+ `h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t9;
h
@@ -2299,25 +2299,25 @@ SELECT * FROM t1;
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `k` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `l` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `m` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `k` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `l` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `m` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
+ `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`o` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
`p` timestamp(6) NULL DEFAULT NULL,
- `q` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `r` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
- `s` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
+ `q` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `r` datetime(6) DEFAULT current_timestamp(6),
+ `s` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
`t` datetime(6) DEFAULT NULL,
`u` datetime(6) DEFAULT '1986-09-27 03:00:00.098765',
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
+ `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
`e` timestamp(6) NULL DEFAULT NULL,
- `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
- `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
+ `f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `g` datetime(6) DEFAULT current_timestamp(6),
+ `h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
`i` datetime(6) DEFAULT NULL,
`j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -2338,7 +2338,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -2347,7 +2347,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
+ `b` datetime(6) DEFAULT current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -2356,7 +2356,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
+ `c` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -2393,7 +2393,7 @@ CREATE TABLE t2 ( b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SET TIMESTAMP = 2000.876543;
@@ -2770,12 +2770,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2822,12 +2822,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2889,12 +2889,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2927,12 +2927,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2975,7 +2975,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 ( a ) VALUES ( 1 );
SELECT * FROM t1;
diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result
index b539f70a3cb..fe97870ab88 100644
--- a/mysql-test/r/function_defaults_innodb.result
+++ b/mysql-test/r/function_defaults_innodb.result
@@ -484,7 +484,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 ( a INT, b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c TIMESTAMP NULL );
@@ -492,7 +492,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -502,7 +502,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE C
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -528,7 +528,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE N
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -537,7 +537,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`c` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -547,7 +547,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp NULL DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -555,7 +555,7 @@ CREATE TABLE t1 ( a TIMESTAMP NOT NULL DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL,
`c` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -564,7 +564,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`c` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -574,7 +574,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp NULL DEFAULT NULL,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -587,7 +587,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -651,7 +651,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -660,7 +660,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -669,7 +669,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP
+ `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -696,7 +696,7 @@ CREATE TABLE t7 SELECT f FROM t1;
SHOW CREATE TABLE t7;
Table Create Table
t7 CREATE TABLE `t7` (
- `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t7;
f
@@ -705,7 +705,7 @@ CREATE TABLE t8 SELECT g FROM t1;
SHOW CREATE TABLE t8;
Table Create Table
t8 CREATE TABLE `t8` (
- `g` datetime DEFAULT CURRENT_TIMESTAMP
+ `g` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t8;
g
@@ -714,7 +714,7 @@ CREATE TABLE t9 SELECT h FROM t1;
SHOW CREATE TABLE t9;
Table Create Table
t9 CREATE TABLE `t9` (
- `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `h` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t9;
h
@@ -754,25 +754,25 @@ SELECT * FROM t1;
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `k` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `l` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `m` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `k` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `l` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `m` timestamp NOT NULL DEFAULT current_timestamp(),
+ `n` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`o` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
`p` timestamp NULL DEFAULT NULL,
- `q` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `r` datetime DEFAULT CURRENT_TIMESTAMP,
- `s` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `q` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `r` datetime DEFAULT current_timestamp(),
+ `s` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`t` datetime DEFAULT NULL,
`u` datetime DEFAULT '1986-09-27 03:00:00',
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT current_timestamp(),
+ `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE current_timestamp(),
`d` timestamp NOT NULL DEFAULT '1986-09-27 03:00:00',
`e` timestamp NULL DEFAULT NULL,
- `f` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `g` datetime DEFAULT CURRENT_TIMESTAMP,
- `h` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `f` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `g` datetime DEFAULT current_timestamp(),
+ `h` datetime DEFAULT NULL ON UPDATE current_timestamp(),
`i` datetime DEFAULT NULL,
`j` datetime DEFAULT '1986-09-27 03:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -793,7 +793,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -802,7 +802,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` datetime DEFAULT CURRENT_TIMESTAMP
+ `b` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -811,7 +811,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `c` datetime DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -848,7 +848,7 @@ CREATE TABLE t2 ( b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET TIMESTAMP = 2000.876543;
@@ -1225,12 +1225,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NOT NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1277,12 +1277,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1344,12 +1344,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NOT NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1382,12 +1382,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT '2011-11-18 00:00:00',
- `like_b` datetime DEFAULT CURRENT_TIMESTAMP,
+ `like_b` datetime DEFAULT current_timestamp(),
`c` datetime NOT NULL DEFAULT '2011-11-18 00:00:00',
- `like_c` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `like_c` datetime NOT NULL DEFAULT current_timestamp(),
+ `d` timestamp NULL DEFAULT '2011-05-03 00:00:00' ON UPDATE current_timestamp(),
`e` timestamp NOT NULL DEFAULT '2011-05-03 00:00:00',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -1430,7 +1430,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 ( a ) VALUES ( 1 );
SELECT * FROM t1;
@@ -2030,7 +2030,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 ( a INT, b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), c TIMESTAMP(6) NULL );
@@ -2038,7 +2038,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -2048,7 +2048,7 @@ ALTER TABLE t1 MODIFY b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UP
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2074,7 +2074,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDAT
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -2083,7 +2083,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2093,7 +2093,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp(6) NULL DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2101,7 +2101,7 @@ CREATE TABLE t1 ( a TIMESTAMP(6) NOT NULL DEFAULT NOW(6) ON UPDATE CURRENT_TIMES
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL,
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -2110,7 +2110,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`c` timestamp(6) NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2120,7 +2120,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` timestamp(6) NULL DEFAULT NULL,
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2133,7 +2133,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -2197,7 +2197,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -2206,7 +2206,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -2215,7 +2215,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6)
+ `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -2242,7 +2242,7 @@ CREATE TABLE t7 SELECT f FROM t1;
SHOW CREATE TABLE t7;
Table Create Table
t7 CREATE TABLE `t7` (
- `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t7;
f
@@ -2251,7 +2251,7 @@ CREATE TABLE t8 SELECT g FROM t1;
SHOW CREATE TABLE t8;
Table Create Table
t8 CREATE TABLE `t8` (
- `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
+ `g` datetime(6) DEFAULT current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t8;
g
@@ -2260,7 +2260,7 @@ CREATE TABLE t9 SELECT h FROM t1;
SHOW CREATE TABLE t9;
Table Create Table
t9 CREATE TABLE `t9` (
- `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
+ `h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t9;
h
@@ -2300,25 +2300,25 @@ SELECT * FROM t1;
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `k` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `l` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `m` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `k` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `l` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `m` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
+ `n` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`o` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
`p` timestamp(6) NULL DEFAULT NULL,
- `q` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `r` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
- `s` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
+ `q` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `r` datetime(6) DEFAULT current_timestamp(6),
+ `s` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
`t` datetime(6) DEFAULT NULL,
`u` datetime(6) DEFAULT '1986-09-27 03:00:00.098765',
- `a` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `a` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
+ `c` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ON UPDATE current_timestamp(6),
`d` timestamp(6) NOT NULL DEFAULT '1986-09-27 03:00:00.098765',
`e` timestamp(6) NULL DEFAULT NULL,
- `f` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
- `g` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
- `h` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6),
+ `f` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
+ `g` datetime(6) DEFAULT current_timestamp(6),
+ `h` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6),
`i` datetime(6) DEFAULT NULL,
`j` datetime(6) DEFAULT '1986-09-27 03:00:00.098765'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -2339,7 +2339,7 @@ CREATE TABLE t2 SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` datetime(6) DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `a` datetime(6) DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t2;
a
@@ -2348,7 +2348,7 @@ CREATE TABLE t3 SELECT b FROM t1;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6)
+ `b` datetime(6) DEFAULT current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t3;
b
@@ -2357,7 +2357,7 @@ CREATE TABLE t4 SELECT c FROM t1;
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
- `c` datetime(6) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(6)
+ `c` datetime(6) DEFAULT NULL ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t4;
c
@@ -2394,7 +2394,7 @@ CREATE TABLE t2 ( b TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET TIMESTAMP = 2000.876543;
@@ -2771,12 +2771,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2823,12 +2823,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2890,12 +2890,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
+ `f` timestamp(6) NOT NULL DEFAULT current_timestamp(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2928,12 +2928,12 @@ t1 CREATE TABLE `t1` (
`dummy` int(11) DEFAULT NULL,
`a` datetime(6) DEFAULT NULL,
`b` datetime(6) DEFAULT '2011-11-18 00:00:00.000000',
- `like_b` datetime(6) DEFAULT CURRENT_TIMESTAMP(6),
+ `like_b` datetime(6) DEFAULT current_timestamp(6),
`c` datetime(6) NOT NULL DEFAULT '2011-11-18 00:00:00.000000',
- `like_c` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
- `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE CURRENT_TIMESTAMP(6),
+ `like_c` datetime(6) NOT NULL DEFAULT current_timestamp(6),
+ `d` timestamp(6) NULL DEFAULT '2011-05-03 00:00:00.000000' ON UPDATE current_timestamp(6),
`e` timestamp(6) NOT NULL DEFAULT '2011-05-03 00:00:00.000000',
- `f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `f` timestamp NULL DEFAULT current_timestamp(),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
`i` int(11) NOT NULL DEFAULT 42
@@ -2976,7 +2976,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `b` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 ( a ) VALUES ( 1 );
SELECT * FROM t1;
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 04d169c84b6..ed0d8f540a0 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1848,8 +1848,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` point DEFAULT NULL,
- `x` double DEFAULT x(a),
- `y` double DEFAULT y(a)
+ `x` double DEFAULT st_x(`a`),
+ `y` double DEFAULT st_y(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Point(1,2));
SELECT x,y FROM t1;
@@ -1861,7 +1861,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` geometry DEFAULT NULL,
- `area` double DEFAULT ST_AREA(g)
+ `area` double DEFAULT st_area(`g`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (g) VALUES (GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'));
SELECT area FROM t1;
@@ -1873,7 +1873,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` geometry DEFAULT NULL,
- `length` double DEFAULT ST_LENGTH(g)
+ `length` double DEFAULT st_length(`g`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (g) VALUES (GeomFromText('LINESTRING(0 0,20 0,20 20,0 20,0 0)'));
SELECT length FROM t1;
@@ -1885,7 +1885,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`g` point DEFAULT NULL,
- `distance` double DEFAULT ST_DISTANCE(g, POINT(0,0))
+ `distance` double DEFAULT st_distance(`g`,point(0,0))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (g) VALUES (Point(1,0));
SELECT distance FROM t1;
@@ -1897,7 +1897,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text DEFAULT NULL,
- `g` geometry DEFAULT GeomFromText(a)
+ `g` geometry DEFAULT st_geometryfromtext(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('point(1 1)');
SELECT AsText(g) FROM t1;
@@ -1910,7 +1910,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL,
- `g` geometry DEFAULT POINT(x,y)
+ `g` geometry DEFAULT point(`x`,`y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (x,y) VALUES (10,20);
SELECT AsText(g) FROM t1;
@@ -1922,7 +1922,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT PointN(a,2)
+ `b` geometry DEFAULT st_pointn(`a`,2)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('LineString(1 1,2 2,3 3)'));
SELECT AsText(b) FROM t1;
@@ -1934,7 +1934,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT StartPoint(a)
+ `b` geometry DEFAULT st_startpoint(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('LineString(1 1,2 2,3 3)'));
SELECT AsText(b) FROM t1;
@@ -1947,7 +1947,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
`b` geometry DEFAULT NULL,
- `c` geometry DEFAULT GeometryCollection(a,b)
+ `c` geometry DEFAULT geometrycollection(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (Point(1,1), Point(2,2));
SELECT AsText(c) FROM t1;
@@ -1959,7 +1959,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT GeomFromWKB(AsBinary(a),20)
+ `b` geometry DEFAULT st_geometryfromwkb(st_aswkb(`a`),20)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('POINT(1 1)', 10));
SELECT AsText(a), SRID(a), AsText(b), SRID(b) FROM t1;
@@ -1971,7 +1971,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT BOUNDARY(a)
+ `b` geometry DEFAULT st_boundary(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('POLYGON((10 10, 10 20, 20 20, 20 10, 10 10))'));
SELECT AsText(b) FROM t1;
@@ -1983,7 +1983,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT BUFFER(a,10)
+ `b` geometry DEFAULT st_buffer(`a`,10)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('POLYGON((10 10, 10 20, 20 20, 20 10, 10 10))'));
SELECT GeometryType(b) FROM t1;
@@ -1995,7 +1995,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT CENTROID(a)
+ `b` geometry DEFAULT st_centroid(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('POLYGON((10 10, 10 20, 20 20, 20 10, 10 10))'));
SELECT AsText(b) FROM t1;
@@ -2007,7 +2007,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT ENVELOPE(a)
+ `b` geometry DEFAULT st_envelope(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('LineString(1 1,4 4)'));
SELECT AsText(b) FROM t1;
@@ -2019,7 +2019,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT PointOnSurface(a)
+ `b` geometry DEFAULT st_pointonsurface(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('POLYGON((10 10, 10 20, 20 20, 20 10, 10 10))'));
SELECT GeometryType(b) FROM t1;
@@ -2031,8 +2031,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` geometry DEFAULT Point(1,1),
- `c` geometry DEFAULT ST_UNION(a,b)
+ `b` geometry DEFAULT point(1,1),
+ `c` geometry DEFAULT st_union(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Point(0,0));
SELECT AsText(c) FROM t1;
@@ -2044,7 +2044,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` varchar(20) DEFAULT GeometryType(a)
+ `b` varchar(20) DEFAULT st_geometrytype(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Point(0, 0));
SELECT b FROM t1;
@@ -2056,7 +2056,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT IsSimple(a)
+ `b` int(11) DEFAULT st_issimple(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Point(0, 0));
SELECT b FROM t1;
@@ -2068,7 +2068,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT IsEmpty(a)
+ `b` int(11) DEFAULT st_isempty(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Point(0, 0));
SELECT b FROM t1;
@@ -2080,7 +2080,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT IsRing(a)
+ `b` int(11) DEFAULT st_isring(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('LineString(0 0,0 1,1 1,1 0,0 0)'));
SELECT b FROM t1;
@@ -2092,7 +2092,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT IsClosed(a)
+ `b` int(11) DEFAULT st_isclosed(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('LineString(0 0,0 1,1 1,1 0,0 0)'));
SELECT b FROM t1;
@@ -2104,7 +2104,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT Dimension(a)
+ `b` int(11) DEFAULT st_dimension(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (Buffer(Point(1,1),1));
SELECT b FROM t1;
@@ -2116,7 +2116,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT NumGeometries(a)
+ `b` int(11) DEFAULT st_numgeometries(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (ST_UNION(Point(1,1),Point(0,0)));
SELECT b FROM t1;
@@ -2128,7 +2128,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT NumInteriorRings(a)
+ `b` int(11) DEFAULT st_numinteriorrings(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))'));
SELECT b FROM t1;
@@ -2140,7 +2140,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT NumPoints(a)
+ `b` int(11) DEFAULT st_numpoints(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (LineString(Point(1,1),Point(0,0)));
SELECT b FROM t1;
@@ -2152,7 +2152,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
- `b` int(11) DEFAULT SRID(a)
+ `b` int(11) DEFAULT srid(`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (GeomFromText('Point(1 1)', 100));
SELECT b FROM t1;
@@ -2165,7 +2165,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
`b` geometry DEFAULT NULL,
- `c` int(11) DEFAULT MBRDisjoint(a,b)
+ `c` int(11) DEFAULT mbrdisjoint(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (Point(1,1),Point(1,1));
SELECT c FROM t1;
@@ -2178,7 +2178,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
`b` geometry DEFAULT NULL,
- `c` int(11) DEFAULT ST_Disjoint(a,b)
+ `c` int(11) DEFAULT st_disjoint(`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (Point(1,1),Point(1,1));
SELECT c FROM t1;
@@ -2191,7 +2191,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` geometry DEFAULT NULL,
`b` geometry DEFAULT NULL,
- `c` int(11) DEFAULT ST_Relate(a,b,'T*F**FFF*')
+ `c` int(11) DEFAULT st_relate(`a`,`b`,'T*F**FFF*')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES (Point(1,1),Point(1,1));
SELECT c FROM t1;
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index 8442f7fc401..8d2ab0d8a55 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -685,7 +685,7 @@ Db char(64) NO PRI
User char(80) NO PRI
Table_name char(64) NO PRI
Grantor char(141) NO MUL
-Timestamp timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+Timestamp timestamp NO current_timestamp() on update current_timestamp()
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') NO
Column_priv set('Select','Insert','Update','References') NO
use test;
@@ -2675,7 +2675,7 @@ CREATE TABLE t1 (a VARCHAR(30) DEFAULT USER());
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(30) DEFAULT USER()
+ `a` varchar(30) DEFAULT user()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ();
GRANT ALL PRIVILEGES ON test.* TO dummy@localhost IDENTIFIED BY 'pwd';
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index cda028536cf..29bdb144551 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -435,7 +435,7 @@ t1 CREATE TABLE `t1` (
`c1` int(11) DEFAULT NULL,
`c2` char(12) NOT NULL,
`c3` varchar(123) NOT NULL,
- `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `c4` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`c2`,`c3`),
UNIQUE KEY `i4` (`c4`),
KEY `c1` (`c1`),
@@ -474,7 +474,7 @@ t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
`c2` char(12) NOT NULL,
`c3` varchar(123) NOT NULL,
- `c4` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `c4` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
KEY `i1` (`c1`),
KEY `i5` (`c1`,`c2`,`c3`,`c4`),
KEY `c1` (`c1`),
diff --git a/mysql-test/r/log_slow.result b/mysql-test/r/log_slow.result
index 6a3f48506e3..383ad10ba66 100644
--- a/mysql-test/r/log_slow.result
+++ b/mysql-test/r/log_slow.result
@@ -46,7 +46,7 @@ select @@log_slow_verbosity;
innodb
show fields from mysql.slow_log;
Field Type Null Key Default Extra
-start_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP
+start_time timestamp(6) NO current_timestamp(6) on update current_timestamp(6)
user_host mediumtext NO NULL
query_time time(6) NO NULL
lock_time time(6) NO NULL
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index db2727c8234..2ec12bfe1c4 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -54,7 +54,7 @@ ERROR HY000: You can't use locks with log tables
show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -63,7 +63,7 @@ general_log CREATE TABLE `general_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log'
show fields from mysql.general_log;
Field Type Null Key Default Extra
-event_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP
+event_time timestamp(6) NO current_timestamp(6) on update current_timestamp(6)
user_host mediumtext NO NULL
thread_id bigint(21) unsigned NO NULL
server_id int(10) unsigned NO NULL
@@ -72,7 +72,7 @@ argument mediumtext NO NULL
show create table mysql.slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
@@ -88,7 +88,7 @@ slow_log CREATE TABLE `slow_log` (
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show fields from mysql.slow_log;
Field Type Null Key Default Extra
-start_time timestamp(6) NO CURRENT_TIMESTAMP(6) on update CURRENT_TIMESTAMP
+start_time timestamp(6) NO current_timestamp(6) on update current_timestamp(6)
user_host mediumtext NO NULL
query_time time(6) NO NULL
lock_time time(6) NO NULL
@@ -169,7 +169,7 @@ set global slow_query_log='OFF';
show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -179,7 +179,7 @@ general_log CREATE TABLE `general_log` (
show create table mysql.slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
@@ -198,7 +198,7 @@ alter table mysql.slow_log engine=myisam;
show create table mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -208,7 +208,7 @@ general_log CREATE TABLE `general_log` (
show create table mysql.slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/mysql5613mysql.result b/mysql-test/r/mysql5613mysql.result
index 1d2c3b97baf..183af7211d3 100644
--- a/mysql-test/r/mysql5613mysql.result
+++ b/mysql-test/r/mysql5613mysql.result
@@ -10,7 +10,7 @@ columns_priv CREATE TABLE `columns_priv` (
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
@@ -58,7 +58,7 @@ event CREATE TABLE `event` (
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
@@ -115,7 +115,7 @@ proc CREATE TABLE `proc` (
`returns` longblob NOT NULL DEFAULT '',
`body` longblob NOT NULL,
`definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -138,7 +138,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
@@ -154,7 +154,7 @@ proxies_priv CREATE TABLE `proxies_priv` (
`Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`With_grant` tinyint(1) NOT NULL DEFAULT 0,
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'
@@ -186,7 +186,7 @@ tables_priv CREATE TABLE `tables_priv` (
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
diff --git a/mysql-test/r/mysql57_virtual.result b/mysql-test/r/mysql57_virtual.result
index ace8fe38d36..6f337c8e7d7 100644
--- a/mysql-test/r/mysql57_virtual.result
+++ b/mysql-test/r/mysql57_virtual.result
@@ -32,7 +32,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) PERSISTENT,
- `c` int(11) AS (a+2) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) PERSISTENT,
+ `c` int(11) AS ((`a` + 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 04612e02b7f..fcfab3e068a 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -2923,7 +2923,7 @@ DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
- `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
UNIQUE KEY `d` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2960,7 +2960,7 @@ DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
- `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
UNIQUE KEY `d` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -5260,7 +5260,7 @@ Error 1146 Table 'mysql.event' doesn't exist
SHOW CREATE TABLE mysql.general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -5270,7 +5270,7 @@ general_log CREATE TABLE `general_log` (
SHOW CREATE TABLE mysql.slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 3b365d6fdde..bc3598131e2 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -260,7 +260,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp(),
`b` varchar(10) DEFAULT NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/r/partition_bug18198.result b/mysql-test/r/partition_bug18198.result
index 80f11edaaf6..ee7bf514807 100644
--- a/mysql-test/r/partition_bug18198.result
+++ b/mysql-test/r/partition_bug18198.result
@@ -130,8 +130,7 @@ ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitio
create table t1 (col1 datetime)
partition by range(week(col1))
(partition p0 values less than (10), partition p1 values less than (30));
-ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
-(partition p0 values less than (10), partition p1 values less than (30))' at line 2
+ERROR HY000: This partition function is not allowed
create table t1 (col1 varchar(25))
partition by range(cast(col1 as signed))
(partition p0 values less than (10), partition p1 values less than (30));
diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result
index 436db33af36..8bb360e96ae 100644
--- a/mysql-test/r/plugin_auth.result
+++ b/mysql-test/r/plugin_auth.result
@@ -27,7 +27,7 @@ proxies_priv CREATE TABLE `proxies_priv` (
`Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`With_grant` tinyint(1) NOT NULL DEFAULT 0,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges'
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index ed768343581..7ef480a6019 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -342,7 +342,7 @@ t1 CREATE TABLE `t1` (
`empty_char` char(0) DEFAULT NULL,
`type_char` char(2) DEFAULT NULL,
`type_varchar` varchar(10) DEFAULT NULL,
- `type_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `type_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`type_date` date NOT NULL DEFAULT '0000-00-00',
`type_time` time NOT NULL DEFAULT '00:00:00',
`type_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -742,17 +742,17 @@ DROP VIEW v1;
CREATE VIEW v1 AS SELECT NOW();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select now() AS `NOW()` binary binary
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select current_timestamp() AS `NOW()` binary binary
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_cache now() AS `NOW()` binary binary
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_cache current_timestamp() AS `NOW()` binary binary
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_NO_CACHE NOW();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()` binary binary
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache current_timestamp() AS `NOW()` binary binary
DROP VIEW v1;
CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE NOW();
ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE
@@ -979,7 +979,7 @@ def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253
def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 0 0 33
def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
-def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 81 0 N 1 0 33
+def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 1 0 33
def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
@@ -998,7 +998,7 @@ def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
-def information_schema COLUMNS COLUMNS EXTRA Extra 253 81 0 N 1 0 33
+def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 1 0 33
Field Type Null Key Default Extra
c int(11) NO PRI NULL
----------------------------------------------------------------
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result
index e1afb964f0a..782ae00bb33 100644
--- a/mysql-test/r/sql_mode.result
+++ b/mysql-test/r/sql_mode.result
@@ -149,7 +149,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"f1" int(11) NOT NULL AUTO_INCREMENT,
- "f2" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ "f2" timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY ("f1")
)
set session sql_mode=no_field_options;
@@ -157,7 +157,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
- `f2` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `f2` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`f1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/statistics.result b/mysql-test/r/statistics.result
index 52986fa9a6b..58d9dded51e 100644
--- a/mysql-test/r/statistics.result
+++ b/mysql-test/r/statistics.result
@@ -1688,7 +1688,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` blob DEFAULT NULL,
- `b` text DEFAULT DECODE_HISTOGRAM('SINGLE_PREC_HB',a)
+ `b` text DEFAULT decode_histogram('SINGLE_PREC_HB',`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES (0x0000000000000000000000000101010101010101010202020303030304040404050505050606070707080809090A0A0B0C0D0D0E0E0F10111213131415161718191B1C1E202224292A2E33373B4850575F6A76818C9AA7B9C4CFDADFE5EBF0F4F8FAFCFF);
SELECT b FROM t1;
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 4da77f21792..9436627aa1f 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1273,7 +1273,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 414815f02b7..b88497dbd9b 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -151,7 +151,7 @@ tables_priv CREATE TABLE `tables_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
@@ -165,7 +165,7 @@ columns_priv CREATE TABLE `columns_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
@@ -179,7 +179,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
@@ -212,7 +212,7 @@ proc CREATE TABLE `proc` (
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -232,7 +232,7 @@ event CREATE TABLE `event` (
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
@@ -252,7 +252,7 @@ event CREATE TABLE `event` (
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -262,7 +262,7 @@ general_log CREATE TABLE `general_log` (
show create table slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/system_mysql_db_fix40123.result b/mysql-test/r/system_mysql_db_fix40123.result
index 414815f02b7..b88497dbd9b 100644
--- a/mysql-test/r/system_mysql_db_fix40123.result
+++ b/mysql-test/r/system_mysql_db_fix40123.result
@@ -151,7 +151,7 @@ tables_priv CREATE TABLE `tables_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
@@ -165,7 +165,7 @@ columns_priv CREATE TABLE `columns_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
@@ -179,7 +179,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
@@ -212,7 +212,7 @@ proc CREATE TABLE `proc` (
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -232,7 +232,7 @@ event CREATE TABLE `event` (
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
@@ -252,7 +252,7 @@ event CREATE TABLE `event` (
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -262,7 +262,7 @@ general_log CREATE TABLE `general_log` (
show create table slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/system_mysql_db_fix50030.result b/mysql-test/r/system_mysql_db_fix50030.result
index ed86a35c910..14905ab81a0 100644
--- a/mysql-test/r/system_mysql_db_fix50030.result
+++ b/mysql-test/r/system_mysql_db_fix50030.result
@@ -151,7 +151,7 @@ tables_priv CREATE TABLE `tables_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
@@ -165,7 +165,7 @@ columns_priv CREATE TABLE `columns_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
@@ -179,7 +179,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
@@ -212,7 +212,7 @@ proc CREATE TABLE `proc` (
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -232,7 +232,7 @@ event CREATE TABLE `event` (
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
@@ -252,7 +252,7 @@ event CREATE TABLE `event` (
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -262,7 +262,7 @@ general_log CREATE TABLE `general_log` (
show create table slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/system_mysql_db_fix50117.result b/mysql-test/r/system_mysql_db_fix50117.result
index 414815f02b7..b88497dbd9b 100644
--- a/mysql-test/r/system_mysql_db_fix50117.result
+++ b/mysql-test/r/system_mysql_db_fix50117.result
@@ -151,7 +151,7 @@ tables_priv CREATE TABLE `tables_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
@@ -165,7 +165,7 @@ columns_priv CREATE TABLE `columns_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
@@ -179,7 +179,7 @@ procs_priv CREATE TABLE `procs_priv` (
`Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
- `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `Timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
KEY `Grantor` (`Grantor`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
@@ -212,7 +212,7 @@ proc CREATE TABLE `proc` (
`returns` longblob NOT NULL,
`body` longblob NOT NULL,
`definer` char(141) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
`comment` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
@@ -232,7 +232,7 @@ event CREATE TABLE `event` (
`execute_at` datetime DEFAULT NULL,
`interval_value` int(11) DEFAULT NULL,
`interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL,
- `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `created` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
@@ -252,7 +252,7 @@ event CREATE TABLE `event` (
show create table general_log;
Table Create Table
general_log CREATE TABLE `general_log` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`thread_id` bigint(21) unsigned NOT NULL,
`server_id` int(10) unsigned NOT NULL,
@@ -262,7 +262,7 @@ general_log CREATE TABLE `general_log` (
show create table slow_log;
Table Create Table
slow_log CREATE TABLE `slow_log` (
- `start_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
+ `start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
`user_host` mediumtext NOT NULL,
`query_time` time(6) NOT NULL,
`lock_time` time(6) NOT NULL,
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 819fe5306ab..dae9094f463 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -42,13 +42,13 @@ Note 1246 Converting column 'a' from VARCHAR to TEXT
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` mediumtext DEFAULT "hello"
+ `a` mediumtext DEFAULT 'hello'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 (a blob default "hello");
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` blob DEFAULT "hello"
+ `a` blob DEFAULT 'hello'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2;
create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr));
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index 43409cf60e7..6af497577fc 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -54,7 +54,7 @@ ushort smallint(5) unsigned zerofill NULL NO MUL 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
-time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP #
+time_stamp timestamp NULL NO current_timestamp() on update current_timestamp() #
date_field date NULL YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
@@ -226,7 +226,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 #
umedium mediumint(8) unsigned NULL NO MUL 0 #
ulong int(11) unsigned NULL NO MUL 0 #
ulonglong bigint(13) unsigned NULL NO MUL 0 #
-time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP #
+time_stamp timestamp NULL NO current_timestamp() on update current_timestamp() #
date_field char(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
@@ -252,7 +252,7 @@ ushort smallint(5) unsigned zerofill NULL NO 00000 #
umedium mediumint(8) unsigned NULL NO 0 #
ulong int(11) unsigned NULL NO 0 #
ulonglong bigint(13) unsigned NULL NO 0 #
-time_stamp timestamp NULL NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP #
+time_stamp timestamp NULL NO current_timestamp() on update current_timestamp() #
date_field char(10) latin1_swedish_ci YES NULL #
time_field time NULL YES NULL #
date_time datetime NULL YES NULL #
diff --git a/mysql-test/r/type_temporal_mysql56.result b/mysql-test/r/type_temporal_mysql56.result
index b0c81844781..cdc951dac14 100644
--- a/mysql-test/r/type_temporal_mysql56.result
+++ b/mysql-test/r/type_temporal_mysql56.result
@@ -63,7 +63,7 @@ SET TIME_ZONE='+00:00';
SHOW CREATE TABLE mysql56timestamp;
Table Create Table
mysql56timestamp CREATE TABLE `mysql56timestamp` (
- `ts0` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `ts0` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`ts1` timestamp(1) NOT NULL DEFAULT '0000-00-00 00:00:00.0',
`ts2` timestamp(2) NOT NULL DEFAULT '0000-00-00 00:00:00.00',
`ts3` timestamp(3) NOT NULL DEFAULT '0000-00-00 00:00:00.000',
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 69c9f68811d..90246fed831 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -195,13 +195,13 @@ t1 t2 t3
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `t1` timestamp NOT NULL DEFAULT current_timestamp(),
`t2` datetime DEFAULT NULL,
`t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP
+t1 timestamp NO current_timestamp()
t2 datetime YES NULL
t3 timestamp NO 0000-00-00 00:00:00
drop table t1;
@@ -222,12 +222,12 @@ t1 t2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
+ `t1` timestamp NOT NULL DEFAULT '2003-01-01 00:00:00' ON UPDATE current_timestamp(),
`t2` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO 2003-01-01 00:00:00 on update CURRENT_TIMESTAMP
+t1 timestamp NO 2003-01-01 00:00:00 on update current_timestamp()
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp not null default now() on update now(), t2 datetime);
@@ -247,12 +247,12 @@ t1 t2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`t2` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+t1 timestamp NO current_timestamp() on update current_timestamp()
t2 datetime YES NULL
drop table t1;
create table t1 (t1 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, t2 datetime, t3 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00');
@@ -272,13 +272,13 @@ t1 t2 t3
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`t2` datetime DEFAULT NULL,
`t3` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+t1 timestamp NO current_timestamp() on update current_timestamp()
t2 datetime YES NULL
t3 timestamp NO 0000-00-00 00:00:00
drop table t1;
@@ -299,12 +299,12 @@ t1 t2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`t2` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-t1 timestamp NO CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
+t1 timestamp NO current_timestamp() on update current_timestamp()
t2 datetime YES NULL
truncate table t1;
insert into t1 values ('2004-04-01 00:00:00', '2004-04-01 00:00:00');
@@ -369,7 +369,7 @@ create table t1 (a timestamp null default current_timestamp on update current_ti
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL, NULL);
@@ -710,12 +710,12 @@ CREATE TABLE t2 AS SELECT * from t1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `ts` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `ts` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
SET sql_mode=DEFAULT;
@@ -731,13 +731,13 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`vc` varchar(10) NOT NULL DEFAULT 'test',
- `ts` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `ts` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`vc` varchar(10) NOT NULL DEFAULT 'test',
- `ts` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
+ `ts` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
End of 10.0 tests
diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result
index ccad5c8f8a1..fc1bd83e04f 100644
--- a/mysql-test/r/type_timestamp_hires.result
+++ b/mysql-test/r/type_timestamp_hires.result
@@ -64,15 +64,15 @@ a
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4)
+ `a` timestamp(4) NOT NULL DEFAULT current_timestamp(4) ON UPDATE current_timestamp(4)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
-a timestamp(4) NO CURRENT_TIMESTAMP(4) on update CURRENT_TIMESTAMP
+a timestamp(4) NO current_timestamp(4) on update current_timestamp(4)
select table_name, column_name, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, datetime_precision, character_set_name, collation_name, column_type, column_key, extra from information_schema.columns where table_name='t1';
table_name t1
column_name a
-column_default CURRENT_TIMESTAMP(4)
+column_default current_timestamp(4)
is_nullable NO
data_type timestamp
character_maximum_length NULL
@@ -84,7 +84,7 @@ character_set_name NULL
collation_name NULL
column_type timestamp(4)
column_key
-extra on update CURRENT_TIMESTAMP
+extra on update current_timestamp(4)
select a, a+interval 9876543 microsecond from t1;
a a+interval 9876543 microsecond
2010-12-11 01:02:03.4567 2010-12-11 01:02:13.333243
@@ -109,12 +109,12 @@ create table t3 like t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4)
+ `a` timestamp(4) NOT NULL DEFAULT current_timestamp(4) ON UPDATE current_timestamp(4)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
- `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4)
+ `a` timestamp(4) NOT NULL DEFAULT current_timestamp(4) ON UPDATE current_timestamp(4)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2, t3;
insert t1 values ('2010-12-13 14:15:16.222222');
@@ -130,7 +130,7 @@ create table t3 select max(a), min(a), sum(a), avg(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP(4) ON UPDATE CURRENT_TIMESTAMP(4),
+ `a` timestamp(4) NOT NULL DEFAULT current_timestamp(4) ON UPDATE current_timestamp(4),
`a+0` decimal(25,4) NOT NULL,
`a-1` decimal(25,4) NOT NULL,
`a*1` decimal(25,4) NOT NULL,
@@ -276,13 +276,13 @@ create or replace table t1 (a timestamp(5) default current_timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) default current_timestamp());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) default current_timestamp(2));
show create table t1;
@@ -298,25 +298,25 @@ create or replace table t1 (a timestamp(5) default current_timestamp(5));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) default current_timestamp(6));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) on update current_timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) on update current_timestamp());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) on update current_timestamp(3));
ERROR HY000: Invalid ON UPDATE clause for 'a' column
@@ -324,12 +324,12 @@ create or replace table t1 (a timestamp(5) on update current_timestamp(5));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
create or replace table t1 (a timestamp(5) on update current_timestamp(6));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result
index dc9806bb7d1..737ed32f1ee 100644
--- a/mysql-test/r/udf.result
+++ b/mysql-test/r/udf.result
@@ -457,7 +457,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) DEFAULT METAPHON(a)
+ `b` varchar(10) DEFAULT metaphon(`a` AS `a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a) VALUES ('Hello');
SELECT * FROM t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 34b899b3f00..faf645d9468 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1920,7 +1920,7 @@ create table t2 (b timestamp default now());
create view v1 as select a,b,t1.a < now() from t1,t2 where t1.a < now();
SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t2`.`b` AS `b`,(`t1`.`a` < now()) AS `t1.a < now()` from (`t1` join `t2`) where (`t1`.`a` < now()) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t2`.`b` AS `b`,(`t1`.`a` < current_timestamp()) AS `t1.a < now()` from (`t1` join `t2`) where (`t1`.`a` < current_timestamp()) latin1 latin1_swedish_ci
drop view v1;
drop table t1, t2;
CREATE TABLE t1 ( a varchar(50) );
@@ -2948,7 +2948,7 @@ create table t1 (f1 datetime);
create view v1 as select * from t1 where f1 between now() and now() + interval 1 minute;
show create view v1;
View Create View character_set_client collation_connection
-v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` where (`t1`.`f1` between now() and (now() + interval 1 minute)) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`f1` AS `f1` from `t1` where (`t1`.`f1` between current_timestamp() and (current_timestamp() + interval 1 minute)) latin1 latin1_swedish_ci
drop view v1;
drop table t1;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result
index 4b028e1da3d..89f29ff4b38 100644
--- a/mysql-test/suite/funcs_1/r/is_columns.result
+++ b/mysql-test/suite/funcs_1/r/is_columns.result
@@ -45,7 +45,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL
COLLATION_NAME varchar(32) YES NULL
COLUMN_TYPE longtext NO
COLUMN_KEY varchar(3) NO
-EXTRA varchar(27) NO
+EXTRA varchar(30) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(1024) NO
SHOW CREATE TABLE information_schema.COLUMNS;
@@ -68,7 +68,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`COLLATION_NAME` varchar(32) DEFAULT NULL,
`COLUMN_TYPE` longtext NOT NULL DEFAULT '',
`COLUMN_KEY` varchar(3) NOT NULL DEFAULT '',
- `EXTRA` varchar(27) NOT NULL DEFAULT '',
+ `EXTRA` varchar(30) NOT NULL DEFAULT '',
`PRIVILEGES` varchar(80) NOT NULL DEFAULT '',
`COLUMN_COMMENT` varchar(1024) NOT NULL DEFAULT ''
) DEFAULT CHARSET=utf8
@@ -91,7 +91,7 @@ CHARACTER_SET_NAME varchar(32) YES NULL
COLLATION_NAME varchar(32) YES NULL
COLUMN_TYPE longtext NO
COLUMN_KEY varchar(3) NO
-EXTRA varchar(27) NO
+EXTRA varchar(30) NO
PRIVILEGES varchar(80) NO
COLUMN_COMMENT varchar(1024) NO
SELECT table_catalog, table_schema, table_name, column_name
diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
index fd8989c7667..a005e39b0b4 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
@@ -645,7 +645,7 @@ def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double uns
def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references
def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references
def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references
-def test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
index 69c5d79b541..bc7a693d617 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -68,7 +68,7 @@ def information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL NULL u
def information_schema COLUMNS COLUMN_TYPE 16 NO longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext
def information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema COLUMNS DATETIME_PRECISION 13 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
-def information_schema COLUMNS EXTRA 18 NO varchar 27 81 NULL NULL NULL utf8 utf8_general_ci varchar(27)
+def information_schema COLUMNS EXTRA 18 NO varchar 30 90 NULL NULL NULL utf8 utf8_general_ci varchar(30)
def information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL NULL utf8 utf8_general_ci varchar(3)
def information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
@@ -602,7 +602,7 @@ NULL information_schema COLUMNS DATETIME_PRECISION bigint NULL NULL NULL NULL bi
3.0000 information_schema COLUMNS COLLATION_NAME varchar 32 96 utf8 utf8_general_ci varchar(32)
1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3)
-3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27)
+3.0000 information_schema COLUMNS EXTRA varchar 30 90 utf8 utf8_general_ci varchar(30)
3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80)
3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 190 570 utf8 utf8_general_ci varchar(190)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result
index 674abfaefab..fdb410fee7a 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_memory.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result
@@ -620,7 +620,7 @@ def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double uns
def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references
def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references
def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references
-def test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
index 6ce5f1bd8a0..823a3ffe214 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result
@@ -682,7 +682,7 @@ def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double uns
def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date select,insert,update,references
def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time select,insert,update,references
def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime select,insert,update,references
-def test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references
diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
index d89459a88ac..3b9f33f2917 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result
@@ -682,7 +682,7 @@ def test tb4 f217 42 NULL YES double NULL NULL 22 NULL NULL NULL NULL double uns
def test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL NULL date
def test tb4 f219 44 NULL YES time NULL NULL NULL NULL 0 NULL NULL time
def test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
-def test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def test tb4 f221 46 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4)
def test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4)
def test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL NULL year(4)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
index 2821e1112e5..832460e085b 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result
@@ -7,7 +7,7 @@ def mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL NULL utf8 utf8_gene
def mysql columns_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
-def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql columns_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references
def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
@@ -47,7 +47,7 @@ def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL N
def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql event collation_connection 20 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql event comment 16 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) select,insert,update,references
-def mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql event db 1 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
def mysql event db_collation 21 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql event definer 4 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) select,insert,update,references
@@ -70,7 +70,7 @@ def mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) sele
def mysql func type 4 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references
def mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
def mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
-def mysql general_log event_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) select,insert,update,references
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
@@ -124,7 +124,7 @@ def mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NU
def mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql proc collation_connection 18 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text select,insert,update,references
-def mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql proc db 1 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
def mysql proc db_collation 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32) select,insert,update,references
def mysql proc definer 12 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) select,insert,update,references
@@ -145,13 +145,13 @@ def mysql procs_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60
def mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references
def mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references
def mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references
-def mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql procs_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references
def mysql proxies_priv Grantor 6 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL select,insert,update,references
def mysql proxies_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
def mysql proxies_priv Proxied_host 3 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
def mysql proxies_priv Proxied_user 4 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references
-def mysql proxies_priv Timestamp 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql proxies_priv User 2 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references
def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1) select,insert,update,references
def mysql roles_mapping Admin_option 4 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
@@ -177,7 +177,7 @@ def mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int
def mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
def mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
def mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
-def mysql slow_log start_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql slow_log start_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6) select,insert,update,references
def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references
def mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references
@@ -186,7 +186,7 @@ def mysql tables_priv Grantor 5 NO char 141 423 NULL NULL NULL utf8 utf8_bin ch
def mysql tables_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
-def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
+def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp() select,insert,update,references
def mysql tables_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references
def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
index 006ed9d82f2..0a92e6edf24 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
@@ -7,7 +7,7 @@ def mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL NULL utf8 utf8_gene
def mysql columns_priv Db 2 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
-def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql columns_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql columns_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI
def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
@@ -47,7 +47,7 @@ def mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL N
def mysql event character_set_client 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql event collation_connection 20 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql event comment 16 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64)
-def mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql event created 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql event db 1 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
def mysql event db_collation 21 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql event definer 4 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141)
@@ -70,7 +70,7 @@ def mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1)
def mysql func type 4 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('function','aggregate')
def mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
def mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
-def mysql general_log event_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP
+def mysql general_log event_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6)
def mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned
def mysql general_log thread_id 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
@@ -124,7 +124,7 @@ def mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NU
def mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql proc collation_connection 18 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql proc comment 16 NULL NO text 65535 65535 NULL NULL NULL utf8 utf8_bin text
-def mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql proc created 13 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql proc db 1 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
def mysql proc db_collation 19 NULL YES char 32 96 NULL NULL NULL utf8 utf8_bin char(32)
def mysql proc definer 12 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141)
@@ -145,13 +145,13 @@ def mysql procs_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60
def mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
def mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI
def mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI
-def mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql procs_priv Timestamp 8 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql procs_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI
def mysql proxies_priv Grantor 6 NO char 141 423 NULL NULL NULL utf8 utf8_bin char(141) MUL
def mysql proxies_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql proxies_priv Proxied_host 3 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql proxies_priv Proxied_user 4 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI
-def mysql proxies_priv Timestamp 7 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql proxies_priv Timestamp 7 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql proxies_priv User 2 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI
def mysql proxies_priv With_grant 5 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(1)
def mysql roles_mapping Admin_option 4 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
@@ -177,7 +177,7 @@ def mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int
def mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
def mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned
def mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
-def mysql slow_log start_time 1 CURRENT_TIMESTAMP(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update CURRENT_TIMESTAMP
+def mysql slow_log start_time 1 current_timestamp(6) NO timestamp NULL NULL NULL NULL 6 NULL NULL timestamp(6) on update current_timestamp(6)
def mysql slow_log thread_id 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL NULL utf8 utf8_general_ci mediumtext
def mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References')
@@ -186,7 +186,7 @@ def mysql tables_priv Grantor 5 NO char 141 423 NULL NULL NULL utf8 utf8_bin ch
def mysql tables_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) PRI
def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
-def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
+def mysql tables_priv Timestamp 6 current_timestamp() NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update current_timestamp()
def mysql tables_priv User 3 NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI
def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index fa0badff96d..5deeeb23baa 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -486,7 +486,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) DEFAULT NULL,
`b` char(1) DEFAULT NULL,
- `c` char(2) GENERATED ALWAYS AS ((`a` or `b`)) VIRTUAL
+ `c` char(2) AS (((`a` <> 0) or (`b` <> 0))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES('1','1');
SELECT * FROM t1;
@@ -507,7 +507,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) DEFAULT NULL,
`b` char(1) DEFAULT NULL,
- `c` char(2) GENERATED ALWAYS AS (concat(`a`,`b`)) VIRTUAL
+ `c` char(2) AS (concat(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (a,b) VALUES('1','1');
SELECT * FROM t1;
@@ -534,7 +534,6 @@ ALTER TABLE t ADD b INTEGER AS (SUBSTR('','a',1));
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'a'
Warning 1292 Truncated incorrect INTEGER value: 'a'
-Warning 1292 Truncated incorrect INTEGER value: 'a'
DROP TABLE t;
set sql_mode= @save_old_sql_mode;
# Bug#21875520 Problems with virtual column indexes
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
index 6a738685a5d..d271edd37cf 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
@@ -81,7 +81,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -94,7 +94,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -114,7 +114,7 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t2;
Field Type Null Key Default Extra
@@ -136,7 +136,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -158,7 +158,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int generated always as (a % 2) virtual);
@@ -168,7 +168,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
drop table t2;
@@ -191,7 +191,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -203,7 +203,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -216,7 +216,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -229,7 +229,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (5 * 2) VIRTUAL
+ `b` int(11) AS ((5 * 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -294,9 +294,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a + 1) VIRTUAL,
- `c` varchar(12) AS ("aaaabb") PERSISTENT,
- `d` blob AS (c) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL,
+ `c` varchar(12) AS ('aaaabb') PERSISTENT,
+ `d` blob AS (`c`) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM t1 order by a;
a b c d
@@ -307,9 +307,9 @@ SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a + 1) VIRTUAL,
- `c` varchar(12) AS ("aaaabb") PERSISTENT,
- `d` blob AS (c) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL,
+ `c` varchar(12) AS ('aaaabb') PERSISTENT,
+ `d` blob AS (`c`) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE t3 AS SELECT * FROM t1;
SHOW CREATE TABLE t3;
@@ -604,7 +604,7 @@ Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL,
"b" varchar(10) DEFAULT NULL,
- "c" char(3) AS (substr(b,1,3)) VIRTUAL,
+ "c" char(3) AS (substr("b",1,3)) VIRTUAL,
PRIMARY KEY ("a"),
KEY "c" ("c")
)
@@ -619,7 +619,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` char(3) AS (substr(b,1,3)) VIRTUAL,
+ `c` char(3) AS (substr(`b`,1,3)) VIRTUAL,
PRIMARY KEY (`a`),
KEY `c` (`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
index f5f8afcc353..37cdc82710d 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
@@ -81,7 +81,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -94,7 +94,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -114,7 +114,7 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t2;
Field Type Null Key Default Extra
@@ -136,7 +136,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -158,7 +158,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int generated always as (a % 2) virtual);
@@ -168,7 +168,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t2;
@@ -191,7 +191,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -203,7 +203,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -216,7 +216,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -229,7 +229,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (5 * 2) VIRTUAL
+ `b` int(11) AS ((5 * 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -294,9 +294,9 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a + 1) VIRTUAL,
- `c` varchar(12) AS ("aaaabb") PERSISTENT,
- `d` blob AS (c) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL,
+ `c` varchar(12) AS ('aaaabb') PERSISTENT,
+ `d` blob AS (`c`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1 order by a;
a b c d
@@ -307,9 +307,9 @@ SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a + 1) VIRTUAL,
- `c` varchar(12) AS ("aaaabb") PERSISTENT,
- `d` blob AS (c) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL,
+ `c` varchar(12) AS ('aaaabb') PERSISTENT,
+ `d` blob AS (`c`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t3 AS SELECT * FROM t1;
SHOW CREATE TABLE t3;
@@ -604,7 +604,7 @@ Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) NOT NULL,
"b" varchar(10) DEFAULT NULL,
- "c" char(3) AS (substr(b,1,3)) VIRTUAL,
+ "c" char(3) AS (substr("b",1,3)) VIRTUAL,
PRIMARY KEY ("a"),
KEY "c" ("c")
)
@@ -619,7 +619,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` char(3) AS (substr(b,1,3)) VIRTUAL,
+ `c` char(3) AS (substr(`b`,1,3)) VIRTUAL,
PRIMARY KEY (`a`),
KEY `c` (`c`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
index ff3e7970f29..3f73b44607c 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result
@@ -11,7 +11,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -24,7 +24,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -46,7 +46,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -59,7 +59,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `a` (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
index 162035c999e..7a45008b9a2 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
@@ -11,7 +11,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) VIRTUAL,
+ `b` int(11) AS ((`a` * 2)) VIRTUAL,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -24,7 +24,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -37,7 +37,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) VIRTUAL,
+ `b` int(11) AS ((`a` * 2)) VIRTUAL,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -50,7 +50,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -75,7 +75,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) VIRTUAL,
+ `b` int(11) AS ((`a` * 2)) VIRTUAL,
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -90,7 +90,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -103,7 +103,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
diff --git a/mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result b/mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result
index aed3fbc8e0b..30d3abb3df0 100644
--- a/mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result
@@ -90,7 +90,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
@@ -101,7 +101,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
@@ -182,7 +182,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) VIRTUAL,
+ `c` int(11) AS (dayofyear(`b`)) VIRTUAL,
`b` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
@@ -203,7 +203,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) PERSISTENT,
+ `c` int(11) AS (dayofyear(`b`)) PERSISTENT,
`b` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
@@ -225,7 +225,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) VIRTUAL
+ `c` int(11) AS (week(`b`,1)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
DROP VIEW IF EXISTS v1,v2;
diff --git a/mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result b/mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result
index 2ebe751009c..2d3d57ab39d 100644
--- a/mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result
@@ -90,7 +90,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
@@ -101,7 +101,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
@@ -182,7 +182,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) VIRTUAL,
+ `c` int(11) AS (dayofyear(`b`)) VIRTUAL,
`b` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -203,7 +203,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) PERSISTENT,
+ `c` int(11) AS (dayofyear(`b`)) PERSISTENT,
`b` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -225,7 +225,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) VIRTUAL
+ `c` int(11) AS (week(`b`,1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
DROP VIEW IF EXISTS v1,v2;
diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
index 72021909e0f..e8d91e13e4d 100644
--- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
@@ -10,7 +10,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (abs(a)) VIRTUAL
+ `b` int(11) AS (abs(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-1, default);
select * from t1;
@@ -25,7 +25,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(acos(a),6)) VIRTUAL
+ `b` double AS (format(acos(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1, default);
insert into t1 values (1.0001,default);
@@ -44,7 +44,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(asin(a),6)) VIRTUAL
+ `b` double AS (format(asin(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (0.2, default);
insert into t1 values (1.0001,default);
@@ -62,7 +62,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -78,7 +78,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `c` double AS (format(atan(a),6)) VIRTUAL
+ `c` double AS (format(atan(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-2,default);
insert into t1 values (format(PI(),6),default);
@@ -96,7 +96,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan2(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -113,7 +113,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (ceil(a)) VIRTUAL
+ `b` int(11) AS (ceiling(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -132,7 +132,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (conv(a,b,c)) VIRTUAL
+ `d` varchar(10) AS (conv(`a`,`b`,`c`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a',16,2,default);
insert into t1 values ('6e',18,8,default);
@@ -153,7 +153,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cos(a),6)) VIRTUAL
+ `b` double AS (format(cos(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
select * from t1;
@@ -168,7 +168,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cot(a),6)) VIRTUAL
+ `b` double AS (format(cot(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (12,default);
@@ -184,7 +184,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (crc32(a)) VIRTUAL
+ `b` bigint(20) AS (crc32(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('mysql',default);
@@ -201,7 +201,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(degrees(a),6)) VIRTUAL
+ `b` double AS (format(degrees(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()/2,6),default);
@@ -218,7 +218,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a/2) VIRTUAL
+ `b` double AS ((`a` / 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -233,7 +233,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(exp(a),6)) VIRTUAL
+ `b` double AS (format(exp(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -252,7 +252,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` bigint(20) AS (floor(a)) VIRTUAL
+ `b` bigint(20) AS (floor(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -269,7 +269,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(ln(a),6)) VIRTUAL
+ `b` double AS (format(ln(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -287,7 +287,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(log(a,b),6)) VIRTUAL
+ `c` double AS (format(log(`a`,`b`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,65536,default);
insert into t1 values (10,100,default);
@@ -305,7 +305,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log(a),6)) VIRTUAL
+ `b` double AS (format(log(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -322,7 +322,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log2(a),6)) VIRTUAL
+ `b` double AS (format(log2(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
insert into t1 values (-100,default);
@@ -339,7 +339,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log10(a),6)) VIRTUAL
+ `b` double AS (format(log10(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (100,default);
@@ -358,7 +358,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a-1) VIRTUAL
+ `b` double AS ((`a` - 1)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -373,7 +373,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (mod(a,10)) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -390,7 +390,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 10) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -407,7 +407,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(10) AS (oct(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,8)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -422,7 +422,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(PI()*a*a,6)) VIRTUAL
+ `b` double AS (format(((pi() * `a`) * `a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -437,7 +437,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -452,8 +452,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (pow(a,2)) VIRTUAL,
- `c` int(11) AS (power(a,2)) VIRTUAL
+ `b` int(11) AS (pow(`a`,2)) VIRTUAL,
+ `c` int(11) AS (pow(`a`,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default,default);
insert into t1 values (2,default,default);
@@ -470,7 +470,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(radians(a),6)) VIRTUAL
+ `b` double AS (format(radians(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (90,default);
select * from t1;
@@ -485,7 +485,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (round(a)) VIRTUAL
+ `b` int(11) AS (round(`a`,0)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-1.23,default);
insert into t1 values (-1.58,default);
@@ -504,7 +504,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` int(11) AS (round(a,b)) VIRTUAL
+ `c` int(11) AS (round(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1.298,1,default);
insert into t1 values (1.298,0,default);
@@ -523,7 +523,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (sign(a)) VIRTUAL
+ `b` int(11) AS (sign(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-32,default);
insert into t1 values (0,default);
@@ -542,7 +542,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sin(a),6)) VIRTUAL
+ `b` double AS (format(sin(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (format(PI()/2,6),default);
select * from t1;
@@ -557,7 +557,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sqrt(a),6)) VIRTUAL
+ `b` double AS (format(sqrt(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (4,default);
insert into t1 values (20,default);
@@ -576,7 +576,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(tan(a),6)) VIRTUAL
+ `b` double AS (format(tan(`a`),6)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()+1,6),default);
@@ -593,7 +593,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a*3) VIRTUAL
+ `b` double AS ((`a` * 3)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -612,7 +612,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (truncate(a,4)) VIRTUAL
+ `b` double AS (truncate(`a`,4)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1.223,default);
insert into t1 values (1.999,default);
@@ -633,7 +633,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (-a) VIRTUAL
+ `b` double AS (-(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -653,7 +653,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(2) DEFAULT NULL,
- `b` int(11) AS (ascii(a)) VIRTUAL
+ `b` int(11) AS (ascii(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
insert into t1 values (2,default);
@@ -672,7 +672,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (bin(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -687,7 +687,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (bit_length(a)) VIRTUAL
+ `b` bigint(20) AS (bit_length(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -702,7 +702,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (char_length(a)) VIRTUAL
+ `b` bigint(20) AS (char_length(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -718,7 +718,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` varbinary(10) AS (char(a,b)) VIRTUAL
+ `c` varbinary(10) AS (char(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (77,121,default);
select * from t1;
@@ -733,7 +733,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (character_length(a)) VIRTUAL
+ `b` bigint(20) AS (char_length(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -749,7 +749,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat_ws(',',a,b)) VIRTUAL
+ `c` varchar(20) AS (concat_ws(',',`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -765,7 +765,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat(a,',',b)) VIRTUAL
+ `c` varchar(20) AS (concat(`a`,',',`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -782,7 +782,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (elt(c,a,b)) VIRTUAL
+ `d` varchar(10) AS (elt(`c`,`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',1,default);
insert into t1 values ('value1','value2',2,default);
@@ -799,7 +799,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (export_set(a,'1','0','',10)) VIRTUAL
+ `b` varchar(10) AS (export_set(`a`,'1','0','',10)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (6,default);
select * from t1;
@@ -815,7 +815,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (field('aa',a,b)) VIRTUAL
+ `c` int(11) AS (field('aa',`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('aa','bb',default);
insert into t1 values ('bb','aa',default);
@@ -833,7 +833,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (find_in_set(a,b)) VIRTUAL
+ `c` int(11) AS (find_in_set(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('aa','aa,bb,cc',default);
insert into t1 values ('aa','bb,aa,cc',default);
@@ -850,7 +850,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(20) AS (format(a,2)) VIRTUAL
+ `b` varchar(20) AS (format(`a`,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (12332.123456,default);
select * from t1;
@@ -865,7 +865,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (17,default);
select * from t1;
@@ -879,7 +879,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -895,7 +895,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (insert(a,length(a),length(b),b)) VIRTUAL
+ `c` varchar(20) AS (insert(`a`,length(`a`),length(`b`),`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('start,','end',default);
select * from t1;
@@ -911,7 +911,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (instr(a,b)) VIRTUAL
+ `c` int(11) AS (locate(`b`,`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar,','bar',default);
insert into t1 values ('xbar,','foobar',default);
@@ -928,7 +928,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lcase(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -943,7 +943,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(5) AS (left(a,5)) VIRTUAL
+ `b` varchar(5) AS (left(`a`,5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -958,7 +958,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -973,7 +973,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a like 'H%o') VIRTUAL
+ `b` tinyint(1) AS ((`a` like 'H%o')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -990,7 +990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (locate('bar',a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1005,7 +1005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lower(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1020,7 +1020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lpad(a,4,' ')) VIRTUAL
+ `b` varchar(10) AS (lpad(`a`,4,' ')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('M',default);
@@ -1037,7 +1037,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (ltrim(a)) VIRTUAL
+ `b` varchar(10) AS (ltrim(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (' MySQL',default);
insert into t1 values ('MySQL',default);
@@ -1056,7 +1056,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(30) AS (make_set(c,a,b)) VIRTUAL
+ `d` varchar(30) AS (make_set(`c`,`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a','b',1,default);
insert into t1 values ('a','b',3,default);
@@ -1073,7 +1073,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (mid(a,1,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,1,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1088,7 +1088,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not like 'H%o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` like 'H%o')))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1105,7 +1105,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` regexp 'H.+o')))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1122,7 +1122,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (octet_length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -1137,7 +1137,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (ord(a)) VIRTUAL
+ `b` bigint(20) AS (ord(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
select * from t1;
@@ -1152,7 +1152,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (position('bar' in a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1167,7 +1167,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (quote(a)) VIRTUAL
+ `b` varchar(10) AS (quote(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Don\'t',default);
select * from t1;
@@ -1182,7 +1182,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1199,7 +1199,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (repeat(a,3)) VIRTUAL
+ `b` varchar(30) AS (repeat(`a`,3)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1214,7 +1214,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (replace(a,'aa','bb')) VIRTUAL
+ `b` varchar(30) AS (replace(`a`,'aa','bb')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1229,7 +1229,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (reverse(a)) VIRTUAL
+ `b` varchar(30) AS (reverse(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1244,7 +1244,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (right(a,4)) VIRTUAL
+ `b` varchar(10) AS (right(`a`,4)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1259,7 +1259,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a rlike 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1276,7 +1276,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rpad(a,4,'??')) VIRTUAL
+ `b` varchar(10) AS (rpad(`a`,4,'??')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('He',default);
select * from t1;
@@ -1291,7 +1291,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rtrim(a)) VIRTUAL
+ `b` varchar(10) AS (rtrim(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello ',default);
select * from t1;
@@ -1306,7 +1306,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) AS (soundex(a)) VIRTUAL
+ `b` varchar(20) AS (soundex(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1322,7 +1322,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a sounds like b) VIRTUAL
+ `c` tinyint(1) AS ((soundex(`a`) = soundex(`b`))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello',default);
insert into t1 values ('Hello','MySQL',default);
@@ -1341,7 +1341,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (concat(a,space(5))) VIRTUAL
+ `b` varchar(10) AS (concat(`a`,space(5))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello', default);
select * from t1;
@@ -1357,7 +1357,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(9) DEFAULT NULL,
`b` varchar(9) DEFAULT NULL,
- `c` tinyint(1) AS (strcmp(a,b)) VIRTUAL
+ `c` tinyint(1) AS (strcmp(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello', default);
insert into t1 values ('Hello','Hello1', default);
@@ -1374,7 +1374,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substr(a,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1389,7 +1389,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (substring_index(a,'.',2)) VIRTUAL
+ `b` varchar(10) AS (substring_index(`a`,'.',2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('www.mysql.com',default);
select * from t1;
@@ -1404,7 +1404,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substring(a from 2 for 2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1419,7 +1419,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (trim(a)) VIRTUAL
+ `b` varchar(10) AS (trim(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (' aa ',default);
select * from t1;
@@ -1434,7 +1434,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (ucase(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1449,7 +1449,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (unhex(a)) VIRTUAL
+ `b` varchar(10) AS (unhex(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('4D7953514C',default);
select * from t1;
@@ -1464,7 +1464,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (upper(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1479,7 +1479,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (weight_string(a as char(4))) VIRTUAL
+ `b` varchar(10) AS (weight_string(`a`,0,4,65)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1497,7 +1497,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(16) AS (case a when NULL then 'asd' when 'b' then 'B' else a end) VIRTUAL
+ `b` varchar(16) AS ((case `a` when NULL then 'asd' when 'b' then 'B' else `a` end)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (NULL,default);
insert into t1 values ('b',default);
@@ -1517,7 +1517,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (if(a=1,a,b)) VIRTUAL
+ `c` int(11) AS (if((`a` = 1),`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,2,default);
insert into t1 values (3,4,default);
@@ -1535,7 +1535,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(10) AS (ifnull(a,'DEFAULT')) VIRTUAL
+ `c` varchar(10) AS (ifnull(`a`,'DEFAULT')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (NULL,'adf',default);
insert into t1 values ('a','adf',default);
@@ -1552,7 +1552,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (nullif(a,'DEFAULT')) VIRTUAL
+ `b` varchar(10) AS (nullif(`a`,'DEFAULT')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('DEFAULT',default);
insert into t1 values ('a',default);
@@ -1572,7 +1572,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a>0 && a<2) VIRTUAL
+ `b` tinyint(1) AS (((`a` > 0) and (`a` < 2))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1589,7 +1589,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` between 0 and 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1606,7 +1606,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varbinary(10) AS (binary a) VIRTUAL
+ `b` varbinary(10) AS (cast(`a` as char charset binary)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('11',default);
insert into t1 values (1,default);
@@ -1623,7 +1623,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a & 5) VIRTUAL
+ `b` int(11) AS ((`a` & 5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1640,7 +1640,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (~a) VIRTUAL
+ `b` int(11) AS (~(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
Warnings:
@@ -1657,7 +1657,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a | 5) VIRTUAL
+ `b` int(11) AS ((`a` | 5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1676,7 +1676,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a ^ 5) VIRTUAL
+ `b` int(11) AS ((`a` ^ 5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1695,7 +1695,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a div 5) VIRTUAL
+ `b` int(11) AS ((`a` DIV 5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (7,default);
@@ -1713,7 +1713,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` tinyint(1) AS (a <=> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <=> `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,1,default);
insert into t1 values (NULL,NULL,default);
@@ -1733,7 +1733,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a=b) VIRTUAL
+ `c` tinyint(1) AS ((`a` = `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1751,7 +1751,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a >= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` >= `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1769,7 +1769,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a > b) VIRTUAL
+ `c` tinyint(1) AS ((`a` > `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1786,7 +1786,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is not null) VIRTUAL
+ `b` tinyint(1) AS ((`a` is not null)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1803,7 +1803,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is null) VIRTUAL
+ `b` tinyint(1) AS (isnull(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1820,7 +1820,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a << 2) VIRTUAL
+ `b` int(11) AS ((`a` << 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (3,default);
@@ -1838,7 +1838,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <= `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1858,7 +1858,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a < b) VIRTUAL
+ `c` tinyint(1) AS ((`a` < `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1877,7 +1877,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a not between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` not between 0 and 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1895,7 +1895,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1915,7 +1915,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a != b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1934,7 +1934,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a>5 || a<3) VIRTUAL
+ `b` int(11) AS (((`a` > 5) or (`a` < 3))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (4,default);
@@ -1951,7 +1951,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a >> 2) VIRTUAL
+ `b` int(11) AS ((`a` >> 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (8,default);
insert into t1 values (3,default);
@@ -1968,7 +1968,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a xor 5) VIRTUAL
+ `b` int(11) AS ((`a` xor 5)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -1990,7 +1990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (adddate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2005,7 +2005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (addtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (addtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2020,7 +2020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (convert_tz(a,'MET','UTC')) VIRTUAL
+ `b` datetime AS (convert_tz(`a`,'MET','UTC')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2035,7 +2035,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_add(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2050,7 +2050,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(64) AS (date_format(a,'%W %M %D')) VIRTUAL
+ `b` varchar(64) AS (date_format(`a`,'%W %M %D')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2065,7 +2065,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_sub(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2080,7 +2080,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date(a)) VIRTUAL
+ `b` datetime AS (cast(`a` as date)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:00:00',default);
select * from t1;
@@ -2095,7 +2095,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (datediff(a,'2000-01-01')) VIRTUAL
+ `b` bigint(20) AS ((to_days(`a`) - to_days('2000-01-01'))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2110,7 +2110,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (day(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2125,7 +2125,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(10) AS (dayname(a)) VIRTUAL
+ `b` varchar(10) AS (dayname(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2140,7 +2140,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofmonth(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2155,7 +2155,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofweek(a)) VIRTUAL
+ `b` int(11) AS (dayofweek(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2170,7 +2170,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofyear(a)) VIRTUAL
+ `b` int(11) AS (dayofyear(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2185,7 +2185,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (extract(year from a)) VIRTUAL
+ `b` int(11) AS (extract(year from `a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2200,7 +2200,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` datetime AS (from_days(a)) VIRTUAL
+ `b` datetime AS (from_days(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (730669,default);
select * from t1;
@@ -2215,7 +2215,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` datetime AS (from_unixtime(a)) VIRTUAL
+ `b` datetime AS (from_unixtime(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1196440219,default);
select * from t1;
@@ -2230,7 +2230,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(32) AS (date_format(a,get_format(DATE,'EUR'))) VIRTUAL
+ `b` varchar(32) AS (date_format(`a`,get_format(DATE, 'EUR'))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2245,7 +2245,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` bigint(20) AS (hour(a)) VIRTUAL
+ `b` bigint(20) AS (hour(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2260,7 +2260,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (last_day(a)) VIRTUAL
+ `b` datetime AS (last_day(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-05',default);
insert into t1 values ('2003-02-32',default);
@@ -2279,7 +2279,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` datetime AS (makedate(a,1)) VIRTUAL
+ `b` datetime AS (makedate(`a`,1)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2001,default);
select * from t1;
@@ -2294,7 +2294,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` time AS (maketime(a,1,3)) VIRTUAL
+ `b` time AS (maketime(`a`,1,3)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -2309,7 +2309,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (microsecond(a)) VIRTUAL
+ `b` bigint(20) AS (microsecond(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 12:00:00.123456',default);
insert into t1 values ('2009-12-31 23:59:59.000010',default);
@@ -2326,7 +2326,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (minute(a)) VIRTUAL
+ `b` int(11) AS (minute(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2341,7 +2341,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (month(a)) VIRTUAL
+ `b` int(11) AS (month(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2356,7 +2356,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(16) AS (monthname(a)) VIRTUAL
+ `b` varchar(16) AS (monthname(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2371,7 +2371,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (period_add(a,2)) VIRTUAL
+ `b` int(11) AS (period_add(`a`,2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (200801,default);
select * from t1;
@@ -2387,7 +2387,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (period_diff(a,b)) VIRTUAL
+ `c` int(11) AS (period_diff(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (200802,200703,default);
select * from t1;
@@ -2402,7 +2402,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (quarter(a)) VIRTUAL
+ `b` int(11) AS (quarter(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2417,7 +2417,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` time AS (sec_to_time(a)) VIRTUAL
+ `b` time AS (sec_to_time(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2378,default);
select * from t1;
@@ -2432,7 +2432,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (second(a)) VIRTUAL
+ `b` int(11) AS (second(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2447,7 +2447,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(64) DEFAULT NULL,
- `b` datetime AS (str_to_date(a,'%m/%d/%Y')) VIRTUAL
+ `b` datetime AS (str_to_date(`a`,'%m/%d/%Y')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('04/30/2004',default);
select * from t1;
@@ -2462,7 +2462,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subdate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2477,7 +2477,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (subtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2492,7 +2492,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(32) AS (time_format(a,'%r')) VIRTUAL
+ `b` varchar(32) AS (time_format(`a`,'%r')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:03:04',default);
select * from t1;
@@ -2507,7 +2507,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` bigint(20) AS (time_to_sec(a)) VIRTUAL
+ `b` bigint(20) AS (time_to_sec(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('22:23:00',default);
select * from t1;
@@ -2522,7 +2522,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` time AS (time(a)) VIRTUAL
+ `b` time AS (cast(`a` as time)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:03:04',default);
select * from t1;
@@ -2538,7 +2538,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` time AS (timediff(a,b)) VIRTUAL
+ `c` time AS (timediff(`a`,`b`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default);
select * from t1;
@@ -2553,7 +2553,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestamp(a)) VIRTUAL
+ `b` timestamp AS (cast(`a` as datetime)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31',default);
select * from t1;
@@ -2568,7 +2568,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestampadd(minute,1,a)) VIRTUAL
+ `b` timestamp AS ((`a` + interval 1 minute)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2003-01-02',default);
select * from t1;
@@ -2582,8 +2582,8 @@ create table t1 (a timestamp, c bigint generated always as (timestampdiff(MONTH,
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `c` bigint(20) AS (timestampdiff(MONTH, a, a)) VIRTUAL
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `c` bigint(20) AS (timestampdiff(MONTH,`a`,`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-01',default);
select * from t1;
@@ -2598,7 +2598,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (to_days(a)) VIRTUAL
+ `b` bigint(20) AS (to_days(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2007-10-07',default);
select * from t1;
@@ -2613,7 +2613,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (week(a)) VIRTUAL
+ `b` int(11) AS (week(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2628,7 +2628,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekday(a)) VIRTUAL
+ `b` int(11) AS (weekday(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2643,7 +2643,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekofyear(a)) VIRTUAL
+ `b` int(11) AS (week(`a`,3)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2658,7 +2658,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (year(a)) VIRTUAL
+ `b` int(11) AS (year(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2673,7 +2673,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (yearweek(a)) VIRTUAL
+ `b` int(11) AS (yearweek(`a`,0)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2695,7 +2695,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` bigint(20) unsigned AS (cast(a as unsigned)) VIRTUAL
+ `b` bigint(20) unsigned AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2716,7 +2716,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` bigint(20) unsigned AS (convert(a,unsigned)) VIRTUAL
+ `b` bigint(20) unsigned AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2740,7 +2740,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (ExtractValue(a,'/b')) VIRTUAL
+ `b` varchar(1024) AS (extractvalue(`a`,'/b')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('<b>text</b>',default);
select * from t1;
@@ -2759,7 +2759,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (aes_encrypt(aes_decrypt(a,'adf'),'adf')) VIRTUAL
+ `b` varchar(1024) AS (aes_encrypt(aes_decrypt(`a`,'adf'),'adf')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2774,7 +2774,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (bit_count(a)) VIRTUAL
+ `b` int(11) AS (bit_count(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (5,default);
select * from t1;
@@ -2789,7 +2789,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (charset(a)) VIRTUAL
+ `b` varchar(1024) AS (charset(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2804,7 +2804,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` int(11) AS (coercibility(a)) VIRTUAL
+ `b` int(11) AS (coercibility(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2819,7 +2819,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (collation(a)) VIRTUAL
+ `b` varchar(1024) AS (collation(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2834,7 +2834,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (uncompress(compress(a))) VIRTUAL
+ `b` varchar(1024) AS (uncompress(compress(`a`))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2849,7 +2849,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (decode(encode(a,'abc'),'abc')) VIRTUAL
+ `b` varchar(1024) AS (decode(encode(`a`,'abc'),'abc')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2864,7 +2864,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT 'aaa',
- `b` varchar(1024) AS (ifnull(a,default(a))) VIRTUAL
+ `b` varchar(1024) AS (ifnull(`a`,default(`a`))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('any value',default);
select * from t1;
@@ -2878,7 +2878,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (des_encrypt(des_decrypt(a,'adf'),'adf')) VIRTUAL
+ `b` varchar(1024) AS (des_encrypt(des_decrypt(`a`,'adf'),'adf')) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2893,7 +2893,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (inet_ntoa(inet_aton(a))) VIRTUAL
+ `b` varchar(1024) AS (inet_ntoa(inet_aton(`a`))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('127.0.0.1',default);
select * from t1;
@@ -2908,7 +2908,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varbinary(32) AS (md5(a)) VIRTUAL
+ `b` varbinary(32) AS (md5(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('testing',default);
select * from t1;
@@ -2923,7 +2923,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (password(a)) VIRTUAL
+ `b` varchar(1024) AS (password(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('badpwd',default);
select * from t1;
@@ -2938,7 +2938,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha1(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2953,7 +2953,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2968,7 +2968,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha2(a,224)) VIRTUAL
+ `b` varchar(1024) AS (sha2(`a`,224)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2983,7 +2983,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) DEFAULT NULL,
- `b` varchar(1024) AS (uncompressed_length(compress(repeat(a,30)))) VIRTUAL
+ `b` varchar(1024) AS (uncompressed_length(compress(repeat(`a`,30)))) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values ('a',default);
select * from t1;
diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
index add3a6a3fe0..905645f2972 100644
--- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
@@ -10,7 +10,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (abs(a)) VIRTUAL
+ `b` int(11) AS (abs(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1, default);
select * from t1;
@@ -25,7 +25,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(acos(a),6)) VIRTUAL
+ `b` double AS (format(acos(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1, default);
insert into t1 values (1.0001,default);
@@ -44,7 +44,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(asin(a),6)) VIRTUAL
+ `b` double AS (format(asin(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0.2, default);
insert into t1 values (1.0001,default);
@@ -62,7 +62,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -78,7 +78,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `c` double AS (format(atan(a),6)) VIRTUAL
+ `c` double AS (format(atan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,default);
insert into t1 values (format(PI(),6),default);
@@ -96,7 +96,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan2(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -113,7 +113,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (ceil(a)) VIRTUAL
+ `b` int(11) AS (ceiling(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -132,7 +132,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (conv(a,b,c)) VIRTUAL
+ `d` varchar(10) AS (conv(`a`,`b`,`c`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a',16,2,default);
insert into t1 values ('6e',18,8,default);
@@ -153,7 +153,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cos(a),6)) VIRTUAL
+ `b` double AS (format(cos(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
select * from t1;
@@ -168,7 +168,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cot(a),6)) VIRTUAL
+ `b` double AS (format(cot(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (12,default);
@@ -184,7 +184,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (crc32(a)) VIRTUAL
+ `b` bigint(20) AS (crc32(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('mysql',default);
@@ -201,7 +201,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(degrees(a),6)) VIRTUAL
+ `b` double AS (format(degrees(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()/2,6),default);
@@ -218,7 +218,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a/2) VIRTUAL
+ `b` double AS ((`a` / 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -233,7 +233,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(exp(a),6)) VIRTUAL
+ `b` double AS (format(exp(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -252,7 +252,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` bigint(20) AS (floor(a)) VIRTUAL
+ `b` bigint(20) AS (floor(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -269,7 +269,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(ln(a),6)) VIRTUAL
+ `b` double AS (format(ln(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -287,7 +287,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(log(a,b),6)) VIRTUAL
+ `c` double AS (format(log(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,65536,default);
insert into t1 values (10,100,default);
@@ -305,7 +305,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log(a),6)) VIRTUAL
+ `b` double AS (format(log(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -322,7 +322,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log2(a),6)) VIRTUAL
+ `b` double AS (format(log2(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
insert into t1 values (-100,default);
@@ -339,7 +339,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log10(a),6)) VIRTUAL
+ `b` double AS (format(log10(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (100,default);
@@ -358,7 +358,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a-1) VIRTUAL
+ `b` double AS ((`a` - 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -373,7 +373,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (mod(a,10)) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -390,7 +390,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 10) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -407,7 +407,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(10) AS (oct(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,8)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -422,7 +422,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(PI()*a*a,6)) VIRTUAL
+ `b` double AS (format(((pi() * `a`) * `a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -437,7 +437,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -452,8 +452,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (pow(a,2)) VIRTUAL,
- `c` int(11) AS (power(a,2)) VIRTUAL
+ `b` int(11) AS (pow(`a`,2)) VIRTUAL,
+ `c` int(11) AS (pow(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default,default);
insert into t1 values (2,default,default);
@@ -470,7 +470,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(radians(a),6)) VIRTUAL
+ `b` double AS (format(radians(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (90,default);
select * from t1;
@@ -485,7 +485,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (round(a)) VIRTUAL
+ `b` int(11) AS (round(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1.23,default);
insert into t1 values (-1.58,default);
@@ -504,7 +504,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` int(11) AS (round(a,b)) VIRTUAL
+ `c` int(11) AS (round(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.298,1,default);
insert into t1 values (1.298,0,default);
@@ -523,7 +523,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (sign(a)) VIRTUAL
+ `b` int(11) AS (sign(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-32,default);
insert into t1 values (0,default);
@@ -542,7 +542,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sin(a),6)) VIRTUAL
+ `b` double AS (format(sin(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI()/2,6),default);
select * from t1;
@@ -557,7 +557,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sqrt(a),6)) VIRTUAL
+ `b` double AS (format(sqrt(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (4,default);
insert into t1 values (20,default);
@@ -576,7 +576,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(tan(a),6)) VIRTUAL
+ `b` double AS (format(tan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()+1,6),default);
@@ -593,7 +593,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a*3) VIRTUAL
+ `b` double AS ((`a` * 3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -612,7 +612,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (truncate(a,4)) VIRTUAL
+ `b` double AS (truncate(`a`,4)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.223,default);
insert into t1 values (1.999,default);
@@ -633,7 +633,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (-a) VIRTUAL
+ `b` double AS (-(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -653,7 +653,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(2) DEFAULT NULL,
- `b` int(11) AS (ascii(a)) VIRTUAL
+ `b` int(11) AS (ascii(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
insert into t1 values (2,default);
@@ -672,7 +672,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (bin(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -687,7 +687,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (bit_length(a)) VIRTUAL
+ `b` bigint(20) AS (bit_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -702,7 +702,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (char_length(a)) VIRTUAL
+ `b` bigint(20) AS (char_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -718,7 +718,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` varbinary(10) AS (char(a,b)) VIRTUAL
+ `c` varbinary(10) AS (char(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (77,121,default);
select * from t1;
@@ -733,7 +733,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (character_length(a)) VIRTUAL
+ `b` bigint(20) AS (char_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -749,7 +749,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat_ws(',',a,b)) VIRTUAL
+ `c` varchar(20) AS (concat_ws(',',`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -765,7 +765,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat(a,',',b)) VIRTUAL
+ `c` varchar(20) AS (concat(`a`,',',`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -782,7 +782,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (elt(c,a,b)) VIRTUAL
+ `d` varchar(10) AS (elt(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',1,default);
insert into t1 values ('value1','value2',2,default);
@@ -799,7 +799,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (export_set(a,'1','0','',10)) VIRTUAL
+ `b` varchar(10) AS (export_set(`a`,'1','0','',10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (6,default);
select * from t1;
@@ -815,7 +815,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (field('aa',a,b)) VIRTUAL
+ `c` int(11) AS (field('aa',`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','bb',default);
insert into t1 values ('bb','aa',default);
@@ -833,7 +833,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (find_in_set(a,b)) VIRTUAL
+ `c` int(11) AS (find_in_set(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','aa,bb,cc',default);
insert into t1 values ('aa','bb,aa,cc',default);
@@ -850,7 +850,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(20) AS (format(a,2)) VIRTUAL
+ `b` varchar(20) AS (format(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12332.123456,default);
select * from t1;
@@ -865,7 +865,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (17,default);
select * from t1;
@@ -879,7 +879,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -895,7 +895,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (insert(a,length(a),length(b),b)) VIRTUAL
+ `c` varchar(20) AS (insert(`a`,length(`a`),length(`b`),`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('start,','end',default);
select * from t1;
@@ -911,7 +911,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (instr(a,b)) VIRTUAL
+ `c` int(11) AS (locate(`b`,`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar,','bar',default);
insert into t1 values ('xbar,','foobar',default);
@@ -928,7 +928,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lcase(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -943,7 +943,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(5) AS (left(a,5)) VIRTUAL
+ `b` varchar(5) AS (left(`a`,5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -958,7 +958,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -973,7 +973,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a like 'H%o') VIRTUAL
+ `b` tinyint(1) AS ((`a` like 'H%o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -990,7 +990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (locate('bar',a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1005,7 +1005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lower(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1020,7 +1020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lpad(a,4,' ')) VIRTUAL
+ `b` varchar(10) AS (lpad(`a`,4,' ')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('M',default);
@@ -1037,7 +1037,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (ltrim(a)) VIRTUAL
+ `b` varchar(10) AS (ltrim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (' MySQL',default);
insert into t1 values ('MySQL',default);
@@ -1056,7 +1056,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(30) AS (make_set(c,a,b)) VIRTUAL
+ `d` varchar(30) AS (make_set(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',1,default);
insert into t1 values ('a','b',3,default);
@@ -1073,7 +1073,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (mid(a,1,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,1,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1088,7 +1088,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not like 'H%o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` like 'H%o')))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1105,7 +1105,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` regexp 'H.+o')))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1122,7 +1122,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (octet_length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -1137,7 +1137,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` bigint(20) AS (ord(a)) VIRTUAL
+ `b` bigint(20) AS (ord(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
select * from t1;
@@ -1152,7 +1152,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (position('bar' in a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1167,7 +1167,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (quote(a)) VIRTUAL
+ `b` varchar(10) AS (quote(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Don\'t',default);
select * from t1;
@@ -1182,7 +1182,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1199,7 +1199,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (repeat(a,3)) VIRTUAL
+ `b` varchar(30) AS (repeat(`a`,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1214,7 +1214,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (replace(a,'aa','bb')) VIRTUAL
+ `b` varchar(30) AS (replace(`a`,'aa','bb')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1229,7 +1229,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (reverse(a)) VIRTUAL
+ `b` varchar(30) AS (reverse(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1244,7 +1244,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (right(a,4)) VIRTUAL
+ `b` varchar(10) AS (right(`a`,4)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1259,7 +1259,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a rlike 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1276,7 +1276,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rpad(a,4,'??')) VIRTUAL
+ `b` varchar(10) AS (rpad(`a`,4,'??')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('He',default);
select * from t1;
@@ -1291,7 +1291,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rtrim(a)) VIRTUAL
+ `b` varchar(10) AS (rtrim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello ',default);
select * from t1;
@@ -1306,7 +1306,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) AS (soundex(a)) VIRTUAL
+ `b` varchar(20) AS (soundex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1322,7 +1322,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a sounds like b) VIRTUAL
+ `c` tinyint(1) AS ((soundex(`a`) = soundex(`b`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello',default);
insert into t1 values ('Hello','MySQL',default);
@@ -1341,7 +1341,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (concat(a,space(5))) VIRTUAL
+ `b` varchar(10) AS (concat(`a`,space(5))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello', default);
select * from t1;
@@ -1357,7 +1357,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(9) DEFAULT NULL,
`b` varchar(9) DEFAULT NULL,
- `c` tinyint(1) AS (strcmp(a,b)) VIRTUAL
+ `c` tinyint(1) AS (strcmp(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello', default);
insert into t1 values ('Hello','Hello1', default);
@@ -1374,7 +1374,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substr(a,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1389,7 +1389,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (substring_index(a,'.',2)) VIRTUAL
+ `b` varchar(10) AS (substring_index(`a`,'.',2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('www.mysql.com',default);
select * from t1;
@@ -1404,7 +1404,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substring(a from 2 for 2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1419,7 +1419,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (trim(a)) VIRTUAL
+ `b` varchar(10) AS (trim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (' aa ',default);
select * from t1;
@@ -1434,7 +1434,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (ucase(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1449,7 +1449,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (unhex(a)) VIRTUAL
+ `b` varchar(10) AS (unhex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('4D7953514C',default);
select * from t1;
@@ -1464,7 +1464,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (upper(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1479,7 +1479,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (weight_string(a as char(4))) VIRTUAL
+ `b` varchar(10) AS (weight_string(`a`,0,4,65)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1497,7 +1497,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(16) AS (case a when NULL then 'asd' when 'b' then 'B' else a end) VIRTUAL
+ `b` varchar(16) AS ((case `a` when NULL then 'asd' when 'b' then 'B' else `a` end)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,default);
insert into t1 values ('b',default);
@@ -1517,7 +1517,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (if(a=1,a,b)) VIRTUAL
+ `c` int(11) AS (if((`a` = 1),`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,2,default);
insert into t1 values (3,4,default);
@@ -1535,7 +1535,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(10) AS (ifnull(a,'DEFAULT')) VIRTUAL
+ `c` varchar(10) AS (ifnull(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,'adf',default);
insert into t1 values ('a','adf',default);
@@ -1552,7 +1552,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (nullif(a,'DEFAULT')) VIRTUAL
+ `b` varchar(10) AS (nullif(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('DEFAULT',default);
insert into t1 values ('a',default);
@@ -1572,7 +1572,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a>0 && a<2) VIRTUAL
+ `b` tinyint(1) AS (((`a` > 0) and (`a` < 2))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1589,7 +1589,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1606,7 +1606,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varbinary(10) AS (binary a) VIRTUAL
+ `b` varbinary(10) AS (cast(`a` as char charset binary)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('11',default);
insert into t1 values (1,default);
@@ -1623,7 +1623,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a & 5) VIRTUAL
+ `b` int(11) AS ((`a` & 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1640,7 +1640,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (~a) VIRTUAL
+ `b` int(11) AS (~(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
Warnings:
@@ -1657,7 +1657,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a | 5) VIRTUAL
+ `b` int(11) AS ((`a` | 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1676,7 +1676,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a ^ 5) VIRTUAL
+ `b` int(11) AS ((`a` ^ 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1695,7 +1695,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a div 5) VIRTUAL
+ `b` int(11) AS ((`a` DIV 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (7,default);
@@ -1713,7 +1713,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` tinyint(1) AS (a <=> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <=> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,1,default);
insert into t1 values (NULL,NULL,default);
@@ -1733,7 +1733,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a=b) VIRTUAL
+ `c` tinyint(1) AS ((`a` = `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1751,7 +1751,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a >= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` >= `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1769,7 +1769,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a > b) VIRTUAL
+ `c` tinyint(1) AS ((`a` > `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1786,7 +1786,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is not null) VIRTUAL
+ `b` tinyint(1) AS ((`a` is not null)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1803,7 +1803,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is null) VIRTUAL
+ `b` tinyint(1) AS (isnull(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1820,7 +1820,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a << 2) VIRTUAL
+ `b` int(11) AS ((`a` << 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (3,default);
@@ -1838,7 +1838,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <= `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1858,7 +1858,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a < b) VIRTUAL
+ `c` tinyint(1) AS ((`a` < `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1877,7 +1877,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a not between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` not between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1895,7 +1895,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1915,7 +1915,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a != b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1934,7 +1934,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a>5 || a<3) VIRTUAL
+ `b` int(11) AS (((`a` > 5) or (`a` < 3))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (4,default);
@@ -1951,7 +1951,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a >> 2) VIRTUAL
+ `b` int(11) AS ((`a` >> 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (8,default);
insert into t1 values (3,default);
@@ -1968,7 +1968,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a xor 5) VIRTUAL
+ `b` int(11) AS ((`a` xor 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -1990,7 +1990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (adddate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2005,7 +2005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (addtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (addtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2020,7 +2020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (convert_tz(a,'MET','UTC')) VIRTUAL
+ `b` datetime AS (convert_tz(`a`,'MET','UTC')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2035,7 +2035,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_add(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2050,7 +2050,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(64) AS (date_format(a,'%W %M %D')) VIRTUAL
+ `b` varchar(64) AS (date_format(`a`,'%W %M %D')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2065,7 +2065,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_sub(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2080,7 +2080,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date(a)) VIRTUAL
+ `b` datetime AS (cast(`a` as date)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:00:00',default);
select * from t1;
@@ -2095,7 +2095,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (datediff(a,'2000-01-01')) VIRTUAL
+ `b` bigint(20) AS ((to_days(`a`) - to_days('2000-01-01'))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2110,7 +2110,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (day(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2125,7 +2125,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(10) AS (dayname(a)) VIRTUAL
+ `b` varchar(10) AS (dayname(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2140,7 +2140,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofmonth(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2155,7 +2155,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofweek(a)) VIRTUAL
+ `b` int(11) AS (dayofweek(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2170,7 +2170,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofyear(a)) VIRTUAL
+ `b` int(11) AS (dayofyear(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2185,7 +2185,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (extract(year from a)) VIRTUAL
+ `b` int(11) AS (extract(year from `a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2200,7 +2200,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` datetime AS (from_days(a)) VIRTUAL
+ `b` datetime AS (from_days(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (730669,default);
select * from t1;
@@ -2215,7 +2215,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` datetime AS (from_unixtime(a)) VIRTUAL
+ `b` datetime AS (from_unixtime(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1196440219,default);
select * from t1;
@@ -2230,7 +2230,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(32) AS (date_format(a,get_format(DATE,'EUR'))) VIRTUAL
+ `b` varchar(32) AS (date_format(`a`,get_format(DATE, 'EUR'))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2245,7 +2245,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` bigint(20) AS (hour(a)) VIRTUAL
+ `b` bigint(20) AS (hour(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2260,7 +2260,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (last_day(a)) VIRTUAL
+ `b` datetime AS (last_day(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-05',default);
insert into t1 values ('2003-02-32',default);
@@ -2279,7 +2279,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` datetime AS (makedate(a,1)) VIRTUAL
+ `b` datetime AS (makedate(`a`,1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2001,default);
select * from t1;
@@ -2294,7 +2294,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` time AS (maketime(a,1,3)) VIRTUAL
+ `b` time AS (maketime(`a`,1,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -2309,7 +2309,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (microsecond(a)) VIRTUAL
+ `b` bigint(20) AS (microsecond(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 12:00:00.123456',default);
insert into t1 values ('2009-12-31 23:59:59.000010',default);
@@ -2326,7 +2326,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (minute(a)) VIRTUAL
+ `b` int(11) AS (minute(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2341,7 +2341,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (month(a)) VIRTUAL
+ `b` int(11) AS (month(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2356,7 +2356,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(16) AS (monthname(a)) VIRTUAL
+ `b` varchar(16) AS (monthname(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2371,7 +2371,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (period_add(a,2)) VIRTUAL
+ `b` int(11) AS (period_add(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (200801,default);
select * from t1;
@@ -2387,7 +2387,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (period_diff(a,b)) VIRTUAL
+ `c` int(11) AS (period_diff(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (200802,200703,default);
select * from t1;
@@ -2402,7 +2402,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (quarter(a)) VIRTUAL
+ `b` int(11) AS (quarter(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2417,7 +2417,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` time AS (sec_to_time(a)) VIRTUAL
+ `b` time AS (sec_to_time(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2378,default);
select * from t1;
@@ -2432,7 +2432,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (second(a)) VIRTUAL
+ `b` int(11) AS (second(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2447,7 +2447,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(64) DEFAULT NULL,
- `b` datetime AS (str_to_date(a,'%m/%d/%Y')) VIRTUAL
+ `b` datetime AS (str_to_date(`a`,'%m/%d/%Y')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('04/30/2004',default);
select * from t1;
@@ -2462,7 +2462,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subdate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2477,7 +2477,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (subtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2492,7 +2492,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(32) AS (time_format(a,'%r')) VIRTUAL
+ `b` varchar(32) AS (time_format(`a`,'%r')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:03:04',default);
select * from t1;
@@ -2507,7 +2507,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` bigint(20) AS (time_to_sec(a)) VIRTUAL
+ `b` bigint(20) AS (time_to_sec(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('22:23:00',default);
select * from t1;
@@ -2522,7 +2522,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` time AS (time(a)) VIRTUAL
+ `b` time AS (cast(`a` as time)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:03:04',default);
select * from t1;
@@ -2538,7 +2538,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` time AS (timediff(a,b)) VIRTUAL
+ `c` time AS (timediff(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default);
select * from t1;
@@ -2553,7 +2553,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestamp(a)) VIRTUAL
+ `b` timestamp AS (cast(`a` as datetime)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31',default);
select * from t1;
@@ -2568,7 +2568,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestampadd(minute,1,a)) VIRTUAL
+ `b` timestamp AS ((`a` + interval 1 minute)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-01-02',default);
select * from t1;
@@ -2582,8 +2582,8 @@ create table t1 (a timestamp, c bigint generated always as (timestampdiff(MONTH,
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `c` bigint(20) AS (timestampdiff(MONTH, a, a)) VIRTUAL
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `c` bigint(20) AS (timestampdiff(MONTH,`a`,`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-01',default);
select * from t1;
@@ -2598,7 +2598,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` bigint(20) AS (to_days(a)) VIRTUAL
+ `b` bigint(20) AS (to_days(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2007-10-07',default);
select * from t1;
@@ -2613,7 +2613,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (week(a)) VIRTUAL
+ `b` int(11) AS (week(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2628,7 +2628,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekday(a)) VIRTUAL
+ `b` int(11) AS (weekday(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2643,7 +2643,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekofyear(a)) VIRTUAL
+ `b` int(11) AS (week(`a`,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2658,7 +2658,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (year(a)) VIRTUAL
+ `b` int(11) AS (year(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2673,7 +2673,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (yearweek(a)) VIRTUAL
+ `b` int(11) AS (yearweek(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2695,7 +2695,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` bigint(20) unsigned AS (cast(a as unsigned)) VIRTUAL
+ `b` bigint(20) unsigned AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2716,7 +2716,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` bigint(20) unsigned AS (convert(a,unsigned)) VIRTUAL
+ `b` bigint(20) unsigned AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2740,7 +2740,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (ExtractValue(a,'/b')) VIRTUAL
+ `b` varchar(1024) AS (extractvalue(`a`,'/b')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('<b>text</b>',default);
select * from t1;
@@ -2759,7 +2759,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (aes_encrypt(aes_decrypt(a,'adf'),'adf')) VIRTUAL
+ `b` varchar(1024) AS (aes_encrypt(aes_decrypt(`a`,'adf'),'adf')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2774,7 +2774,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (bit_count(a)) VIRTUAL
+ `b` int(11) AS (bit_count(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (5,default);
select * from t1;
@@ -2789,7 +2789,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (charset(a)) VIRTUAL
+ `b` varchar(1024) AS (charset(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2804,7 +2804,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` int(11) AS (coercibility(a)) VIRTUAL
+ `b` int(11) AS (coercibility(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2819,7 +2819,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (collation(a)) VIRTUAL
+ `b` varchar(1024) AS (collation(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2834,7 +2834,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (uncompress(compress(a))) VIRTUAL
+ `b` varchar(1024) AS (uncompress(compress(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2849,7 +2849,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (decode(encode(a,'abc'),'abc')) VIRTUAL
+ `b` varchar(1024) AS (decode(encode(`a`,'abc'),'abc')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2864,7 +2864,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT 'aaa',
- `b` varchar(1024) AS (ifnull(a,default(a))) VIRTUAL
+ `b` varchar(1024) AS (ifnull(`a`,default(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('any value',default);
select * from t1;
@@ -2878,7 +2878,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (des_encrypt(des_decrypt(a,'adf'),'adf')) VIRTUAL
+ `b` varchar(1024) AS (des_encrypt(des_decrypt(`a`,'adf'),'adf')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2893,7 +2893,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (inet_ntoa(inet_aton(a))) VIRTUAL
+ `b` varchar(1024) AS (inet_ntoa(inet_aton(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('127.0.0.1',default);
select * from t1;
@@ -2908,7 +2908,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varbinary(32) AS (md5(a)) VIRTUAL
+ `b` varbinary(32) AS (md5(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('testing',default);
select * from t1;
@@ -2923,7 +2923,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (password(a)) VIRTUAL
+ `b` varchar(1024) AS (password(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('badpwd',default);
select * from t1;
@@ -2938,7 +2938,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha1(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2953,7 +2953,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2968,7 +2968,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha2(a,224)) VIRTUAL
+ `b` varchar(1024) AS (sha2(`a`,224)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2983,7 +2983,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) DEFAULT NULL,
- `b` varchar(1024) AS (uncompressed_length(compress(repeat(a,30)))) VIRTUAL
+ `b` varchar(1024) AS (uncompressed_length(compress(repeat(`a`,30)))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a',default);
select * from t1;
diff --git a/mysql-test/suite/gcol/r/rpl_gcol.result b/mysql-test/suite/gcol/r/rpl_gcol.result
index 245ce3ba2e5..3174858faa6 100644
--- a/mysql-test/suite/gcol/r/rpl_gcol.result
+++ b/mysql-test/suite/gcol/r/rpl_gcol.result
@@ -7,7 +7,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (2,default);
diff --git a/mysql-test/suite/innodb/r/innodb-virtual-columns.result b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
index 9837f567954..b28c411fcc5 100644
--- a/mysql-test/suite/innodb/r/innodb-virtual-columns.result
+++ b/mysql-test/suite/innodb/r/innodb-virtual-columns.result
@@ -30,11 +30,7 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
- ELSE 'Not Completed'
- END) VIRTUAL,
+ `ofis_deg_status` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed' else 'Not Completed' end)) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
@@ -140,46 +136,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
- ELSE 'Not Completed'
- END) VIRTUAL,
- `ofis_deg_status2` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress2'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
- ELSE 'Not Completed2'
- END) VIRTUAL,
- `ofis_deg_status3` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress3'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
- ELSE 'Not Completed3'
- END) VIRTUAL,
- `ofis_deg_status4` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress4'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
- ELSE 'Not Completed4'
- END) VIRTUAL,
- `ofis_deg_status5` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress5'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
- ELSE 'Not Completed5'
- END) VIRTUAL,
- `ofis_deg_status6` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress6'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
- ELSE 'Not Completed6'
- END) VIRTUAL,
- `ofis_deg_status7` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress7'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
- ELSE 'Not Completed7'
- END) VIRTUAL,
- `ofis_deg_status8` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress8'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
- ELSE 'Not Completed8'
- END) VIRTUAL,
+ `ofis_deg_status` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed' else 'Not Completed' end)) VIRTUAL,
+ `ofis_deg_status2` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress2' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed2' else 'Not Completed2' end)) VIRTUAL,
+ `ofis_deg_status3` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress3' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed3' else 'Not Completed3' end)) VIRTUAL,
+ `ofis_deg_status4` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress4' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed4' else 'Not Completed4' end)) VIRTUAL,
+ `ofis_deg_status5` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress5' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed5' else 'Not Completed5' end)) VIRTUAL,
+ `ofis_deg_status6` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress6' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed6' else 'Not Completed6' end)) VIRTUAL,
+ `ofis_deg_status7` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress7' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed7' else 'Not Completed7' end)) VIRTUAL,
+ `ofis_deg_status8` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress8' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed8' else 'Not Completed8' end)) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
@@ -229,46 +193,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
- ELSE 'Not Completed'
- END) VIRTUAL,
- `ofis_deg_status2` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress2'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
- ELSE 'Not Completed2'
- END) VIRTUAL,
- `ofis_deg_status3` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress3'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
- ELSE 'Not Completed3'
- END) VIRTUAL,
- `ofis_deg_status4` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress4'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
- ELSE 'Not Completed4'
- END) VIRTUAL,
- `ofis_deg_status5` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress5'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
- ELSE 'Not Completed5'
- END) VIRTUAL,
- `ofis_deg_status6` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress6'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
- ELSE 'Not Completed6'
- END) VIRTUAL,
- `ofis_deg_status7` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress7'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
- ELSE 'Not Completed7'
- END) VIRTUAL,
- `ofis_deg_status8` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress8'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
- ELSE 'Not Completed8'
- END) VIRTUAL,
+ `ofis_deg_status` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed' else 'Not Completed' end)) VIRTUAL,
+ `ofis_deg_status2` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress2' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed2' else 'Not Completed2' end)) VIRTUAL,
+ `ofis_deg_status3` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress3' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed3' else 'Not Completed3' end)) VIRTUAL,
+ `ofis_deg_status4` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress4' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed4' else 'Not Completed4' end)) VIRTUAL,
+ `ofis_deg_status5` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress5' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed5' else 'Not Completed5' end)) VIRTUAL,
+ `ofis_deg_status6` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress6' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed6' else 'Not Completed6' end)) VIRTUAL,
+ `ofis_deg_status7` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress7' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed7' else 'Not Completed7' end)) VIRTUAL,
+ `ofis_deg_status8` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress8' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed8' else 'Not Completed8' end)) VIRTUAL,
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`),
KEY `grad_degree_as_of_term_ndx` (`deg_as_of_term`)
@@ -338,46 +270,14 @@ grad_degree CREATE TABLE `grad_degree` (
`plan` varchar(10) NOT NULL,
`admit_term` char(4) NOT NULL,
`wdraw_rsn` varchar(4) NOT NULL DEFAULT '',
- `ofis_deg_status` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed'
- ELSE 'Not Completed'
- END) VIRTUAL,
- `ofis_deg_status2` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress2'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed2'
- ELSE 'Not Completed2'
- END) VIRTUAL,
- `ofis_deg_status3` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress3'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed3'
- ELSE 'Not Completed3'
- END) VIRTUAL,
- `ofis_deg_status4` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress4'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed4'
- ELSE 'Not Completed4'
- END) VIRTUAL,
- `ofis_deg_status5` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress5'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed5'
- ELSE 'Not Completed5'
- END) VIRTUAL,
- `ofis_deg_status6` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress6'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed6'
- ELSE 'Not Completed6'
- END) VIRTUAL,
- `ofis_deg_status7` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress7'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed7'
- ELSE 'Not Completed7'
- END) VIRTUAL,
- `ofis_deg_status8` varchar(15) AS (CASE
-WHEN wdraw_rsn = '' THEN 'In progress8'
- WHEN wdraw_rsn = 'DCMP' OR wdraw_rsn = 'TRDC' THEN 'Completed8'
- ELSE 'Not Completed8'
- END) VIRTUAL,
+ `ofis_deg_status` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed' else 'Not Completed' end)) VIRTUAL,
+ `ofis_deg_status2` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress2' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed2' else 'Not Completed2' end)) VIRTUAL,
+ `ofis_deg_status3` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress3' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed3' else 'Not Completed3' end)) VIRTUAL,
+ `ofis_deg_status4` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress4' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed4' else 'Not Completed4' end)) VIRTUAL,
+ `ofis_deg_status5` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress5' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed5' else 'Not Completed5' end)) VIRTUAL,
+ `ofis_deg_status6` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress6' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed6' else 'Not Completed6' end)) VIRTUAL,
+ `ofis_deg_status7` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress7' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed7' else 'Not Completed7' end)) VIRTUAL,
+ `ofis_deg_status8` varchar(15) AS ((case when (`wdraw_rsn` = '') then 'In progress8' when ((`wdraw_rsn` = 'DCMP') or (`wdraw_rsn` = 'TRDC')) then 'Completed8' else 'Not Completed8' end)) VIRTUAL,
`deg_start_term` char(4) NOT NULL DEFAULT '' COMMENT 'Educated guess at the beginning of the data',
`deg_as_of_term` char(4) NOT NULL COMMENT 'In most cases also end term',
PRIMARY KEY (`student_id`,`plan`,`admit_term`)
diff --git a/mysql-test/suite/parts/r/partition_datetime_innodb.result b/mysql-test/suite/parts/r/partition_datetime_innodb.result
index ced3a1d0b25..0c7b47edcda 100644
--- a/mysql-test/suite/parts/r/partition_datetime_innodb.result
+++ b/mysql-test/suite/parts/r/partition_datetime_innodb.result
@@ -7,7 +7,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
@@ -37,7 +37,7 @@ partition by key (a) partitions 12;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
diff --git a/mysql-test/suite/parts/r/partition_datetime_myisam.result b/mysql-test/suite/parts/r/partition_datetime_myisam.result
index 7939df21d67..40efba9d984 100644
--- a/mysql-test/suite/parts/r/partition_datetime_myisam.result
+++ b/mysql-test/suite/parts/r/partition_datetime_myisam.result
@@ -7,7 +7,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
@@ -37,7 +37,7 @@ partition by key (a) partitions 12;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (a)
diff --git a/mysql-test/suite/rpl/r/rpl_default.result b/mysql-test/suite/rpl/r/rpl_default.result
index a1629b99bb3..3195046a42d 100644
--- a/mysql-test/suite/rpl/r/rpl_default.result
+++ b/mysql-test/suite/rpl/r/rpl_default.result
@@ -8,7 +8,7 @@ connection slave;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT (1+1),
+ `a` int(11) DEFAULT ((1 + 1)),
`b` bigint(20) DEFAULT uuid_short(),
`u` blob DEFAULT user()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
index 815c2599a65..a07bac9340c 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
@@ -675,7 +675,7 @@ t16 CREATE TABLE `t16` (
`c4` blob DEFAULT NULL,
`c5` char(5) DEFAULT NULL,
`c6` int(11) DEFAULT 1,
- `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `c7` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY KEY (c1)
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
index 0d249834e70..280afed0385 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
@@ -675,7 +675,7 @@ t16 CREATE TABLE `t16` (
`c4` blob DEFAULT NULL,
`c5` char(5) DEFAULT NULL,
`c6` int(11) DEFAULT 1,
- `c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
+ `c7` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`c1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (c1)
diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result
index 075cbc14fe7..a000384909c 100644
--- a/mysql-test/suite/rpl/r/rpl_multi_engine.result
+++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result
@@ -21,7 +21,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection slave;
@@ -38,7 +38,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection master;
@@ -80,7 +80,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection master;
@@ -122,7 +122,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
connection master;
@@ -164,7 +164,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
connection slave;
@@ -181,7 +181,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection master;
@@ -223,7 +223,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection master;
@@ -265,7 +265,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
connection master;
@@ -307,7 +307,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection slave;
@@ -324,7 +324,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection master;
@@ -366,7 +366,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
connection master;
@@ -408,7 +408,7 @@ t1 CREATE TABLE `t1` (
`f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
- `t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `t` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_partition_innodb.result b/mysql-test/suite/rpl/r/rpl_partition_innodb.result
index 4494b757291..4657ed7dde5 100644
--- a/mysql-test/suite/rpl/r/rpl_partition_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_partition_innodb.result
@@ -55,7 +55,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -69,7 +69,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -99,7 +99,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -113,7 +113,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
diff --git a/mysql-test/suite/rpl/r/rpl_partition_memory.result b/mysql-test/suite/rpl/r/rpl_partition_memory.result
index 6073352210d..1d57c48ad78 100644
--- a/mysql-test/suite/rpl/r/rpl_partition_memory.result
+++ b/mysql-test/suite/rpl/r/rpl_partition_memory.result
@@ -55,7 +55,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -69,7 +69,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -99,7 +99,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -113,7 +113,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
diff --git a/mysql-test/suite/rpl/r/rpl_partition_myisam.result b/mysql-test/suite/rpl/r/rpl_partition_myisam.result
index 8d6cd8e3b77..42ad10c8cf1 100644
--- a/mysql-test/suite/rpl/r/rpl_partition_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_partition_myisam.result
@@ -55,7 +55,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -69,7 +69,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -99,7 +99,7 @@ show create table test.byrange_tbl;
Table Create Table
byrange_tbl CREATE TABLE `byrange_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
@@ -113,7 +113,7 @@ show create table test.regular_tbl;
Table Create Table
regular_tbl CREATE TABLE `regular_tbl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `dt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user` char(255) DEFAULT NULL,
`uuidf` varbinary(255) DEFAULT NULL,
`fkid` int(11) DEFAULT NULL,
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result b/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result
index 41b3ca9d6fe..ac0a419b7e5 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result
@@ -12,14 +12,14 @@ Table Create Table
mysql050614_temporal0 CREATE TABLE `mysql050614_temporal0` (
`a` time DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `c` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE mysql050614_temporal1;
Table Create Table
mysql050614_temporal1 CREATE TABLE `mysql050614_temporal1` (
`a` time(1) DEFAULT NULL,
`b` datetime(1) DEFAULT NULL,
- `c` timestamp(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1) ON UPDATE CURRENT_TIMESTAMP(1)
+ `c` timestamp(1) NOT NULL DEFAULT current_timestamp(1) ON UPDATE current_timestamp(1)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection slave;
SELECT @@mysql56_temporal_format;
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result b/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result
index 2e3af3367ff..ace11d5bd6e 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result
@@ -15,14 +15,14 @@ Table Create Table
mysql050614_temporal0 CREATE TABLE `mysql050614_temporal0` (
`a` time DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `c` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE mysql050614_temporal1;
Table Create Table
mysql050614_temporal1 CREATE TABLE `mysql050614_temporal1` (
`a` time(1) DEFAULT NULL,
`b` datetime(1) DEFAULT NULL,
- `c` timestamp(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1) ON UPDATE CURRENT_TIMESTAMP(1)
+ `c` timestamp(1) NOT NULL DEFAULT current_timestamp(1) ON UPDATE current_timestamp(1)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection slave;
SELECT @@mysql56_temporal_format;
diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
index cdf612e6db8..f214e6d7dac 100644
--- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
+++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
@@ -2,7 +2,7 @@ CREATE TABLE t1 (a TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NULL);
@@ -32,7 +32,7 @@ CREATE TABLE t1 (a TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT NULL);
@@ -60,7 +60,7 @@ CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
@@ -81,14 +81,14 @@ CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -96,7 +96,7 @@ CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -104,7 +104,7 @@ CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -112,7 +112,7 @@ CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -120,7 +120,7 @@ CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00')
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -128,39 +128,39 @@ CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `b` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP) AS SELECT 1 AS i;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`i` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 (b TIMESTAMP) AS SELECT a FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -170,6 +170,6 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
index 1c42da57bfc..5219fd4e9c4 100644
--- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
+++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
@@ -37,7 +37,7 @@ CREATE TABLE t1 (a TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT NULL);
@@ -65,7 +65,7 @@ CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
@@ -86,7 +86,7 @@ CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `a` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL);
@@ -134,7 +134,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL,
- `b` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `b` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
@@ -142,7 +142,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL,
- `b` timestamp NULL DEFAULT CURRENT_TIMESTAMP
+ `b` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP);
@@ -150,7 +150,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
+ `b` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP) AS SELECT 1 AS i;
diff --git a/mysql-test/suite/vcol/r/delayed.result b/mysql-test/suite/vcol/r/delayed.result
new file mode 100644
index 00000000000..ba3ac5c1c65
--- /dev/null
+++ b/mysql-test/suite/vcol/r/delayed.result
@@ -0,0 +1,7 @@
+create table t (a int primary key, b int, c int as (b), index (c));
+insert t (a,b) values (10,1);
+replace delayed t (a,b) values (10,5);
+check table t;
+Table Op Msg_type Msg_text
+test.t check status OK
+drop table t;
diff --git a/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result b/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
index 934a84cc3cc..7bad8e9f6d4 100644
--- a/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
+++ b/mysql-test/suite/vcol/r/innodb_autoinc_vcol.result
@@ -9,7 +9,7 @@ alter table t1 auto_increment = 3;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c2` int(11) AS (1+1) VIRTUAL,
+ `c2` int(11) AS ((1 + 1)) VIRTUAL,
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/vcol/r/rpl_vcol.result b/mysql-test/suite/vcol/r/rpl_vcol.result
index a20719ad813..2ec225b0ff6 100644
--- a/mysql-test/suite/vcol/r/rpl_vcol.result
+++ b/mysql-test/suite/vcol/r/rpl_vcol.result
@@ -7,7 +7,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (2,default);
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
index dd580c344b0..6605f7c99b4 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
@@ -21,25 +21,25 @@ create or replace table t1 (a datetime as (current_time()) PERSISTENT);
ERROR HY000: Function or expression 'curtime()' cannot be used in the GENERATED ALWAYS AS clause of `a`
# CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP
create or replace table t1 (a datetime as (current_timestamp()) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `a`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `a`
create or replace table t1 (a datetime as (current_timestamp) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `a`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `a`
# CURTIME()
create or replace table t1 (a datetime as (curtime()) PERSISTENT);
ERROR HY000: Function or expression 'curtime()' cannot be used in the GENERATED ALWAYS AS clause of `a`
# LOCALTIME(), LOCALTIME
create or replace table t1 (a datetime, b varchar(10) as (localtime()) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `b`
create or replace table t1 (a datetime, b varchar(10) as (localtime) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `b`
# LOCALTIMESTAMP, LOCALTIMESTAMP()(v4.0.6)
create or replace table t1 (a datetime, b varchar(10) as (localtimestamp()) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `b`
create or replace table t1 (a datetime, b varchar(10) as (localtimestamp) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `b`
# NOW()
create or replace table t1 (a datetime, b varchar(10) as (now()) PERSISTENT);
-ERROR HY000: Function or expression 'now()' cannot be used in the GENERATED ALWAYS AS clause of `b`
+ERROR HY000: Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `b`
# SYSDATE()
create or replace table t1 (a int, b varchar(10) as (sysdate()) PERSISTENT);
ERROR HY000: Function or expression 'sysdate()' cannot be used in the GENERATED ALWAYS AS clause of `b`
@@ -242,7 +242,7 @@ drop function sub1;
create or replace table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')));
drop table t1;
create or replace table t1 (a int, b varchar(16384) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')));
-ERROR HY000: Table definition is too large
+ERROR HY000: Expression in the GENERATED ALWAYS AS clause is too big
#
# Constant expression
create or replace table t1 (a int as (PI()) PERSISTENT);
diff --git a/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result b/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
index e66c2d3a3c3..42b852a7c6c 100644
--- a/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_column_def_options_innodb.result
@@ -54,7 +54,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -67,7 +67,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -87,7 +87,7 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t2;
Field Type Null Key Default Extra
@@ -109,7 +109,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -131,7 +131,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int as (a % 2));
@@ -141,6 +141,6 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result b/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
index d60a3cf1a51..7af1d35b67f 100644
--- a/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_column_def_options_myisam.result
@@ -54,7 +54,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -67,7 +67,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -87,7 +87,7 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) AS ((`a` % 2)) VIRTUAL COMMENT 'my comment'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t2;
Field Type Null Key Default Extra
@@ -109,7 +109,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
@@ -131,7 +131,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int as (a % 2));
@@ -141,6 +141,6 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_keys_innodb.result b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
index 79450d41684..843bd6efc8e 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_innodb.result
@@ -13,7 +13,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -28,7 +28,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -57,7 +57,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `b` (`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
@@ -70,7 +70,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `a` (`a`,`b`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index a62fc2ffda0..2a551956173 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -129,7 +129,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -144,7 +144,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -173,7 +173,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
@@ -186,7 +186,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a*2) PERSISTENT,
+ `b` int(11) AS ((`a` * 2)) PERSISTENT,
KEY `a` (`a`,`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index d4a583c34b2..4aeeda38cc1 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -130,7 +130,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(32) DEFAULT NULL,
- `v` char(32) CHARACTER SET ucs2 AS (a) VIRTUAL
+ `v` char(32) CHARACTER SET ucs2 AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a int, b int);
@@ -155,7 +155,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` char(2) NOT NULL,
- `c` enum('Y','N') AS (case when b = 'aa' then 'Y' else 'N' end) PERSISTENT
+ `c` enum('Y','N') AS ((case when (`b` = 'aa') then 'Y' else 'N' end)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1(a,b) values (1,'bb'), (2,'aa'), (3,'cc');
select * from t1;
@@ -173,7 +173,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` set('y','n') AS (if(a=0,if(b=0,('n,n'),('n,y')),if(b=0,('y,n'),('y,y')))) PERSISTENT
+ `c` set('y','n') AS (if((`a` = 0),if((`b` = 0),'n,n','n,y'),if((`b` = 0),'y,n','y,y'))) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t2(a,b) values (7,0), (2,3), (0,1);
select * from t2;
@@ -227,7 +227,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` bigint(20) AS (a > '2') VIRTUAL
+ `b` bigint(20) AS ((`a` > '2')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 (a) values (1),(3);
select * from t1;
@@ -244,7 +244,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(20) DEFAULT NULL,
- `b` bigint(20) AS (a between 0 and 2) VIRTUAL
+ `b` bigint(20) AS ((`a` between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 (a) values (1),(3);
select * from t1;
@@ -261,7 +261,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(10) DEFAULT NULL,
- `b` char(10) AS (a between 0 and 2) VIRTUAL
+ `b` char(10) AS ((`a` between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 (a) values (1),(3);
select * from t1;
@@ -284,8 +284,8 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(32) DEFAULT NULL,
- `c` int(11) AS (a MOD 10) VIRTUAL,
- `d` varchar(5) AS (LEFT(b,5)) PERSISTENT
+ `c` int(11) AS ((`a` % 10)) VIRTUAL,
+ `d` varchar(5) AS (left(`b`,5)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
Field Type Null Key Default Extra
@@ -324,7 +324,7 @@ create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=lat
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `v1` varchar(255) AS (c1) PERSISTENT,
+ `v1` varchar(255) AS (`c1`) PERSISTENT,
`c1` varchar(50) COLLATE latin1_general_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
drop table t1;
@@ -339,7 +339,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (TIMESTAMP(a)) VIRTUAL
+ `b` timestamp AS (cast(`a` as datetime)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME, b TIMESTAMP AS (TIMESTAMP(a)),c TIMESTAMP);
@@ -347,7 +347,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (TIMESTAMP(a)) VIRTUAL,
+ `b` timestamp AS (cast(`a` as datetime)) VIRTUAL,
`c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
index 76482b39d79..c026637c0a5 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result
@@ -81,7 +81,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
@@ -92,7 +92,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
@@ -173,7 +173,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) VIRTUAL,
+ `c` int(11) AS (dayofyear(`b`)) VIRTUAL,
`b` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
@@ -194,7 +194,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) PERSISTENT,
+ `c` int(11) AS (dayofyear(`b`)) PERSISTENT,
`b` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
@@ -216,7 +216,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) PERSISTENT
+ `c` int(11) AS (week(`b`,1)) PERSISTENT
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 15. ALTER. Changing the expression of a virtual non-stored column.
@@ -237,7 +237,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) VIRTUAL
+ `c` int(11) AS (week(`b`,1)) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
#
diff --git a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
index 233f6778ca9..172fc631f08 100644
--- a/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result
@@ -81,7 +81,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) PERSISTENT
+ `b` int(11) AS ((`a` % 2)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 8. ALTER. Modify virtual non-stored -> virtual stored
@@ -92,7 +92,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 2) VIRTUAL
+ `b` int(11) AS ((`a` % 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
@@ -173,7 +173,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) VIRTUAL,
+ `c` int(11) AS (dayofyear(`b`)) VIRTUAL,
`b` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -194,7 +194,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `c` int(11) AS (dayofyear(b)) PERSISTENT,
+ `c` int(11) AS (dayofyear(`b`)) PERSISTENT,
`b` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -216,7 +216,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) PERSISTENT
+ `c` int(11) AS (week(`b`,1)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 15. ALTER. Changing the expression of a virtual non-stored column.
@@ -237,7 +237,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` int(11) AS (week(b,1)) VIRTUAL
+ `c` int(11) AS (week(`b`,1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
#
diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
index a6f69edab1a..328184aabca 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
@@ -9,7 +9,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (abs(a)) VIRTUAL
+ `b` int(11) AS (abs(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1, default);
select * from t1;
@@ -24,7 +24,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(acos(a),6)) VIRTUAL
+ `b` double AS (format(acos(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1, default);
insert into t1 values (1.0001,default);
@@ -43,7 +43,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(asin(a),6)) VIRTUAL
+ `b` double AS (format(asin(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0.2, default);
insert into t1 values (1.0001,default);
@@ -61,7 +61,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -77,7 +77,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `c` double AS (format(atan(a),6)) VIRTUAL
+ `c` double AS (format(atan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,default);
insert into t1 values (format(PI(),6),default);
@@ -95,7 +95,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(atan2(a,b),6)) VIRTUAL
+ `c` double AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
insert into t1 values (format(PI(),6),0,default);
@@ -112,7 +112,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (ceil(a)) VIRTUAL
+ `b` int(11) AS (ceiling(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -131,7 +131,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (conv(a,b,c)) VIRTUAL
+ `d` varchar(10) AS (conv(`a`,`b`,`c`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a',16,2,default);
insert into t1 values ('6e',18,8,default);
@@ -152,7 +152,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cos(a),6)) VIRTUAL
+ `b` double AS (format(cos(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
select * from t1;
@@ -167,7 +167,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(cot(a),6)) VIRTUAL
+ `b` double AS (format(cot(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
insert into t1 values (1,default);
@@ -184,7 +184,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` mediumtext AS (crc32(a)) VIRTUAL
+ `b` mediumtext AS (crc32(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('mysql',default);
@@ -201,7 +201,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(degrees(a),6)) VIRTUAL
+ `b` double AS (format(degrees(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()/2,6),default);
@@ -218,7 +218,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a/2) VIRTUAL
+ `b` double AS ((`a` / 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -233,7 +233,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(exp(a),6)) VIRTUAL
+ `b` double AS (format(exp(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -252,7 +252,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` mediumtext AS (floor(a)) VIRTUAL
+ `b` mediumtext AS (floor(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
insert into t1 values (-1.23,default);
@@ -269,7 +269,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(ln(a),6)) VIRTUAL
+ `b` double AS (format(ln(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -287,7 +287,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` double AS (format(log(a,b),6)) VIRTUAL
+ `c` double AS (format(log(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,65536,default);
insert into t1 values (10,100,default);
@@ -305,7 +305,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log(a),6)) VIRTUAL
+ `b` double AS (format(log(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
@@ -322,7 +322,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log2(a),6)) VIRTUAL
+ `b` double AS (format(log2(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
insert into t1 values (-100,default);
@@ -339,7 +339,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(log10(a),6)) VIRTUAL
+ `b` double AS (format(log10(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (100,default);
@@ -358,7 +358,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a-1) VIRTUAL
+ `b` double AS ((`a` - 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
select * from t1;
@@ -373,7 +373,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (mod(a,10)) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -390,7 +390,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a % 10) VIRTUAL
+ `b` int(11) AS ((`a` % 10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -407,7 +407,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(10) AS (oct(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,8)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -422,7 +422,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(PI()*a*a,6)) VIRTUAL
+ `b` double AS (format(((pi() * `a`) * `a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -437,7 +437,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
select * from t1;
@@ -452,8 +452,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (pow(a,2)) VIRTUAL,
- `c` int(11) AS (power(a,2)) VIRTUAL
+ `b` int(11) AS (pow(`a`,2)) VIRTUAL,
+ `c` int(11) AS (pow(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default,default);
insert into t1 values (2,default,default);
@@ -470,7 +470,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(radians(a),6)) VIRTUAL
+ `b` double AS (format(radians(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (90,default);
select * from t1;
@@ -485,7 +485,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (round(a)) VIRTUAL
+ `b` int(11) AS (round(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1.23,default);
insert into t1 values (-1.58,default);
@@ -504,7 +504,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
`b` double DEFAULT NULL,
- `c` int(11) AS (round(a,b)) VIRTUAL
+ `c` int(11) AS (round(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.298,1,default);
insert into t1 values (1.298,0,default);
@@ -523,7 +523,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` int(11) AS (sign(a)) VIRTUAL
+ `b` int(11) AS (sign(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-32,default);
insert into t1 values (0,default);
@@ -542,7 +542,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sin(a),6)) VIRTUAL
+ `b` double AS (format(sin(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI()/2,6),default);
select * from t1;
@@ -557,7 +557,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(sqrt(a),6)) VIRTUAL
+ `b` double AS (format(sqrt(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (4,default);
insert into t1 values (20,default);
@@ -576,7 +576,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (format(tan(a),6)) VIRTUAL
+ `b` double AS (format(tan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
insert into t1 values (format(PI()+1,6),default);
@@ -593,7 +593,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (a*3) VIRTUAL
+ `b` double AS ((`a` * 3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -612,7 +612,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (truncate(a,4)) VIRTUAL
+ `b` double AS (truncate(`a`,4)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.223,default);
insert into t1 values (1.999,default);
@@ -633,7 +633,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` double AS (-a) VIRTUAL
+ `b` double AS (-(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -653,7 +653,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(2) DEFAULT NULL,
- `b` int(11) AS (ascii(a)) VIRTUAL
+ `b` int(11) AS (ascii(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
insert into t1 values (2,default);
@@ -672,7 +672,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (bin(a)) VIRTUAL
+ `b` varchar(10) AS (conv(`a`,10,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -687,7 +687,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` mediumtext AS (bit_length(a)) VIRTUAL
+ `b` mediumtext AS (bit_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -702,7 +702,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` mediumtext AS (char_length(a)) VIRTUAL
+ `b` mediumtext AS (char_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -718,7 +718,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` varbinary(10) AS (char(a,b)) VIRTUAL
+ `c` varbinary(10) AS (char(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (77,121,default);
select * from t1;
@@ -733,7 +733,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` mediumtext AS (character_length(a)) VIRTUAL
+ `b` mediumtext AS (char_length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -749,7 +749,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat_ws(',',a,b)) VIRTUAL
+ `c` varchar(20) AS (concat_ws(',',`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -765,7 +765,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (concat(a,',',b)) VIRTUAL
+ `c` varchar(20) AS (concat(`a`,',',`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',default);
select * from t1;
@@ -782,7 +782,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(10) AS (elt(c,a,b)) VIRTUAL
+ `d` varchar(10) AS (elt(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',1,default);
insert into t1 values ('value1','value2',2,default);
@@ -799,7 +799,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (export_set(a,'1','0','',10)) VIRTUAL
+ `b` varchar(10) AS (export_set(`a`,'1','0','',10)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (6,default);
select * from t1;
@@ -815,7 +815,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (field('aa',a,b)) VIRTUAL
+ `c` int(11) AS (field('aa',`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','bb',default);
insert into t1 values ('bb','aa',default);
@@ -833,7 +833,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (find_in_set(a,b)) VIRTUAL
+ `c` int(11) AS (find_in_set(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','aa,bb,cc',default);
insert into t1 values ('aa','bb,aa,cc',default);
@@ -850,7 +850,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` double DEFAULT NULL,
- `b` varchar(20) AS (format(a,2)) VIRTUAL
+ `b` varchar(20) AS (format(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12332.123456,default);
select * from t1;
@@ -865,7 +865,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (17,default);
select * from t1;
@@ -879,7 +879,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (hex(a)) VIRTUAL
+ `b` varchar(10) AS (hex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -895,7 +895,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(20) AS (insert(a,length(a),length(b),b)) VIRTUAL
+ `c` varchar(20) AS (insert(`a`,length(`a`),length(`b`),`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('start,','end',default);
select * from t1;
@@ -911,7 +911,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` int(11) AS (instr(a,b)) VIRTUAL
+ `c` int(11) AS (locate(`b`,`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar,','bar',default);
insert into t1 values ('xbar,','foobar',default);
@@ -928,7 +928,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lcase(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -943,7 +943,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(5) AS (left(a,5)) VIRTUAL
+ `b` varchar(5) AS (left(`a`,5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -958,7 +958,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -973,7 +973,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a like 'H%!o' escape '!') VIRTUAL
+ `b` tinyint(1) AS ((`a` like 'H%!o' escape '!')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -990,7 +990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (locate('bar',a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1005,7 +1005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lower(a)) VIRTUAL
+ `b` varchar(10) AS (lcase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1020,7 +1020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (lpad(a,4,' ')) VIRTUAL
+ `b` varchar(10) AS (lpad(`a`,4,' ')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
insert into t1 values ('M',default);
@@ -1037,7 +1037,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (ltrim(a)) VIRTUAL
+ `b` varchar(10) AS (ltrim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (' MySQL',default);
insert into t1 values ('MySQL',default);
@@ -1056,7 +1056,7 @@ t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
- `d` varchar(30) AS (make_set(c,a,b)) VIRTUAL
+ `d` varchar(30) AS (make_set(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',1,default);
insert into t1 values ('a','b',3,default);
@@ -1073,7 +1073,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (mid(a,1,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,1,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1088,7 +1088,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not like 'H%o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` like 'H%o')))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1105,7 +1105,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a not regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((not((`a` regexp 'H.+o')))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1122,7 +1122,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` int(11) AS (octet_length(a)) VIRTUAL
+ `b` int(11) AS (length(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('text',default);
select * from t1;
@@ -1137,7 +1137,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` mediumtext AS (ord(a)) VIRTUAL
+ `b` mediumtext AS (ord(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
select * from t1;
@@ -1152,7 +1152,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (position('bar' in a)) VIRTUAL
+ `b` varchar(10) AS (locate('bar',`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1167,7 +1167,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (quote(a)) VIRTUAL
+ `b` varchar(10) AS (quote(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Don\'t',default);
select * from t1;
@@ -1182,7 +1182,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a regexp 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('hello',default);
@@ -1199,7 +1199,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (repeat(a,3)) VIRTUAL
+ `b` varchar(30) AS (repeat(`a`,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1214,7 +1214,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (replace(a,'aa','bb')) VIRTUAL
+ `b` varchar(30) AS (replace(`a`,'aa','bb')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1229,7 +1229,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(30) AS (reverse(a)) VIRTUAL
+ `b` varchar(30) AS (reverse(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('maa',default);
select * from t1;
@@ -1244,7 +1244,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (right(a,4)) VIRTUAL
+ `b` varchar(10) AS (right(`a`,4)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar',default);
select * from t1;
@@ -1259,7 +1259,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` tinyint(1) AS (a rlike 'H.+o') VIRTUAL
+ `b` tinyint(1) AS ((`a` regexp 'H.+o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
insert into t1 values ('MySQL',default);
@@ -1276,7 +1276,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rpad(a,4,'??')) VIRTUAL
+ `b` varchar(10) AS (rpad(`a`,4,'??')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('He',default);
select * from t1;
@@ -1291,7 +1291,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (rtrim(a)) VIRTUAL
+ `b` varchar(10) AS (rtrim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello ',default);
select * from t1;
@@ -1306,7 +1306,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(20) AS (soundex(a)) VIRTUAL
+ `b` varchar(20) AS (soundex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1322,7 +1322,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a sounds like b) VIRTUAL
+ `c` tinyint(1) AS ((soundex(`a`) = soundex(`b`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello',default);
insert into t1 values ('Hello','MySQL',default);
@@ -1341,7 +1341,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (concat(a,space(5))) VIRTUAL
+ `b` varchar(10) AS (concat(`a`,space(5))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello', default);
select * from t1;
@@ -1357,7 +1357,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(9) DEFAULT NULL,
`b` varchar(9) DEFAULT NULL,
- `c` tinyint(1) AS (strcmp(a,b)) VIRTUAL
+ `c` tinyint(1) AS (strcmp(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello', default);
insert into t1 values ('Hello','Hello1', default);
@@ -1374,7 +1374,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substr(a,2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1389,7 +1389,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (substring_index(a,'.',2)) VIRTUAL
+ `b` varchar(10) AS (substring_index(`a`,'.',2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('www.mysql.com',default);
select * from t1;
@@ -1404,7 +1404,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (substring(a from 2 for 2)) VIRTUAL
+ `b` varchar(10) AS (substr(`a`,2,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
select * from t1;
@@ -1419,7 +1419,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (trim(a)) VIRTUAL
+ `b` varchar(10) AS (trim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (' aa ',default);
select * from t1;
@@ -1434,7 +1434,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (ucase(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1449,7 +1449,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(15) DEFAULT NULL,
- `b` varchar(10) AS (unhex(a)) VIRTUAL
+ `b` varchar(10) AS (unhex(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('4D7953514C',default);
select * from t1;
@@ -1464,7 +1464,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(5) DEFAULT NULL,
- `b` varchar(10) AS (upper(a)) VIRTUAL
+ `b` varchar(10) AS (ucase(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -1482,7 +1482,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(16) AS (case a when NULL then 'asd' when 'b' then 'B' else a end) VIRTUAL
+ `b` varchar(16) AS ((case `a` when NULL then 'asd' when 'b' then 'B' else `a` end)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,default);
insert into t1 values ('b',default);
@@ -1502,7 +1502,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (if(a=1,a,b)) VIRTUAL
+ `c` int(11) AS (if((`a` = 1),`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,2,default);
insert into t1 values (3,4,default);
@@ -1520,7 +1520,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` varchar(10) AS (ifnull(a,'DEFAULT')) VIRTUAL
+ `c` varchar(10) AS (ifnull(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,'adf',default);
insert into t1 values ('a','adf',default);
@@ -1537,7 +1537,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varchar(10) AS (nullif(a,'DEFAULT')) VIRTUAL
+ `b` varchar(10) AS (nullif(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('DEFAULT',default);
insert into t1 values ('a',default);
@@ -1557,7 +1557,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a>0 && a<2) VIRTUAL
+ `b` tinyint(1) AS (((`a` > 0) and (`a` < 2))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1574,7 +1574,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1591,7 +1591,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
- `b` varbinary(10) AS (binary a) VIRTUAL
+ `b` varbinary(10) AS (cast(`a` as char charset binary)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('11',default);
insert into t1 values (1,default);
@@ -1608,7 +1608,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a & 5) VIRTUAL
+ `b` int(11) AS ((`a` & 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1625,7 +1625,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (~a) VIRTUAL
+ `b` int(11) AS (~(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
Warnings:
@@ -1642,7 +1642,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a | 5) VIRTUAL
+ `b` int(11) AS ((`a` | 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1661,7 +1661,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a ^ 5) VIRTUAL
+ `b` int(11) AS ((`a` ^ 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (0,default);
@@ -1680,7 +1680,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a div 5) VIRTUAL
+ `b` int(11) AS ((`a` DIV 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (7,default);
@@ -1698,7 +1698,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` tinyint(1) AS (a <=> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <=> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,1,default);
insert into t1 values (NULL,NULL,default);
@@ -1718,7 +1718,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a=b) VIRTUAL
+ `c` tinyint(1) AS ((`a` = `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1736,7 +1736,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a >= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` >= `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1754,7 +1754,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a > b) VIRTUAL
+ `c` tinyint(1) AS ((`a` > `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
insert into t1 values ('a','a',default);
@@ -1771,7 +1771,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is not null) VIRTUAL
+ `b` tinyint(1) AS ((`a` is not null)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1788,7 +1788,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a is null) VIRTUAL
+ `b` tinyint(1) AS (isnull(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (NULL,default);
@@ -1805,7 +1805,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a << 2) VIRTUAL
+ `b` int(11) AS ((`a` << 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (3,default);
@@ -1823,7 +1823,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <= b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <= `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1843,7 +1843,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a < b) VIRTUAL
+ `c` tinyint(1) AS ((`a` < `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1862,7 +1862,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` tinyint(1) AS (a not between 0 and 2) VIRTUAL
+ `b` tinyint(1) AS ((`a` not between 0 and 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
insert into t1 values (1,default);
@@ -1880,7 +1880,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a <> b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1900,7 +1900,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(10) DEFAULT NULL,
`b` varchar(10) DEFAULT NULL,
- `c` tinyint(1) AS (a != b) VIRTUAL
+ `c` tinyint(1) AS ((`a` <> `b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
insert into t1 values ('b','b',default);
@@ -1919,7 +1919,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a>5 || a<3) VIRTUAL
+ `b` int(11) AS (((`a` > 5) or (`a` < 3))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (4,default);
@@ -1936,7 +1936,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a >> 2) VIRTUAL
+ `b` int(11) AS ((`a` >> 2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (8,default);
insert into t1 values (3,default);
@@ -1953,7 +1953,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a xor 5) VIRTUAL
+ `b` int(11) AS ((`a` xor 5)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
insert into t1 values (1,default);
@@ -1975,7 +1975,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (adddate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -1990,7 +1990,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (addtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (addtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2005,7 +2005,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (convert_tz(a,'MET','UTC')) VIRTUAL
+ `b` datetime AS (convert_tz(`a`,'MET','UTC')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2020,7 +2020,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_add(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` + interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2035,7 +2035,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date_sub(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2050,7 +2050,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (date(a)) VIRTUAL
+ `b` datetime AS (cast(`a` as date)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:00:00',default);
select * from t1;
@@ -2065,7 +2065,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` mediumtext AS (datediff(a,'2000-01-01')) VIRTUAL
+ `b` mediumtext AS ((to_days(`a`) - to_days('2000-01-01'))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2080,7 +2080,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (day(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2095,7 +2095,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofmonth(a)) VIRTUAL
+ `b` int(11) AS (dayofmonth(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2110,7 +2110,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofweek(a)) VIRTUAL
+ `b` int(11) AS (dayofweek(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2125,7 +2125,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (dayofyear(a)) VIRTUAL
+ `b` int(11) AS (dayofyear(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2140,7 +2140,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (extract(year from a)) VIRTUAL
+ `b` int(11) AS (extract(year from `a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2155,7 +2155,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumtext DEFAULT NULL,
- `b` datetime AS (from_days(a)) VIRTUAL
+ `b` datetime AS (from_days(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (730669,default);
select * from t1;
@@ -2171,7 +2171,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumtext DEFAULT NULL,
- `b` datetime AS (from_unixtime(a)) VIRTUAL
+ `b` datetime AS (from_unixtime(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1196440219,default);
select * from t1;
@@ -2186,7 +2186,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` mediumtext AS (hour(a)) VIRTUAL
+ `b` mediumtext AS (hour(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2201,7 +2201,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (last_day(a)) VIRTUAL
+ `b` datetime AS (last_day(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-05',default);
insert into t1 values ('2003-02-32',default);
@@ -2220,7 +2220,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` datetime AS (makedate(a,1)) VIRTUAL
+ `b` datetime AS (makedate(`a`,1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2001,default);
select * from t1;
@@ -2235,7 +2235,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` time AS (maketime(a,1,3)) VIRTUAL
+ `b` time AS (maketime(`a`,1,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
select * from t1;
@@ -2250,7 +2250,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` mediumtext AS (microsecond(a)) VIRTUAL
+ `b` mediumtext AS (microsecond(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 12:00:00.123456',default);
insert into t1 values ('2009-12-31 23:59:59.000010',default);
@@ -2267,7 +2267,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (minute(a)) VIRTUAL
+ `b` int(11) AS (minute(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2282,7 +2282,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (month(a)) VIRTUAL
+ `b` int(11) AS (month(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
@@ -2297,7 +2297,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (period_add(a,2)) VIRTUAL
+ `b` int(11) AS (period_add(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (200801,default);
select * from t1;
@@ -2313,7 +2313,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
- `c` int(11) AS (period_diff(a,b)) VIRTUAL
+ `c` int(11) AS (period_diff(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (200802,200703,default);
select * from t1;
@@ -2328,7 +2328,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (quarter(a)) VIRTUAL
+ `b` int(11) AS (quarter(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2343,7 +2343,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` mediumtext DEFAULT NULL,
- `b` time AS (sec_to_time(a)) VIRTUAL
+ `b` time AS (sec_to_time(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2378,default);
select * from t1;
@@ -2358,7 +2358,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (second(a)) VIRTUAL
+ `b` int(11) AS (second(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('10:05:03',default);
select * from t1;
@@ -2373,7 +2373,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(64) DEFAULT NULL,
- `b` datetime AS (str_to_date(a,'%m/%d/%Y')) VIRTUAL
+ `b` datetime AS (str_to_date(`a`,'%m/%d/%Y')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('04/30/2004',default);
select * from t1;
@@ -2388,7 +2388,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subdate(a,interval 1 month)) VIRTUAL
+ `b` datetime AS ((`a` - interval 1 month)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2403,7 +2403,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` datetime AS (subtime(a,'02:00:00')) VIRTUAL
+ `b` datetime AS (subtime(`a`,'02:00:00')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31',default);
select * from t1;
@@ -2418,7 +2418,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` time DEFAULT NULL,
- `b` mediumtext AS (time_to_sec(a)) VIRTUAL
+ `b` mediumtext AS (time_to_sec(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('22:23:00',default);
select * from t1;
@@ -2433,7 +2433,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` time AS (time(a)) VIRTUAL
+ `b` time AS (cast(`a` as time)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-08-31 02:03:04',default);
select * from t1;
@@ -2449,7 +2449,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
`b` datetime DEFAULT NULL,
- `c` mediumtext AS (timediff(a,b)) VIRTUAL
+ `c` mediumtext AS (timediff(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default);
select * from t1;
@@ -2464,7 +2464,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestamp(a)) VIRTUAL
+ `b` timestamp AS (cast(`a` as datetime)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-12-31',default);
select * from t1;
@@ -2479,7 +2479,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` timestamp AS (timestampadd(minute,1,a)) VIRTUAL
+ `b` timestamp AS ((`a` + interval 1 minute)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-01-02',default);
select * from t1;
@@ -2493,9 +2493,9 @@ create table t1 (a timestamp, b timestamp, c long as (timestampdiff(MONTH, a,b))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `a` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c` mediumtext AS (timestampdiff(MONTH, a,b)) VIRTUAL
+ `c` mediumtext AS (timestampdiff(MONTH,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-01','2003-05-01',default);
select * from t1;
@@ -2510,7 +2510,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` mediumtext AS (to_days(a)) VIRTUAL
+ `b` mediumtext AS (to_days(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2007-10-07',default);
select * from t1;
@@ -2525,7 +2525,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (week(a,0)) VIRTUAL
+ `b` int(11) AS (week(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2540,7 +2540,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekday(a)) VIRTUAL
+ `b` int(11) AS (weekday(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2555,7 +2555,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (weekofyear(a)) VIRTUAL
+ `b` int(11) AS (week(`a`,3)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2570,7 +2570,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (year(a)) VIRTUAL
+ `b` int(11) AS (year(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2585,7 +2585,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` int(11) AS (yearweek(a)) VIRTUAL
+ `b` int(11) AS (yearweek(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2008-09-01',default);
select * from t1;
@@ -2607,7 +2607,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` mediumtext AS (cast(a as unsigned)) VIRTUAL
+ `b` mediumtext AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2628,7 +2628,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` mediumtext AS (convert(a,unsigned)) VIRTUAL
+ `b` mediumtext AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (-1,default);
@@ -2656,7 +2656,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (aes_encrypt(aes_decrypt(a,'adf'),'adf')) VIRTUAL
+ `b` varchar(1024) AS (aes_encrypt(aes_decrypt(`a`,'adf'),'adf')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2671,7 +2671,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (bit_count(a)) VIRTUAL
+ `b` int(11) AS (bit_count(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (5,default);
select * from t1;
@@ -2686,7 +2686,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (uncompress(compress(a))) VIRTUAL
+ `b` varchar(1024) AS (uncompress(compress(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2701,7 +2701,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (decode(encode(a,'abc'),'abc')) VIRTUAL
+ `b` varchar(1024) AS (decode(encode(`a`,'abc'),'abc')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
select * from t1;
@@ -2716,7 +2716,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT 'aaa',
- `b` varchar(1024) AS (ifnull(a,default(a))) VIRTUAL
+ `b` varchar(1024) AS (ifnull(`a`,default(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('any value',default);
select * from t1;
@@ -2731,7 +2731,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (inet_ntoa(inet_aton(a))) VIRTUAL
+ `b` varchar(1024) AS (inet_ntoa(inet_aton(`a`))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('127.0.0.1',default);
select * from t1;
@@ -2746,7 +2746,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varbinary(32) AS (md5(a)) VIRTUAL
+ `b` varbinary(32) AS (md5(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('testing',default);
select * from t1;
@@ -2761,7 +2761,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (old_password(a)) VIRTUAL
+ `b` varchar(1024) AS (old_password(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('badpwd',default);
select * from t1;
@@ -2776,7 +2776,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (password(a)) VIRTUAL
+ `b` varchar(1024) AS (password(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('badpwd',default);
select * from t1;
@@ -2791,7 +2791,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha1(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2806,7 +2806,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1024) DEFAULT NULL,
- `b` varchar(1024) AS (sha(a)) VIRTUAL
+ `b` varchar(1024) AS (sha(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('abc',default);
select * from t1;
@@ -2821,7 +2821,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` char(1) DEFAULT NULL,
- `b` varchar(1024) AS (uncompressed_length(compress(repeat(a,30)))) VIRTUAL
+ `b` varchar(1024) AS (uncompressed_length(compress(repeat(`a`,30)))) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a',default);
select * from t1;
@@ -2836,7 +2836,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` varchar(100) AS (monthname(a)) VIRTUAL
+ `b` varchar(100) AS (monthname(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2010-10-10',default);
select * from t1;
@@ -2851,7 +2851,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` varchar(100) AS (dayname(a)) VIRTUAL
+ `b` varchar(100) AS (dayname(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2011-11-11',default);
select * from t1;
@@ -2866,7 +2866,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` varchar(100) AS (date_format(a, '%W %a %M %b')) VIRTUAL
+ `b` varchar(100) AS (date_format(`a`,'%W %a %M %b')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2012-12-12',default);
select * from t1;
@@ -2896,7 +2896,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` datetime DEFAULT NULL,
- `b` varchar(10) AS (time_format(a,"%d.%m.%Y")) VIRTUAL
+ `b` varchar(10) AS (time_format(`a`,'%d.%m.%Y')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2001-01-01 02:02:02',default);
select * from t1;
diff --git a/mysql-test/suite/vcol/r/vcol_syntax.result b/mysql-test/suite/vcol/r/vcol_syntax.result
index 8515d790359..14c376797d6 100644
--- a/mysql-test/suite/vcol/r/vcol_syntax.result
+++ b/mysql-test/suite/vcol/r/vcol_syntax.result
@@ -5,7 +5,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int as (a+1) virtual);
@@ -13,7 +13,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) VIRTUAL
+ `b` int(11) AS ((`a` + 1)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a int, b int generated always as (a+1) persistent);
@@ -21,7 +21,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) AS (a+1) PERSISTENT
+ `b` int(11) AS ((`a` + 1)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set session sql_mode='ORACLE';
@@ -30,7 +30,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) DEFAULT NULL,
- "b" int(11) AS (a+1) VIRTUAL
+ "b" int(11) AS (("a" + 1)) VIRTUAL
)
drop table t1;
create table t1 (a int, b int generated always as (a+1) virtual);
@@ -38,7 +38,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) DEFAULT NULL,
- "b" int(11) AS (a+1) VIRTUAL
+ "b" int(11) AS (("a" + 1)) VIRTUAL
)
drop table t1;
create table t1 (a int, b int as (a+1) persistent);
@@ -46,7 +46,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE "t1" (
"a" int(11) DEFAULT NULL,
- "b" int(11) AS (a+1) PERSISTENT
+ "b" int(11) AS (("a" + 1)) PERSISTENT
)
drop table t1;
set session sql_mode=@OLD_SQL_MODE;
diff --git a/mysql-test/suite/vcol/t/delayed.test b/mysql-test/suite/vcol/t/delayed.test
new file mode 100644
index 00000000000..62065abdba8
--- /dev/null
+++ b/mysql-test/suite/vcol/t/delayed.test
@@ -0,0 +1,5 @@
+create table t (a int primary key, b int, c int as (b), index (c));
+insert t (a,b) values (10,1);
+replace delayed t (a,b) values (10,5);
+check table t;
+drop table t;
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
index 492082af30c..708dbd42a8d 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
@@ -345,7 +345,7 @@ eval create or replace table t1 (a int, b varchar(16384) as (concat(a,'$tmp_long
--disable_query_log
let $tmp_long_string = `SELECT repeat('a',65535)`;
---error ER_TOO_MANY_FIELDS
+--error ER_EXPRESSION_IS_TOO_BIG
eval create or replace table t1 (a int, b varchar(16384) as (concat(a,'$tmp_long_string')));
--enable_query_log
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 5f00debbc3a..6eca3a64562 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -448,11 +448,12 @@ DEALLOCATE PREPARE stmt;
# We can't have an expression for prepared statements
#
-PREPARE stmt FROM 'CREATE TABLE t1 (a INT DEFAULT(?+?))';
+prepare stmt from 'create table t1 (a int default(?+?))';
set @a=1;
---error ER_PARSE_ERROR
execute stmt using @a,@a;
-DEALLOCATE PREPARE stmt;
+deallocate prepare stmt;
+show create table t1;
+drop table t1;
--echo #
--echo # Parenthesized Item_basic_constant
@@ -1974,3 +1975,21 @@ DROP TABLE t1;
--echo # end of 10.2 test
+
+#
+# ANSI_QUOTES
+#
+set sql_mode=ansi_quotes;
+create table t1 (a int, b int default (a+1));
+show create table t1;
+insert t1 (a) values (10);
+set sql_mode='';
+show create table t1;
+insert t1 (a) values (20);
+flush tables;
+show create table t1;
+insert t1 (a) values (30);
+select * from t1;
+drop table t1;
+set sql_mode=default;
+
diff --git a/mysql-test/t/partition_bug18198.test b/mysql-test/t/partition_bug18198.test
index 75544f58ce8..720d483e8ed 100644
--- a/mysql-test/t/partition_bug18198.test
+++ b/mysql-test/t/partition_bug18198.test
@@ -163,7 +163,7 @@ create table t1 (col1 date)
partition by range(unix_timestamp(col1))
(partition p0 values less than (10), partition p1 values less than (30));
--- error ER_PARSE_ERROR
+-- error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
create table t1 (col1 datetime)
partition by range(week(col1))
(partition p0 values less than (10), partition p1 values less than (30));