mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work2-4.1
This commit is contained in:
@ -1,9 +1,23 @@
|
||||
############### include/ps_create.inc ##################
|
||||
# #
|
||||
# drop + create the tables used in most PS test cases #
|
||||
# t/ps_*.test #
|
||||
# #
|
||||
########################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TABLES HERE !!!
|
||||
#
|
||||
# Please be aware, that this file will be sourced by several
|
||||
# test case files stored within the subdirectory 't'.
|
||||
# So every change here will affect several test cases.
|
||||
|
||||
#----------- Please insert your table definitions here ----------#
|
||||
|
||||
|
||||
#---- Please do not alter the following table definitions -------#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t_many_col_types ;
|
||||
--enable_warnings
|
||||
|
@ -4,6 +4,38 @@
|
||||
# #
|
||||
##############################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
#
|
||||
# Please be aware, that this file will be sourced by several test case files
|
||||
# stored within the subdirectory 't'. So every change here will affect
|
||||
# several test cases.
|
||||
#
|
||||
# Please do not modify the structure (DROP/ALTER..) of the tables
|
||||
# 't1' and 't_many_col_types'.
|
||||
#
|
||||
# But you are encouraged to use these two tables within your statements
|
||||
# whenever possible.
|
||||
# t1 - very simple table
|
||||
# t_many_col_types - table with nearly all available column types
|
||||
#
|
||||
# The structure and the content of these tables can be found in
|
||||
# include/ps_create.inc CREATE TABLE ...
|
||||
# include/ps_renew.inc DELETE all rows and INSERT some rows
|
||||
#
|
||||
# Both tables are managed by the same storage engine.
|
||||
# The type of the storage engine is stored in the variable '$type' .
|
||||
|
||||
|
||||
|
||||
#------------------- Please insert your test cases here -------------------#
|
||||
|
||||
|
||||
|
||||
#-------- Please be very carefull when editing behind this line ----------#
|
||||
|
||||
--disable_query_log
|
||||
select '------ delete tests ------' as test_sequence ;
|
||||
--enable_query_log
|
||||
|
@ -4,6 +4,43 @@
|
||||
# #
|
||||
##############################################################
|
||||
|
||||
#
|
||||
# NOTE: THESE TESTS CANNOT BE APPLIED TO TABLES OF TYPE MERGE.
|
||||
# Test which can be applied to MERGE tables should be stored in
|
||||
# include/ps_modify.inc .
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
#
|
||||
# Please be aware, that this file will be sourced by several test case files
|
||||
# stored within the subdirectory 't'. So every change here will affect
|
||||
# several test cases.
|
||||
#
|
||||
# Please do not modify the structure (DROP/ALTER..) of the tables
|
||||
# 't1' and 't_many_col_types'.
|
||||
#
|
||||
# But you are encouraged to use these two tables within your statements
|
||||
# (DELETE/UPDATE/...) whenever possible.
|
||||
# t1 - very simple table
|
||||
# t_many_col_types - table with nearly all available column types
|
||||
#
|
||||
# The structure and the content of these tables can be found in
|
||||
# include/ps_create.inc CREATE TABLE ...
|
||||
# include/ps_renew.inc DELETE all rows and INSERT some rows
|
||||
#
|
||||
# Both tables are managed by the same storage engine.
|
||||
# The type of the storage engine is stored in the variable '$type' .
|
||||
|
||||
|
||||
|
||||
#------------------- Please insert your test cases here -------------------#
|
||||
|
||||
|
||||
#-------- Please be very carefull when editing behind this line ----------#
|
||||
|
||||
## big insert select statements
|
||||
set @duplicate='duplicate ' ;
|
||||
set @1000=1000 ;
|
||||
|
@ -4,10 +4,39 @@
|
||||
# #
|
||||
##############################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
# Please do not modify (INSERT/UPDATE/DELETE) the content of the tables
|
||||
# t1 and t_many_col_types.
|
||||
# Such tests should be done in include/ps_modify.inc
|
||||
#
|
||||
# Please be aware, that this file will be sourced by several test case files
|
||||
# stored within the subdirectory 't'. So every change here will affect
|
||||
# several test cases.
|
||||
#
|
||||
# Please do not modify (INSERT/UPDATE/DELETE) the content or the
|
||||
# structure (DROP/ALTER..) of the tables
|
||||
# 't1' and 't_many_col_types'.
|
||||
# Such tests should be done in include/ps_modify.inc .
|
||||
#
|
||||
# But you are encouraged to use these two tables within your SELECT statements
|
||||
# whenever possible.
|
||||
# t1 - very simple table
|
||||
# t_many_col_types - table with nearly all available column types
|
||||
#
|
||||
# The structure and the content of these tables can be found in
|
||||
# include/ps_create.inc CREATE TABLE ...
|
||||
# include/ps_renew.inc DELETE all rows and INSERT some rows
|
||||
#
|
||||
# Both tables are managed by the same storage engine.
|
||||
# The type of the storage engine is stored in the variable '$type' .
|
||||
|
||||
|
||||
|
||||
#------------------- Please insert your test cases here -------------------#
|
||||
|
||||
|
||||
|
||||
#-------- Please be very carefull when editing behind this line ----------#
|
||||
|
||||
--disable_query_log
|
||||
select '------ simple select tests ------' as test_sequence ;
|
||||
|
@ -525,7 +525,7 @@ fi
|
||||
|
||||
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
|
||||
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
|
||||
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose=1"
|
||||
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
|
||||
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
|
||||
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES CLIENT_BINDIR
|
||||
|
||||
|
@ -98,7 +98,7 @@ if [ ! -x $exec_ndb ]; then
|
||||
echo "$exec_ndb missing"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -x $exec_mgmtsrv ]; then
|
||||
if [ ! -x $exec_mgmtsrvr ]; then
|
||||
echo "$exec_mgmtsrvr missing"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -785,7 +785,7 @@ Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
show keys from t1;
|
||||
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
||||
t1 0 PRIMARY 1 a A 2 NULL NULL BTREE
|
||||
t1 0 PRIMARY 1 a NULL 2 NULL NULL BTREE
|
||||
drop table t1;
|
||||
create table t1 (i int, j int )ENGINE=BDB;
|
||||
insert into t1 values (1,2);
|
||||
|
@ -1,15 +1,37 @@
|
||||
SET @@character_set_server=latin5;
|
||||
CREATE DATABASE db1 DEFAULT CHARACTER SET cp1251;
|
||||
USE db1;
|
||||
CREATE DATABASE db2;
|
||||
SHOW CREATE DATABASE db1;
|
||||
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET cp1251;
|
||||
USE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
SHOW CREATE DATABASE mysqltest1;
|
||||
Database Create Database
|
||||
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET cp1251 */
|
||||
SHOW CREATE DATABASE db2;
|
||||
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp1251 */
|
||||
SHOW CREATE DATABASE mysqltest2;
|
||||
Database Create Database
|
||||
db2 CREATE DATABASE `db2` /*!40100 DEFAULT CHARACTER SET latin5 */
|
||||
DROP DATABASE db2;
|
||||
USE db1;
|
||||
mysqltest2 CREATE DATABASE `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin5 */
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(10) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin5
|
||||
DROP TABLE mysqltest2.t1;
|
||||
ALTER DATABASE mysqltest2 DEFAULT CHARACTER SET latin7;
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(10) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin7
|
||||
DROP DATABASE mysqltest2;
|
||||
CREATE DATABASE mysqltest2 CHARACTER SET latin2;
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(10) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin2
|
||||
DROP DATABASE mysqltest2;
|
||||
USE mysqltest1;
|
||||
CREATE TABLE t1 (a char(10));
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
@ -32,4 +54,4 @@ t1 CREATE TABLE `t1` (
|
||||
`a` char(10) collate latin1_german1_ci default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
@ -111,3 +111,34 @@ SET character_set_connection=cp1251;
|
||||
SELECT hex('<27><><EFBFBD><EFBFBD>');
|
||||
hex('<27><><EFBFBD><EFBFBD>')
|
||||
F2E5F1F2
|
||||
USE test;
|
||||
SET NAMES binary;
|
||||
CREATE TABLE `тест` (`тест` int);
|
||||
SHOW CREATE TABLE `тест`;
|
||||
Table Create Table
|
||||
тест CREATE TABLE `тест` (
|
||||
`тест` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SET NAMES utf8;
|
||||
SHOW CREATE TABLE `тест`;
|
||||
Table Create Table
|
||||
тест CREATE TABLE `тест` (
|
||||
`тест` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE `тест`;
|
||||
SET NAMES binary;
|
||||
SET character_set_connection=utf8;
|
||||
SELECT 'тест' as s;
|
||||
s
|
||||
тест
|
||||
SET NAMES utf8;
|
||||
SET character_set_connection=binary;
|
||||
SELECT 'тест' as s;
|
||||
s
|
||||
тест
|
||||
SET NAMES binary;
|
||||
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
|
||||
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>'
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
|
||||
ERROR HY000: Invalid utf8 character string: '<27><><EFBFBD><EFBFBD><EFBFBD>` (a int)'
|
||||
|
@ -1655,3 +1655,109 @@ Z,z,Ź,ź,Ż,ż,Ž,ž
|
||||
ǁ
|
||||
ǂ
|
||||
ǃ
|
||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci;
|
||||
group_concat(c1 order by c1)
|
||||
÷
|
||||
×
|
||||
A,a,À,Á,Â,Ã,Ä,Å,à,á,â,ã,ä,å,Ā,ā,Ă,ă,Ą,ą,Ǎ,ǎ,Ǟ,ǟ,Ǡ,ǡ,Ǻ,ǻ
|
||||
AA,Aa,aA,aa
|
||||
Æ,æ,Ǣ,ǣ,Ǽ,ǽ
|
||||
B,b
|
||||
ƀ
|
||||
Ɓ
|
||||
Ƃ,ƃ
|
||||
C,c,Ç,ç,Ć,ć,Ĉ,ĉ,Ċ,ċ,Č,č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|
||||
27E0E3E6E7E8EAEB27
|
||||
select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678");
|
||||
unhex(hex("foobar")) hex(unhex("1234567890ABCDEF")) unhex("345678")
|
||||
foobar 1234567890ABCDEF 4Vx
|
||||
select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678"), unhex(NULL);
|
||||
unhex(hex("foobar")) hex(unhex("1234567890ABCDEF")) unhex("345678") unhex(NULL)
|
||||
foobar 1234567890ABCDEF 4Vx NULL
|
||||
select hex(unhex("1")), hex(unhex("12")), hex(unhex("123")), hex(unhex("1234")), hex(unhex("12345")), hex(unhex("123456"));
|
||||
hex(unhex("1")) hex(unhex("12")) hex(unhex("123")) hex(unhex("1234")) hex(unhex("12345")) hex(unhex("123456"))
|
||||
01 12 0123 1234 012345 123456
|
||||
|
@ -175,10 +175,10 @@ insert into t1 values (19,4, 0);
|
||||
select * from t1 where b<=5 and c=0;
|
||||
a b c
|
||||
19 4 0
|
||||
select * from t1 where b=4 and c<=5;
|
||||
select * from t1 where b=4 and c<=5 order by a;
|
||||
a b c
|
||||
19 4 0
|
||||
17 4 4
|
||||
19 4 0
|
||||
select * from t1 where b<=4 and c<=5 order by a;
|
||||
a b c
|
||||
7 2 1
|
||||
|
@ -25,19 +25,19 @@ test2 CREATE DATABASE `test2` /*!40100 DEFAULT CHARACTER SET latin2 */
|
||||
show create database test3;
|
||||
Database Create Database
|
||||
test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET latin5 */
|
||||
set @@collation_server=armscii_bin;
|
||||
set @@collation_server=armscii8_bin;
|
||||
drop database test3;
|
||||
create database test3;
|
||||
|
||||
--- --master--
|
||||
show create database test3;
|
||||
Database Create Database
|
||||
test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii_bin */
|
||||
test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
|
||||
|
||||
--- --slave--
|
||||
show create database test3;
|
||||
Database Create Database
|
||||
test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii_bin */
|
||||
test3 CREATE DATABASE `test3` /*!40100 DEFAULT CHARACTER SET armscii8 COLLATE armscii8_bin */
|
||||
use test2;
|
||||
create table t1 (a int auto_increment primary key, b varchar(100));
|
||||
set character_set_client=cp850, collation_connection=latin2_croatian_ci;
|
||||
@ -51,7 +51,7 @@ insert into t1 (b) values(@@collation_connection);
|
||||
select * from t1 order by a;
|
||||
a b
|
||||
1 armscii8
|
||||
2 armscii_bin
|
||||
2 armscii8_bin
|
||||
3 cp850
|
||||
4 latin2
|
||||
5 latin2_croatian_ci
|
||||
@ -60,7 +60,7 @@ a b
|
||||
select * from test2.t1 order by a;
|
||||
a b
|
||||
1 armscii8
|
||||
2 armscii_bin
|
||||
2 armscii8_bin
|
||||
3 cp850
|
||||
4 latin2
|
||||
5 latin2_croatian_ci
|
||||
|
@ -13,25 +13,48 @@
|
||||
|
||||
|
||||
SET @@character_set_server=latin5;
|
||||
CREATE DATABASE db1 DEFAULT CHARACTER SET cp1251;
|
||||
USE db1;
|
||||
CREATE DATABASE db2;
|
||||
CREATE DATABASE mysqltest1 DEFAULT CHARACTER SET cp1251;
|
||||
USE mysqltest1;
|
||||
CREATE DATABASE mysqltest2;
|
||||
|
||||
#
|
||||
# This should be cp1251
|
||||
#
|
||||
SHOW CREATE DATABASE db1;
|
||||
SHOW CREATE DATABASE mysqltest1;
|
||||
|
||||
#
|
||||
# This should take the default latin5 value from server level.
|
||||
# Database "mysqltest2" should take the default latin5 value from
|
||||
# the server level.
|
||||
# Afterwards, table "d2.t1" should inherit the default latin5 value from
|
||||
# the database "mysqltest2", using database option hash.
|
||||
#
|
||||
SHOW CREATE DATABASE db2;
|
||||
DROP DATABASE db2;
|
||||
SHOW CREATE DATABASE mysqltest2;
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
DROP TABLE mysqltest2.t1;
|
||||
|
||||
#
|
||||
# Now we check if the database charset is updated in
|
||||
# the database options hash when we ALTER DATABASE.
|
||||
#
|
||||
ALTER DATABASE mysqltest2 DEFAULT CHARACTER SET latin7;
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
||||
#
|
||||
# Now we check if the database charset is removed from
|
||||
# the database option hash when we DROP DATABASE.
|
||||
#
|
||||
CREATE DATABASE mysqltest2 CHARACTER SET latin2;
|
||||
CREATE TABLE mysqltest2.t1 (a char(10));
|
||||
SHOW CREATE TABLE mysqltest2.t1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
||||
#
|
||||
# Check that table value uses database level by default
|
||||
#
|
||||
USE db1;
|
||||
USE mysqltest1;
|
||||
CREATE TABLE t1 (a char(10));
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
@ -50,4 +73,4 @@ DROP TABLE t1;
|
||||
#
|
||||
#
|
||||
#
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
@ -78,3 +78,32 @@ SET NAMES koi8r;
|
||||
SELECT hex('<27><><EFBFBD><EFBFBD>');
|
||||
SET character_set_connection=cp1251;
|
||||
SELECT hex('<27><><EFBFBD><EFBFBD>');
|
||||
|
||||
USE test;
|
||||
|
||||
# Bug#4417
|
||||
# Check that identifiers and strings are not converted
|
||||
# when the client character set is binary.
|
||||
|
||||
SET NAMES binary;
|
||||
CREATE TABLE `тест` (`тест` int);
|
||||
SHOW CREATE TABLE `тест`;
|
||||
SET NAMES utf8;
|
||||
SHOW CREATE TABLE `тест`;
|
||||
DROP TABLE `тест`;
|
||||
SET NAMES binary;
|
||||
SET character_set_connection=utf8;
|
||||
SELECT 'тест' as s;
|
||||
SET NAMES utf8;
|
||||
SET character_set_connection=binary;
|
||||
SELECT 'тест' as s;
|
||||
|
||||
#
|
||||
# Test that we allow only well-formed UTF8 identitiers
|
||||
#
|
||||
SET NAMES binary;
|
||||
--error 1300
|
||||
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
|
||||
SET NAMES utf8;
|
||||
--error 1300
|
||||
CREATE TABLE `good<6F><64><EFBFBD><EFBFBD><EFBFBD>` (a int);
|
||||
|
@ -178,4 +178,5 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci;
|
||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ci;
|
||||
--select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci;
|
||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci;
|
||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci;
|
||||
|
||||
|
@ -78,7 +78,7 @@ select quote(concat('abc\'', '\\cba'));
|
||||
select quote(1/0), quote('\0\Z');
|
||||
select length(quote(concat(char(0),"test")));
|
||||
select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235))));
|
||||
select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678");
|
||||
select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678"), unhex(NULL);
|
||||
select hex(unhex("1")), hex(unhex("12")), hex(unhex("123")), hex(unhex("1234")), hex(unhex("12345")), hex(unhex("123456"));
|
||||
select length(unhex(md5("abrakadabra")));
|
||||
|
||||
|
@ -106,7 +106,7 @@ select * from t1 where b<=5 order by a;
|
||||
select * from t1 where b<=5 and c=0;
|
||||
insert into t1 values (19,4, 0);
|
||||
select * from t1 where b<=5 and c=0;
|
||||
select * from t1 where b=4 and c<=5;
|
||||
select * from t1 where b=4 and c<=5 order by a;
|
||||
select * from t1 where b<=4 and c<=5 order by a;
|
||||
select * from t1 where b<=5 and c=0 or b<=5 and c=2;
|
||||
drop table t1;
|
||||
|
@ -4,15 +4,9 @@
|
||||
# #
|
||||
##############################################################
|
||||
|
||||
|
||||
# Please do not
|
||||
# - modify (INSERT/UPDATE/DELETE) the content of the tables
|
||||
# t1 and t_many_col_types. Such tests should be done in
|
||||
# include/ps_modify.inc
|
||||
# - insert test cases where the results depend on the
|
||||
# table type. Such tests should be done in the files
|
||||
# include/ps_query.inc, include/ps_modify ...
|
||||
#
|
||||
#
|
||||
# NOTE: PLEASE SEE THE DETAILED DESCRIPTION AT THE BOTTOM OF THIS FILE
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
--disable_query_log
|
||||
@ -737,3 +731,101 @@ execute stmt1 using
|
||||
@arg60, @arg61 ;
|
||||
|
||||
drop table t1 ;
|
||||
|
||||
##### RULES OF THUMB TO PRESERVE THE SYSTEMATICS OF THE PS TEST CASES #####
|
||||
#
|
||||
# 0. You don't have the time to
|
||||
# - read and pay attention to these rules of thumb
|
||||
# - accept that QA may move your test case to a different place
|
||||
# (I will not change your code!!) .
|
||||
# Please append your test case to
|
||||
# t/ps.test
|
||||
#
|
||||
# 1. You have more time and want to get as much value from you test case as
|
||||
# possible. Please try to make the following decisions:
|
||||
#
|
||||
# Will the execution or result of the sub test case depend on the
|
||||
# properties of a storage engine ?
|
||||
#
|
||||
# NO --> alter t/ps_1general.test (Example: Command with syntax error)
|
||||
# If you need a table, please try to use
|
||||
# t1 - very simple table
|
||||
# t_many_col_types - table with nearly all available column types
|
||||
# whenever possible.
|
||||
#
|
||||
# The structure and the content of these tables can be found in
|
||||
# include/ps_create.inc CREATE TABLE ...
|
||||
# include/ps_renew.inc DELETE all rows and INSERT some rows
|
||||
#
|
||||
# Both tables are managed by the same storage engine.
|
||||
# The type of the storage engine is stored in the variable
|
||||
# '$type' . In ps_1general.test $type is set to 'MYISAM'.
|
||||
#
|
||||
# Please feel free to source ps_create.inc or ps_renew.inc
|
||||
# whenever you think it helps. But please restore the original
|
||||
# state of these tables after your tests, because the following
|
||||
# statements may depend on it.
|
||||
#
|
||||
# YES
|
||||
# |
|
||||
# |
|
||||
# Is it possible to apply the sub test case to all table types ?
|
||||
# YES --> alter include/ps_query.inc (for SELECTs)
|
||||
# include/ps_modify.inc (for INSERT/UPDATE/DELETE)
|
||||
# include/ps_modify1.inc (also for INSERT/UPDATE/DELETE,
|
||||
# but t/ps_5merge.test will not source that file)
|
||||
# Please try to find an appropriate place within the file.
|
||||
# It would be nice if we have some systematics in the
|
||||
# order of the sub test cases (if possible).
|
||||
#
|
||||
# Please be aware, that
|
||||
# include: ps_query.inc, ps_modify.inc, ps_modify1.inc
|
||||
# will be sourced by several test case files stored within the
|
||||
# subdirectory 't'. So every change here will affect several test
|
||||
# cases.
|
||||
#
|
||||
# NO
|
||||
# |
|
||||
# |
|
||||
# Append the sub test case to the appropriate
|
||||
# ps_<number><table type>.test .
|
||||
#
|
||||
# 2. The current structure of the PS tests
|
||||
#
|
||||
# t/ps_1general.test Check of basic PS features, SHOW commands and DDL
|
||||
# The tests should not depend on the table type.
|
||||
#
|
||||
# t/ps_2myisam Check of PS on tables of type MYISAM .
|
||||
# t/ps_3innodb Check of PS on tables of type InnoDB .
|
||||
# ...
|
||||
# t/ps_6bdb Check of PS on tables of type BDB .
|
||||
# All storage engine related tests use the variable $type to hold the
|
||||
# name of the storage engine.
|
||||
#
|
||||
# include/ps_query.inc test cases with SELECT/...
|
||||
# These test cases should not modify the content or
|
||||
# the structure (DROP/ALTER..) of the tables
|
||||
# 't1' and 't_many_col_types'.
|
||||
# include/ps_modify.inc test cases with INSERT/UPDATE/...
|
||||
# These test cases should not modify the structure
|
||||
# (DROP/ALTER..) of the tables
|
||||
# 't1' and 't_many_col_types'.
|
||||
# These two test sequences will be applied to all table types .
|
||||
#
|
||||
# include/ps_modify1.inc test cases with INSERT/UPDATE/...
|
||||
# This test sequences will be applied to all table types
|
||||
# except MERGE tables.
|
||||
#
|
||||
# include/ps_create.inc DROP and CREATE of the tables
|
||||
# 't1' and 't_many_col_types' .
|
||||
# include/ps_renew.inc DELETE all rows and INSERT some rows, that means
|
||||
# recreate the original content of these tables.
|
||||
# Please do not alter the commands concerning these two tables.
|
||||
#
|
||||
# Please feel free and encouraged to exploit the current code sharing
|
||||
# mechanism of the 'ps_<number><table type>' test cases. It is an convenient
|
||||
# way to check all storage engines.
|
||||
#
|
||||
# Thank you for reading these rules of thumb.
|
||||
#
|
||||
# Matthias
|
||||
|
@ -4,6 +4,10 @@
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
let $type= 'MYISAM' ;
|
||||
|
@ -4,8 +4,14 @@
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $type= 'InnoDB' ;
|
||||
-- source include/ps_create.inc
|
||||
-- source include/ps_renew.inc
|
||||
|
@ -4,6 +4,10 @@
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
let $type= 'HEAP' ;
|
||||
@ -19,7 +23,8 @@ eval create table t1
|
||||
--disable_warnings
|
||||
drop table if exists t_many_col_types;
|
||||
--enable_warnings
|
||||
# The used table type doesn't support BLOB/TEXT columns (error 1163)
|
||||
# The used table type doesn't support BLOB/TEXT columns.
|
||||
# (The server would send error 1163 .)
|
||||
# So we use char(100) instead.
|
||||
eval create table t_many_col_types
|
||||
(
|
||||
|
@ -4,6 +4,10 @@
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
--disable_warnings
|
||||
|
@ -4,6 +4,10 @@
|
||||
# #
|
||||
###############################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE SEE ps_1general.test (bottom)
|
||||
# BEFORE ADDING NEW TEST CASES HERE !!!
|
||||
|
||||
use test;
|
||||
|
||||
-- source include/have_bdb.inc
|
||||
|
@ -26,7 +26,7 @@ show create database test2;
|
||||
show create database test3;
|
||||
|
||||
connection master;
|
||||
set @@collation_server=armscii_bin;
|
||||
set @@collation_server=armscii8_bin;
|
||||
drop database test3;
|
||||
create database test3;
|
||||
--disable_query_log
|
||||
|
Reference in New Issue
Block a user