summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <acurtis@poseidon.ndb.mysql.com>2005-11-07 16:25:06 +0100
committerunknown <acurtis@poseidon.ndb.mysql.com>2005-11-07 16:25:06 +0100
commit6b3a9caef9b8cf42f8a706f778bba72db89cdd2b (patch)
tree2b8ffe29d899326e4ad244ac3f67d4fcf29bfae6 /mysql-test
parentdf33aacd87ff08c27fd371a0bb348fe3986e6f95 (diff)
downloadmariadb-git-6b3a9caef9b8cf42f8a706f778bba72db89cdd2b.tar.gz
Make storage engines "pluggable", handlerton work
Makefile.am: Changes to autoconf subst config/ac-macros/ha_berkeley.m4: simplify config/ac-macros/ha_ndbcluster.m4: simplify config/ac-macros/ha_partition.m4: simplify configure.in: strip configure of storage engine specific cruft and simplify extra/Makefile.am: changes to autoconf/automake subst libmysqld/Makefile.am: only compile storage engines if required. make find object file a little smarter libmysqld/examples/Makefile.am: changes to autoconf subst mysql-test/Makefile.am: remove storage engine specific cruft mysql-test/r/ps_1general.result: cannot gaurantee order of results from 'show storage engines' mysql-test/r/show_check.result: fix test - frm file fails to be deleted if it is invalid mysql-test/r/sql_mode.result: isam does not exist, test may need to be redone/fixed in 5.0 mysql-test/r/warnings.result: isam no longer exists mysql-test/t/ps_1general.test: cannot gaurantee order of results from 'show storage engines' mysql-test/t/show_check.test: fix test - frm file fails to be deleted if it is invalid mysql-test/t/sql_mode.test: isam does not exist, test may need to be redone/fixed in 5.0 mysql-test/t/system_mysql_db_fix.test: change isam to myisam mysql-test/t/view.test: change isam to myisam mysql-test/t/warnings.test: isam no longer exists sql/Makefile.am: Make storage engines "pluggable" stage 1 only compile storage engines if included sql/examples/ha_example.cc: handlerton work sql/examples/ha_example.h: handlerton work sql/examples/ha_tina.cc: handlerton work sql/examples/ha_tina.h: handlerton work sql/ha_archive.cc: handlerton work sql/ha_archive.h: handlerton work sql/ha_berkeley.cc: handlerton work sql/ha_berkeley.h: handlerton work sql/ha_blackhole.cc: handlerton work sql/ha_federated.cc: handlerton work sql/ha_federated.h: handlerton work sql/ha_heap.cc: handlerton work sql/ha_innodb.cc: handlerton work sql/ha_innodb.h: handlerton work sql/ha_myisam.cc: handlerton work sql/ha_myisammrg.cc: handlerton work sql/ha_ndbcluster.cc: handlerton work sql/ha_ndbcluster.h: handlerton work sql/ha_partition.cc: handlerton work sql/handler.cc: start removing storage engine specific cruft sql/handler.h: start removing storage engine specific cruft db_type for binlog handlerton handlerton flag for not-user-selectable storage engines sql/lex.h: start removing storage engine specific cruft sql/log.cc: handlerton work give binlog handlerton a 'real' db_type sql/mysql_priv.h: start removing storage engine specific cruft sql/mysqld.cc: start removing storage engine specific cruft sql/set_var.cc: start removing storage engine specific cruft sql/sp_head.cc: start removing storage engine specific cruft sql/sql_class.cc: start removing storage engine specific cruft sql/sql_class.h: start removing storage engine specific cruft sql/sql_lex.h: start removing storage engine specific cruft sql/sql_manager.cc: start removing storage engine specific cruft sql/sql_manager.h: start removing storage engine specific cruft sql/sql_parse.cc: start removing storage engine specific cruft sql/sql_partition.cc: start removing storage engine specific cruft sql/sql_prepare.cc: start removing storage engine specific cruft sql/sql_show.cc: start removing storage engine specific cruft sql/sql_table.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE start removing storage engine specific cruft sql/sql_update.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/sql_yacc.yy: start removing storage engine specific cruft test if we should throw error sql/table.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/table.h: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE sql/unireg.cc: changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE storage/ndb/include/kernel/kernel_types.h: added my_config.h storage/ndb/include/ndb_global.h.in: added my_config.h storage/ndb/include/ndb_types.h.in: added my_config.h config/ac-macros/storage.m4: New BitKeeper file ``config/ac-macros/storage.m4'' sql/handlerton.cc.in: New BitKeeper file ``sql/handlerton.cc.in''
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/Makefile.am12
-rw-r--r--mysql-test/r/ps_1general.result15
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/r/sql_mode.result18
-rw-r--r--mysql-test/r/warnings.result7
-rw-r--r--mysql-test/t/ps_1general.test5
-rw-r--r--mysql-test/t/show_check.test3
-rw-r--r--mysql-test/t/sql_mode.test24
-rw-r--r--mysql-test/t/system_mysql_db_fix.test6
-rw-r--r--mysql-test/t/view.test4
-rw-r--r--mysql-test/t/warnings.test6
11 files changed, 30 insertions, 72 deletions
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index f1194d7fc2f..2142a84419e 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -17,18 +17,8 @@
## Process this file with automake to create Makefile.in
-if HAVE_NDBCLUSTER_DB
SUBDIRS = ndb
DIST_SUBDIRS=ndb
-USE_NDBCLUSTER=\"--ndbcluster\"
-else
-# If one uses automake conditionals, automake will automatically
-# include all possible branches to DIST_SUBDIRS goal.
-# Reset DIST_SUBDIRS if we don't use NDB
-SUBDIRS=
-DIST_SUBDIRS=
-USE_NDBCLUSTER=\"\"
-endif
benchdir_root= $(prefix)
testdir = $(benchdir_root)/mysql-test
@@ -126,7 +116,7 @@ SUFFIXES = .sh
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
-e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
- -e 's!@''USE_NDBCLUSTER''@!$(USE_NDBCLUSTER)!g' \
+ -e 's!@''USE_NDBCLUSTER''@!@TEST_NDBCLUSTER@!g' \
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index de6f995dd6c..756772c16a5 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -320,21 +320,6 @@ prepare stmt4 from ' show errors limit 20 ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
prepare stmt4 from ' show storage engines ';
execute stmt4;
-Engine Support Comment
-MyISAM YES/NO Default engine as of MySQL 3.23 with great performance
-MEMORY YES/NO Hash based, stored in memory, useful for temporary tables
-InnoDB YES/NO Supports transactions, row-level locking, and foreign keys
-BerkeleyDB YES/NO Supports transactions and page-level locking
-BLACKHOLE YES/NO /dev/null storage engine (anything you write to it disappears)
-EXAMPLE YES/NO Example storage engine
-ARCHIVE YES/NO Archive storage engine
-CSV YES/NO CSV storage engine
-ndbcluster YES/NO Clustered, fault-tolerant, memory-based tables
-FEDERATED YES/NO Federated MySQL storage engine
-MRG_MYISAM YES/NO Collection of identical MyISAM tables
-binlog YES/NO This is a meta storage engine to represent the binlog in a transaction
-ISAM YES/NO Obsolete storage engine
-partition YES/NO Partition engine
drop table if exists t5;
prepare stmt1 from ' drop table if exists t5 ' ;
execute stmt1 ;
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index fdb0db602ff..98be82fbf38 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -518,7 +518,7 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
show create table t1;
ERROR HY000: Incorrect information in file: './test/t1.frm'
-drop table t1;
+drop table if exists t1;
CREATE TABLE txt1(a int);
CREATE TABLE tyt2(a int);
CREATE TABLE urkunde(a int);
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result
index 7d9d7fb333c..d131cebf58a 100644
--- a/mysql-test/r/sql_mode.result
+++ b/mysql-test/r/sql_mode.result
@@ -423,24 +423,6 @@ a\b a\"b a'\b a'\"b
SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
a\b a\'b a"\b a"\'b
a\b a\'b a"\b a"\'b
-set session sql_mode = 'NO_ENGINE_SUBSTITUTION';
-create table t1 (a int) engine=isam;
-ERROR HY000: The 'ISAM' feature is disabled; you need MySQL built with 'ISAM' to have it working
-show create table t1;
-ERROR 42S02: Table 'test.t1' doesn't exist
-drop table if exists t1;
-Warnings:
-Note 1051 Unknown table 't1'
-set session sql_mode = '';
-create table t1 (a int) engine=isam;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
-show create table t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` int(11) default NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-drop table t1;
SET @@SQL_MODE='';
create function `foo` () returns int return 5;
show create function `foo`;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index d8329e446ac..46f05399ba9 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -166,13 +166,6 @@ show variables like 'max_error_count';
Variable_name Value
max_error_count 10
drop table t1;
-create table t1 (id int) engine=isam;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
-alter table t1 engine=isam;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
-drop table t1;
create table t1 (id int) type=heap;
Warnings:
Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index 6abfd8f28a7..fa844f02ace 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -342,8 +342,11 @@ prepare stmt4 from ' show warnings limit 20 ';
--error 1295
prepare stmt4 from ' show errors limit 20 ';
prepare stmt4 from ' show storage engines ';
---replace_column 2 YES/NO
+# The output depends upon the precise order in which
+# storage engines are registered, so we switch off the output.
+--disable_result_log
execute stmt4;
+--enable_result_log
################ MISC STUFF ################
## get a warning and an error
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 89d281a2c58..1b6a1158dac 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -396,7 +396,8 @@ system echo "this is a junk file for test" >> var/master-data/test/t1.frm ;
SHOW TABLE STATUS like 't1';
--error 1033
show create table t1;
-drop table t1;
+drop table if exists t1;
+system rm -f var/master-data/test/t1.frm ;
# End of 4.1 tests
diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test
index 8ae9ced6c68..08a03df3274 100644
--- a/mysql-test/t/sql_mode.test
+++ b/mysql-test/t/sql_mode.test
@@ -209,18 +209,18 @@ SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b";
# is not available
#
-set session sql_mode = 'NO_ENGINE_SUBSTITUTION';
---error 1289
-create table t1 (a int) engine=isam;
---error 1146
-show create table t1;
-drop table if exists t1;
-
-# for comparison, lets see the warnings...
-set session sql_mode = '';
-create table t1 (a int) engine=isam;
-show create table t1;
-drop table t1;
+#set session sql_mode = 'NO_ENGINE_SUBSTITUTION';
+#--error 1289
+#create table t1 (a int) engine=isam;
+#--error 1146
+#show create table t1;
+#drop table if exists t1;
+#
+## for comparison, lets see the warnings...
+#set session sql_mode = '';
+#create table t1 (a int) engine=isam;
+#show create table t1;
+#drop table t1;
#
# Bug #6903: ANSI_QUOTES does not come into play with SHOW CREATE FUNCTION
diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix.test
index 0a93ad4a690..9b475a6f494 100644
--- a/mysql-test/t/system_mysql_db_fix.test
+++ b/mysql-test/t/system_mysql_db_fix.test
@@ -34,7 +34,7 @@ CREATE TABLE db (
PRIMARY KEY Host (Host,Db,User),
KEY User (User)
)
-type=ISAM;
+type=MyISAM;
--enable-warnings
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
@@ -52,7 +52,7 @@ CREATE TABLE host (
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db)
)
-type=ISAM;
+type=MyISAM;
--enable-warnings
--disable_warnings
@@ -71,7 +71,7 @@ CREATE TABLE user (
Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,User)
)
-type=ISAM;
+type=MyISAM;
--enable-warnings
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 0bd0e572193..4338d0f8f9a 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -1804,7 +1804,9 @@ drop table t1;
# underlying tables (BUG#6443)
#
set sql_mode='strict_all_tables';
+--disable_warnings
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB;
+--enable_warnings
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
-- error 1364
@@ -1860,7 +1862,9 @@ drop table t1;
#
# Test for bug #11771: wrong query_id in SELECT * FROM <view>
#
+--disable_warnings
CREATE TABLE t1 (f1 char) ENGINE = innodb;
+--enable_warnings
INSERT INTO t1 VALUES ('A');
CREATE VIEW v1 AS SELECT * FROM t1;
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index f6ae7cdaf30..f65ce962ef2 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -113,9 +113,9 @@ show variables like 'max_error_count';
# Test for handler type
#
drop table t1;
-create table t1 (id int) engine=isam;
-alter table t1 engine=isam;
-drop table t1;
+#create table t1 (id int) engine=isam;
+#alter table t1 engine=isam;
+#drop table t1;
#
# Test for deprecated TYPE= syntax