mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
bd365f7622
Add support for warnings for prepare of prepared statements Fixed test to work with --ps-protocol Fixed some test results libmysql/libmysql.c: Add support for warnings for prepare of prepared statements mysql-test/r/func_concat.result: After merge fixes mysql-test/r/select.result: Delete conflicting tables form previous tests mysql-test/r/view.result: New code from 4.1 fixed old error mysql-test/t/create.test: Ensure that --ps-protocol return same results as normal test mysql-test/t/func_group.test: Remove not needed --disable_ps_protocol mysql-test/t/func_time.test: Ensure that --ps-protocol return same results as normal test mysql-test/t/having.test: Ensure that --ps-protocol return same results as normal test mysql-test/t/insert_select.test: Remove not needed --disable_ps_protocol mysql-test/t/select.test: Ensure that --ps-protocol return same results as normal test mysql-test/t/sp.test: Fixed comment mysql-test/t/system_mysql_db_fix.test: Fix that results is same as from system_mysql_db.test mysql-test/t/trigger.test: Added comment mysql-test/t/type_blob.test: Remove not needed --disable_ps_protocol mysql-test/t/union.test: Run most of the test with --ps-protocol mysql-test/t/user_limits.test: Ensure that --ps-protocol return same results as normal test mysql-test/t/view.test: Removed --error as bug is now fixed mysql-test/t/warnings.test: Ensure that --ps-protocol return same results as normal test ndb/include/Makefile.am: Don't automaticly use SCCS files sql/ha_ndbcluster.cc: Removed compiler warning sql/log_event.cc: After merge fix sql/sql_class.h: After merge fix sql/sql_insert.cc: After merge fix sql/sql_load.cc: After merge fix sql/sql_prepare.cc: Add support for warnings for prepare of prepared statements sql/sql_update.cc: After merge fixes
105 lines
2.2 KiB
Text
105 lines
2.2 KiB
Text
#
|
|
# Test some warnings
|
|
#
|
|
--disable_warnings
|
|
drop table if exists t1, t2;
|
|
--enable_warnings
|
|
SET SQL_WARNINGS=1;
|
|
|
|
create table t1 (a int);
|
|
insert into t1 values (1);
|
|
insert into t1 values ("hej");
|
|
insert into t1 values ("hej"),("då");
|
|
set SQL_WARNINGS=1;
|
|
insert into t1 values ("hej");
|
|
insert into t1 values ("hej"),("då");
|
|
drop table t1;
|
|
set SQL_WARNINGS=0;
|
|
|
|
#
|
|
# Test other warnings
|
|
#
|
|
|
|
drop temporary table if exists not_exists;
|
|
drop table if exists not_exists_table;
|
|
show warnings limit 1;
|
|
drop database if exists not_exists_db;
|
|
show count(*) warnings;
|
|
create table t1(id int);
|
|
create table if not exists t1(id int);
|
|
--disable_ps_protocol
|
|
select @@warning_count;
|
|
--enable_ps_protocol
|
|
drop table t1;
|
|
|
|
#
|
|
# Test warnings for LOAD DATA INFILE
|
|
#
|
|
|
|
create table t1(a tinyint, b int not null, c date, d char(5));
|
|
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
|
|
# PS doesn't work good with @@warning_count
|
|
--disable_ps_protocol
|
|
select @@warning_count;
|
|
--enable_ps_protocol
|
|
drop table t1;
|
|
|
|
#
|
|
# Warnings from basic INSERT, UPDATE and ALTER commands
|
|
#
|
|
|
|
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
|
|
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
|
|
alter table t1 modify c char(4);
|
|
alter table t1 add d char(2);
|
|
update t1 set a=NULL where a=10;
|
|
update t1 set c='mysql ab' where c='test';
|
|
update t1 set d=c;
|
|
create table t2(a tinyint NOT NULL, b char(3));
|
|
insert into t2 select b,c from t1;
|
|
insert into t2(b) values('mysqlab');
|
|
set sql_warnings=1;
|
|
insert into t2(b) values('mysqlab');
|
|
set sql_warnings=0;
|
|
drop table t1, t2;
|
|
|
|
#
|
|
# Test for max_error_count
|
|
#
|
|
|
|
create table t1(a char(10));
|
|
let $1=50;
|
|
disable_query_log;
|
|
while ($1)
|
|
{
|
|
eval insert into t1 values('mysql ab');
|
|
dec $1;
|
|
}
|
|
enable_query_log;
|
|
alter table t1 add b char;
|
|
set max_error_count=10;
|
|
update t1 set b=a;
|
|
--disable_ps_protocol
|
|
select @@warning_count;
|
|
--enable_ps_protocol
|
|
|
|
#
|
|
# Test for handler type
|
|
#
|
|
drop table t1;
|
|
create table t1 (id int) engine=isam;
|
|
alter table t1 engine=isam;
|
|
drop table t1;
|
|
|
|
#
|
|
# Test for deprecated TYPE= syntax
|
|
#
|
|
|
|
create table t1 (id int) type=heap;
|
|
alter table t1 type=myisam;
|
|
drop table t1;
|
|
|
|
#
|
|
# Test for deprecated table_type variable
|
|
#
|
|
set table_type=MYISAM;
|