diff options
author | unknown <monty@mashka.mysql.fi> | 2003-01-03 00:04:33 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-01-03 00:04:33 +0200 |
commit | 591352060bf09321e6c6bb93b6c2b9bac1fa569a (patch) | |
tree | 461fafebcf70ffd880e85f8342601eaade292e1b /sql/sql_load.cc | |
parent | 6827968b2e4f8df470f63b03e912628f6345fd94 (diff) | |
parent | 5fcd61bec6600a83e9ed9fba2ba380b8f5a66a35 (diff) | |
download | mariadb-git-591352060bf09321e6c6bb93b6c2b9bac1fa569a.tar.gz |
Merge with 4.0.8
BitKeeper/etc/logging_ok:
auto-union
VC++Files/sql/mysqld.dsp:
Auto merged
acinclude.m4:
Auto merged
include/my_base.h:
Auto merged
include/myisam.h:
Auto merged
include/myisammrg.h:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_write.c:
Auto merged
myisam/myisamdef.h:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/case.result:
Auto merged
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/key_diff.result:
Auto merged
mysql-test/r/multi_update.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/multi_update.test:
Auto merged
mysql-test/t/rpl_log_pos.test:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_myisammrg.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql-bench/crash-me.sh:
Auto merged
sql-bench/server-cfg.sh:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/structs.h:
Auto merged
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 00450a3b86c..96ff33774ac 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -269,11 +269,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->time_stamp=save_time_stamp; table->next_number_field=0; - if (thd->lock) - { - mysql_unlock_tables(thd, thd->lock); - thd->lock=0; - } } if (file >= 0) my_close(file,MYF(0)); free_blobs(table); /* if pack_blob was used */ @@ -292,7 +287,8 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, mysql_bin_log.write(&d); } } - DBUG_RETURN(-1); // Error on read + error= -1; // Error on read + goto err; } sprintf(name,ER(ER_LOAD_INFO),info.records,info.deleted, info.records-info.copied,thd->cuted_fields); @@ -326,6 +322,13 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } if (transactional_table) error=ha_autocommit_or_rollback(thd,error); + +err: + if (thd->lock) + { + mysql_unlock_tables(thd, thd->lock); + thd->lock=0; + } DBUG_RETURN(error); } |