diff --git a/cmake/character_sets.cmake b/cmake/character_sets.cmake index d51444ec433..1cf63ed1462 100644 --- a/cmake/character_sets.cmake +++ b/cmake/character_sets.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2009 Sun Microsystems, Inc +# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -13,17 +13,19 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#Charsets and collations +# Charsets and collations IF(NOT DEFAULT_CHARSET) -SET(DEFAULT_CHARSET "latin1") + SET(DEFAULT_CHARSET "latin1") ENDIF() -IF(NOT DEFAULT_COLLATIONS) -SET(DEFAULT_COLLATION "latin1_swedish_ci") +IF(NOT DEFAULT_COLLATION) + SET(DEFAULT_COLLATION "latin1_swedish_ci") ENDIF() SET(CHARSETS ${DEFAULT_CHARSET} latin1 utf8 utf8mb4) -SET(CHARSETS_COMPLEX big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8 utf8mb4 utf16 utf32) +SET(CHARSETS_COMPLEX + big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 + sjis tis620 ucs2 ujis utf8 utf8mb4 utf16 utf32) SET(CHARSETS_AVAILABLE binary armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257 diff --git a/config.h.cmake b/config.h.cmake index 204e1032410..65ebd077da6 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,6 +1,5 @@ -/* Copyright (C) 2009, 2011, Oracle and/or its affiliates. All rights - reserved - +/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. @@ -516,8 +515,8 @@ #cmakedefine CYBOZU 1 /* Character sets and collations */ -#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "latin1" -#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci" +#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "@MYSQL_DEFAULT_CHARSET_NAME@" +#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "@MYSQL_DEFAULT_COLLATION_NAME@" #cmakedefine USE_MB 1 #cmakedefine USE_MB_IDENT 1 diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 89fd4104c6f..25ec8beb59f 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -193,7 +193,7 @@ int main(int argc, char **argv) } for (argument= arguments+1 ; *argument ; argument++) - if (*argument != args_separator) /* skip arguments separator */ + if (!my_getopt_is_args_separator(*argument)) /* skip arguments separator */ puts(*argument); my_free(load_default_groups); free_defaults(arguments); diff --git a/include/my_sys.h b/include/my_sys.h index 96b40415c56..484dc684b03 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -817,7 +817,8 @@ extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len); extern int get_defaults_options(int argc, char **argv, char **defaults, char **extra_defaults, char **group_suffix); -extern const char *args_separator; +extern my_bool my_getopt_use_args_separator; +extern my_bool my_getopt_is_args_separator(const char* arg); extern int my_load_defaults(const char *conf_file, const char **groups, int *argc, char ***argv, const char ***); extern int load_defaults(const char *conf_file, const char **groups, diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 298205e1b7d..7ffc88745ea 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -10,7 +10,6 @@ innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innod main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2 main.gis # Bug#52208 2010-11-24 alik gis fails on some platforms (Solaris, HP-UX, Linux) main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server -main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible) main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun diff --git a/mysql-test/include/restart_slave_sql.inc b/mysql-test/include/restart_slave_sql.inc new file mode 100644 index 00000000000..ee6c6d7ced6 --- /dev/null +++ b/mysql-test/include/restart_slave_sql.inc @@ -0,0 +1,43 @@ +# ==== Purpose ==== +# +# Provide a earier way to restart SQL thread when you want to stop sql thread +# and then start it immediately. +# +# Sources stop_slave_sql.inc to stop SQL thread on the current connection. +# Then issues START SLAVE SQL_THREAD and then waits until +# the SQL threads have started, or until a timeout is reached. +# +# Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of +# test case bugs. +# +# +# ==== Usage ==== +# +# [--let $slave_timeout= NUMBER] +# [--let $rpl_debug= 1] +# --source include/restart_slave_sql.inc +# +# Parameters: +# $slave_timeout +# See include/wait_for_slave_param.inc +# +# $rpl_debug +# See include/rpl_init.inc + + +--let $include_filename= restart_slave.inc +--source include/begin_include_file.inc + + +if (!$rpl_debug) +{ + --disable_query_log +} + +source include/stop_slave_sql.inc; +START SLAVE SQL_THREAD; +source include/wait_for_slave_sql_to_start.inc; + + +--let $include_filename= restart_slave.inc +--source include/end_include_file.inc \ No newline at end of file diff --git a/mysql-test/include/rpl_connection_master.inc b/mysql-test/include/rpl_connection_master.inc new file mode 100644 index 00000000000..e54e34071c8 --- /dev/null +++ b/mysql-test/include/rpl_connection_master.inc @@ -0,0 +1,2 @@ +let $rpl_connection_name= master; +source include/rpl_connection.inc; \ No newline at end of file diff --git a/mysql-test/include/rpl_connection_slave.inc b/mysql-test/include/rpl_connection_slave.inc new file mode 100644 index 00000000000..ef3876394d6 --- /dev/null +++ b/mysql-test/include/rpl_connection_slave.inc @@ -0,0 +1,2 @@ +let $rpl_connection_name= slave; +source include/rpl_connection.inc; \ No newline at end of file diff --git a/mysql-test/include/rpl_connection_slave1.inc b/mysql-test/include/rpl_connection_slave1.inc new file mode 100644 index 00000000000..8aee6defbdd --- /dev/null +++ b/mysql-test/include/rpl_connection_slave1.inc @@ -0,0 +1,2 @@ +let $rpl_connection_name= slave1; +source include/rpl_connection.inc; \ No newline at end of file diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result index 0b061f507a7..4ea5efab159 100644 --- a/mysql-test/r/ctype_many.result +++ b/mysql-test/r/ctype_many.result @@ -1684,6 +1684,21 @@ ARMENIAN CAPIT ECH 2 ARMENIAN CAPIT ZA 2 DROP TABLE t1; # +# Start of 5.1 tests +# +# +# Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function +# +SET NAMES latin1; +DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1) +AS BINARY(0)) USING utf8); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'Zpq' +Warning 1292 Truncated incorrect BINARY(0) value: '1.' +# +# End of 5.1 tests +# +# # Start of 5.5 tests # # diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 552ff564a89..39590eb1c99 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3); SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a; 1 DROP TABLE t1, t2; +# +# Bug#59149 valgrind warnings with "like .. escape .." function +# +SELECT '' LIKE '1' ESCAPE COUNT(1); +ERROR HY000: Incorrect arguments to ESCAPE End of 5.1 tests diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 9cb57b06c38..feeba25c536 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1334,7 +1334,7 @@ CREATE DATABASE ` CREATE TABLE `ä`.`ä` (a int) ENGINE=Memory; SHOW TABLE STATUS FROM `ä` LIKE 'ä'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -ä MEMORY 10 Fixed 0 8 # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL +ä MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL DROP DATABASE `ä`; show columns from `#mysql50#????????`; Got one of the listed errors diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 6b7ba57ce2e..4568775d3fd 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1113,6 +1113,17 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15, '2011', 1)), 1); ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1)); ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing +# +# Bug #44332 my_xml_scan reads behind the end of buffer +# +SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1'); +UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1') +NULL +Warnings: +Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: END-OF-INPUT unexpected (ident or '/' wanted)' +SELECT UPDATEXML(CONVERT(_latin1'", 3); p->cur++) - {} - if (!memcmp(p->cur, "-->", 3)) - p->cur+=3; + for (; p->cur < p->end; p->cur++) + { + if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->"))) + { + p->cur+= 3; + break; + } + } a->end=p->cur; lex=MY_XML_COMMENT; } - else if (!memcmp(p->cur, "cur+= 9; for (; p->cur < p->end - 2 ; p->cur++)