summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/ps_create.inc14
-rw-r--r--mysql-test/include/ps_modify.inc32
-rw-r--r--mysql-test/include/ps_modify1.inc37
-rw-r--r--mysql-test/include/ps_query.inc35
-rw-r--r--mysql-test/t/ps_1general.test110
-rw-r--r--mysql-test/t/ps_2myisam.test4
-rw-r--r--mysql-test/t/ps_3innodb.test4
-rw-r--r--mysql-test/t/ps_4heap.test7
-rw-r--r--mysql-test/t/ps_5merge.test4
-rw-r--r--mysql-test/t/ps_6bdb.test4
10 files changed, 238 insertions, 13 deletions
diff --git a/mysql-test/include/ps_create.inc b/mysql-test/include/ps_create.inc
index 7c457572d61..77844c99d77 100644
--- a/mysql-test/include/ps_create.inc
+++ b/mysql-test/include/ps_create.inc
@@ -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
diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc
index 85e9690cf04..04c5cbaad6b 100644
--- a/mysql-test/include/ps_modify.inc
+++ b/mysql-test/include/ps_modify.inc
@@ -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
diff --git a/mysql-test/include/ps_modify1.inc b/mysql-test/include/ps_modify1.inc
index 3608e726648..0b192a52625 100644
--- a/mysql-test/include/ps_modify1.inc
+++ b/mysql-test/include/ps_modify1.inc
@@ -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 ;
diff --git a/mysql-test/include/ps_query.inc b/mysql-test/include/ps_query.inc
index 819ec4add06..e22f168dcd7 100644
--- a/mysql-test/include/ps_query.inc
+++ b/mysql-test/include/ps_query.inc
@@ -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 ;
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index b7686bbd26a..5f0ff528b2b 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -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
diff --git a/mysql-test/t/ps_2myisam.test b/mysql-test/t/ps_2myisam.test
index 3bb8b01cf87..c7e4746762b 100644
--- a/mysql-test/t/ps_2myisam.test
+++ b/mysql-test/t/ps_2myisam.test
@@ -4,6 +4,10 @@
# #
###############################################
+#
+# NOTE: PLEASE SEE ps_1general.test (bottom)
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
use test;
let $type= 'MYISAM' ;
diff --git a/mysql-test/t/ps_3innodb.test b/mysql-test/t/ps_3innodb.test
index 71acf3b76f1..e6d3e239ff9 100644
--- a/mysql-test/t/ps_3innodb.test
+++ b/mysql-test/t/ps_3innodb.test
@@ -4,6 +4,10 @@
# #
###############################################
+#
+# NOTE: PLEASE SEE ps_1general.test (bottom)
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
use test;
let $type= 'InnoDB' ;
diff --git a/mysql-test/t/ps_4heap.test b/mysql-test/t/ps_4heap.test
index 8aa715b095e..d1c81d95cd7 100644
--- a/mysql-test/t/ps_4heap.test
+++ b/mysql-test/t/ps_4heap.test
@@ -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
(
diff --git a/mysql-test/t/ps_5merge.test b/mysql-test/t/ps_5merge.test
index ee4beea78c4..ff48a50f331 100644
--- a/mysql-test/t/ps_5merge.test
+++ b/mysql-test/t/ps_5merge.test
@@ -4,6 +4,10 @@
# #
###############################################
+#
+# NOTE: PLEASE SEE ps_1general.test (bottom)
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
use test;
--disable_warnings
diff --git a/mysql-test/t/ps_6bdb.test b/mysql-test/t/ps_6bdb.test
index dde6a05268e..7dbd08f5baa 100644
--- a/mysql-test/t/ps_6bdb.test
+++ b/mysql-test/t/ps_6bdb.test
@@ -4,6 +4,10 @@
# #
###############################################
+#
+# NOTE: PLEASE SEE ps_1general.test (bottom)
+# BEFORE ADDING NEW TEST CASES HERE !!!
+
use test;
-- source include/have_bdb.inc