summaryrefslogtreecommitdiff
path: root/mysql-test/t/federated.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/federated.test')
-rw-r--r--mysql-test/t/federated.test44
1 files changed, 43 insertions, 1 deletions
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index 28091676dd7..c401468a940 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -1137,11 +1137,53 @@ ORDER BY federated.t1.country_id;
DROP TABLE federated.countries;
-# optimize and repair tests
+#BEGIN optimize and repair tests
OPTIMIZE TABLE federated.t1;
REPAIR TABLE federated.t1;
REPAIR TABLE federated.t1 QUICK;
REPAIR TABLE federated.t1 EXTENDED;
REPAIR TABLE federated.t1 USE_FRM;
+#END optimize and repair tests
+
+
+# BEGIN ALTER TEST
+connection slave;
+--disable_warnings
+DROP TABLE IF EXISTS federated.normal_table;
+--enable_warnings
+
+CREATE TABLE federated.normal_table (
+ `id` int(4) NOT NULL,
+ `name` varchar(10) default NULL
+ ) DEFAULT CHARSET=latin1;
+
+connection master;
+--disable_warnings
+DROP TABLE IF EXISTS federated.alter_me;
+--enable_warnings
+
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval CREATE TABLE federated.alter_me (
+ `id` int(4) NOT NULL,
+ `name` varchar(10) default NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1
+ CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/normal_table';
+
+INSERT INTO federated.alter_me (id, name) VALUES (1, 'Monty');
+INSERT INTO federated.alter_me (id, name) VALUES (2, 'David');
+
+SELECT * FROM federated.alter_me;
+
+--error 1031
+ALTER TABLE federated.alter_me MODIFY COLUMN id int(16) NOT NULL;
+
+SELECT * FROM federated.alter_me;
+
+DROP TABLE federated.alter_me;
+connection slave;
+DROP TABLE federated.normal_table;
+# END ALTER TEST
+
source include/federated_cleanup.inc;