List:Internals« Previous MessageNext Message »
From:antony Date:July 20 2005 11:16pm
Subject:bk commit into 4.1 tree (acurtis:1.2330) BUG#11238
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of antony. When antony 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2330 05/07/21 00:16:30 acurtis@stripped +8 -0
  Bug#11238
    "SELECT ... FOR UPDATE executed as consistent read inside LOCK TABLES"
    Do not discard lock_type information as handler::start_stmt() may require knowledge.

  sql/sql_base.cc
    1.256 05/07/21 00:16:05 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/handler.h
    1.142 05/07/21 00:16:05 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/ha_ndbcluster.h
    1.57 05/07/21 00:16:05 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/ha_ndbcluster.cc
    1.168 05/07/21 00:16:05 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/ha_innodb.h
    1.81 05/07/21 00:16:05 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/ha_innodb.cc
    1.202 05/07/21 00:16:04 acurtis@stripped +3 -2
    new lock_type argument for handler::start_stmt() 
    fix for bug 11238

  sql/ha_berkeley.h
    1.70 05/07/21 00:16:04 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

  sql/ha_berkeley.cc
    1.153 05/07/21 00:16:04 acurtis@stripped +1 -1
    new lock_type argument for handler::start_stmt() 

# 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:	acurtis
# Host:	ltantony.xiphis.org
# Root:	/usr/home/antony/work2/p2-bug11238

--- 1.152/sql/ha_berkeley.cc	2005-06-05 18:38:38 +01:00
+++ 1.153/sql/ha_berkeley.cc	2005-07-21 00:16:04 +01:00
@@ -1863,7 +1863,7 @@
   Under LOCK TABLES, each used tables will force a call to start_stmt.
 */
 
-int ha_berkeley::start_stmt(THD *thd)
+int ha_berkeley::start_stmt(THD *thd, thr_lock_type lock_type)
 {
   int error=0;
   DBUG_ENTER("ha_berkeley::start_stmt");

--- 1.69/sql/ha_berkeley.h	2005-05-04 14:05:53 +01:00
+++ 1.70/sql/ha_berkeley.h	2005-07-21 00:16:04 +01:00
@@ -131,7 +131,7 @@
   int extra(enum ha_extra_function operation);
   int reset(void);
   int external_lock(THD *thd, int lock_type);
-  int start_stmt(THD *thd);
+  int start_stmt(THD *thd, thr_lock_type lock_type);
   void position(byte *record);
   int analyze(THD* thd,HA_CHECK_OPT* check_opt);
   int optimize(THD* thd, HA_CHECK_OPT* check_opt);

--- 1.141/sql/handler.h	2005-06-08 12:31:56 +01:00
+++ 1.142/sql/handler.h	2005-07-21 00:16:05 +01:00
@@ -402,7 +402,7 @@
   virtual int reset() { return extra(HA_EXTRA_RESET); }
   virtual int external_lock(THD *thd, int lock_type)=0;
   virtual void unlock_row() {}
-  virtual int start_stmt(THD *thd) {return 0;}
+  virtual int start_stmt(THD *thd, thr_lock_type lock_type) {return 0;}
   /*
     This is called to delete all rows in a table
     If the handler don't support this, then this function will

--- 1.255/sql/sql_base.cc	2005-06-28 13:06:12 +01:00
+++ 1.256/sql/sql_base.cc	2005-07-21 00:16:05 +01:00
@@ -1595,7 +1595,7 @@
 		    MYF(0),table->table_name);
     DBUG_RETURN(1);
   }
-  if ((error=table->file->start_stmt(thd)))
+  if ((error=table->file->start_stmt(thd, lock_type)))
   {
     table->file->print_error(error,MYF(0));
     DBUG_RETURN(1);

--- 1.167/sql/ha_ndbcluster.cc	2005-07-06 10:23:25 +01:00
+++ 1.168/sql/ha_ndbcluster.cc	2005-07-21 00:16:05 +01:00
@@ -3322,7 +3322,7 @@
   startTransaction for each transaction/statement.
 */
 
-int ha_ndbcluster::start_stmt(THD *thd)
+int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
 {
   int error=0;
   DBUG_ENTER("start_stmt");

--- 1.56/sql/ha_ndbcluster.h	2005-07-06 10:23:25 +01:00
+++ 1.57/sql/ha_ndbcluster.h	2005-07-21 00:16:05 +01:00
@@ -118,7 +118,7 @@
   int extra_opt(enum ha_extra_function operation, ulong cache_size);
   int reset();
   int external_lock(THD *thd, int lock_type);
-  int start_stmt(THD *thd);
+  int start_stmt(THD *thd, thr_lock_type lock_type);
   const char * table_type() const;
   const char ** bas_ext() const;
   ulong table_flags(void) const;

--- 1.201/sql/ha_innodb.cc	2005-06-05 18:38:39 +01:00
+++ 1.202/sql/ha_innodb.cc	2005-07-21 00:16:04 +01:00
@@ -4935,7 +4935,8 @@
 ha_innobase::start_stmt(
 /*====================*/
 	              /* out: 0 or error code */
-	THD*    thd)  /* in: handle to the user thread */
+	THD*    thd,  /* in: handle to the user thread */
+        thr_lock_type lock_type)
 {
 	row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
 	trx_t*		trx;
@@ -4976,7 +4977,7 @@
 	} else {
 		if (trx->isolation_level != TRX_ISO_SERIALIZABLE
 		    && thd->lex->sql_command == SQLCOM_SELECT
-		    && thd->lex->lock_option == TL_READ) {
+		    && lock_type == TL_READ) {
 	
 			/* For other than temporary tables, we obtain
 			no lock for consistent read (plain SELECT). */

--- 1.80/sql/ha_innodb.h	2005-05-04 14:05:53 +01:00
+++ 1.81/sql/ha_innodb.h	2005-07-21 00:16:05 +01:00
@@ -148,7 +148,7 @@
 	int discard_or_import_tablespace(my_bool discard);
   	int extra(enum ha_extra_function operation);
   	int external_lock(THD *thd, int lock_type);
-	int start_stmt(THD *thd);
+	int start_stmt(THD *thd, thr_lock_type lock_type);
 
   	void position(byte *record);
   	ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key);
Thread
bk commit into 4.1 tree (acurtis:1.2330) BUG#11238antony21 Jul