From bb8b5fd66830b291b3eab7d015d015a22cddd16c Mon Sep 17 00:00:00 2001
From: Rich Prohaska <prohaska@tokutek.com>
Date: Mon, 8 Oct 2012 16:42:03 +0000
Subject: [PATCH] refs #4363 hcr blobs

git-svn-id: file:///svn/mysql/tests/mysql-test@48712 c7de825b-a66e-492c-adef-691d508d4ae1
---
 .../tokudb.alter_table/r/hcr_blob.result      | 39 ++++++++++
 .../tokudb.alter_table/r/hcr_text.result      | 39 ++++++++++
 .../suite/tokudb.alter_table/t/hcr_blob.test  | 74 +++++++++++++++++++
 .../suite/tokudb.alter_table/t/hcr_text.test  | 74 +++++++++++++++++++
 4 files changed, 226 insertions(+)
 create mode 100644 mysql-test/suite/tokudb.alter_table/r/hcr_blob.result
 create mode 100644 mysql-test/suite/tokudb.alter_table/r/hcr_text.result
 create mode 100644 mysql-test/suite/tokudb.alter_table/t/hcr_blob.test
 create mode 100644 mysql-test/suite/tokudb.alter_table/t/hcr_text.test

diff --git a/mysql-test/suite/tokudb.alter_table/r/hcr_blob.result b/mysql-test/suite/tokudb.alter_table/r/hcr_blob.result
new file mode 100644
index 0000000000..a173c1f3ce
--- /dev/null
+++ b/mysql-test/suite/tokudb.alter_table/r/hcr_blob.result
@@ -0,0 +1,39 @@
+drop table if exists t;
+set default_storage_engine='tokudb';
+set tokudb_disable_slow_alter=1;
+create table t (a tinyblob);
+alter table t change column a aa tinyblob;
+alter table t change column aa a3 blob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a blob);
+alter table t change column a aa blob;
+alter table t change column aa a3 tinyblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a mediumblob);
+alter table t change column a aa mediumblob;
+alter table t change column aa a3 tinyblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 blob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a longblob);
+alter table t change column a aa longblob;
+alter table t change column aa a3 tinyblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 blob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumblob;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
diff --git a/mysql-test/suite/tokudb.alter_table/r/hcr_text.result b/mysql-test/suite/tokudb.alter_table/r/hcr_text.result
new file mode 100644
index 0000000000..b055e4eee8
--- /dev/null
+++ b/mysql-test/suite/tokudb.alter_table/r/hcr_text.result
@@ -0,0 +1,39 @@
+drop table if exists t;
+set default_storage_engine='tokudb';
+set tokudb_disable_slow_alter=1;
+create table t (a tinytext);
+alter table t change column a aa tinytext;
+alter table t change column aa a3 text;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a text);
+alter table t change column a aa text;
+alter table t change column aa a3 tinytext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a mediumtext);
+alter table t change column a aa mediumtext;
+alter table t change column aa a3 tinytext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 text;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 longtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
+create table t (a longtext);
+alter table t change column a aa longtext;
+alter table t change column aa a3 tinytext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 text;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+alter table t change column aa a3 mediumtext;
+ERROR 42000: Table 't' uses an extension that doesn't exist in this XYZ version
+drop table t;
diff --git a/mysql-test/suite/tokudb.alter_table/t/hcr_blob.test b/mysql-test/suite/tokudb.alter_table/t/hcr_blob.test
new file mode 100644
index 0000000000..e2b9e43d52
--- /dev/null
+++ b/mysql-test/suite/tokudb.alter_table/t/hcr_blob.test
@@ -0,0 +1,74 @@
+--source include/have_tokudb.inc
+--disable_warnings
+drop table if exists t;
+--enable_warnings
+set default_storage_engine='tokudb';
+set tokudb_disable_slow_alter=1;
+
+create table t (a tinyblob);
+alter table t change column a aa tinyblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 blob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longblob;
+
+drop table t;
+
+create table t (a blob);
+alter table t change column a aa blob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinyblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longblob;
+
+drop table t;
+
+create table t (a mediumblob);
+alter table t change column a aa mediumblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinyblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 blob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longblob;
+
+drop table t;
+
+create table t (a longblob);
+alter table t change column a aa longblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinyblob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 blob;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumblob;
+
+drop table t;
\ No newline at end of file
diff --git a/mysql-test/suite/tokudb.alter_table/t/hcr_text.test b/mysql-test/suite/tokudb.alter_table/t/hcr_text.test
new file mode 100644
index 0000000000..ca4a3a4943
--- /dev/null
+++ b/mysql-test/suite/tokudb.alter_table/t/hcr_text.test
@@ -0,0 +1,74 @@
+--source include/have_tokudb.inc
+--disable_warnings
+drop table if exists t;
+--enable_warnings
+set default_storage_engine='tokudb';
+set tokudb_disable_slow_alter=1;
+
+create table t (a tinytext);
+alter table t change column a aa tinytext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 text;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumtext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longtext;
+
+drop table t;
+
+create table t (a text);
+alter table t change column a aa text;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinytext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumtext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longtext;
+
+drop table t;
+
+create table t (a mediumtext);
+alter table t change column a aa mediumtext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinytext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 text;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 longtext;
+
+drop table t;
+
+create table t (a longtext);
+alter table t change column a aa longtext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 tinytext;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 text;
+
+--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/
+--error ER_UNSUPPORTED_EXTENSION
+alter table t change column aa a3 mediumtext;
+
+drop table t;
\ No newline at end of file
-- 
2.30.9