From 35352d4da67c9a81a48ad398ca5cdb9e3848d236 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 2 May 2011 13:25:53 +0300 Subject: [PATCH] mysql-test/suite/funcs_1/r/storedproc.result: Fixed test failure mysql-test/suite/funcs_1/t/storedproc.test: Fixed test failure (The error changed as syntax for alter changed with ALTER ONLINE) storage/maria/ha_maria.cc: fixed compiler warning --- mysql-test/suite/funcs_1/r/storedproc.result | 4 +++- mysql-test/suite/funcs_1/t/storedproc.test | 2 +- storage/maria/ha_maria.cc | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index 8da7213bded..15ae654458a 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -3942,7 +3942,9 @@ CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; END// -ERROR 0A000: ALTER VIEW is not allowed in stored procedures +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':BEGIN +SELECT @x; +END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() analyze:BEGIN diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test index 16c4d61bf58..3bd3199da4e 100644 --- a/mysql-test/suite/funcs_1/t/storedproc.test +++ b/mysql-test/suite/funcs_1/t/storedproc.test @@ -3082,7 +3082,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error ER_SP_BADSTATEMENT +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 1aadd3bdfa8..5d2b2ea42cb 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -1967,7 +1967,7 @@ void ha_maria::start_bulk_insert(ha_rows rows) /* don't enable row cache if too few rows */ if (!rows || (rows > MARIA_MIN_ROWS_TO_USE_WRITE_CACHE)) { - size_t size= thd->variables.read_buff_size; + ulonglong size= thd->variables.read_buff_size, tmp; if (rows) { if (file->state->records) @@ -1979,7 +1979,8 @@ void ha_maria::start_bulk_insert(ha_rows rows) else if (table->s->avg_row_length) set_if_smaller(size, (size_t) (table->s->avg_row_length * rows)); } - maria_extra(file, HA_EXTRA_WRITE_CACHE, (void*) &size); + tmp= (ulong) size; // Safe becasue of limits + maria_extra(file, HA_EXTRA_WRITE_CACHE, (void*) &tmp); } can_enable_indexes= (maria_is_all_keys_active(share->state.key_map,