~tsarev/percona-server/test51_716210

« back to all changes in this revision

Viewing changes to patches/userstat.patch

  • Committer: Oleg Tsarev
  • Date: 2011-09-12 13:33:10 UTC
  • mfrom: (278.1.3 test_716210)
  • Revision ID: oleg.tsarev@percona.com-20110912133310-5w4fs7ykkq188rjo
Fixed bug #716210 - incorrect last_errno in slow-query-log

Show diffs side-by-side

added added

removed removed

Lines of Context:
1759
1759
   /*
1760
1760
     Commands which always take a long time are logged into
1761
1761
     the slow log only if opt_log_slow_admin_statements is set.
1762
 
@@ -1921,6 +1933,13 @@
 
1762
@@ -1922,6 +1934,13 @@
1763
1763
     thd->profiling.discard_current_query();
1764
1764
 #endif
1765
1765
     break;
1773
1773
   case SCH_OPEN_TABLES:
1774
1774
   case SCH_VARIABLES:
1775
1775
   case SCH_STATUS:
1776
 
@@ -2077,6 +2096,7 @@
 
1776
@@ -2078,6 +2097,7 @@
1777
1777
                        thd->security_ctx->priv_host)) &&
1778
1778
         check_global_access(thd, SUPER_ACL))
1779
1779
     {
1781
1781
       my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
1782
1782
       DBUG_RETURN(TRUE);
1783
1783
     }
1784
 
@@ -5418,6 +5438,7 @@
 
1784
@@ -5419,6 +5439,7 @@
1785
1785
       if (!no_errors)
1786
1786
       {
1787
1787
         const char *db_name= db ? db : thd->db;
1789
1789
         my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
1790
1790
                  sctx->priv_user, sctx->priv_host, db_name);
1791
1791
       }
1792
 
@@ -5450,12 +5471,15 @@
 
1792
@@ -5451,12 +5472,15 @@
1793
1793
   {                                            // We can never grant this
1794
1794
     DBUG_PRINT("error",("No possible access"));
1795
1795
     if (!no_errors)
1805
1805
     DBUG_RETURN(TRUE);                         /* purecov: tested */
1806
1806
   }
1807
1807
 
1808
 
@@ -5481,11 +5505,15 @@
 
1808
@@ -5482,11 +5506,15 @@
1809
1809
 
1810
1810
   DBUG_PRINT("error",("Access denied"));
1811
1811
   if (!no_errors)
1821
1821
   DBUG_RETURN(TRUE);                           /* purecov: tested */
1822
1822
 }
1823
1823
 
1824
 
@@ -5514,6 +5542,7 @@
 
1824
@@ -5515,6 +5543,7 @@
1825
1825
 
1826
1826
     if (!thd->col_access && check_grant_db(thd, dst_db_name))
1827
1827
     {
1829
1829
       my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
1830
1830
                thd->security_ctx->priv_user,
1831
1831
                thd->security_ctx->priv_host,
1832
 
@@ -5595,9 +5624,12 @@
 
1832
@@ -5596,9 +5625,12 @@
1833
1833
         (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
1834
1834
     {
1835
1835
       if (!no_errors)
1842
1842
       return TRUE;
1843
1843
     }
1844
1844
     /*
1845
 
@@ -5760,6 +5792,7 @@
 
1845
@@ -5761,6 +5793,7 @@
1846
1846
   if ((thd->security_ctx->master_access & want_access))
1847
1847
     return 0;
1848
1848
   get_privilege_desc(command, sizeof(command), want_access);
1850
1850
   my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
1851
1851
   return 1;
1852
1852
 #else
1853
 
@@ -6134,6 +6167,32 @@
 
1853
@@ -6135,6 +6168,32 @@
1854
1854
   lex_start(thd);
1855
1855
   mysql_reset_thd_for_next_command(thd);
1856
1856
 
1883
1883
   if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
1884
1884
   {
1885
1885
     LEX *lex= thd->lex;
1886
 
@@ -6214,6 +6273,43 @@
 
1886
@@ -6215,6 +6274,43 @@
1887
1887
     *found_semicolon= NULL;
1888
1888
   }
1889
1889
 
1927
1927
   DBUG_VOID_RETURN;
1928
1928
 }
1929
1929
 
1930
 
@@ -7086,6 +7182,13 @@
 
1930
@@ -7087,6 +7183,13 @@
1931
1931
     if (flush_error_log())
1932
1932
       result=1;
1933
1933
   }
1941
1941
 #ifdef HAVE_QUERY_CACHE
1942
1942
   if (options & REFRESH_QUERY_CACHE_FREE)
1943
1943
   {
1944
 
@@ -7186,6 +7289,40 @@
 
1944
@@ -7187,6 +7290,40 @@
1945
1945
 #endif
1946
1946
  if (options & REFRESH_USER_RESOURCES)
1947
1947
    reset_mqh((LEX_USER *) NULL, 0);             /* purecov: inspected */