From 11dbc1c48f6344cda00bae8e939d33f0ff215cd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 May 2006 17:10:53 -0700 Subject: [PATCH] Bug#19648 "Merge table does not work with bit types" MERGE should have HA_CAN_BIT_FIELD feature bit set or else table row is formatted incorrectly. mysql-test/r/merge.result: Bug#19648 Test for fix mysql-test/t/merge.test: Bug#19648 Test for fix sql/ha_myisammrg.h: Bug#19648 Must have HA_CAN_BIT_FIELD for BIT type support --- mysql-test/r/merge.result | 6 ++++++ mysql-test/t/merge.test | 9 +++++++++ sql/ha_myisammrg.h | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9a34d6fba58..568f83b7d6d 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -776,3 +776,9 @@ insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=MERGE; ERROR HY000: Table storage engine for 't1' doesn't have this option drop table t1; +create table t1 (b bit(1)); +create table t2 (b bit(1)); +create table tm (b bit(1)) engine = merge union = (t1,t2); +select * from tm; +b +drop table tm, t1, t2; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 7ea14a811ed..400279a826b 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -390,4 +390,13 @@ insert into t1 values ("Monty"),("WAX"),("Walrus"); alter table t1 engine=MERGE; drop table t1; +# +# BUG#19648 - Merge table does not work with bit types +# +create table t1 (b bit(1)); +create table t2 (b bit(1)); +create table tm (b bit(1)) engine = merge union = (t1,t2); +select * from tm; +drop table tm, t1, t2; + # End of 5.0 tests diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index c762b7c286e..a73f368c51d 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -37,7 +37,8 @@ class ha_myisammrg: public handler { return (HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_READ_RND_SAME | HA_NULL_IN_KEY | HA_CAN_INDEX_BLOBS | HA_FILE_BASED | - HA_CAN_INSERT_DELAYED | HA_ANY_INDEX_MAY_BE_UNIQUE); + HA_CAN_INSERT_DELAYED | HA_ANY_INDEX_MAY_BE_UNIQUE | + HA_CAN_BIT_FIELD); } ulong index_flags(uint inx, uint part, bool all_parts) const {