mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
e702b70d67
The --enable_prepare_warnings allows to not discard warnings from autorepair of crashed table in --ps-protocol mode. Use this to properly fix the parts.partition_recover_myisam and maria.maria-recover tests. Add a test case for the new feature. This also adds missing test coverage for the case where the same warning is thrown in both prepare and execute phase. client/mysqltest.cc: Implement new commands --enable-prepare_warnings and --disable_prepare_warnings. mysql-test/r/mysqltest_ps.result: Add test case for new --enable_prepare_warning mysqltest command. mysql-test/suite/maria/t/maria-recover.test: Better fix of test case using new --enable_prepare_warnings command. mysql-test/suite/parts/t/partition_recover_myisam.test: Fix test failure in --ps-protocol mode. mysql-test/t/mysqltest_ps.test: Add test case for new --enable_prepare_warning mysqltest command.
34 lines
805 B
Text
34 lines
805 B
Text
#
|
|
# Test mysqltest in --ps-protocol mode.
|
|
#
|
|
|
|
if (`SELECT $PS_PROTOCOL = 0`)
|
|
{
|
|
--skip Need prepared statement protocol
|
|
}
|
|
|
|
#
|
|
# Test the --enable_prepare_warnings command.
|
|
# Test default value (off), enabling, and disabling.
|
|
#
|
|
|
|
--enable_warnings
|
|
|
|
select 1 + "2 a";
|
|
create table t (a int primary key, b blob default '');
|
|
# This statement gives warning both during prepare and execute.
|
|
# So gives double warnings when --enable_prepare_warnings.
|
|
select a, (2*a) AS a from t group by a;
|
|
drop table t;
|
|
|
|
--enable_prepare_warnings
|
|
select 1 + "2 a";
|
|
create table t (a int primary key, b blob default '');
|
|
select a, (2*a) AS a from t group by a;
|
|
drop table t;
|
|
|
|
--disable_prepare_warnings
|
|
select 1 + "2 a";
|
|
create table t (a int primary key, b blob default '');
|
|
select a, (2*a) AS a from t group by a;
|
|
drop table t;
|