summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorsvoj@mysql.com/april.(none) <>2007-03-13 18:02:06 +0400
committersvoj@mysql.com/april.(none) <>2007-03-13 18:02:06 +0400
commitcb132bea8fd94a17653a971e74636a36a74f14c5 (patch)
treecf2f53be0dbcd2f0f4414b5442205636de128294 /myisam
parent576db4f44c9caa09a16477dc5580e8938eb5b745 (diff)
downloadmariadb-git-cb132bea8fd94a17653a971e74636a36a74f14c5.tar.gz
BUG#26881 - Large MERGE tables report incorrect specification when no
differences in tables Certain merge tables were wrongly reported as having incorrect definition: - Some fields that are 1 byte long (e.g. TINYINT, CHAR(1)), might be internally casted (in certain cases) to a different type on a storage engine layer. (affects 4.1 and up) - If tables in a merge (and a MERGE table itself) had short VARCHAR column (less than 4 bytes) and at least one (but not all) tables were ALTER'ed (even to an identical table: ALTER TABLE xxx ENGINE=yyy), table definitions went ouf of sync. (affects 4.1 only) This is fixed by relaxing a check for underlying conformance and setting field type to FIELD_TYPE_STRING in case varchar is shorter than 4 when a table is created.
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_create.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index da9e0887b00..5e363a4e670 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -158,6 +158,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
rec--;
if (rec->type == (int) FIELD_SKIP_ZERO && rec->length == 1)
{
+ /*
+ NOTE1: here we change a field type FIELD_SKIP_ZERO ->
+ FIELD_NORMAL
+ */
rec->type=(int) FIELD_NORMAL;
packed--;
min_pack_length++;