Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- sql-common/client_plugin.c 2013-01-07 06:29:49.000000000 +0000
- +++ sql-common/client_plugin.c 2013-03-02 11:26:32.180009884 +0000
- @@ -233,11 +233,13 @@
- {
- 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 @@
- 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,11 +295,15 @@
- mysql_client_register_plugin(MYSQL *mysql,
- struct st_mysql_client_plugin *plugin)
- {
- + va_list unused;
- +
- if (is_not_initialized(mysql, plugin->name))
- return NULL;
- pthread_mutex_lock(&LOCK_load_client_plugin);
- + bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
- +
- /* make sure the plugin wasn't loaded meanwhile */
- if (find_plugin(plugin->name, plugin->type))
- {
- @@ -307,7 +313,7 @@
- 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;
- --- sql/query_response_time.cc 2013-01-07 06:29:49.000000000 +0000
- +++ sql/query_response_time.cc 2013-03-02 12:41:16.290010827 +0000
- @@ -198,7 +198,7 @@
- /* The lock for atomic operations on m_count and m_total. Only actually
- used on architectures that do not have atomic implementation of atomic
- operations. */
- - my_atomic_rwlock_t time_collector_lock;
- + mutable my_atomic_rwlock_t time_collector_lock;
- uint32 m_count[OVERALL_POWER_COUNT + 1];
- uint64 m_total[OVERALL_POWER_COUNT + 1];
- };
Advertisement
Add Comment
Please, Sign In to add comment