[Commits] Rev 3678: fix for functions. in file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

sanja at montyprogram.com sanja at montyprogram.com
Mon Aug 19 10:17:32 EEST 2013


At file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

------------------------------------------------------------
revno: 3678
revision-id: sanja at montyprogram.com-20130819071730-mz4gmb6yqc4sqekn
parent: sanja at montyprogram.com-20130813103252-ny379kz8a6gkvkja
committer: sanja at montyprogram.com
branch nick: work-maria-10.0-base-merge-5.5
timestamp: Mon 2013-08-19 10:17:30 +0300
message:
  fix for functions.
  removed unused fix
-------------- next part --------------
=== modified file 'sql/item_func.h'
--- a/sql/item_func.h	2013-08-13 10:32:52 +0000
+++ b/sql/item_func.h	2013-08-19 07:17:30 +0000
@@ -1279,6 +1279,7 @@ public:
   {
     return Item_int_func::used_tables() | RAND_TABLE_BIT;
   }
+  bool is_expensive() { return 1; }
   longlong val_int();
   bool check_vcol_func_processor(uchar *int_arg) 
   {
@@ -1533,6 +1534,7 @@ class Item_func_get_lock :public Item_in
     return Item_int_func::used_tables() | RAND_TABLE_BIT;
   }
   bool const_item() const { return 0; }
+  bool is_expensive() { return 1; }
   bool check_vcol_func_processor(uchar *int_arg) 
   {
     return trace_unsupported_by_check_vcol_func_processor(func_name());
@@ -1551,6 +1553,7 @@ public:
     return Item_int_func::used_tables() | RAND_TABLE_BIT;
   }
   bool const_item() const { return 0; }
+  bool is_expensive() { return 1; }
   void fix_length_and_dec() { max_length=1; set_persist_maybe_null(1);}
   bool check_vcol_func_processor(uchar *int_arg) 
   {
@@ -1636,6 +1639,7 @@ public:
     return Item_func::used_tables() | RAND_TABLE_BIT;
   }
   bool const_item() const { return 0; }
+  bool is_expensive() { return 1; }
   String *str_result(String *str);
   my_decimal *val_decimal_result(my_decimal *);
   bool is_null_result();

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2013-07-17 19:24:29 +0000
+++ b/sql/sql_base.cc	2013-08-19 07:17:30 +0000
@@ -5665,7 +5665,10 @@ bool lock_tables(THD *thd, TABLE_LIST *t
               !thd->lex->requires_prelocking());
 
   if (!tables && !thd->lex->requires_prelocking())
+  {
+    DBUG_PRINT("info", ("No tables and no prelocking"));
     DBUG_RETURN(thd->decide_logging_format(tables));
+  }
 
   /*
     Check for thd->locked_tables_mode to avoid a redundant

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2013-08-12 18:12:43 +0000
+++ b/sql/sql_select.cc	2013-08-19 07:17:30 +0000
@@ -8957,10 +8957,6 @@ make_join_select(JOIN *join,SQL_SELECT *
     {                        /* there may be a select without a cond. */    
       if (join->table_count > 1)
         cond->update_used_tables();		// Tablenr may have changed
-      if (join->const_tables == join->table_count &&
-	  thd->lex->current_select->master_unit() ==
-	  &thd->lex->unit)		// not upper level SELECT
-        join->const_table_map|=RAND_TABLE_BIT;
 
       /*
         Extract expressions that depend on constant tables



More information about the commits mailing list