~percona-dev/percona-server/5.1.57-fix_bug_785564

« back to all changes in this revision

Viewing changes to userstat.patch

  • Committer: Alexey Kopytov
  • Date: 2011-02-02 08:09:59 UTC
  • Revision ID: akopytov@gmail.com-20110202080959-2rf7xw3rg0myg0n3
This patch fixes compiler warnings introduced by Percona patches in the
core server (i.e. excluding XtraDB).

XtraDB-specific warnings will be reported and fixed separately.

Show diffs side-by-side

added added

removed removed

Lines of Context:
436
436
 
437
437
 /*
438
438
   Log slow query with all enabled log event handlers
439
 
@@ -4495,6 +4517,8 @@
 
439
@@ -4496,6 +4518,8 @@
440
440
                              thd->first_successful_insert_id_in_prev_stmt_for_binlog);
441
441
           if (e.write(file))
442
442
             goto err;
445
445
         }
446
446
         if (thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements() > 0)
447
447
         {
448
 
@@ -4506,12 +4530,16 @@
 
448
@@ -4507,12 +4531,16 @@
449
449
                              minimum());
450
450
           if (e.write(file))
451
451
             goto err;
462
462
         }
463
463
         if (thd->user_var_events.elements)
464
464
         {
465
 
@@ -4527,6 +4555,8 @@
 
465
@@ -4528,6 +4556,8 @@
466
466
                                  user_var_event->charset_number);
467
467
             if (e.write(file))
468
468
               goto err;
471
471
           }
472
472
         }
473
473
       }
474
 
@@ -4539,6 +4569,8 @@
 
474
@@ -4540,6 +4570,8 @@
475
475
     if (event_info->write(file) || 
476
476
         DBUG_EVALUATE_IF("injecting_fault_writing", 1, 0))
477
477
       goto err;
480
480
 
481
481
     if (file == &log_file) // we are writing to the real log (disk)
482
482
     {
483
 
@@ -4684,7 +4716,7 @@
 
483
@@ -4685,7 +4717,7 @@
484
484
     be reset as a READ_CACHE to be able to read the contents from it.
485
485
  */
486
486
 
489
489
 {
490
490
   Mutex_sentry sentry(lock_log ? &LOCK_log : NULL);
491
491
 
492
 
@@ -4732,6 +4764,7 @@
 
492
@@ -4733,6 +4765,7 @@
493
493
       /* write the first half of the split header */
494
494
       if (my_b_write(&log_file, header, carry))
495
495
         return ER_ERROR_ON_WRITE;
497
497
 
498
498
       /*
499
499
         copy fixed second half of header to cache so the correct
500
 
@@ -4800,6 +4833,7 @@
 
500
@@ -4801,6 +4834,7 @@
501
501
     /* Write data to the binary log file */
502
502
     if (my_b_write(&log_file, cache->read_pos, length))
503
503
       return ER_ERROR_ON_WRITE;
505
505
     cache->read_pos=cache->read_end;           // Mark buffer used up
506
506
   } while ((length= my_b_fill(cache)));
507
507
 
508
 
@@ -4922,21 +4956,24 @@
 
508
@@ -4923,21 +4957,24 @@
509
509
       */
510
510
       if (qinfo.write(&log_file))
511
511
         goto err;
984
984
   uint32     server_id;
985
985
   uint32     file_id;                  // for LOAD DATA INFILE
986
986
   /* remote (peer) port */
987
 
@@ -1828,6 +1830,8 @@
 
987
@@ -1833,6 +1835,8 @@
988
988
   /* variables.transaction_isolation is reset to this after each commit */
989
989
   enum_tx_isolation session_tx_isolation;
990
990
   enum_check_fields count_cuted_fields;
993
993
 
994
994
   DYNAMIC_ARRAY user_var_events;        /* For user variables replication */
995
995
   MEM_ROOT      *user_var_events_alloc; /* Allocate above array elements here */
996
 
@@ -1916,6 +1920,49 @@
 
996
@@ -1921,6 +1925,49 @@
997
997
   */
998
998
   LOG_INFO*  current_linfo;
999
999
   NET*       slave_net;                        // network connection from slave -> m.
1043
1043
   /* Used by the sys_var class to store temporary values */
1044
1044
   union
1045
1045
   {
1046
 
@@ -1981,6 +2028,11 @@
 
1046
@@ -1986,6 +2033,11 @@
1047
1047
     alloc_root. 
1048
1048
   */
1049
1049
   void init_for_queries();
1055
1055
   void change_user(void);
1056
1056
   void cleanup(void);
1057
1057
   void cleanup_after_query();
1058
 
@@ -2351,9 +2403,15 @@
 
1058
@@ -2356,9 +2408,15 @@
1059
1059
     *p_db= strmake(db, db_length);
1060
1060
     *p_db_length= db_length;
1061
1061
     return FALSE;
1071
1071
 public:
1072
1072
   inline Internal_error_handler *get_internal_handler()
1073
1073
   { return m_internal_handler; }
1074
 
@@ -2437,6 +2495,9 @@
 
1074
@@ -2442,6 +2500,9 @@
1075
1075
   LEX_STRING invoker_host;
1076
1076
 };
1077
1077
 
1854
1854
       my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
1855
1855
       DBUG_RETURN(TRUE);
1856
1856
     }
1857
 
@@ -5348,6 +5368,7 @@
 
1857
@@ -5349,6 +5369,7 @@
1858
1858
       if (!no_errors)
1859
1859
       {
1860
1860
         const char *db_name= db ? db : thd->db;
1862
1862
         my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
1863
1863
                  sctx->priv_user, sctx->priv_host, db_name);
1864
1864
       }
1865
 
@@ -5380,12 +5401,15 @@
 
1865
@@ -5381,12 +5402,15 @@
1866
1866
   {                                            // We can never grant this
1867
1867
     DBUG_PRINT("error",("No possible access"));
1868
1868
     if (!no_errors)
1878
1878
     DBUG_RETURN(TRUE);                         /* purecov: tested */
1879
1879
   }
1880
1880
 
1881
 
@@ -5411,11 +5435,15 @@
 
1881
@@ -5412,11 +5436,15 @@
1882
1882
 
1883
1883
   DBUG_PRINT("error",("Access denied"));
1884
1884
   if (!no_errors)
1894
1894
   DBUG_RETURN(TRUE);                           /* purecov: tested */
1895
1895
 }
1896
1896
 
1897
 
@@ -5444,6 +5472,7 @@
 
1897
@@ -5445,6 +5473,7 @@
1898
1898
 
1899
1899
     if (!thd->col_access && check_grant_db(thd, dst_db_name))
1900
1900
     {
1902
1902
       my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
1903
1903
                thd->security_ctx->priv_user,
1904
1904
                thd->security_ctx->priv_host,
1905
 
@@ -5525,9 +5554,12 @@
 
1905
@@ -5526,9 +5555,12 @@
1906
1906
         (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
1907
1907
     {
1908
1908
       if (!no_errors)
1915
1915
       return TRUE;
1916
1916
     }
1917
1917
     /*
1918
 
@@ -5690,6 +5722,7 @@
 
1918
@@ -5691,6 +5723,7 @@
1919
1919
   if ((thd->security_ctx->master_access & want_access))
1920
1920
     return 0;
1921
1921
   get_privilege_desc(command, sizeof(command), want_access);
1923
1923
   my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
1924
1924
   return 1;
1925
1925
 #else
1926
 
@@ -6071,6 +6104,30 @@
 
1926
@@ -6072,6 +6105,30 @@
1927
1927
   lex_start(thd);
1928
1928
   mysql_reset_thd_for_next_command(thd);
1929
1929
 
1954
1954
   if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
1955
1955
   {
1956
1956
     LEX *lex= thd->lex;
1957
 
@@ -6151,6 +6208,43 @@
 
1957
@@ -6152,6 +6209,43 @@
1958
1958
     *found_semicolon= NULL;
1959
1959
   }
1960
1960
 
1998
1998
   DBUG_VOID_RETURN;
1999
1999
 }
2000
2000
 
2001
 
@@ -7016,6 +7110,13 @@
 
2001
@@ -7017,6 +7111,13 @@
2002
2002
     if (flush_error_log())
2003
2003
       result=1;
2004
2004
   }
2012
2012
 #ifdef HAVE_QUERY_CACHE
2013
2013
   if (options & REFRESH_QUERY_CACHE_FREE)
2014
2014
   {
2015
 
@@ -7116,6 +7217,40 @@
 
2015
@@ -7117,6 +7218,40 @@
2016
2016
 #endif
2017
2017
  if (options & REFRESH_USER_RESOURCES)
2018
2018
    reset_mqh((LEX_USER *) NULL, 0);             /* purecov: inspected */