summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-07-30 19:02:21 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-07-30 19:02:21 +0300
commite5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022 (patch)
tree7da108a5ff817f9b4aec681922a904983e5f804b /sql/sql_load.cc
parentc0b65fb77dcb7010056dff7e476b7397dd912c89 (diff)
parent1307d3b8033985d842b900ec8ebe7be9f0a4e092 (diff)
downloadmariadb-git-e5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022.tar.gz
(Pushing for Andrei)
Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-opt into magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_table.cc: Auto merged mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: merge of bug 27471 from 5.0-opt to 5.1-opt sql/log.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/set_var.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sp_head.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_delete.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_insert.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_load.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_parse.cc: merge of bug 27471 from 5.0-opt to 5.1-opt sql/sql_update.cc: merge of bug 27471 from 5.0-opt to 5.1-opt
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 3ffbdf83815..8bbe1e413b3 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -376,7 +376,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table->file->ha_start_bulk_insert((ha_rows) 0);
table->copy_blobs=1;
- thd->no_trans_update.stmt= FALSE;
thd->abort_on_warning= (!ignore &&
(thd->variables.sql_mode &
(MODE_STRICT_TRANS_TABLES |
@@ -410,7 +409,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
ha_autocommit_...
*/
query_cache_invalidate3(thd, table_list, 0);
-
if (error)
{
if (read_file_from_client)
@@ -469,8 +467,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted,
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
- if (!transactional_table)
- thd->no_trans_update.all= TRUE;
+ if (thd->transaction.stmt.modified_non_trans_table)
+ thd->transaction.all.modified_non_trans_table= TRUE;
#ifndef EMBEDDED_LIBRARY
if (mysql_bin_log.is_open())
{
@@ -506,6 +504,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
/* ok to client sent only after binlog write and engine commit */
send_ok(thd, info.copied + info.deleted, 0L, name);
err:
+ DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) ||
+ thd->transaction.stmt.modified_non_trans_table);
table->file->ha_release_auto_increment();
if (thd->lock)
{
@@ -552,7 +552,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
Item_field *sql_field;
TABLE *table= table_list->table;
ulonglong id;
- bool no_trans_update_stmt, err;
+ bool err;
DBUG_ENTER("read_fixed_length");
id= 0;
@@ -580,7 +580,6 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
#ifdef HAVE_purify
read_info.row_end[0]=0;
#endif
- no_trans_update_stmt= !table->file->has_transactions();
restore_record(table, s->default_values);
/*
@@ -650,7 +649,6 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
table->auto_increment_field_not_null= FALSE;
if (err)
DBUG_RETURN(1);
- thd->no_trans_update.stmt= no_trans_update_stmt;
/*
We don't need to reset auto-increment field since we are restoring
@@ -685,12 +683,11 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
TABLE *table= table_list->table;
uint enclosed_length;
ulonglong id;
- bool no_trans_update_stmt, err;
+ bool err;
DBUG_ENTER("read_sep_field");
enclosed_length=enclosed.length();
id= 0;
- no_trans_update_stmt= !table->file->has_transactions();
for (;;it.rewind())
{
@@ -827,7 +824,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
We don't need to reset auto-increment field since we are restoring
its default value at the beginning of each loop iteration.
*/
- thd->no_trans_update.stmt= no_trans_update_stmt;
if (read_info.next_line()) // Skip to next line
break;
if (read_info.line_cuted)