Skip to content

Commit ce07d09

Browse files
committed
Merge 10.0 into 10.1
2 parents de76cbd + 6224666 commit ce07d09

File tree

16 files changed

+145
-28
lines changed

16 files changed

+145
-28
lines changed

client/mysql_upgrade.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ static struct my_option my_long_options[]=
166166
"server with which it was built/distributed.",
167167
&opt_version_check, &opt_version_check, 0,
168168
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
169-
{"write-binlog", OPT_WRITE_BINLOG, "All commands including those, "
170-
"issued by mysqlcheck, are written to the binary log.",
169+
{"write-binlog", OPT_WRITE_BINLOG, "All commands including those "
170+
"issued by mysqlcheck are written to the binary log.",
171171
&opt_write_binlog, &opt_write_binlog, 0, GET_BOOL, NO_ARG,
172172
0, 0, 0, 0, 0, 0},
173173
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}

include/ma_dyncol.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ typedef struct st_mysql_lex_string LEX_STRING;
6363
/* NO and OK is the same used just to show semantics */
6464
#define ER_DYNCOL_NO ER_DYNCOL_OK
6565

66+
#ifdef HAVE_CHARSET_utf8mb4
67+
#define DYNCOL_UTF (&my_charset_utf8mb4_general_ci)
68+
#else
69+
#define DYNCOL_UTF (&my_charset_utf8_general_ci)
70+
#endif
71+
6672
enum enum_dyncol_func_result
6773
{
6874
ER_DYNCOL_OK= 0,

man/mysql_upgrade.1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,7 @@ it was built/distributed. Defaults to on; use \fB\-\-skip\-version\-check\fR to
691691
.sp
692692
Cause binary logging to be enabled while
693693
\fBmysql_upgrade\fR
694-
runs\&. This is the default behavior; to disable binary logging during the upgrade, use the inverse of this option (that is, start the program with
695-
\fB\-\-skip\-write\-binlog\fR)\&.
694+
runs\&.
696695
.RE
697696
.SH "COPYRIGHT"
698697
.br

mysql-test/r/ctype_utf8.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10264,6 +10264,21 @@ DROP FUNCTION iswellformed;
1026410264
DROP TABLE allbytes;
1026510265
# End of ctype_backslash.inc
1026610266
#
10267+
# MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1)
10268+
#
10269+
SET NAMES utf8;
10270+
SELECT CHAR(0xDF USING latin1);
10271+
CHAR(0xDF USING latin1)
10272+
ß
10273+
CREATE OR REPLACE VIEW v1 AS SELECT CHAR(0xDF USING latin1) AS c;
10274+
SHOW CREATE VIEW v1;
10275+
View Create View character_set_client collation_connection
10276+
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select char(0xdf using latin1) AS `c` utf8 utf8_general_ci
10277+
SELECT * FROM v1;
10278+
c
10279+
ß
10280+
DROP VIEW v1;
10281+
#
1026710282
# End of 10.0 tests
1026810283
#
1026910284
#

mysql-test/r/ctype_utf8mb4.result

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3421,6 +3421,32 @@ a b
34213421
a 😁 b a ? b
34223422
DROP TABLE t1;
34233423
#
3424+
# MDEV-8949: COLUMN_CREATE unicode name breakage
3425+
#
3426+
SET NAMES utf8mb4;
3427+
SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
3428+
COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1))
3429+
{"😎":1}
3430+
SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
3431+
COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1))
3432+
`😎`
3433+
SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E
3434+
as int);
3435+
COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E
3436+
as int)
3437+
1
3438+
CREATE TABLE t1 AS SELECT
3439+
COLUMN_LIST(COLUMN_CREATE('a',1)),
3440+
COLUMN_JSON(COLUMN_CREATE('b',1));
3441+
SHOW CREATE TABLE t1;
3442+
Table Create Table
3443+
t1 CREATE TABLE `t1` (
3444+
`COLUMN_LIST(COLUMN_CREATE('a',1))` longtext CHARACTER SET utf8mb4,
3445+
`COLUMN_JSON(COLUMN_CREATE('b',1))` longtext CHARACTER SET utf8mb4
3446+
) ENGINE=MyISAM DEFAULT CHARSET=latin1
3447+
DROP TABLE t1;
3448+
SET NAMES default;
3449+
#
34243450
# End of 10.0 tests
34253451
#
34263452
#

mysql-test/r/func_str.result

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4547,6 +4547,27 @@ set global max_allowed_packet=default;
45474547
# End of 5.6 tests
45484548
#
45494549
#
4550+
# Start of 10.0 tests
4551+
#
4552+
#
4553+
# MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1)
4554+
#
4555+
EXPLAIN EXTENDED SELECT CHAR(0xDF USING latin1);
4556+
id select_type table type possible_keys key key_len ref rows filtered Extra
4557+
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
4558+
Warnings:
4559+
Note 1003 select char(0xdf using latin1) AS `CHAR(0xDF USING latin1)`
4560+
EXPLAIN EXTENDED SELECT CHAR(0xDF USING `binary`);
4561+
id select_type table type possible_keys key key_len ref rows filtered Extra
4562+
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
4563+
Warnings:
4564+
Note 1003 select char(0xdf) AS `CHAR(0xDF USING ``binary``)`
4565+
EXPLAIN EXTENDED SELECT CHAR(0xDF);
4566+
id select_type table type possible_keys key key_len ref rows filtered Extra
4567+
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
4568+
Warnings:
4569+
Note 1003 select char(0xdf) AS `CHAR(0xDF)`
4570+
#
45504571
# Start of 10.1 tests
45514572
#
45524573
#

mysql-test/t/ctype_utf8.test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,18 @@ SELECT _utf8 0x7E, _utf8 X'7E', _utf8 B'01111110';
18691869
let $ctype_unescape_combinations=selected;
18701870
--source include/ctype_unescape.inc
18711871

1872+
--echo #
1873+
--echo # MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1)
1874+
--echo #
1875+
1876+
SET NAMES utf8;
1877+
SELECT CHAR(0xDF USING latin1);
1878+
CREATE OR REPLACE VIEW v1 AS SELECT CHAR(0xDF USING latin1) AS c;
1879+
SHOW CREATE VIEW v1;
1880+
SELECT * FROM v1;
1881+
DROP VIEW v1;
1882+
1883+
18721884
--echo #
18731885
--echo # End of 10.0 tests
18741886
--echo #

mysql-test/t/ctype_utf8mb4.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,24 @@ INSERT INTO t1 SELECT 'a 😁 b', 'a 😁 b';
19131913
SELECT * FROM t1;
19141914
DROP TABLE t1;
19151915

1916+
--echo #
1917+
--echo # MDEV-8949: COLUMN_CREATE unicode name breakage
1918+
--echo #
1919+
1920+
SET NAMES utf8mb4;
1921+
SELECT COLUMN_JSON(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
1922+
SELECT COLUMN_LIST(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1));
1923+
SELECT COLUMN_GET(COLUMN_CREATE(_utf8mb4 0xF09F988E, 1), _utf8mb4 0xF09F988E
1924+
as int);
1925+
1926+
CREATE TABLE t1 AS SELECT
1927+
COLUMN_LIST(COLUMN_CREATE('a',1)),
1928+
COLUMN_JSON(COLUMN_CREATE('b',1));
1929+
SHOW CREATE TABLE t1;
1930+
DROP TABLE t1;
1931+
1932+
SET NAMES default;
1933+
19161934
--echo #
19171935
--echo # End of 10.0 tests
19181936
--echo #

mysql-test/t/func_str.test

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,18 @@ set global max_allowed_packet=default;
17561756
--echo # End of 5.6 tests
17571757
--echo #
17581758

1759+
--echo #
1760+
--echo # Start of 10.0 tests
1761+
--echo #
1762+
1763+
--echo #
1764+
--echo # MDEV-12681 Wrong VIEW results for CHAR(0xDF USING latin1)
1765+
--echo #
1766+
1767+
EXPLAIN EXTENDED SELECT CHAR(0xDF USING latin1);
1768+
EXPLAIN EXTENDED SELECT CHAR(0xDF USING `binary`);
1769+
EXPLAIN EXTENDED SELECT CHAR(0xDF);
1770+
17591771
--echo #
17601772
--echo # Start of 10.1 tests
17611773
--echo #
@@ -1800,7 +1812,6 @@ SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64(
18001812
SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64("Yq==") OR f2= from_base64("YQ=="));
18011813
DROP TABLE t1;
18021814

1803-
18041815
--echo #
18051816
--echo # End of 10.1 tests
18061817
--echo #

mysys/ma_dyncol.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,8 +4183,7 @@ mariadb_dyncol_json_internal(DYNAMIC_COLUMN *str, DYNAMIC_STRING *json,
41834183
}
41844184
else
41854185
{
4186-
if ((rc= mariadb_dyncol_val_str(json, &val,
4187-
&my_charset_utf8_general_ci, '"')) < 0)
4186+
if ((rc= mariadb_dyncol_val_str(json, &val, DYNCOL_UTF, '"')) < 0)
41884187
goto err;
41894188
}
41904189
}

0 commit comments

Comments
 (0)