summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-08-14 11:12:17 +0400
committerAlexander Barkov <bar@mariadb.org>2017-08-14 11:12:17 +0400
commit9d853230077a97db819abc69a9197ab0b5f5aff2 (patch)
treef692c17c16849edeab2a12a586c952572a74ec09
parent0f554dd0fdc54a07e38d6fd28b2f79a3dfc08713 (diff)
downloadmariadb-git-9d853230077a97db819abc69a9197ab0b5f5aff2.tar.gz
MDEV-13500 sql_mode=ORACLE: can't create a virtual column with function MOD
Fixing Item_func_mod::print() to print "arg1 MOD arg2" instea of "arg1 % arg2"
-rw-r--r--mysql-test/r/analyze_stmt_orderby.result2
-rw-r--r--mysql-test/r/default.result4
-rw-r--r--mysql-test/r/func_op.result2
-rw-r--r--mysql-test/r/func_test.result2
-rw-r--r--mysql-test/r/gis-debug.result2
-rw-r--r--mysql-test/r/gis.result12
-rw-r--r--mysql-test/suite/compat/oracle/r/vcol.result23
-rw-r--r--mysql-test/suite/compat/oracle/t/vcol.test16
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result18
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result18
-rw-r--r--mysql-test/suite/gcol/r/gcol_non_stored_columns_innodb.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_non_stored_columns_myisam.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result4
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_basic.result4
-rw-r--r--mysql-test/suite/parts/r/part_supported_sql_func_myisam.result2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result12
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_myisam.result12
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_myisam.result24
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_myisam.result36
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_myisam.result36
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result24
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_innodb.result4
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_myisam.result4
-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_misc.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_innodb.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_non_stored_columns_myisam.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result4
-rw-r--r--sql/item_func.h2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp.result2
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp_rev.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result4
34 files changed, 180 insertions, 141 deletions
diff --git a/mysql-test/r/analyze_stmt_orderby.result b/mysql-test/r/analyze_stmt_orderby.result
index 8d904a4419b..dd7bd6b53f7 100644
--- a/mysql-test/r/analyze_stmt_orderby.result
+++ b/mysql-test/r/analyze_stmt_orderby.result
@@ -365,7 +365,7 @@ ANALYZE
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 50,
- "attached_condition": "t2.a % 2 = 0"
+ "attached_condition": "t2.a MOD 2 = 0"
}
}
}
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index c18db932afa..9aa07a42eab 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -2091,7 +2091,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT (`a` * `b`),
`d` int(11) DEFAULT (`a` / `b`),
- `e` int(11) DEFAULT (`a` % `b`)
+ `e` int(11) DEFAULT (`a` MOD `b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SHOW CREATE TABLE t1;
Table Create Table
@@ -2100,7 +2100,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT (`a` * `b`),
`d` int(11) DEFAULT (`a` / `b`),
- `e` int(11) DEFAULT (`a` % `b`)
+ `e` int(11) DEFAULT (`a` MOD `b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (7, 3, DEFAULT, DEFAULT, DEFAULT);
SELECT * FROM t1;
diff --git a/mysql-test/r/func_op.result b/mysql-test/r/func_op.result
index 685aba1075f..36fe8446638 100644
--- a/mysql-test/r/func_op.result
+++ b/mysql-test/r/func_op.result
@@ -5,7 +5,7 @@ explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select 1 + 1 AS `1+1`,1 - 1 AS `1-1`,1 + 1 * 2 AS `1+1*2`,8 / 5 AS `8/5`,8 % 5 AS `8%5`,8 % 5 AS `mod(8,5)`,8 % 5 | 0 AS `mod(8,5)|0`,-(1 + 1) * -2 AS `-(1+1)*-2`
+Note 1003 select 1 + 1 AS `1+1`,1 - 1 AS `1-1`,1 + 1 * 2 AS `1+1*2`,8 / 5 AS `8/5`,8 MOD 5 AS `8%5`,8 MOD 5 AS `mod(8,5)`,8 MOD 5 | 0 AS `mod(8,5)|0`,-(1 + 1) * -2 AS `-(1+1)*-2`
select 1 | (1+1),5 & 3,bit_count(7) ;
1 | (1+1) 5 & 3 bit_count(7)
3 1 3
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index 8f175a6805b..4243ed9cfb0 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -62,7 +62,7 @@ explain extended select 10 % 7, 10 mod 7, 10 div 3;
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 10 % 7 AS `10 % 7`,10 % 7 AS `10 mod 7`,10 DIV 3 AS `10 div 3`
+Note 1003 select 10 MOD 7 AS `10 % 7`,10 MOD 7 AS `10 mod 7`,10 DIV 3 AS `10 div 3`
select 18446744073709551615, 18446744073709551615 DIV 1, 18446744073709551615 DIV 2;
18446744073709551615 18446744073709551615 DIV 1 18446744073709551615 DIV 2
18446744073709551615 18446744073709551615 9223372036854775807
diff --git a/mysql-test/r/gis-debug.result b/mysql-test/r/gis-debug.result
index 1516c3d5089..be4145f2236 100644
--- a/mysql-test/r/gis-debug.result
+++ b/mysql-test/r/gis-debug.result
@@ -403,5 +403,5 @@ ERROR HY000: Illegal parameter data types varchar and geometry for operation '-'
CREATE TABLE t1 AS SELECT '0'/POINT(0,0) LIMIT 0;
ERROR HY000: Illegal parameter data types varchar and geometry for operation '/'
CREATE TABLE t1 AS SELECT '0' MOD POINT(0,0) LIMIT 0;
-ERROR HY000: Illegal parameter data types varchar and geometry for operation '%'
+ERROR HY000: Illegal parameter data types varchar and geometry for operation 'MOD'
SET debug_dbug='-d,num_op';
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 73ec9d3049d..aa4ba5e6a1c 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -4060,7 +4060,7 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '*'
SELECT POINT(1,1) / 1;
ERROR HY000: Illegal parameter data types geometry and int for operation '/'
SELECT POINT(1,1) MOD 1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '%'
+ERROR HY000: Illegal parameter data types geometry and int for operation 'MOD'
SELECT 1 + POINT(1,1);
ERROR HY000: Illegal parameter data types int and geometry for operation '+'
SELECT 1 - POINT(1,1);
@@ -4070,7 +4070,7 @@ ERROR HY000: Illegal parameter data types int and geometry for operation '*'
SELECT 1 / POINT(1,1);
ERROR HY000: Illegal parameter data types int and geometry for operation '/'
SELECT 1 MOD POINT(1,1);
-ERROR HY000: Illegal parameter data types int and geometry for operation '%'
+ERROR HY000: Illegal parameter data types int and geometry for operation 'MOD'
SELECT a + 1 FROM t1;
ERROR HY000: Illegal parameter data types geometry and int for operation '+'
SELECT a - 1 FROM t1;
@@ -4080,7 +4080,7 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '*'
SELECT a / 1 FROM t1;
ERROR HY000: Illegal parameter data types geometry and int for operation '/'
SELECT a MOD 1 FROM t1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '%'
+ERROR HY000: Illegal parameter data types geometry and int for operation 'MOD'
SELECT 1 + a FROM t1;
ERROR HY000: Illegal parameter data types int and geometry for operation '+'
SELECT 1 - a FROM t1;
@@ -4090,7 +4090,7 @@ ERROR HY000: Illegal parameter data types int and geometry for operation '*'
SELECT 1 / a FROM t1;
ERROR HY000: Illegal parameter data types int and geometry for operation '/'
SELECT 1 MOD a FROM t1;
-ERROR HY000: Illegal parameter data types int and geometry for operation '%'
+ERROR HY000: Illegal parameter data types int and geometry for operation 'MOD'
SELECT COALESCE(a) + 1 FROM t1;
ERROR HY000: Illegal parameter data types geometry and int for operation '+'
SELECT COALESCE(a) - 1 FROM t1;
@@ -4100,7 +4100,7 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '*'
SELECT COALESCE(a) / 1 FROM t1;
ERROR HY000: Illegal parameter data types geometry and int for operation '/'
SELECT COALESCE(a) MOD 1 FROM t1;
-ERROR HY000: Illegal parameter data types geometry and int for operation '%'
+ERROR HY000: Illegal parameter data types geometry and int for operation 'MOD'
SELECT 1 + COALESCE(a) FROM t1;
ERROR HY000: Illegal parameter data types int and geometry for operation '+'
SELECT 1 - COALESCE(a) FROM t1;
@@ -4110,7 +4110,7 @@ ERROR HY000: Illegal parameter data types int and geometry for operation '*'
SELECT 1 / COALESCE(a) FROM t1;
ERROR HY000: Illegal parameter data types int and geometry for operation '/'
SELECT 1 MOD COALESCE(a) FROM t1;
-ERROR HY000: Illegal parameter data types int and geometry for operation '%'
+ERROR HY000: Illegal parameter data types int and geometry for operation 'MOD'
DROP TABLE t1;
#
# MDEV-12514 Split Item_temporal_func::fix_length_and_dec()
diff --git a/mysql-test/suite/compat/oracle/r/vcol.result b/mysql-test/suite/compat/oracle/r/vcol.result
new file mode 100644
index 00000000000..89118bad2fd
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/r/vcol.result
@@ -0,0 +1,23 @@
+#
+# MDEV-13500 sql_mode=ORACLE: can't create a virtual column with function MOD
+#
+SET sql_mode=ORACLE;
+CREATE TABLE t1 (c1 INTEGER, c2 INTEGER AS (c1 MOD 10) VIRTUAL);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE "t1" (
+ "c1" int(11) DEFAULT NULL,
+ "c2" int(11) GENERATED ALWAYS AS ("c1" MOD 10) VIRTUAL
+)
+INSERT INTO t1 (c1) VALUES (999);
+SELECT * FROM t1;
+c1 c2
+999 9
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT a MOD 10 FROM t1;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE VIEW "v1" AS select "t1"."a" MOD 10 AS "a MOD 10" from "t1" latin1 latin1_swedish_ci
+DROP VIEW v1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/compat/oracle/t/vcol.test b/mysql-test/suite/compat/oracle/t/vcol.test
new file mode 100644
index 00000000000..1317006fc0f
--- /dev/null
+++ b/mysql-test/suite/compat/oracle/t/vcol.test
@@ -0,0 +1,16 @@
+--echo #
+--echo # MDEV-13500 sql_mode=ORACLE: can't create a virtual column with function MOD
+--echo #
+
+SET sql_mode=ORACLE;
+CREATE TABLE t1 (c1 INTEGER, c2 INTEGER AS (c1 MOD 10) VIRTUAL);
+SHOW CREATE TABLE t1;
+INSERT INTO t1 (c1) VALUES (999);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT);
+CREATE VIEW v1 AS SELECT a MOD 10 FROM t1;
+SHOW CREATE VIEW v1;
+DROP VIEW v1;
+DROP TABLE t1;
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 e93d3bf025a..1f3a1b641ba 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
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 563883adce0..40029079943 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
describe t1;
Field Type Null Key Default Extra
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 d0a00b6221e..da1ecda5ca7 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
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 1ed96d0345b..9165fc31cf7 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
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 5e165b42be7..fbdd663d721 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
@@ -393,7 +393,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -410,7 +410,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
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 7a18bf2d8fb..c92760f75b5 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
@@ -393,7 +393,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
@@ -410,7 +410,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert into t1 values (11,default);
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_basic.result b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
index bd44661f5dd..73c52f40eb7 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_basic.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
@@ -546,9 +546,9 @@ t1 CREATE TABLE `t1` (
`col2` int(11) NOT NULL,
`col3` int(11) NOT NULL,
`col4` int(11) DEFAULT NULL,
- `col5` int(11) GENERATED ALWAYS AS (`col2` % `col3`) VIRTUAL,
+ `col5` int(11) GENERATED ALWAYS AS (`col2` MOD `col3`) VIRTUAL,
`col7` int(11) GENERATED ALWAYS AS (`col5` * `col5`) VIRTUAL,
- `col8` int(11) GENERATED ALWAYS AS (`col5` % `col5`) VIRTUAL,
+ `col8` int(11) GENERATED ALWAYS AS (`col5` MOD `col5`) VIRTUAL,
`col9` text DEFAULT NULL,
`col6` int(11) DEFAULT NULL,
UNIQUE KEY `uidx` (`col5`)
diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
index 490a79155a2..9697328ff25 100644
--- a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
+++ b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result
@@ -2318,7 +2318,7 @@ t55 CREATE TABLE `t55` (
`col1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY LIST (`colint`)
-SUBPARTITION BY HASH (`col1` % 10)
+SUBPARTITION BY HASH (`col1` MOD 10)
SUBPARTITIONS 5
(PARTITION `p0` VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM,
PARTITION `p1` VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
index 93862512ea1..ce3dd51496e 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
@@ -1123,7 +1123,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -3284,7 +3284,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3829,7 +3829,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -5413,7 +5413,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -7574,7 +7574,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -8119,7 +8119,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
index 91dd960f516..a276e1593ee 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
@@ -1282,7 +1282,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -3445,7 +3445,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3990,7 +3990,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -5574,7 +5574,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -7737,7 +7737,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -8282,7 +8282,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
index e10fb459e99..b4e1ddc577b 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
@@ -1016,7 +1016,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -2971,7 +2971,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3464,7 +3464,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -4896,7 +4896,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -6849,7 +6849,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -7342,7 +7342,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -8770,7 +8770,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -10723,7 +10723,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -11216,7 +11216,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -12644,7 +12644,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -14597,7 +14597,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -15090,7 +15090,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
index ee587189113..59039b97f65 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
@@ -1018,7 +1018,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -2973,7 +2973,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3466,7 +3466,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -5000,7 +5000,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -7163,7 +7163,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -7708,7 +7708,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -9292,7 +9292,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -11455,7 +11455,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -12000,7 +12000,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -13484,7 +13484,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -15437,7 +15437,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -15930,7 +15930,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -17464,7 +17464,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -19625,7 +19625,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -20170,7 +20170,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -21754,7 +21754,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -23915,7 +23915,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -24460,7 +24460,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
index 5fef45b630d..69548fdb94b 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
@@ -1022,7 +1022,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -2981,7 +2981,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3476,7 +3476,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -5016,7 +5016,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -7183,7 +7183,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -7730,7 +7730,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -9320,7 +9320,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -11487,7 +11487,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -12034,7 +12034,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx1` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -13525,7 +13525,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -15496,7 +15496,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -15992,7 +15992,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -17535,7 +17535,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -19714,7 +19714,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -20262,7 +20262,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int1`,`f_int2`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -21855,7 +21855,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -24034,7 +24034,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -24582,7 +24582,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL,
UNIQUE KEY `uidx` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index e32cd4394ad..3b84c0295f2 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -1007,7 +1007,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -2946,7 +2946,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -3434,7 +3434,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -4848,7 +4848,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -6781,7 +6781,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -7269,7 +7269,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -8795,7 +8795,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 4)
+ PARTITION BY LIST (`f_int1` MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -10946,7 +10946,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int1` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -11487,7 +11487,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int1`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
@@ -13064,7 +13064,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST ((`f_int1` + `f_int2`) % 4)
+ PARTITION BY LIST ((`f_int1` + `f_int2`) MOD 4)
(PARTITION `part_3` VALUES IN (-3) ENGINE = MyISAM,
PARTITION `part_2` VALUES IN (-2) ENGINE = MyISAM,
PARTITION `part_1` VALUES IN (-1) ENGINE = MyISAM,
@@ -15209,7 +15209,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 3))
+ PARTITION BY LIST (abs(`f_int1` MOD 3))
SUBPARTITION BY HASH (`f_int2` + 1)
(PARTITION `part1` VALUES IN (0)
(SUBPARTITION `sp11` ENGINE = MyISAM,
@@ -15750,7 +15750,7 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `uidx1` (`f_int1`,`f_int2`),
UNIQUE KEY `uidx2` (`f_int2`,`f_int1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (abs(`f_int1` % 2))
+ PARTITION BY LIST (abs(`f_int1` MOD 2))
SUBPARTITION BY KEY (`f_int2`)
SUBPARTITIONS 3
(PARTITION `part1` VALUES IN (0) ENGINE = MyISAM,
diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result
index ff1ca17bd5d..a5d257f64e0 100644
--- a/mysql-test/suite/parts/r/partition_syntax_innodb.result
+++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result
@@ -658,7 +658,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = InnoDB,
PARTITION `part3` VALUES IN (1) ENGINE = InnoDB)
@@ -685,7 +685,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = InnoDB,
PARTITION `part2` VALUES IN (0) ENGINE = InnoDB,
PARTITION `part3` VALUES IN (1) ENGINE = InnoDB)
diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result
index b54591fe538..765280f35c6 100644
--- a/mysql-test/suite/parts/r/partition_syntax_myisam.result
+++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result
@@ -658,7 +658,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = MyISAM,
PARTITION `part3` VALUES IN (1) ENGINE = MyISAM)
@@ -693,7 +693,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = MyISAM,
PARTITION `part2` VALUES IN (0) ENGINE = MyISAM,
PARTITION `part3` VALUES IN (1) ENGINE = MyISAM)
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 8bfb8f0429c..0f80365f6a7 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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 96eb2bdc02f..e53a7594663 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL COMMENT 'my comment'
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index 9aadc5ed4bb..2f737c5c51b 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -284,7 +284,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL,
`b` varchar(32) DEFAULT NULL,
- `c` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL,
+ `c` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL,
`d` varchar(5) GENERATED ALWAYS AS (left(`b`,5)) STORED
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from 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 f4cbb5bd662..84817469fa2 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
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 87bd1bcf530..b4b41635110 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) GENERATED ALWAYS AS (`a` % 2) STORED
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) STORED
) 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) GENERATED ALWAYS AS (`a` % 2) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
# Case 9. CREATE LIKE
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 dd767071dc9..86030a304d4 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
@@ -393,7 +393,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert ignore into t1 values (11,default);
@@ -410,7 +410,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
+ `b` int(11) GENERATED ALWAYS AS (`a` MOD 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
insert ignore into t1 values (11,default);
diff --git a/sql/item_func.h b/sql/item_func.h
index d537648f9dc..91129d27fe5 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1103,7 +1103,7 @@ public:
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
- const char *func_name() const { return "%"; }
+ const char *func_name() const { return "MOD"; }
enum precedence precedence() const { return MUL_PRECEDENCE; }
void result_precision();
void fix_length_and_dec();
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp.result
index 9ef1ff28f10..101e159eaf3 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp.result
@@ -56,7 +56,7 @@ EXPLAIN
"used_key_parts": ["kp1"],
"rows": 1000,
"filtered": 100,
- "index_condition": "t3.kp1 between 2 and 4 and t3.kp1 % 3 = 0",
+ "index_condition": "t3.kp1 between 2 and 4 and t3.kp1 MOD 3 = 0",
"attached_condition": "t3.kp2 like '%foo%'"
}
}
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp_rev.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp_rev.result
index 9c4b2d22ad7..b00e0e14e46 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp_rev.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_icp_rev.result
@@ -56,7 +56,7 @@ EXPLAIN
"used_key_parts": ["kp1"],
"rows": 1000,
"filtered": 100,
- "index_condition": "t3.kp1 between 2 and 4 and t3.kp1 % 3 = 0",
+ "index_condition": "t3.kp1 between 2 and 4 and t3.kp1 MOD 3 = 0",
"attached_condition": "t3.kp2 like '%foo%'"
}
}
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
index c84b4601332..1a4bf02cc7c 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
@@ -658,7 +658,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = TokuDB,
PARTITION `part3` VALUES IN (1) ENGINE = TokuDB)
@@ -685,7 +685,7 @@ t1 CREATE TABLE `t1` (
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
- PARTITION BY LIST (`f_int1` % 2)
+ PARTITION BY LIST (`f_int1` MOD 2)
(PARTITION `part1` VALUES IN (NULL) ENGINE = TokuDB,
PARTITION `part2` VALUES IN (0) ENGINE = TokuDB,
PARTITION `part3` VALUES IN (1) ENGINE = TokuDB)