Skip to content

Commit 4991eab

Browse files
author
Alexander Barkov
committed
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
2 parents 280866d + fe12756 commit 4991eab

23 files changed

+1146
-433
lines changed

BUILD/SETUP.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fi
205205

206206
max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max"
207207
max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache"
208-
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management"
208+
max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic"
209209
all_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent"
210210

211211
#

mysql-test/r/func_hybrid_type.result

Lines changed: 123 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,14 +1000,14 @@ t2 CREATE TABLE `t2` (
10001000
`least____a_a` int(11) DEFAULT NULL,
10011001
`greatest_a_a` int(11) DEFAULT NULL,
10021002
`___________b` bit(8) DEFAULT NULL,
1003-
`case_______b` int(8) unsigned DEFAULT NULL,
1004-
`case_____b_b` int(8) unsigned DEFAULT NULL,
1005-
`coalesce___b` int(8) unsigned DEFAULT NULL,
1006-
`coalesce_b_b` int(8) unsigned DEFAULT NULL,
1007-
`if_______b_b` int(8) unsigned DEFAULT NULL,
1003+
`case_______b` bit(8) DEFAULT NULL,
1004+
`case_____b_b` bit(8) DEFAULT NULL,
1005+
`coalesce___b` bit(8) DEFAULT NULL,
1006+
`coalesce_b_b` bit(8) DEFAULT NULL,
1007+
`if_______b_b` bit(8) DEFAULT NULL,
10081008
`ifnull___b_b` bit(8) DEFAULT NULL,
1009-
`least____b_b` int(8) unsigned DEFAULT NULL,
1010-
`greatest_b_b` int(8) unsigned DEFAULT NULL
1009+
`least____b_b` bit(8) DEFAULT NULL,
1010+
`greatest_b_b` bit(8) DEFAULT NULL
10111011
) ENGINE=MyISAM DEFAULT CHARSET=latin1
10121012
DROP TABLE t2;
10131013
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -1119,18 +1119,18 @@ GREATEST(a, b) AS greatest_a_b,
11191119
GREATEST(b, a) AS greatest_b_a
11201120
FROM t1;
11211121
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
1122-
def case_____a_b 8 10 10 Y 32928 0 63
1123-
def case_____b_a 8 10 2 Y 32928 0 63
1124-
def coalesce_a_b 8 10 10 Y 32928 0 63
1125-
def coalesce_b_a 8 10 2 Y 32928 0 63
1126-
def if_______a_b 8 10 2 Y 32928 0 63
1127-
def if_______b_a 8 10 10 Y 32928 0 63
1128-
def ifnull___a_b 8 10 10 Y 32928 0 63
1129-
def ifnull___b_a 8 10 2 Y 32928 0 63
1130-
def least____a_b 8 10 2 Y 32928 0 63
1131-
def least____b_a 8 10 2 Y 32928 0 63
1132-
def greatest_a_b 8 10 10 Y 32928 0 63
1133-
def greatest_b_a 8 10 10 Y 32928 0 63
1122+
def case_____a_b 3 10 10 Y 32928 0 63
1123+
def case_____b_a 3 10 2 Y 32928 0 63
1124+
def coalesce_a_b 3 10 10 Y 32928 0 63
1125+
def coalesce_b_a 3 10 2 Y 32928 0 63
1126+
def if_______a_b 3 10 2 Y 32928 0 63
1127+
def if_______b_a 3 10 10 Y 32928 0 63
1128+
def ifnull___a_b 3 10 10 Y 32928 0 63
1129+
def ifnull___b_a 3 10 2 Y 32928 0 63
1130+
def least____a_b 3 10 2 Y 32928 0 63
1131+
def least____b_a 3 10 2 Y 32928 0 63
1132+
def greatest_a_b 3 10 10 Y 32928 0 63
1133+
def greatest_b_a 3 10 10 Y 32928 0 63
11341134
case_____a_b 4294967295
11351135
case_____b_a 50
11361136
coalesce_a_b 4294967295
@@ -1177,14 +1177,14 @@ t2 CREATE TABLE `t2` (
11771177
`least____a_a` int(10) unsigned DEFAULT NULL,
11781178
`greatest_a_a` int(10) unsigned DEFAULT NULL,
11791179
`___________b` bit(8) DEFAULT NULL,
1180-
`case_______b` int(8) unsigned DEFAULT NULL,
1181-
`case_____b_b` int(8) unsigned DEFAULT NULL,
1182-
`coalesce___b` int(8) unsigned DEFAULT NULL,
1183-
`coalesce_b_b` int(8) unsigned DEFAULT NULL,
1184-
`if_______b_b` int(8) unsigned DEFAULT NULL,
1180+
`case_______b` bit(8) DEFAULT NULL,
1181+
`case_____b_b` bit(8) DEFAULT NULL,
1182+
`coalesce___b` bit(8) DEFAULT NULL,
1183+
`coalesce_b_b` bit(8) DEFAULT NULL,
1184+
`if_______b_b` bit(8) DEFAULT NULL,
11851185
`ifnull___b_b` bit(8) DEFAULT NULL,
1186-
`least____b_b` int(8) unsigned DEFAULT NULL,
1187-
`greatest_b_b` int(8) unsigned DEFAULT NULL
1186+
`least____b_b` bit(8) DEFAULT NULL,
1187+
`greatest_b_b` bit(8) DEFAULT NULL
11881188
) ENGINE=MyISAM DEFAULT CHARSET=latin1
11891189
DROP TABLE t2;
11901190
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -1212,8 +1212,8 @@ t2 CREATE TABLE `t2` (
12121212
`coalesce_b_a` int(10) unsigned DEFAULT NULL,
12131213
`if_______a_b` int(10) unsigned DEFAULT NULL,
12141214
`if_______b_a` int(10) unsigned DEFAULT NULL,
1215-
`ifnull___a_b` bigint(10) unsigned DEFAULT NULL,
1216-
`ifnull___b_a` bigint(10) unsigned DEFAULT NULL,
1215+
`ifnull___a_b` int(10) unsigned DEFAULT NULL,
1216+
`ifnull___b_a` int(10) unsigned DEFAULT NULL,
12171217
`least____a_b` int(10) unsigned DEFAULT NULL,
12181218
`least____b_a` int(10) unsigned DEFAULT NULL,
12191219
`greatest_a_b` int(10) unsigned DEFAULT NULL,
@@ -1345,23 +1345,23 @@ SHOW CREATE TABLE t2;
13451345
Table Create Table
13461346
t2 CREATE TABLE `t2` (
13471347
`___________a` bit(7) DEFAULT NULL,
1348-
`case_______a` int(7) unsigned DEFAULT NULL,
1349-
`case_____a_a` int(7) unsigned DEFAULT NULL,
1350-
`coalesce___a` int(7) unsigned DEFAULT NULL,
1351-
`coalesce_a_a` int(7) unsigned DEFAULT NULL,
1352-
`if_______a_a` int(7) unsigned DEFAULT NULL,
1348+
`case_______a` bit(7) DEFAULT NULL,
1349+
`case_____a_a` bit(7) DEFAULT NULL,
1350+
`coalesce___a` bit(7) DEFAULT NULL,
1351+
`coalesce_a_a` bit(7) DEFAULT NULL,
1352+
`if_______a_a` bit(7) DEFAULT NULL,
13531353
`ifnull___a_a` bit(7) DEFAULT NULL,
1354-
`least____a_a` int(7) unsigned DEFAULT NULL,
1355-
`greatest_a_a` int(7) unsigned DEFAULT NULL,
1354+
`least____a_a` bit(7) DEFAULT NULL,
1355+
`greatest_a_a` bit(7) DEFAULT NULL,
13561356
`___________b` bit(8) DEFAULT NULL,
1357-
`case_______b` int(8) unsigned DEFAULT NULL,
1358-
`case_____b_b` int(8) unsigned DEFAULT NULL,
1359-
`coalesce___b` int(8) unsigned DEFAULT NULL,
1360-
`coalesce_b_b` int(8) unsigned DEFAULT NULL,
1361-
`if_______b_b` int(8) unsigned DEFAULT NULL,
1357+
`case_______b` bit(8) DEFAULT NULL,
1358+
`case_____b_b` bit(8) DEFAULT NULL,
1359+
`coalesce___b` bit(8) DEFAULT NULL,
1360+
`coalesce_b_b` bit(8) DEFAULT NULL,
1361+
`if_______b_b` bit(8) DEFAULT NULL,
13621362
`ifnull___b_b` bit(8) DEFAULT NULL,
1363-
`least____b_b` int(8) unsigned DEFAULT NULL,
1364-
`greatest_b_b` int(8) unsigned DEFAULT NULL
1363+
`least____b_b` bit(8) DEFAULT NULL,
1364+
`greatest_b_b` bit(8) DEFAULT NULL
13651365
) ENGINE=MyISAM DEFAULT CHARSET=latin1
13661366
DROP TABLE t2;
13671367
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -1383,18 +1383,18 @@ FROM t1;
13831383
SHOW CREATE TABLE t2;
13841384
Table Create Table
13851385
t2 CREATE TABLE `t2` (
1386-
`case_____a_b` int(8) unsigned DEFAULT NULL,
1387-
`case_____b_a` int(8) unsigned DEFAULT NULL,
1388-
`coalesce_a_b` int(8) unsigned DEFAULT NULL,
1389-
`coalesce_b_a` int(8) unsigned DEFAULT NULL,
1390-
`if_______a_b` int(8) unsigned DEFAULT NULL,
1391-
`if_______b_a` int(8) unsigned DEFAULT NULL,
1386+
`case_____a_b` bit(8) DEFAULT NULL,
1387+
`case_____b_a` bit(8) DEFAULT NULL,
1388+
`coalesce_a_b` bit(8) DEFAULT NULL,
1389+
`coalesce_b_a` bit(8) DEFAULT NULL,
1390+
`if_______a_b` bit(8) DEFAULT NULL,
1391+
`if_______b_a` bit(8) DEFAULT NULL,
13921392
`ifnull___a_b` bit(8) DEFAULT NULL,
13931393
`ifnull___b_a` bit(8) DEFAULT NULL,
1394-
`least____a_b` int(8) unsigned DEFAULT NULL,
1395-
`least____b_a` int(8) unsigned DEFAULT NULL,
1396-
`greatest_a_b` int(8) unsigned DEFAULT NULL,
1397-
`greatest_b_a` int(8) unsigned DEFAULT NULL
1394+
`least____a_b` bit(8) DEFAULT NULL,
1395+
`least____b_a` bit(8) DEFAULT NULL,
1396+
`greatest_a_b` bit(8) DEFAULT NULL,
1397+
`greatest_b_a` bit(8) DEFAULT NULL
13981398
) ENGINE=MyISAM DEFAULT CHARSET=latin1
13991399
DROP TABLE t2;
14001400
DROP TABLE t1;
@@ -1429,8 +1429,8 @@ def coalesce___a 4 12 1 Y 32896 31 63
14291429
def coalesce_a_a 4 12 1 Y 32896 31 63
14301430
def if_______a_a 4 12 1 Y 32896 31 63
14311431
def ifnull___a_a 4 12 1 Y 32896 31 63
1432-
def least____a_a 5 23 1 Y 32896 31 63
1433-
def greatest_a_a 5 23 1 Y 32896 31 63
1432+
def least____a_a 4 23 1 Y 32896 31 63
1433+
def greatest_a_a 4 23 1 Y 32896 31 63
14341434
def test t1 t1 b ___________b 2 6 6 Y 32768 0 63
14351435
def case_______b 2 6 6 Y 32896 0 63
14361436
def case_____b_b 2 6 6 Y 32896 0 63
@@ -1522,23 +1522,23 @@ SHOW CREATE TABLE t2;
15221522
Table Create Table
15231523
t2 CREATE TABLE `t2` (
15241524
`___________a` float DEFAULT NULL,
1525-
`case_______a` double DEFAULT NULL,
1526-
`case_____a_a` double DEFAULT NULL,
1527-
`coalesce___a` double DEFAULT NULL,
1528-
`coalesce_a_a` double DEFAULT NULL,
1529-
`if_______a_a` double DEFAULT NULL,
1525+
`case_______a` float DEFAULT NULL,
1526+
`case_____a_a` float DEFAULT NULL,
1527+
`coalesce___a` float DEFAULT NULL,
1528+
`coalesce_a_a` float DEFAULT NULL,
1529+
`if_______a_a` float DEFAULT NULL,
15301530
`ifnull___a_a` float DEFAULT NULL,
1531-
`least____a_a` double DEFAULT NULL,
1532-
`greatest_a_a` double DEFAULT NULL,
1531+
`least____a_a` float DEFAULT NULL,
1532+
`greatest_a_a` float DEFAULT NULL,
15331533
`___________b` smallint(6) DEFAULT NULL,
1534-
`case_______b` int(6) DEFAULT NULL,
1535-
`case_____b_b` int(6) DEFAULT NULL,
1536-
`coalesce___b` int(6) DEFAULT NULL,
1537-
`coalesce_b_b` int(6) DEFAULT NULL,
1538-
`if_______b_b` int(6) DEFAULT NULL,
1534+
`case_______b` smallint(6) DEFAULT NULL,
1535+
`case_____b_b` smallint(6) DEFAULT NULL,
1536+
`coalesce___b` smallint(6) DEFAULT NULL,
1537+
`coalesce_b_b` smallint(6) DEFAULT NULL,
1538+
`if_______b_b` smallint(6) DEFAULT NULL,
15391539
`ifnull___b_b` smallint(6) DEFAULT NULL,
1540-
`least____b_b` int(6) DEFAULT NULL,
1541-
`greatest_b_b` int(6) DEFAULT NULL
1540+
`least____b_b` smallint(6) DEFAULT NULL,
1541+
`greatest_b_b` smallint(6) DEFAULT NULL
15421542
) ENGINE=MyISAM DEFAULT CHARSET=latin1
15431543
DROP TABLE t2;
15441544
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -1560,12 +1560,12 @@ FROM t1;
15601560
SHOW CREATE TABLE t2;
15611561
Table Create Table
15621562
t2 CREATE TABLE `t2` (
1563-
`case_____a_b` double DEFAULT NULL,
1564-
`case_____b_a` double DEFAULT NULL,
1565-
`coalesce_a_b` double DEFAULT NULL,
1566-
`coalesce_b_a` double DEFAULT NULL,
1567-
`if_______a_b` double DEFAULT NULL,
1568-
`if_______b_a` double DEFAULT NULL,
1563+
`case_____a_b` float DEFAULT NULL,
1564+
`case_____b_a` float DEFAULT NULL,
1565+
`coalesce_a_b` float DEFAULT NULL,
1566+
`coalesce_b_a` float DEFAULT NULL,
1567+
`if_______a_b` float DEFAULT NULL,
1568+
`if_______b_a` float DEFAULT NULL,
15691569
`ifnull___a_b` float DEFAULT NULL,
15701570
`ifnull___b_a` float DEFAULT NULL,
15711571
`least____a_b` double DEFAULT NULL,
@@ -1885,14 +1885,14 @@ t2 CREATE TABLE `t2` (
18851885
`least____a_a` int(11) DEFAULT NULL,
18861886
`greatest_a_a` int(11) DEFAULT NULL,
18871887
`___________b` year(4) DEFAULT NULL,
1888-
`case_______b` int(4) unsigned DEFAULT NULL,
1889-
`case_____b_b` int(4) unsigned DEFAULT NULL,
1890-
`coalesce___b` int(4) unsigned DEFAULT NULL,
1891-
`coalesce_b_b` int(4) unsigned DEFAULT NULL,
1892-
`if_______b_b` int(4) unsigned DEFAULT NULL,
1888+
`case_______b` year(4) DEFAULT NULL,
1889+
`case_____b_b` year(4) DEFAULT NULL,
1890+
`coalesce___b` year(4) DEFAULT NULL,
1891+
`coalesce_b_b` year(4) DEFAULT NULL,
1892+
`if_______b_b` year(4) DEFAULT NULL,
18931893
`ifnull___b_b` year(4) DEFAULT NULL,
1894-
`least____b_b` int(4) unsigned DEFAULT NULL,
1895-
`greatest_b_b` int(4) unsigned DEFAULT NULL
1894+
`least____b_b` year(4) DEFAULT NULL,
1895+
`greatest_b_b` year(4) DEFAULT NULL
18961896
) ENGINE=MyISAM DEFAULT CHARSET=latin1
18971897
DROP TABLE t2;
18981898
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -2062,14 +2062,14 @@ t2 CREATE TABLE `t2` (
20622062
`least____a_a` int(10) unsigned DEFAULT NULL,
20632063
`greatest_a_a` int(10) unsigned DEFAULT NULL,
20642064
`___________b` year(4) DEFAULT NULL,
2065-
`case_______b` int(4) unsigned DEFAULT NULL,
2066-
`case_____b_b` int(4) unsigned DEFAULT NULL,
2067-
`coalesce___b` int(4) unsigned DEFAULT NULL,
2068-
`coalesce_b_b` int(4) unsigned DEFAULT NULL,
2069-
`if_______b_b` int(4) unsigned DEFAULT NULL,
2065+
`case_______b` year(4) DEFAULT NULL,
2066+
`case_____b_b` year(4) DEFAULT NULL,
2067+
`coalesce___b` year(4) DEFAULT NULL,
2068+
`coalesce_b_b` year(4) DEFAULT NULL,
2069+
`if_______b_b` year(4) DEFAULT NULL,
20702070
`ifnull___b_b` year(4) DEFAULT NULL,
2071-
`least____b_b` int(4) unsigned DEFAULT NULL,
2072-
`greatest_b_b` int(4) unsigned DEFAULT NULL
2071+
`least____b_b` year(4) DEFAULT NULL,
2072+
`greatest_b_b` year(4) DEFAULT NULL
20732073
) ENGINE=MyISAM DEFAULT CHARSET=latin1
20742074
DROP TABLE t2;
20752075
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
@@ -3512,5 +3512,40 @@ t2 CREATE TABLE `t2` (
35123512
DROP TABLE t2;
35133513
DROP TABLE t1;
35143514
#
3515+
# MDEV-12617 CASE and CASE-alike hybrid functions do not preserve exact data types
3516+
#
3517+
CREATE TABLE t1 (a FLOAT(10,2));
3518+
CREATE TABLE t2 AS SELECT COALESCE(a) FROM t1;
3519+
SHOW CREATE TABLE t2;
3520+
Table Create Table
3521+
t2 CREATE TABLE `t2` (
3522+
`COALESCE(a)` float(10,2) DEFAULT NULL
3523+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3524+
DROP TABLE t2, t1;
3525+
CREATE TABLE t1 (a FLOAT(10,2));
3526+
CREATE TABLE t2 AS SELECT LEAST(a,a) FROM t1;
3527+
SHOW CREATE TABLE t2;
3528+
Table Create Table
3529+
t2 CREATE TABLE `t2` (
3530+
`LEAST(a,a)` float(19,2) DEFAULT NULL
3531+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3532+
DROP TABLE t2, t1;
3533+
CREATE TABLE t1 (a TINYINT(1));
3534+
CREATE TABLE t2 AS SELECT COALESCE(a) FROM t1;
3535+
SHOW CREATE TABLE t2;
3536+
Table Create Table
3537+
t2 CREATE TABLE `t2` (
3538+
`COALESCE(a)` tinyint(4) DEFAULT NULL
3539+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3540+
DROP TABLE t2, t1;
3541+
CREATE TABLE t1 (a TINYINT(1));
3542+
CREATE TABLE t2 AS SELECT LEAST(a,a) FROM t1;
3543+
SHOW CREATE TABLE t2;
3544+
Table Create Table
3545+
t2 CREATE TABLE `t2` (
3546+
`LEAST(a,a)` tinyint(4) DEFAULT NULL
3547+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3548+
DROP TABLE t2, t1;
3549+
#
35153550
# End of 10.3 tests
35163551
#

0 commit comments

Comments
 (0)