List:Internals« Previous MessageNext Message »
From:monty Date:September 4 2004 12:03pm
Subject:bk commit into 5.0 tree (monty:1.1745)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated 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.1745 04/09/04 15:02:57 monty@stripped +9 -0
  Print value of Item_param if it has a value (when debugging)

  tests/client_test.c
    1.68 04/09/04 15:02:55 monty@stripped +2 -0
    More debugging

  sql/sql_yacc.yy
    1.304 04/09/04 15:02:55 monty@stripped +1 -1
    Fixed typo

  sql/sql_select.cc
    1.263 04/09/04 15:02:55 monty@stripped +6 -3
    More debugging

  sql/sql_parse.cc
    1.352 04/09/04 15:02:54 monty@stripped +1 -0
    Added missing command names (caused crash when running with --debug)

  sql/sql_insert.cc
    1.116 04/09/04 15:02:54 monty@stripped +3 -4
    Fix bug casused by merge

  sql/log.cc
    1.125 04/09/04 15:02:54 monty@stripped +5 -5
    Better variable name

  sql/item.h
    1.93 04/09/04 15:02:54 monty@stripped +1 -1
    Print value of param if it has a value (when debugging)

  sql/item.cc
    1.92 04/09/04 15:02:54 monty@stripped +20 -1
    Print value of Item_param if it has a value (when debugging)

  libmysql/libmysql.c
    1.173 04/09/04 15:02:54 monty@stripped +1 -1
    More debug

# 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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.0

--- 1.172/libmysql/libmysql.c	Tue Aug  3 13:31:57 2004
+++ 1.173/libmysql/libmysql.c	Sat Sep  4 15:02:54 2004
@@ -2384,7 +2384,7 @@
   char buff[4 /* size of stmt id */ +
             5 /* execution flags */];
   DBUG_ENTER("execute");
-  DBUG_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length));
+  DBUG_DUMP("packet", packet, length);
 
   mysql->last_used_con= mysql;
   int4store(buff, stmt->stmt_id);		/* Send stmt id to server */

--- 1.91/sql/item.cc	Mon Aug 30 12:09:53 2004
+++ 1.92/sql/item.cc	Sat Sep  4 15:02:54 2004
@@ -1143,8 +1143,27 @@
   return rc;
 }
 
-/* End of Item_param related */
 
+void Item_param::print(String *str)
+{
+  if (state == NO_VALUE)
+  {
+    str->append('?');
+  }
+  else
+  {
+    char buffer[80];
+    String tmp(buffer, sizeof(buffer), &my_charset_bin);
+    const String *res;
+    res= query_val_str(&tmp);
+    str->append(*res);
+  }
+}
+
+
+/****************************************************************************
+  Item_copy_string
+****************************************************************************/
 
 void Item_copy_string::copy()
 {

--- 1.92/sql/item.h	Thu Aug 26 14:34:53 2004
+++ 1.93/sql/item.h	Sat Sep  4 15:02:54 2004
@@ -635,7 +635,7 @@
   */
   virtual table_map used_tables() const
   { return state != NO_VALUE ? (table_map)0 : PARAM_TABLE_BIT; }
-  void print(String *str) { str->append('?'); }
+  void print(String *str);
   /* parameter never equal to other parameter of other item */
   bool eq(const Item *item, bool binary_cmp) const { return 0; }
 };

--- 1.124/sql/log.cc	Fri Jul 16 00:34:35 2004
+++ 1.125/sql/log.cc	Sat Sep  4 15:02:54 2004
@@ -838,13 +838,13 @@
   while ((strcmp(to_log,log_info.log_file_name) || (exit_loop=included)) &&
          !log_in_use(log_info.log_file_name))
   {
-    ulong tmp;
-    LINT_INIT(tmp);
+    ulong file_size;
+    LINT_INIT(file_size);
     if (decrease_log_space) //stat the file we want to delete
     {
       MY_STAT s;
       if (my_stat(log_info.log_file_name,&s,MYF(0)))
-        tmp= s.st_size;
+        file_size= s.st_size;
       else
       {
         /* 
@@ -852,7 +852,7 @@
            of space that deletion will free. In most cases,
            deletion won't work either, so it's not a problem.
         */
-        tmp= 0; 
+        file_size= 0; 
       }
     }
     /*
@@ -861,7 +861,7 @@
     */
     DBUG_PRINT("info",("purging %s",log_info.log_file_name));
     if (!my_delete(log_info.log_file_name, MYF(0)) && decrease_log_space)
-      *decrease_log_space-= tmp;
+      *decrease_log_space-= file_size;
     if (find_next_log(&log_info, 0) || exit_loop)
       break;
   }

--- 1.115/sql/sql_insert.cc	Fri Sep  3 22:38:42 2004
+++ 1.116/sql/sql_insert.cc	Sat Sep  4 15:02:54 2004
@@ -86,14 +86,13 @@
       return -1;
     }
 
-    table_list->next_local= 0;
     thd->dupp_field=0;
-    save_next= table_list->next_local;        // fields only from first table
- 
     thd->lex->select_lex.no_wrap_view_item= 1;
+    save_next= table_list->next_local;        // fields only from first table
+    table_list->next_local= 0;
     res= setup_fields(thd, 0, table_list, fields, 1, 0, 0);
-    thd->lex->select_lex.no_wrap_view_item= 0;
     table_list->next_local= save_next;
+    thd->lex->select_lex.no_wrap_view_item= 0;
     if (res)
       return -1;
 

--- 1.351/sql/sql_parse.cc	Fri Sep  3 21:44:33 2004
+++ 1.352/sql/sql_parse.cc	Sat Sep  4 15:02:54 2004
@@ -78,6 +78,7 @@
   "Connect","Kill","Debug","Ping","Time","Delayed_insert","Change user",
   "Binlog Dump","Table Dump",  "Connect Out", "Register Slave",
   "Prepare", "Prepare Execute", "Long Data", "Close stmt",
+  "Reset stmt", "Set option", "Fetch",
   "Error"					// Last command number
 };
 

--- 1.262/sql/sql_select.cc	Fri Sep  3 22:38:42 2004
+++ 1.263/sql/sql_select.cc	Sat Sep  4 15:02:55 2004
@@ -543,6 +543,7 @@
   if (cond_value == Item::COND_FALSE ||
       (!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS)))
   {						/* Impossible cond */
+    DBUG_PRINT("info", ("Impossible WHERE"));
     zero_result_cause= "Impossible WHERE";
     error= 0;
     DBUG_RETURN(0);
@@ -560,20 +561,24 @@
     {
       if (res > 1)
       {
+        DBUG_PRINT("error",("Error from opt_sum_query"));
 	DBUG_RETURN(1);
       }
       if (res < 0)
       {
+        DBUG_PRINT("info",("No matching min/max row"));
 	zero_result_cause= "No matching min/max row";
 	error=0;
 	DBUG_RETURN(0);
       }
+      DBUG_PRINT("info",("Select tables optimized away"));
       zero_result_cause= "Select tables optimized away";
       tables_list= 0;				// All tables resolved
     }
   }
   if (!tables_list)
   {
+    DBUG_PRINT("info",("No tables"));
     error= 0;
     DBUG_RETURN(0);
   }
@@ -11641,7 +11646,6 @@
     }
     if (my_strcasecmp(table_alias_charset, cmp_name, alias))
     {
-   {
       str->append(' ');
       append_identifier(thd, str, alias, strlen(alias));
     }
@@ -11649,7 +11653,6 @@
 }
 
 
-
 void st_select_lex::print(THD *thd, String *str)
 {
   if (!thd)
@@ -11657,7 +11660,7 @@
 
   str->append("select ", 7);
 
-  //options
+  /* First add options */
   if (options & SELECT_STRAIGHT_JOIN)
     str->append("straight_join ", 14);
   if ((thd->lex->lock_option == TL_READ_HIGH_PRIORITY) &&

--- 1.303/sql/sql_yacc.yy	Tue Aug 31 00:11:10 2004
+++ 1.304/sql/sql_yacc.yy	Sat Sep  4 15:02:55 2004
@@ -7553,7 +7553,7 @@
 	| ALGORITHM_SYM EQ MERGE_SYM
 	  { Lex->create_view_algorithm= VIEW_ALGORITHM_MERGE; }
 	| ALGORITHM_SYM EQ TEMPTABLE_SYM
-	  { Lex->create_view_algorithm= VIEW_ALGORITHM_TMEPTABLE; }
+	  { Lex->create_view_algorithm= VIEW_ALGORITHM_TMPTABLE; }
 	;
 check_option:
         /* empty */ {}

--- 1.67/tests/client_test.c	Fri Sep  3 21:44:34 2004
+++ 1.68/tests/client_test.c	Sat Sep  4 15:02:55 2004
@@ -5508,6 +5508,7 @@
   MYSQL_STMT *stmt;
   int        rc, id;
   MYSQL_BIND bind[1];
+  DBUG_ENTER("test_subselect");
 
   myheader("test_subselect");
 
@@ -5609,6 +5610,7 @@
   assert(rc == MYSQL_NO_DATA);
 
   mysql_stmt_close(stmt);
+  DBUG_VOID_RETURN;
 }
 
 
Thread
bk commit into 5.0 tree (monty:1.1745)monty4 Sep