summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-02 19:39:45 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-02 19:39:45 +0300
commita74d04671d23fa65bd610184965cc2974ec41cf9 (patch)
treeac1577cdd546fe5fd7914a268d6b2728b86b021f /sql/sql_load.cc
parent80204e051c1e9acda0ab7a6a50c728795b67adb3 (diff)
downloadmariadb-git-a74d04671d23fa65bd610184965cc2974ec41cf9.tar.gz
Fixed warnings and build failures after last push
Speed up some PBXT tests by adding begin...commit around creating of testing tables. include/my_base.h: Fixed wrong constant mysql-test/mysql-test-run.pl: Print MariaDB instead of MySQL mysql-test/r/range.result: Move test that required partitions to parts.optimizer mysql-test/suite/innodb_plugin/t/disabled.def: Disable test that causes valgrind warning about not released memory in xtradb mysql-test/suite/parts/r/optimizer.result: Moved from range.result mysql-test/suite/parts/t/optimizer.test: Moved from range.test mysql-test/suite/pbxt/r/join_nested.result: Updated results after optimizer changes mysql-test/suite/pbxt/r/renamedb.result: Updated test for new error message mysql-test/suite/pbxt/t/check.test: Speed up test mysql-test/suite/pbxt/t/count_distinct2.test: Speed up test mysql-test/suite/pbxt/t/derived.test: Speed up test mysql-test/suite/pbxt/t/renamedb.test: Updated test for new error message mysql-test/suite/rpl/r/rpl_log_pos.result: Updated results mysql-test/suite/rpl/t/rpl_log_pos.test: Update test to read from a position that has 'known wrong' data. The orignal test read a timestamp, so the error message could differ between runs. mysql-test/suite/rpl/t/rpl_temporary_errors.test: Sync to slave to make test predictable mysql-test/t/events_time_zone.test: Extend wait to make test predictable mysql-test/t/range.test: Move test that required partitions to parts.optimizer sql/sql_list.h: Fixed compiler warning sql/sql_load.cc: buffer was not freed in some error conditions tests/mysql_client_test.c: Fixed compiler warning
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 99f0d7c24df..d0506d75925 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1054,7 +1054,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
String &field_term, String &line_start, String &line_term,
String &enclosed_par, int escape, bool get_it_from_net,
bool is_fifo)
- :file(file_par),escape_char(escape)
+ :file(file_par),buffer(0),escape_char(escape)
{
read_charset= cs;
field_term_ptr=(char*) field_term.ptr();
@@ -1103,6 +1103,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
MYF(MY_WME)))
{
my_free((uchar*) buffer,MYF(0)); /* purecov: inspected */
+ buffer= 0;
error=1;
}
else
@@ -1133,9 +1134,8 @@ READ_INFO::~READ_INFO()
{
if (need_end_io_cache)
::end_io_cache(&cache);
- my_free((uchar*) buffer,MYF(0));
- error=1;
}
+ my_free((uchar*) buffer,MYF(MY_ALLOW_ZERO_PTR));
}