Commit f40b9962 authored by Alexander Barkov's avatar Alexander Barkov

Merge 10.0->10.0-connect

parents d05ccc23 a6e5ac22
This diff is collapsed.
...@@ -40,6 +40,49 @@ select 2 /*M!999999 +1 */; ...@@ -40,6 +40,49 @@ select 2 /*M!999999 +1 */;
2 2
select 2 /*M!0000 +1 */; select 2 /*M!0000 +1 */;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0000 +1 */' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '0000 +1 */' at line 1
#
# Testing that MySQL versions >= 5.7.x and < 10.0.0 are ignored (MDEV-5009)
#
SELECT 1 /*!50699 +1*/;
1 +1
2
SELECT 1 /*!50700 +1*/;
1
1
SELECT 1 /*!50999 +1*/;
1
1
SELECT 1 /*!99999 +1*/;
1
1
SELECT 1 /*!100000 +1*/;
1 +1
2
SELECT 1 /*!110000 +1*/;
1
1
#
# Tesing that versions >= 5.7.x and < 10.0.0 are not ignored
# when used with the MariaDB executable comment syntax.
#
SELECT 1 /*M!50699 +1*/;
1 +1
2
SELECT 1 /*M!50700 +1*/;
1 +1
2
SELECT 1 /*M!50999 +1*/;
1 +1
2
SELECT 1 /*M!99999 +1*/;
1 +1
2
SELECT 1 /*M!100000 +1*/;
1 +1
2
SELECT 1 /*M!110000 +1*/;
1
1
select 1/*!2*/; select 1/*!2*/;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2*/' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2*/' at line 1
select 1/*!0000002*/; select 1/*!0000002*/;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2374,3 +2374,11 @@ EXTRACT(HOUR FROM TIME('1 02:00:00')) EXTRACT(HOUR FROM TIME('26:00:00')) ...@@ -2374,3 +2374,11 @@ EXTRACT(HOUR FROM TIME('1 02:00:00')) EXTRACT(HOUR FROM TIME('26:00:00'))
SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00'));
EXTRACT(DAY FROM TIME('1 02:00:00')) EXTRACT(DAY FROM TIME('26:00:00')) EXTRACT(DAY FROM TIME('1 02:00:00')) EXTRACT(DAY FROM TIME('26:00:00'))
1 1 1 1
#
# MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL)
#
SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE) 254 19 19 Y 0 0 8
DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE)
2011-01-02 12:14:14
...@@ -83,6 +83,7 @@ utf8_unicode_520_ci utf8 214 # # ...@@ -83,6 +83,7 @@ utf8_unicode_520_ci utf8 214 # #
utf8_vietnamese_ci utf8 215 # # utf8_vietnamese_ci utf8 215 # #
utf8_general_mysql500_ci utf8 223 # # utf8_general_mysql500_ci utf8 223 # #
utf8_croatian_ci utf8 576 # # utf8_croatian_ci utf8 576 # #
utf8_myanmar_ci utf8 577 # #
ucs2_general_ci ucs2 35 Yes # # ucs2_general_ci ucs2 35 Yes # #
ucs2_bin ucs2 90 # # ucs2_bin ucs2 90 # #
ucs2_unicode_ci ucs2 128 # # ucs2_unicode_ci ucs2 128 # #
...@@ -111,6 +112,7 @@ ucs2_unicode_520_ci ucs2 150 # # ...@@ -111,6 +112,7 @@ ucs2_unicode_520_ci ucs2 150 # #
ucs2_vietnamese_ci ucs2 151 # # ucs2_vietnamese_ci ucs2 151 # #
ucs2_general_mysql500_ci ucs2 159 # # ucs2_general_mysql500_ci ucs2 159 # #
ucs2_croatian_ci ucs2 640 # # ucs2_croatian_ci ucs2 640 # #
ucs2_myanmar_ci ucs2 641 # #
cp866_general_ci cp866 36 Yes # # cp866_general_ci cp866 36 Yes # #
cp866_bin cp866 68 # # cp866_bin cp866 68 # #
keybcs2_general_ci keybcs2 37 Yes # # keybcs2_general_ci keybcs2 37 Yes # #
...@@ -152,6 +154,7 @@ utf8mb4_croatian_mysql561_ci utf8mb4 245 # # ...@@ -152,6 +154,7 @@ utf8mb4_croatian_mysql561_ci utf8mb4 245 # #
utf8mb4_unicode_520_ci utf8mb4 246 # # utf8mb4_unicode_520_ci utf8mb4 246 # #
utf8mb4_vietnamese_ci utf8mb4 247 # # utf8mb4_vietnamese_ci utf8mb4 247 # #
utf8mb4_croatian_ci utf8mb4 608 # # utf8mb4_croatian_ci utf8mb4 608 # #
utf8mb4_myanmar_ci utf8mb4 609 # #
cp1251_bulgarian_ci cp1251 14 # # cp1251_bulgarian_ci cp1251 14 # #
cp1251_ukrainian_ci cp1251 23 # # cp1251_ukrainian_ci cp1251 23 # #
cp1251_bin cp1251 50 # # cp1251_bin cp1251 50 # #
...@@ -184,6 +187,7 @@ utf16_croatian_mysql561_ci utf16 122 # # ...@@ -184,6 +187,7 @@ utf16_croatian_mysql561_ci utf16 122 # #
utf16_unicode_520_ci utf16 123 # # utf16_unicode_520_ci utf16 123 # #
utf16_vietnamese_ci utf16 124 # # utf16_vietnamese_ci utf16 124 # #
utf16_croatian_ci utf16 672 # # utf16_croatian_ci utf16 672 # #
utf16_myanmar_ci utf16 673 # #
utf16le_general_ci utf16le 56 Yes # # utf16le_general_ci utf16le 56 Yes # #
utf16le_bin utf16le 62 # # utf16le_bin utf16le 62 # #
cp1256_general_ci cp1256 57 Yes # # cp1256_general_ci cp1256 57 Yes # #
...@@ -218,6 +222,7 @@ utf32_croatian_mysql561_ci utf32 181 # # ...@@ -218,6 +222,7 @@ utf32_croatian_mysql561_ci utf32 181 # #
utf32_unicode_520_ci utf32 182 # # utf32_unicode_520_ci utf32 182 # #
utf32_vietnamese_ci utf32 183 # # utf32_vietnamese_ci utf32 183 # #
utf32_croatian_ci utf32 736 # # utf32_croatian_ci utf32 736 # #
utf32_myanmar_ci utf32 737 # #
binary binary 63 Yes # # binary binary 63 Yes # #
geostd8_general_ci geostd8 92 Yes # # geostd8_general_ci geostd8 92 Yes # #
geostd8_bin geostd8 93 # # geostd8_bin geostd8 93 # #
......
...@@ -83,6 +83,7 @@ utf8_unicode_520_ci utf8 214 # # ...@@ -83,6 +83,7 @@ utf8_unicode_520_ci utf8 214 # #
utf8_vietnamese_ci utf8 215 # # utf8_vietnamese_ci utf8 215 # #
utf8_general_mysql500_ci utf8 223 # # utf8_general_mysql500_ci utf8 223 # #
utf8_croatian_ci utf8 576 # # utf8_croatian_ci utf8 576 # #
utf8_myanmar_ci utf8 577 # #
ucs2_general_ci ucs2 35 Yes # # ucs2_general_ci ucs2 35 Yes # #
ucs2_bin ucs2 90 # # ucs2_bin ucs2 90 # #
ucs2_unicode_ci ucs2 128 # # ucs2_unicode_ci ucs2 128 # #
...@@ -111,6 +112,7 @@ ucs2_unicode_520_ci ucs2 150 # # ...@@ -111,6 +112,7 @@ ucs2_unicode_520_ci ucs2 150 # #
ucs2_vietnamese_ci ucs2 151 # # ucs2_vietnamese_ci ucs2 151 # #
ucs2_general_mysql500_ci ucs2 159 # # ucs2_general_mysql500_ci ucs2 159 # #
ucs2_croatian_ci ucs2 640 # # ucs2_croatian_ci ucs2 640 # #
ucs2_myanmar_ci ucs2 641 # #
cp866_general_ci cp866 36 Yes # # cp866_general_ci cp866 36 Yes # #
cp866_bin cp866 68 # # cp866_bin cp866 68 # #
keybcs2_general_ci keybcs2 37 Yes # # keybcs2_general_ci keybcs2 37 Yes # #
...@@ -152,6 +154,7 @@ utf8mb4_croatian_mysql561_ci utf8mb4 245 # # ...@@ -152,6 +154,7 @@ utf8mb4_croatian_mysql561_ci utf8mb4 245 # #
utf8mb4_unicode_520_ci utf8mb4 246 # # utf8mb4_unicode_520_ci utf8mb4 246 # #
utf8mb4_vietnamese_ci utf8mb4 247 # # utf8mb4_vietnamese_ci utf8mb4 247 # #
utf8mb4_croatian_ci utf8mb4 608 # # utf8mb4_croatian_ci utf8mb4 608 # #
utf8mb4_myanmar_ci utf8mb4 609 # #
cp1251_bulgarian_ci cp1251 14 # # cp1251_bulgarian_ci cp1251 14 # #
cp1251_ukrainian_ci cp1251 23 # # cp1251_ukrainian_ci cp1251 23 # #
cp1251_bin cp1251 50 # # cp1251_bin cp1251 50 # #
...@@ -184,6 +187,7 @@ utf16_croatian_mysql561_ci utf16 122 # # ...@@ -184,6 +187,7 @@ utf16_croatian_mysql561_ci utf16 122 # #
utf16_unicode_520_ci utf16 123 # # utf16_unicode_520_ci utf16 123 # #
utf16_vietnamese_ci utf16 124 # # utf16_vietnamese_ci utf16 124 # #
utf16_croatian_ci utf16 672 # # utf16_croatian_ci utf16 672 # #
utf16_myanmar_ci utf16 673 # #
utf16le_general_ci utf16le 56 Yes # # utf16le_general_ci utf16le 56 Yes # #
utf16le_bin utf16le 62 # # utf16le_bin utf16le 62 # #
cp1256_general_ci cp1256 57 Yes # # cp1256_general_ci cp1256 57 Yes # #
...@@ -218,6 +222,7 @@ utf32_croatian_mysql561_ci utf32 181 # # ...@@ -218,6 +222,7 @@ utf32_croatian_mysql561_ci utf32 181 # #
utf32_unicode_520_ci utf32 182 # # utf32_unicode_520_ci utf32 182 # #
utf32_vietnamese_ci utf32 183 # # utf32_vietnamese_ci utf32 183 # #
utf32_croatian_ci utf32 736 # # utf32_croatian_ci utf32 736 # #
utf32_myanmar_ci utf32 737 # #
binary binary 63 Yes # # binary binary 63 Yes # #
geostd8_general_ci geostd8 92 Yes # # geostd8_general_ci geostd8 92 Yes # #
geostd8_bin geostd8 93 # # geostd8_bin geostd8 93 # #
......
...@@ -31,6 +31,27 @@ select 2 /*M!999999 +1 */; ...@@ -31,6 +31,27 @@ select 2 /*M!999999 +1 */;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
select 2 /*M!0000 +1 */; select 2 /*M!0000 +1 */;
--echo #
--echo # Testing that MySQL versions >= 5.7.x and < 10.0.0 are ignored (MDEV-5009)
--echo #
SELECT 1 /*!50699 +1*/;
SELECT 1 /*!50700 +1*/;
SELECT 1 /*!50999 +1*/;
SELECT 1 /*!99999 +1*/;
SELECT 1 /*!100000 +1*/;
SELECT 1 /*!110000 +1*/;
--echo #
--echo # Tesing that versions >= 5.7.x and < 10.0.0 are not ignored
--echo # when used with the MariaDB executable comment syntax.
--echo #
SELECT 1 /*M!50699 +1*/;
SELECT 1 /*M!50700 +1*/;
SELECT 1 /*M!50999 +1*/;
SELECT 1 /*M!99999 +1*/;
SELECT 1 /*M!100000 +1*/;
SELECT 1 /*M!110000 +1*/;
# #
# Bug#25411 (trigger code truncated) # Bug#25411 (trigger code truncated)
# #
......
...@@ -564,3 +564,21 @@ SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci; ...@@ -564,3 +564,21 @@ SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci;
--echo # --echo #
--echo # End of 5.6 tests --echo # End of 5.6 tests
--echo # --echo #
--echo #
--echo # Start of MariaDB-10.0 tests
--echo #
--echo
--echo #
--echo # MDEV-4929 Myanmar collation
--echo #
SET NAMES utf8 COLLATE utf8_myanmar_ci;
--source include/ctype_myanmar.inc
SET collation_connection=ucs2_myanmar_ci;
--source include/ctype_myanmar.inc
--echo #
--echo # End of MariaDB-10.0 tests
--echo #
-- source include/have_ucs2.inc
-- source include/have_utf16.inc -- source include/have_utf16.inc
--disable_warnings --disable_warnings
...@@ -190,3 +191,20 @@ SET collation_connection=utf16_unicode_520_ci; ...@@ -190,3 +191,20 @@ SET collation_connection=utf16_unicode_520_ci;
--echo # --echo #
--echo # End of 5.6 tests --echo # End of 5.6 tests
--echo # --echo #
--echo #
--echo # Start of MariaDB-10.0 tests
--echo #
--echo
--echo #
--echo # MDEV-4929 Myanmar collation
--echo #
SET NAMES utf8;
SET collation_connection=utf16_myanmar_ci;
--source include/ctype_myanmar.inc
--echo #
--echo # End of MariaDB-10.0 tests
--echo #
...@@ -212,3 +212,20 @@ SET collation_connection=utf32_unicode_520_ci; ...@@ -212,3 +212,20 @@ SET collation_connection=utf32_unicode_520_ci;
--echo # --echo #
--echo # End of 5.6 tests --echo # End of 5.6 tests
--echo # --echo #
--echo #
--echo # Start of MariaDB-10.0 tests
--echo #
--echo
--echo #
--echo # MDEV-4929 Myanmar collation
--echo #
SET NAMES utf8;
SET collation_connection=utf32_myanmar_ci;
--source include/ctype_myanmar.inc
--echo #
--echo # End of MariaDB-10.0 tests
--echo #
...@@ -54,3 +54,19 @@ SET collation_connection=utf8mb4_czech_ci; ...@@ -54,3 +54,19 @@ SET collation_connection=utf8mb4_czech_ci;
--echo # --echo #
--echo # End of 5.5 tests --echo # End of 5.5 tests
--echo # --echo #
--echo #
--echo # Start of MariaDB-10.0 tests
--echo #
--echo
--echo #
--echo # MDEV-4929 Myanmar collation
--echo #
SET NAMES utf8mb4 COLLATE utf8mb4_myanmar_ci;
--source include/ctype_myanmar.inc
--echo #
--echo # End of MariaDB-10.0 tests
--echo #
...@@ -1449,3 +1449,11 @@ SELECT EXTRACT(HOUR FROM '1 02:00:00'), EXTRACT(HOUR FROM '26:00:00'); ...@@ -1449,3 +1449,11 @@ SELECT EXTRACT(HOUR FROM '1 02:00:00'), EXTRACT(HOUR FROM '26:00:00');
SELECT EXTRACT(HOUR FROM TIME'1 02:00:00'), EXTRACT(HOUR FROM TIME'26:00:00'); SELECT EXTRACT(HOUR FROM TIME'1 02:00:00'), EXTRACT(HOUR FROM TIME'26:00:00');
SELECT EXTRACT(HOUR FROM TIME('1 02:00:00')), EXTRACT(HOUR FROM TIME('26:00:00')); SELECT EXTRACT(HOUR FROM TIME('1 02:00:00')), EXTRACT(HOUR FROM TIME('26:00:00'));
SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00'));
--echo #
--echo # MDEV-4838 Wrong metadata for DATE_ADD('string', INVERVAL)
--echo #
--enable_metadata
SELECT DATE_ADD('2011-01-02 12:13:14', INTERVAL 1 MINUTE);
--disable_metadata
...@@ -48,6 +48,7 @@ extern struct charset_info_st my_charset_ucs2_sinhala_uca_ci; ...@@ -48,6 +48,7 @@ extern struct charset_info_st my_charset_ucs2_sinhala_uca_ci;
extern struct charset_info_st my_charset_ucs2_unicode_520_ci; extern struct charset_info_st my_charset_ucs2_unicode_520_ci;
extern struct charset_info_st my_charset_ucs2_vietnamese_ci; extern struct charset_info_st my_charset_ucs2_vietnamese_ci;
extern struct charset_info_st my_charset_ucs2_croatian_uca_ci; extern struct charset_info_st my_charset_ucs2_croatian_uca_ci;
extern struct charset_info_st my_charset_ucs2_myanmar_uca_ci;
#endif #endif
...@@ -76,6 +77,7 @@ extern struct charset_info_st my_charset_utf32_sinhala_uca_ci; ...@@ -76,6 +77,7 @@ extern struct charset_info_st my_charset_utf32_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf32_unicode_520_ci; extern struct charset_info_st my_charset_utf32_unicode_520_ci;
extern struct charset_info_st my_charset_utf32_vietnamese_ci; extern struct charset_info_st my_charset_utf32_vietnamese_ci;
extern struct charset_info_st my_charset_utf32_croatian_uca_ci; extern struct charset_info_st my_charset_utf32_croatian_uca_ci;
extern struct charset_info_st my_charset_utf32_myanmar_uca_ci;
#endif /* HAVE_CHARSET_utf32 */ #endif /* HAVE_CHARSET_utf32 */
...@@ -104,6 +106,7 @@ extern struct charset_info_st my_charset_utf16_sinhala_uca_ci; ...@@ -104,6 +106,7 @@ extern struct charset_info_st my_charset_utf16_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf16_unicode_520_ci; extern struct charset_info_st my_charset_utf16_unicode_520_ci;
extern struct charset_info_st my_charset_utf16_vietnamese_ci; extern struct charset_info_st my_charset_utf16_vietnamese_ci;
extern struct charset_info_st my_charset_utf16_croatian_uca_ci; extern struct charset_info_st my_charset_utf16_croatian_uca_ci;
extern struct charset_info_st my_charset_utf16_myanmar_uca_ci;
#endif /* HAVE_CHARSET_utf16 */ #endif /* HAVE_CHARSET_utf16 */
...@@ -132,6 +135,7 @@ extern struct charset_info_st my_charset_utf8_sinhala_uca_ci; ...@@ -132,6 +135,7 @@ extern struct charset_info_st my_charset_utf8_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf8_unicode_520_ci; extern struct charset_info_st my_charset_utf8_unicode_520_ci;
extern struct charset_info_st my_charset_utf8_vietnamese_ci; extern struct charset_info_st my_charset_utf8_vietnamese_ci;
extern struct charset_info_st my_charset_utf8_croatian_uca_ci; extern struct charset_info_st my_charset_utf8_croatian_uca_ci;
extern struct charset_info_st my_charset_utf8_myanmar_uca_ci;
#ifdef HAVE_UTF8_GENERAL_CS #ifdef HAVE_UTF8_GENERAL_CS
extern struct charset_info_st my_charset_utf8_general_cs; extern struct charset_info_st my_charset_utf8_general_cs;
#endif #endif
...@@ -162,6 +166,7 @@ extern struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci; ...@@ -162,6 +166,7 @@ extern struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_unicode_520_ci; extern struct charset_info_st my_charset_utf8mb4_unicode_520_ci;
extern struct charset_info_st my_charset_utf8mb4_vietnamese_ci; extern struct charset_info_st my_charset_utf8mb4_vietnamese_ci;
extern struct charset_info_st my_charset_utf8mb4_croatian_uca_ci; extern struct charset_info_st my_charset_utf8mb4_croatian_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_myanmar_uca_ci;
#endif /* HAVE_CHARSET_utf8mb4 */ #endif /* HAVE_CHARSET_utf8mb4 */
#endif /* HAVE_UCA_COLLATIONS */ #endif /* HAVE_UCA_COLLATIONS */
...@@ -255,6 +260,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -255,6 +260,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_unicode_520_ci); add_compiled_collation(&my_charset_ucs2_unicode_520_ci);
add_compiled_collation(&my_charset_ucs2_vietnamese_ci); add_compiled_collation(&my_charset_ucs2_vietnamese_ci);
add_compiled_collation(&my_charset_ucs2_croatian_uca_ci); add_compiled_collation(&my_charset_ucs2_croatian_uca_ci);
add_compiled_collation(&my_charset_ucs2_myanmar_uca_ci);
#endif #endif
#endif #endif
...@@ -296,6 +302,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -296,6 +302,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8_unicode_520_ci); add_compiled_collation(&my_charset_utf8_unicode_520_ci);
add_compiled_collation(&my_charset_utf8_vietnamese_ci); add_compiled_collation(&my_charset_utf8_vietnamese_ci);
add_compiled_collation(&my_charset_utf8_croatian_uca_ci); add_compiled_collation(&my_charset_utf8_croatian_uca_ci);
add_compiled_collation(&my_charset_utf8_myanmar_uca_ci);
#endif #endif
#endif /* HAVE_CHARSET_utf8 */ #endif /* HAVE_CHARSET_utf8 */
...@@ -329,6 +336,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -329,6 +336,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8mb4_unicode_520_ci); add_compiled_collation(&my_charset_utf8mb4_unicode_520_ci);
add_compiled_collation(&my_charset_utf8mb4_vietnamese_ci); add_compiled_collation(&my_charset_utf8mb4_vietnamese_ci);
add_compiled_collation(&my_charset_utf8mb4_croatian_uca_ci); add_compiled_collation(&my_charset_utf8mb4_croatian_uca_ci);
add_compiled_collation(&my_charset_utf8mb4_myanmar_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */ #endif /* HAVE_UCA_COLLATIONS */
#endif /* HAVE_CHARSET_utf8mb4 */ #endif /* HAVE_CHARSET_utf8mb4 */
...@@ -364,6 +372,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -364,6 +372,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf16_unicode_520_ci); add_compiled_collation(&my_charset_utf16_unicode_520_ci);
add_compiled_collation(&my_charset_utf16_vietnamese_ci); add_compiled_collation(&my_charset_utf16_vietnamese_ci);
add_compiled_collation(&my_charset_utf16_croatian_uca_ci); add_compiled_collation(&my_charset_utf16_croatian_uca_ci);
add_compiled_collation(&my_charset_utf16_myanmar_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */ #endif /* HAVE_UCA_COLLATIONS */
#endif /* HAVE_CHARSET_utf16 */ #endif /* HAVE_CHARSET_utf16 */
...@@ -397,6 +406,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -397,6 +406,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf32_unicode_520_ci); add_compiled_collation(&my_charset_utf32_unicode_520_ci);
add_compiled_collation(&my_charset_utf32_vietnamese_ci); add_compiled_collation(&my_charset_utf32_vietnamese_ci);
add_compiled_collation(&my_charset_utf32_croatian_uca_ci); add_compiled_collation(&my_charset_utf32_croatian_uca_ci);
add_compiled_collation(&my_charset_utf32_myanmar_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */ #endif /* HAVE_UCA_COLLATIONS */
#endif /* HAVE_CHARSET_utf32 */ #endif /* HAVE_CHARSET_utf32 */
......
...@@ -1523,19 +1523,14 @@ int lex_one_token(void *arg, THD *thd) ...@@ -1523,19 +1523,14 @@ int lex_one_token(void *arg, THD *thd)
lip->save_in_comment_state(); lip->save_in_comment_state();
if (lip->yyPeekn(2) == 'M' && lip->yyPeekn(3) == '!') if (lip->yyPeekn(2) == '!' ||
{ (lip->yyPeekn(2) == 'M' && lip->yyPeekn(3) == '!'))
/* Skip MariaDB unique marker */
lip->set_echo(FALSE);
lip->yySkip();
/* The following if will be true */
}
if (lip->yyPeekn(2) == '!')
{ {
bool maria_comment_syntax= lip->yyPeekn(2) == 'M';
lip->in_comment= DISCARD_COMMENT; lip->in_comment= DISCARD_COMMENT;
/* Accept '/' '*' '!', but do not keep this marker. */ /* Accept '/' '*' '!', but do not keep this marker. */
lip->set_echo(FALSE); lip->set_echo(FALSE);
lip->yySkipn(3); lip->yySkipn(maria_comment_syntax ? 4 : 3);
/* /*
The special comment format is very strict: The special comment format is very strict:
...@@ -1565,7 +1560,14 @@ int lex_one_token(void *arg, THD *thd) ...@@ -1565,7 +1560,14 @@ int lex_one_token(void *arg, THD *thd)
version= (ulong) my_strtoll10(lip->get_ptr(), &end_ptr, &error); version= (ulong) my_strtoll10(lip->get_ptr(), &end_ptr, &error);
if (version <= MYSQL_VERSION_ID) /*
MySQL-5.7 has new features and might have new SQL syntax that
MariaDB-10.0 does not understand. Ignore all versioned comments
with MySQL versions in the range 50700-999999, but
do not ignore MariaDB specific comments for the same versions.
*/
if (version <= MYSQL_VERSION_ID &&
(version < 50700 || version > 99999 || maria_comment_syntax))
{ {
/* Accept 'M' 'm' 'm' 'd' 'd' */ /* Accept 'M' 'm' 'm' 'd' 'd' */
lip->yySkipn(length); lip->yySkipn(length);
......
This diff is collapsed.
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