summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorRohit Kalhans <rohit.kalhans@oracle.com>2012-02-08 12:10:55 +0530
committerRohit Kalhans <rohit.kalhans@oracle.com>2012-02-08 12:10:55 +0530
commit9153fddf5880a2a2fcc1542c27ddbbc6f8c0fb9e (patch)
treee58195a7225032197fd3df4e5727a459c791c2f8 /sql/sql_base.cc
parent6df5a61d2ee53ae43aafe07a697d7be3344a14d7 (diff)
downloadmariadb-git-9153fddf5880a2a2fcc1542c27ddbbc6f8c0fb9e.tar.gz
Backout the patch for bug#11758263.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc41
1 files changed, 1 insertions, 40 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index fda0ba61e63..e0472e2c9b5 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -214,8 +214,7 @@ static bool auto_repair_table(THD *thd, TABLE_LIST *table_list);
static void free_cache_entry(TABLE *entry);
static bool
has_write_table_with_auto_increment(TABLE_LIST *tables);
-static bool
-has_write_table_with_auto_increment_and_select(TABLE_LIST *tables);
+
uint cached_open_tables(void)
{
@@ -5684,11 +5683,6 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
/* We have to emulate LOCK TABLES if we are statement needs prelocking. */
if (thd->lex->requires_prelocking())
{
-
- if (thd->variables.binlog_format != BINLOG_FORMAT_ROW && tables &&
- has_write_table_with_auto_increment_and_select(tables))
- thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_WRITE_AUTOINC_SELECT);
-
/*
A query that modifies autoinc column in sub-statement can make the
master and slave inconsistent.
@@ -9086,39 +9080,6 @@ has_write_table_with_auto_increment(TABLE_LIST *tables)
return 0;
}
-/*
- checks if the tables have select tables in the table list and write tables
- with auto-increment column.
-
- SYNOPSIS
- has_two_write_locked_tables_with_auto_increment_and_select
- tables Table list
-
- RETURN VALUES
-
- -true if the table list has atleast one table with auto-increment column
- and atleast one table to select from.
- -false otherwise
-*/
-
-static bool
-has_write_table_with_auto_increment_and_select(TABLE_LIST *tables)
-{
- bool has_select= false;
- bool has_auto_increment_tables = has_write_table_with_auto_increment(tables);
- for(TABLE_LIST *table= tables; table; table= table->next_global)
- {
- if (!table->placeholder() &&
- (table->lock_type <= TL_READ_NO_INSERT))
- {
- has_select= true;
- break;
- }
- }
- return(has_select && has_auto_increment_tables);
-}
-
-
/*
Open and lock system tables for read.