From f89e6c442cea2d6f220afe55284520ce26362729 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 18 Sep 2013 17:25:10 +0200 Subject: [PATCH 1/6] MDEV-5029 Crash in MariaDB 5.5.33 with .frm from older MariaDB release Don't fail when an frm is inconsistent (legacy DB_TYPE_xxx code doesn't match the engine name), use the engine name, ignore the legacy code. --- mysql-test/r/bad_frm_crash_5029.result | 11 +++++++++++ .../std_data/{mdev5029.frm => mdev5029_1.frm} | Bin mysql-test/std_data/mdev5029_2.MAD | Bin 0 -> 8192 bytes mysql-test/std_data/mdev5029_2.MAI | Bin 0 -> 8192 bytes mysql-test/std_data/mdev5029_2.frm | Bin 0 -> 8602 bytes mysql-test/t/bad_frm_crash_5029.test | 11 ++++++++++- sql/table.cc | 5 ++++- 7 files changed, 25 insertions(+), 2 deletions(-) rename mysql-test/std_data/{mdev5029.frm => mdev5029_1.frm} (100%) create mode 100644 mysql-test/std_data/mdev5029_2.MAD create mode 100644 mysql-test/std_data/mdev5029_2.MAI create mode 100644 mysql-test/std_data/mdev5029_2.frm diff --git a/mysql-test/r/bad_frm_crash_5029.result b/mysql-test/r/bad_frm_crash_5029.result index 7a829c8f6ba..8aa0065f5ee 100644 --- a/mysql-test/r/bad_frm_crash_5029.result +++ b/mysql-test/r/bad_frm_crash_5029.result @@ -1,2 +1,13 @@ show create table t1; ERROR 42000: Unknown storage engine 'InnoDB' +call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria"); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL, + `c` int(11) DEFAULT NULL, + KEY `a` (`a`), + KEY `b` (`b`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +drop table t1; diff --git a/mysql-test/std_data/mdev5029.frm b/mysql-test/std_data/mdev5029_1.frm similarity index 100% rename from mysql-test/std_data/mdev5029.frm rename to mysql-test/std_data/mdev5029_1.frm diff --git a/mysql-test/std_data/mdev5029_2.MAD b/mysql-test/std_data/mdev5029_2.MAD new file mode 100644 index 0000000000000000000000000000000000000000..3dcc005ec0d03681b402e75f595130e784a4a5d5 GIT binary patch literal 8192 zcmeIu0Sy2E3<4nghrZ_c1`$XwV8DO@0|pEjFkrxd0RsjM7%*VKfB^#r3>YwAz<>b* J20jm5+W{%^1N;C0 literal 0 HcmV?d00001 diff --git a/mysql-test/std_data/mdev5029_2.MAI b/mysql-test/std_data/mdev5029_2.MAI new file mode 100644 index 0000000000000000000000000000000000000000..3533a1d705a05c79c5b916f4cd33952bc89de6a4 GIT binary patch literal 8192 zcmeH^KZ*h|6vn?~GB^VYYrRcCFJWV=jUd+EVJmB4i(L!B3s`svD+?PB;Q_pd`Xw`i z&LFbw!uOcu{rU3VgkP@LJZW3o#u>k+1q*%|k_0pZEP72BgjaSet*-ept$ba5m)%fJ zZ2GEeHaH#2I9~TDua5lLufHcl|JA*04!hNU`_nHP{fqwjlJ^-kgbwo$t`^rPR}b+< zjDk0TB;esv8$y1*I3LQ-W(>w2$dMv<86N|f!f|H{x0)KtrJ9D2X81c7&%?$JR?AOa#F0wN#+A|L`HAOa#F0wN#+A|L`HAOa#F0wN#+A|L`H MAOa#F0{@M`9i7EFNB{r; literal 0 HcmV?d00001 diff --git a/mysql-test/std_data/mdev5029_2.frm b/mysql-test/std_data/mdev5029_2.frm new file mode 100644 index 0000000000000000000000000000000000000000..d7eb677fea780d987ffb29915b2b999306fb9e38 GIT binary patch literal 8602 zcmeI&O$x#=5C!0uNi1rqbRlls)TId48;CdX3bnX!>j`=e@8d;!5bLCWf>7vErP3Q&Lo z6rcbFC_sUq6c7OdoZz4x0GL9j>%#Sc6hRYIS#_y?@&w!z1t>5q@O5kTZr^X&@N#~k z00k&O0SZun0u-PC1^!mxVG#fA;YJ+Hz~YFFu8cmf9B{@;b6-a|E6Z&%vb2vPnZB8j li*{8chm$Zw-BZzjS^u2E2X#-S4FVs`eUqgP>P|~u;SFZO9y0&{ literal 0 HcmV?d00001 diff --git a/mysql-test/t/bad_frm_crash_5029.test b/mysql-test/t/bad_frm_crash_5029.test index b15c37fbc6d..858922886ab 100644 --- a/mysql-test/t/bad_frm_crash_5029.test +++ b/mysql-test/t/bad_frm_crash_5029.test @@ -4,8 +4,17 @@ # a.k.a. fail to open an frm with indexes: let $datadir=`select @@datadir`; -copy_file std_data/mdev5029.frm $datadir/test/t1.frm; + +# normal innodb table (but innodb is disabled here) +copy_file std_data/mdev5029_1.frm $datadir/test/t1.frm; --error ER_UNKNOWN_STORAGE_ENGINE show create table t1; remove_file $datadir/test/t1.frm; +# Aria table, incorrect typecode +call mtr.add_suppression("t1.frm is inconsistent: engine typecode 43, engine name Aria"); +copy_file std_data/mdev5029_2.frm $datadir/test/t1.frm; +copy_file std_data/mdev5029_2.MAI $datadir/test/t1.MAI; +copy_file std_data/mdev5029_2.MAD $datadir/test/t1.MAD; +show create table t1; +drop table t1; diff --git a/sql/table.cc b/sql/table.cc index 9e71680652a..15fbe867c15 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1093,7 +1093,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, plugin_data(tmp_plugin, handlerton *))) { /* bad file, legacy_db_type did not match the name */ - goto err; + sql_print_warning("%s.frm is inconsistent: engine typecode %d, engine name %s (%d)", + share->normalized_path.str, legacy_db_type, + plugin_name(tmp_plugin)->str, + ha_legacy_type(plugin_data(tmp_plugin, handlerton *))); } /* tmp_plugin is locked with a local lock. From cd077ca8396c369ded7df822e700714da1e13aa3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:00 +0200 Subject: [PATCH 2/6] MDEV-5026 cannot use system jemalloc --- cmake/jemalloc.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/jemalloc.cmake b/cmake/jemalloc.cmake index 54e69da5a28..5cb9c493a20 100644 --- a/cmake/jemalloc.cmake +++ b/cmake/jemalloc.cmake @@ -30,14 +30,23 @@ MACRO (USE_BUNDLED_JEMALLOC) ENDMACRO() SET(WITH_JEMALLOC "yes" CACHE STRING - "Which jemalloc to use (possible values are 'no', 'bundled', 'yes' (same as bundled)") -#"Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") + "Which jemalloc to use (possible values are 'no', 'bundled', 'system', 'yes' (system if possible, otherwise bundled)") MACRO (CHECK_JEMALLOC) IF(WIN32) SET(WITH_JEMALLOC "no") ENDIF() - IF(WITH_JEMALLOC STREQUAL "bundled" OR WITH_JEMALLOC STREQUAL "yes") + IF(WITH_JEMALLOC STREQUAL "system" OR WITH_JEMALLOC STREQUAL "yes") + CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC) + IF (HAVE_JEMALLOC) + SET(LIBJEMALLOC jemalloc) + ELSEIF (WITH_JEMALLOC STREQUAL "system") + MESSAGE(FATAL_ERROR "system jemalloc is not found") + ELSEIF (WITH_JEMALLOC STREQUAL "yes") + SET(trybundled 1) + ENDIF() + ENDIF() + IF(WITH_JEMALLOC STREQUAL "bundled" OR trybundled) USE_BUNDLED_JEMALLOC() ENDIF() ENDMACRO() From 43f4e364f0dc818d2d39881a765fe4fce0813f79 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:10 +0200 Subject: [PATCH 3/6] MDEV-5021 tokudb ft-index libraries are build with -DWITHOUT_TOKUDB=1 --- storage/tokudb/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt index fb6cfeb2aec..716af3f9ba6 100644 --- a/storage/tokudb/CMakeLists.txt +++ b/storage/tokudb/CMakeLists.txt @@ -1,6 +1,7 @@ # ft-index only supports x86-64 and cmake-2.8.9+ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND - NOT CMAKE_VERSION VERSION_LESS "2.8.9") + NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND + NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE) CHECK_CXX_SOURCE_COMPILES( " struct a {int b; int c; }; From 93b7d00f006b7ff770e65f6f70ebe5526aa111ba Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 20:19:17 +0200 Subject: [PATCH 4/6] MDEV-5035 debian package conflict libmariadbclient18 5.5.33+maria-1~wheezy vs. mariadb-server-5.3 5.3.12-mariadb122~wheezy --- debian/dist/Debian/control | 3 ++- debian/dist/Ubuntu/control | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/dist/Debian/control b/debian/dist/Debian/control index c66ffedfd1a..38868478abd 100644 --- a/debian/dist/Debian/control +++ b/debian/dist/Debian/control @@ -14,7 +14,8 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query diff --git a/debian/dist/Ubuntu/control b/debian/dist/Ubuntu/control index 8eb5f4537ac..de7b2405676 100644 --- a/debian/dist/Ubuntu/control +++ b/debian/dist/Ubuntu/control @@ -14,7 +14,8 @@ Package: libmariadbclient18 Section: libs Architecture: any Depends: mariadb-common, libmysqlclient18 (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} -Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33) +Conflicts: mariadb-server-5.5 (<< 5.5.33), mariadb-galera-server-5.5 (<< 5.5.33), + mariadb-server-5.1, mariadb-server-5.2, mariadb-server-5.3 Description: MariaDB database client library MariaDB is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query From 6e52631065b3ef01c9c3e4adb286f66c3d1abbfb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 22:24:39 +0200 Subject: [PATCH 5/6] MDEV-4979 mysqld_safe section in my.cnf doesn't have mariadb equivalent read also [mariadb_safe] section. modify the manpage accordingly (and remove a netware-specific option from it) --- man/mysqld_safe.1 | 42 ++++-------------------------------------- scripts/mysqld_safe.sh | 2 +- 2 files changed, 5 insertions(+), 39 deletions(-) diff --git a/man/mysqld_safe.1 b/man/mysqld_safe.1 index 7cd68e01c7d..25848aecb9c 100644 --- a/man/mysqld_safe.1 +++ b/man/mysqld_safe.1 @@ -83,15 +83,15 @@ Options unknown to are passed to \fBmysqld\fR if they are specified on the command line, but ignored if they are specified in the -[mysqld_safe] -group of an option file\&. See +[mysqld_safe] or [mariadb_safe] +groups of an option file\&. See Section\ \&4.2.3.3, \(lqUsing Option Files\(rq\&. .PP \fBmysqld_safe\fR reads all options from the [mysqld], -[server], and -[mysqld_safe] +[server], +[mysqld_safe], and [mariadb_safe] sections in option files\&. For example, if you specify a [mysqld] section like this, @@ -146,40 +146,6 @@ Display a help message and exit\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqld_safe: autoclose option -.\" autoclose option: mysqld_safe -\fB\-\-autoclose\fR -.sp -(NetWare only) On NetWare, -\fBmysqld_safe\fR -provides a screen presence\&. When you unload (shut down) the -\fBmysqld_safe\fR -NLM, the screen does not by default go away\&. Instead, it prompts for user input: -.sp -.if n \{\ -.RS 4 -.\} -.nf -** -.fi -.if n \{\ -.RE -.\} -.sp -If you want NetWare to close the screen automatically instead, use the -\fB\-\-autoclose\fR -option to -\fBmysqld_safe\fR\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .\" mysqld_safe: basedir option .\" basedir option: mysqld_safe \fB\-\-basedir=\fR\fB\fIpath\fR\fR diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 572a08781c8..3c63acddc0c 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -509,7 +509,7 @@ then SET_USER=0 fi -parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld` +parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysqld mariadb_safe` parse_arguments PICK-ARGS-FROM-ARGV "$@" From 28ec372744e6dbeab9ecae7a3a9a7ef23b0866d5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 19 Sep 2013 22:24:59 +0200 Subject: [PATCH 6/6] 5.5.33a --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b44efde92ba..ed0c4b57704 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=33 -MYSQL_VERSION_EXTRA= +MYSQL_VERSION_EXTRA=a