summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-10 01:55:05 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-10 01:55:05 +0200
commitda1ff072c28eb58197892ba28c281e6ad0487c17 (patch)
tree32ebd679eacd38dead4f046faa80fac1acd2b7f7 /sql/sql_load.cc
parentafbd3fc503ece8cfcccb5bda04ce85d249234948 (diff)
downloadmariadb-git-da1ff072c28eb58197892ba28c281e6ad0487c17.tar.gz
Fixed core dump bug in str LIKE "%other_str%" where strings contained characters >= 128.
Fixed problem with replication LOAD DATA INFILE when using --old-rpl-compat. When executing on master LOAD DATA and InnoDB failed with 'table full' error the binary log was corrupted. sql/item_cmpfunc.cc: Fixed core dump bug in str LIKE "%other_str%" where strings contained characters >= 128. sql/log_event.cc: Fixed problem with replication LOAD DATA INFILE when using --old-rpl-compat sql/sql_load.cc: When executing on master LOAD DATA and InnoDB failed with 'table full' error the binary log was corrupted.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 6375ba46fd7..908ff8c6361 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -283,6 +283,20 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
{
if (lf_info.wrote_create_file)
{
+ /*
+ Make sure last block (the one which caused the error) gets logged.
+ This is needed because otherwise after write of
+ (to the binlog, not to read_info (which is a cache))
+ Delete_file_log_event the bad block will remain in read_info.
+ At the end of mysql_load(), the destructor of read_info will call
+ end_io_cache() which will flush read_info, so we will finally have
+ this in the binlog:
+ Append_block # The last successfull block
+ Delete_file
+ Append_block # The failing block
+ which is nonsense.
+ */
+ read_info.end_io_cache();
Delete_file_log_event d(thd, log_delayed);
mysql_bin_log.write(&d);
}