Commit 9d853230 authored by Alexander Barkov's avatar Alexander Barkov

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"
parent 0f554dd0
......@@ -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"
}
}
}
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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';
......@@ -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()
......
#
# 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;
--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;
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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`)
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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)
......
......@@ -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)
......
......@@ -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;
......@@ -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;
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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);
......
......@@ -1103,7 +1103,7 @@ class Item_func_mod :public Item_num_op
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();
......
......@@ -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%'"
}
}
......
......@@ -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%'"
}
}
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment