Skip to content

Commit 1c5ca7c

Browse files
committed
Merge branch '5.5' into 10.0
2 parents 9a4bc0d + ab93a4d commit 1c5ca7c

File tree

15 files changed

+116
-5
lines changed

15 files changed

+116
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ support-files/mysql.spec
214214
support-files/mysqld_multi.server
215215
support-files/wsrep.cnf
216216
support-files/wsrep_notify
217+
support-files/SELinux/centos6-mariadb.pp
217218
tags
218219
tests/async_queries
219220
tests/bug25714

mysql-test/r/ctype_ucs.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,6 +4550,16 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
45504550
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061))
45514551
1
45524552
#
4553+
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
4554+
#
4555+
SET character_set_connection=ucs2;
4556+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
4557+
SELECT @@sql_mode;
4558+
@@sql_mode
4559+
NO_ENGINE_SUBSTITUTION
4560+
SET sql_mode=DEFAULT;
4561+
SET NAMES utf8;
4562+
#
45534563
# End of 5.5 tests
45544564
#
45554565
#

mysql-test/r/ctype_utf16.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,16 @@ ERROR HY000: Invalid utf16 character string: 'DE9899'
15801580
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
15811581
ERROR HY000: Invalid utf16 character string: 'DE9899'
15821582
#
1583+
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
1584+
#
1585+
SET character_set_connection=utf16;
1586+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
1587+
SELECT @@sql_mode;
1588+
@@sql_mode
1589+
NO_ENGINE_SUBSTITUTION
1590+
SET sql_mode=DEFAULT;
1591+
SET NAMES utf8;
1592+
#
15831593
# End of 5.5 tests
15841594
#
15851595
#

mysql-test/r/ctype_utf32.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,16 @@ select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
16621662
c
16631663
FFFF0000
16641664
#
1665+
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
1666+
#
1667+
SET character_set_connection=utf32;
1668+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
1669+
SELECT @@sql_mode;
1670+
@@sql_mode
1671+
NO_ENGINE_SUBSTITUTION
1672+
SET sql_mode=DEFAULT;
1673+
SET NAMES utf8;
1674+
#
16651675
# End of 5.5 tests
16661676
#
16671677
#

mysql-test/t/ctype_ucs.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,14 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061));
811811
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061));
812812
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
813813

814+
--echo #
815+
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
816+
--echo #
817+
SET character_set_connection=ucs2;
818+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
819+
SELECT @@sql_mode;
820+
SET sql_mode=DEFAULT;
821+
SET NAMES utf8;
814822

815823
--echo #
816824
--echo # End of 5.5 tests

mysql-test/t/ctype_utf16.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,15 @@ DO RPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
795795
--error ER_INVALID_CHARACTER_STRING
796796
DO LPAD(_utf16 0x0061 COLLATE utf16_unicode_ci, 10000, 0x0061DE989999);
797797

798+
--echo #
799+
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
800+
--echo #
801+
SET character_set_connection=utf16;
802+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
803+
SELECT @@sql_mode;
804+
SET sql_mode=DEFAULT;
805+
SET NAMES utf8;
806+
798807
--echo #
799808
--echo # End of 5.5 tests
800809
--echo #

mysql-test/t/ctype_utf32.test

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,15 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
894894
#
895895
select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
896896

897+
--echo #
898+
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
899+
--echo #
900+
SET character_set_connection=utf32;
901+
SET sql_mode='NO_ENGINE_SUBSTITUTION';
902+
SELECT @@sql_mode;
903+
SET sql_mode=DEFAULT;
904+
SET NAMES utf8;
905+
897906
--echo #
898907
--echo # End of 5.5 tests
899908
--echo #

scripts/mysqld_safe.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,13 @@ max_fast_restarts=5
870870
have_sleep=1
871871

872872
# close stdout and stderr, everything goes to $logging now
873-
exec 1>&-
874-
exec 2>&-
873+
if expr "${-}" : '.*x' > /dev/null
874+
then
875+
:
876+
else
877+
exec 1>&-
878+
exec 2>&-
879+
fi
875880

876881
while true
877882
do

sql/sys_vars.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ class Sys_var_set: public Sys_var_typelib
12351235

12361236
if (var->value->result_type() == STRING_RESULT)
12371237
{
1238-
if (!(res=var->value->val_str(&str)))
1238+
if (!(res=var->value->val_str_ascii(&str)))
12391239
return true;
12401240
else
12411241
{

support-files/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ IF(UNIX)
6767
ENDFOREACH()
6868
IF(INSTALL_SUPPORTFILESDIR)
6969
INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
70-
INSTALL(DIRECTORY RHEL4-SElinux/ DESTINATION ${inst_location}/SELinux/RHEL4 COMPONENT SupportFiles)
70+
ADD_SUBDIRECTORY(SELinux)
7171
ENDIF()
7272

7373
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)

0 commit comments

Comments
 (0)