]> git.pld-linux.org Git - packages/mysql.git/blobdiff - sql_no_fcache.patch
localize vars
[packages/mysql.git] / sql_no_fcache.patch
index d0406436b9abdda40681be68ed484c63fdf4dae1..930a0c1438bcb5de03f26fae0cb4c4b0074048d3 100644 (file)
@@ -5,19 +5,18 @@
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
-diff -ruN a/client/mysqldump.c b/client/mysqldump.c
---- a/client/mysqldump.c       2010-07-28 16:47:58.264067653 +0400
-+++ b/client/mysqldump.c       2010-07-28 16:47:59.604985656 +0400
-@@ -139,6 +139,8 @@
+--- a/client/mysqldump.c
++++ b/client/mysqldump.c
+@@ -143,6 +143,8 @@
  static uint opt_protocol= 0;
- static char *opt_plugin_dir= 0, *opt_default_auth;
+ static char *opt_plugin_dir= 0, *opt_default_auth= 0;
  
 +static my_bool server_supports_sql_no_fcache= FALSE;
 +
  /*
  Dynamic_string wrapper functions. In this file use these
  wrappers, they will terminate the process if there is
-@@ -1486,6 +1488,17 @@
+@@ -1496,6 +1498,17 @@
      /* Don't switch charsets for 4.1 and earlier.  (bug#34192). */
      server_supports_switching_charsets= FALSE;
    } 
@@ -35,7 +34,7 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
    /*
      As we're going to set SQL_MODE, it would be lost on reconnect, so we
      cannot reconnect.
-@@ -3158,7 +3171,12 @@
+@@ -3177,7 +3190,12 @@
  
      /* now build the query string */
  
@@ -49,7 +48,7 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
      dynstr_append_checked(&query_string, filename);
      dynstr_append_checked(&query_string, "'");
  
-@@ -3208,7 +3226,12 @@
+@@ -3227,7 +3245,12 @@
        check_io(md_result_file);
      }
      
@@ -63,9 +62,8 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
      dynstr_append_checked(&query_string, result_table);
  
      if (where)
-diff -ruN a/include/flashcache_ioctl.h b/include/flashcache_ioctl.h
---- a/include/flashcache_ioctl.h       1970-01-01 03:00:00.000000000 +0300
-+++ b/include/flashcache_ioctl.h       2010-07-28 16:47:59.744079911 +0400
+--- /dev/null
++++ b/include/flashcache_ioctl.h
 @@ -0,0 +1,53 @@
 +/****************************************************************************
 + *  flashcache_ioctl.h
@@ -120,9 +118,8 @@ diff -ruN a/include/flashcache_ioctl.h b/include/flashcache_ioctl.h
 +#define FLASHCACHEDELALLWHITELIST      _IOW(FLASHCACHE_IOCTL, FLASHCACHEDELWHITELISTALL_CMD, pid_t)
 +
 +#endif
-diff -ruN a/patch_info/sql_no_fcache.info b/patch_info/sql_no_fcache.info
---- a/patch_info/sql_no_fcache.info    1970-01-01 03:00:00.000000000 +0300
-+++ b/patch_info/sql_no_fcache.info    2010-07-28 16:47:59.915439165 +0400
+--- /dev/null
++++ b/patch_info/sql_no_fcache.info
 @@ -0,0 +1,6 @@
 +File=sql_no_fcache.patch
 +Name=Support for flashcache including the SQL_NO_FCACHE option that prevents blocks from being cached during a query.
@@ -130,9 +127,8 @@ diff -ruN a/patch_info/sql_no_fcache.info b/patch_info/sql_no_fcache.info
 +Author=Facebook
 +License=GPL
 +Comment=
-diff -ruN a/sql/lex.h b/sql/lex.h
---- a/sql/lex.h        2010-07-28 16:47:58.575318748 +0400
-+++ b/sql/lex.h        2010-07-28 16:48:00.134078469 +0400
+--- a/sql/lex.h
++++ b/sql/lex.h
 @@ -516,6 +516,7 @@
    { "SQL_CACHE",        SYM(SQL_CACHE_SYM)},
    { "SQL_CALC_FOUND_ROWS", SYM(SQL_CALC_FOUND_ROWS)},
@@ -141,21 +137,19 @@ diff -ruN a/sql/lex.h b/sql/lex.h
    { "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT)},
    { "SQL_THREAD",     SYM(SQL_THREAD)},
    { "SQL_TSI_SECOND",   SYM(SECOND_SYM)},
-diff -ruN a/sql/mysqld.h b/sql/mysqld.h
---- a/sql/mysqld.h     2010-07-28 16:47:58.565318871 +0400
-+++ b/sql/mysqld.h     2010-07-28 16:48:03.004544367 +0400
-@@ -192,6 +192,8 @@
- extern ulong back_log;
+--- a/sql/mysqld.h
++++ b/sql/mysqld.h
+@@ -195,6 +195,8 @@
  extern char language[FN_REFLEN];
- extern ulong server_id, concurrency;
+ extern "C" MYSQL_PLUGIN_IMPORT ulong server_id;
+ extern ulong concurrency;
 +/* flashcache */
 +extern int cachedev_fd;
  extern time_t server_start_time, flush_status_time;
  extern char *opt_mysql_tmpdir, mysql_charsets_dir[];
  extern int mysql_unpacked_real_data_home_len;
-diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
---- a/sql/mysqld.cc    2010-07-28 16:47:58.565318871 +0400
-+++ b/sql/mysqld.cc    2010-07-28 16:48:03.004544367 +0400
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
 @@ -86,6 +86,11 @@
  #ifdef HAVE_SYS_PRCTL_H
  #include <sys/prctl.h>
@@ -168,7 +162,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  #include <thr_alarm.h>
  #include <ft_global.h>
-@@ -484,6 +489,11 @@
+@@ -491,6 +496,11 @@
  ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
  ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
  ulong max_connections, max_connect_errors;
@@ -177,10 +171,10 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 +int cachedev_fd;
 +my_bool cachedev_enabled= FALSE;
 +
- /**
-   Limit of the total number of prepared statements in the server.
-   Is necessary to protect the server against out-of-memory attacks.
-@@ -4167,6 +4177,97 @@
+ /*
+   Maximum length of parameter value which can be set through
+   mysql_send_long_data() call.
+@@ -4102,6 +4112,97 @@
  #define decrement_handler_count()
  #endif /* defined(_WIN32) || defined(HAVE_SMEM) */
  
@@ -278,7 +272,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  #ifndef EMBEDDED_LIBRARY
  #ifndef DBUG_OFF
-@@ -4421,6 +4522,10 @@
+@@ -4363,6 +4464,10 @@
    test_lc_time_sz();
  #endif
  
@@ -289,7 +283,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    /*
      We have enough space for fiddling with the argv, continue
    */
-@@ -4624,6 +4729,10 @@
+@@ -4574,6 +4679,10 @@
    }
  #endif
    clean_up(1);
@@ -300,7 +294,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    mysqld_exit(0);
  }
  
-@@ -6445,6 +6554,7 @@
+@@ -6421,6 +6530,7 @@
    {"Delayed_errors",           (char*) &delayed_insert_errors,  SHOW_LONG},
    {"Delayed_insert_threads",   (char*) &delayed_insert_threads, SHOW_LONG_NOFLUSH},
    {"Delayed_writes",           (char*) &delayed_insert_writes,  SHOW_LONG},
@@ -308,10 +302,9 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    {"Flush_commands",           (char*) &refresh_version,        SHOW_LONG_NOFLUSH},
    {"Handler_commit",           (char*) offsetof(STATUS_VAR, ha_commit_count), SHOW_LONG_STATUS},
    {"Handler_delete",           (char*) offsetof(STATUS_VAR, ha_delete_count), SHOW_LONG_STATUS},
-diff -ruN a/sql/sql_lex.cc b/sql/sql_lex.cc
---- a/sql/sql_lex.cc   2010-07-28 16:47:58.555318714 +0400
-+++ b/sql/sql_lex.cc   2010-07-28 16:48:07.794069239 +0400
-@@ -384,6 +384,7 @@
+--- a/sql/sql_lex.cc
++++ b/sql/sql_lex.cc
+@@ -390,6 +390,7 @@
    lex->describe= 0;
    lex->subqueries= FALSE;
    lex->context_analysis_only= 0;
@@ -319,10 +312,9 @@ diff -ruN a/sql/sql_lex.cc b/sql/sql_lex.cc
    lex->derived_tables= 0;
    lex->safe_to_cache_query= 1;
    lex->leaf_tables_insert= 0;
-diff -ruN a/sql/sql_lex.h b/sql/sql_lex.h
---- a/sql/sql_lex.h    2010-07-28 16:47:58.575318748 +0400
-+++ b/sql/sql_lex.h    2010-07-28 16:48:08.405691834 +0400
-@@ -2293,6 +2293,7 @@
+--- a/sql/sql_lex.h
++++ b/sql/sql_lex.h
+@@ -2346,6 +2346,7 @@
  
    enum enum_yes_no_unknown tx_chain, tx_release;
    bool safe_to_cache_query;
@@ -330,9 +322,8 @@ diff -ruN a/sql/sql_lex.h b/sql/sql_lex.h
    bool subqueries, ignore;
    st_parsing_options parsing_options;
    Alter_info alter_info;
-diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
---- a/sql/sql_select.cc        2010-07-28 16:47:58.555318714 +0400
-+++ b/sql/sql_select.cc        2010-07-28 16:48:13.414069437 +0400
+--- a/sql/sql_select.cc
++++ b/sql/sql_select.cc
 @@ -55,6 +55,12 @@
  
  #define PREV_BITS(type,A)     ((type) (((type) 1 << (A)) -1))
@@ -377,10 +368,9 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
    MYSQL_SELECT_DONE((int) res, (ulong) thd->limit_found_rows);
    DBUG_RETURN(res);
  }
-diff -ruN a/sql/sql_yacc.yy b/sql/sql_yacc.yy
---- a/sql/sql_yacc.yy  2010-07-28 16:47:58.565318871 +0400
-+++ b/sql/sql_yacc.yy  2010-07-28 16:48:14.205317990 +0400
-@@ -1283,6 +1283,7 @@
+--- a/sql/sql_yacc.yy
++++ b/sql/sql_yacc.yy
+@@ -1284,6 +1284,7 @@
  %token  SQL_CACHE_SYM
  %token  SQL_CALC_FOUND_ROWS
  %token  SQL_NO_CACHE_SYM
@@ -388,7 +378,7 @@ diff -ruN a/sql/sql_yacc.yy b/sql/sql_yacc.yy
  %token  SQL_SMALL_RESULT
  %token  SQL_SYM                       /* SQL-2003-R */
  %token  SQL_THREAD
-@@ -7349,6 +7350,10 @@
+@@ -7362,6 +7363,10 @@
                Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE;
              }
            }
@@ -399,3 +389,32 @@ diff -ruN a/sql/sql_yacc.yy b/sql/sql_yacc.yy
          | SQL_CACHE_SYM
            {
              /* 
+--- /dev/null
++++ b/mysql-test/r/percona_sql_no_fcache.result
+@@ -0,0 +1,12 @@
++drop table if exists t1;
++create table t (a int not null);
++insert into t values (1),(2),(3);
++SELECT SQL_NO_FCACHE SLEEP(0);
++SLEEP(0)
++0
++SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
++a
++1
++2
++3
++DROP TABLE t;
+--- /dev/null
++++ b/mysql-test/t/percona_sql_no_fcache.test
+@@ -0,0 +1,11 @@
++--disable_warnings
++drop table if exists t1;
++--enable_warnings
++
++create table t (a int not null);
++insert into t values (1),(2),(3);
++
++SELECT SQL_NO_FCACHE SLEEP(0);
++SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
++
++DROP TABLE t;
This page took 0.041281 seconds and 4 git commands to generate.