From 6824e2d5b2cb30ce3c83da8d33296f02e193ea2a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 11 Feb 2013 20:23:39 +0100 Subject: compat-mysql55 5.5.30 --- mysql-va-list.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mysql-va-list.patch (limited to 'mysql-va-list.patch') diff --git a/mysql-va-list.patch b/mysql-va-list.patch new file mode 100644 index 0000000..552457c --- /dev/null +++ b/mysql-va-list.patch @@ -0,0 +1,55 @@ +Fix unportable usage associated with va_list arguments. Passing "0" to +a va_list argument only works if va_list is an integer or pointer type, +which is not required by the C spec, and is not true on ARM for instance. +Per bug #744707. + + +diff -up mysql-5.5.28/sql-common/client_plugin.c.p12 mysql-5.5.28/sql-common/client_plugin.c +--- mysql-5.5.28/sql-common/client_plugin.c.p12 2012-08-29 10:50:46.000000000 +0200 ++++ mysql-5.5.28/sql-common/client_plugin.c 2012-12-06 14:22:54.494857607 +0100 +@@ -233,11 +233,13 @@ int mysql_client_plugin_init() + { + MYSQL mysql; + struct st_mysql_client_plugin **builtin; ++ va_list unused; + + if (initialized) + return 0; + + bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ + + pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW); + init_alloc_root(&mem_root, 128, 128); +@@ -249,7 +251,7 @@ int mysql_client_plugin_init() + pthread_mutex_lock(&LOCK_load_client_plugin); + + for (builtin= mysql_client_builtins; *builtin; builtin++) +- add_plugin(&mysql, *builtin, 0, 0, 0); ++ add_plugin(&mysql, *builtin, 0, 0, unused); + + pthread_mutex_unlock(&LOCK_load_client_plugin); + +@@ -293,9 +295,13 @@ struct st_mysql_client_plugin * + mysql_client_register_plugin(MYSQL *mysql, + struct st_mysql_client_plugin *plugin) + { ++ va_list unused; ++ + if (is_not_initialized(mysql, plugin->name)) + return NULL; + ++ bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */ ++ + pthread_mutex_lock(&LOCK_load_client_plugin); + + /* make sure the plugin wasn't loaded meanwhile */ +@@ -307,7 +313,7 @@ mysql_client_register_plugin(MYSQL *mysq + plugin= NULL; + } + else +- plugin= add_plugin(mysql, plugin, 0, 0, 0); ++ plugin= add_plugin(mysql, plugin, 0, 0, unused); + + pthread_mutex_unlock(&LOCK_load_client_plugin); + return plugin; -- cgit