[Commits] Rev 2876: compare "Copying to tmp table" proc_info in http://bazaar.launchpad.net/~maria-captains/maria/5.3/

serg at askmonty.org serg at askmonty.org
Thu Jan 13 16:11:14 EET 2011


At http://bazaar.launchpad.net/~maria-captains/maria/5.3/

------------------------------------------------------------
revno: 2876
revision-id: sergii at pisem.net-20110113141108-hfrhzi1zu74dzj8g
parent: sergii at pisem.net-20110113140931-56e9x0463dpc2l8s
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 5.3-monty
timestamp: Thu 2011-01-13 15:11:08 +0100
message:
  compare "Copying to tmp table" proc_info
  as a pointer, not as a string
-------------- next part --------------
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-01-13 14:09:31 +0000
+++ b/sql/sql_select.cc	2011-01-13 14:11:08 +0000
@@ -45,6 +45,8 @@ const char *join_type_str[]={ "UNKNOWN",
                               "index_merge"
 };
 
+const char *copy_to_tmp_table= "Copying to tmp table";
+
 struct st_sargable_param;
 
 static void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array);
@@ -1957,7 +1959,7 @@ JOIN::exec()
     curr_tmp_table= exec_tmp_table1;
 
     /* Copy data to the temporary table */
-    thd_proc_info(thd, "Copying to tmp table");
+    thd_proc_info(thd, copy_to_tmp_table);
     DBUG_PRINT("info", ("%s", thd->proc_info));
     if (!curr_join->sort_and_group &&
         curr_join->const_tables != curr_join->tables)
@@ -12781,8 +12783,8 @@ create_internal_tmp_table_from_heap2(THD
   table->file->change_table_ptr(table, table->s);
   table->use_all_columns();
   if (save_proc_info)
-    thd_proc_info(thd, (!strcmp(save_proc_info,"Copying to tmp table") ?
-                     "Copying to tmp table on disk" : save_proc_info));
+    thd_proc_info(thd, save_proc_info == copy_to_tmp_table ?
+                  "Copying to tmp table on disk" : save_proc_info);
   DBUG_RETURN(0);
 
  err:



More information about the commits mailing list