petermolnar

Percona-Server-5.5.29-rel29.4 armhf patch

Mar 2nd, 2013
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.04 KB | None | 0 0
  1. --- sql-common/client_plugin.c  2013-01-07 06:29:49.000000000 +0000
  2. +++ sql-common/client_plugin.c  2013-03-02 11:26:32.180009884 +0000
  3. @@ -233,11 +233,13 @@
  4.  {
  5.    MYSQL mysql;
  6.    struct st_mysql_client_plugin **builtin;
  7. +  va_list unused;
  8.  
  9.    if (initialized)
  10.      return 0;
  11.  
  12.    bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
  13. +  bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
  14.  
  15.    pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
  16.    init_alloc_root(&mem_root, 128, 128);
  17. @@ -249,7 +251,7 @@
  18.    pthread_mutex_lock(&LOCK_load_client_plugin);
  19.  
  20.    for (builtin= mysql_client_builtins; *builtin; builtin++)
  21. -    add_plugin(&mysql, *builtin, 0, 0, 0);
  22. +    add_plugin(&mysql, *builtin, 0, 0, unused);
  23.  
  24.    pthread_mutex_unlock(&LOCK_load_client_plugin);
  25.  
  26. @@ -293,11 +295,15 @@
  27.  mysql_client_register_plugin(MYSQL *mysql,
  28.                               struct st_mysql_client_plugin *plugin)
  29.  {
  30. +  va_list unused;
  31. +
  32.    if (is_not_initialized(mysql, plugin->name))
  33.      return NULL;
  34.  
  35.    pthread_mutex_lock(&LOCK_load_client_plugin);
  36.  
  37. +  bzero(&unused, sizeof(unused)); /* suppress uninitialized-value warnings */
  38. +
  39.    /* make sure the plugin wasn't loaded meanwhile */
  40.    if (find_plugin(plugin->name, plugin->type))
  41.    {
  42. @@ -307,7 +313,7 @@
  43.      plugin= NULL;
  44.    }
  45.    else
  46. -    plugin= add_plugin(mysql, plugin, 0, 0, 0);
  47. +    plugin= add_plugin(mysql, plugin, 0, 0, unused);
  48.  
  49.    pthread_mutex_unlock(&LOCK_load_client_plugin);
  50.    return plugin;
  51. --- sql/query_response_time.cc  2013-01-07 06:29:49.000000000 +0000
  52. +++ sql/query_response_time.cc  2013-03-02 12:41:16.290010827 +0000
  53. @@ -198,7 +198,7 @@
  54.    /* The lock for atomic operations on m_count and m_total.  Only actually
  55.    used on architectures that do not have atomic implementation of atomic
  56.    operations. */
  57. -  my_atomic_rwlock_t time_collector_lock;
  58. +  mutable my_atomic_rwlock_t time_collector_lock;
  59.    uint32   m_count[OVERALL_POWER_COUNT + 1];
  60.    uint64   m_total[OVERALL_POWER_COUNT + 1];
  61.  };
Advertisement
Add Comment
Please, Sign In to add comment