MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:sanja Date:April 27 2002 9:10am
Subject:bk commit into 4.0 tree
View as plain text  
Below is the list of changes that have just been committed into a
4.0 repository of bell. When bell does a push, they will be propogated to 
the main repository and within 24 hours after the push to the public repository. 
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1285 02/04/27 12:09:59 bell@stripped +2 -0
  disabled query cache in mysqldump queries

  client/mysqldump.c
    1.68 02/04/27 12:09:54 bell@stripped +8 -5
    query cache disabled by adding SQL_NO_CACHE;
    buffer for select query command incresed on 512 byte; 
    query command buffer size defined as marco QUERY_LENGTH.

  Docs/manual.texi
    1.917 02/04/27 12:09:54 bell@stripped +2 -0
    disabled query cache note added to changelog

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bell
# Host:	sanja.is.com.ua
# Root:	/home/bell/mysql/work-dump-4.0

--- 1.916/Docs/manual.texi	Fri Apr 26 20:51:42 2002
+++ 1.917/Docs/manual.texi	Sat Apr 27 12:09:54 2002
@@ -48956,6 +48956,8 @@
 
 @itemize @bullet
 @item
+Query cache disabled in mysqldump.
+@item
 Boolean fulltext search weighting scheme changed to something more reasonable.
 @item
 Fixed bug in boolean fulltext search, that caused MySQL to ignore queries of

--- 1.67/client/mysqldump.c	Wed Apr 17 04:18:40 2002
+++ 1.68/client/mysqldump.c	Sat Apr 27 12:09:54 2002
@@ -64,6 +64,9 @@
 #define SHOW_EXTRA  5
 #define QUOTE_CHAR	'`'
 
+/* Size of buffer for dump's select query */
+#define QUERY_LENGTH 1536
+
 static char *add_load_option(char *ptr, const char *object,
 			     const char *statement);
 
@@ -909,7 +912,7 @@
 */
 static void dumpTable(uint numFields, char *table)
 {
-  char query[1024], *end, buff[256],table_buff[NAME_LEN+3];
+  char query[QUERY_LENGTH], *end, buff[256],table_buff[NAME_LEN+3];
   MYSQL_RES	*res;
   MYSQL_FIELD  *field;
   MYSQL_ROW    row;
@@ -926,7 +929,8 @@
     my_delete(filename, MYF(0)); /* 'INTO OUTFILE' doesn't work, if
 				    filename wasn't deleted */
     to_unix_path(filename);
-    sprintf(query, "SELECT * INTO OUTFILE '%s'", filename);
+    sprintf(query, "SELECT /*!40001 SQL_NO_CACHE */ * INTO OUTFILE '%s'",
+	    filename);
     end= strend(query);
     if (replace)
       end= strmov(end, " REPLACE");
@@ -957,7 +961,8 @@
     if (!opt_xml)
       fprintf(md_result_file,"\n--\n-- Dumping data for table '%s'\n--\n",
 	      table);
-    sprintf(query, "SELECT * FROM %s", quote_name(table,table_buff));
+    sprintf(query, "SELECT /*!40001 SQL_NO_CACHE */ * FROM %s",
+	    quote_name(table,table_buff));
     if (where)
     {
       if (!opt_xml)
@@ -1420,8 +1425,6 @@
       return(first_error);
     }
   }
-  if(mysql_query(sock, "SET SQL_QUERY_CACHE_TYPE=OFF") && verbose)
-    fprintf(stderr, "-- Can't disable query cache (not supported).\n");
   if (opt_alldbs)
     dump_all_databases();
   /* Only one database and selected table(s) */
Thread
bk commit into 4.0 treesanja27 Apr