mariadb/myisam
unknown 969b71653d 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.


myisam/mi_create.c:
  Added a comment.
mysql-test/r/merge.result:
  A test case for bug#26881.
mysql-test/t/merge.test:
  A test case for bug#26881.
sql/ha_myisam.cc:
  Relaxed some checks performed by check_definition():
  As comparing of fulltext keys (and key segments) is not yet implemented,
  only return an error in case one of keys is fulltext and other is not.
  Otherwise, if both keys are fulltext, accept them as is.
  
  As comparing of spatial keys (and key segments) is not yet implemented,
  only return an error in case one of keys is spatial and other is not.
  Otherwise, if both keys are spatial, accept them as is.
  
  A workaround to handle situation when field is casted from FIELD_SKIP_ZERO
  to FIELD_NORMAL. This could happen only in case field length is 1 and row
  format is fixed.
sql/sql_parse.cc:
  When a table that has varchar field shorter than 4 is created, field type is
  set to FIELD_TYPE_VAR_STRING. Later, when a table is modified using alter
  table, field type is changed to FIELD_TYPE_STRING (see Field_string::type).
  That means HA_OPTION_PACK_RECORD flag might be lost and thus null_bit might
  be shifted by alter table, in other words alter table doesn't create 100%
  equal table definition.
  
  This is usually not a problem, since when a table is created/altered,
  definition on a storage engine layer is based on one that is passed from
  sql layer. But it is a problem for merge engine - null_bit is shifted when
  a table (merge or underlying) is altered.
  
  Set field type to FIELD_TYPE_STRING in case FIELD_TYPE_VAR_STRING is shorter
  than 4 when a table is created as it is done in Field::type.
2007-03-13 18:02:06 +04:00
..
ftbench ftbench fixes 2003-10-23 23:33:06 +02:00
.cvsignore This ChangeSet adds RTREE support into myisam library. 2002-02-20 14:11:21 +04:00
ChangeLog New thr_alarm struct for better integration with OS2 2000-11-28 04:47:47 +02:00
ft_boolean_search.c Fixed compiler warnings 2005-07-28 21:25:05 +03:00
ft_eval.c Big code cleanup/review before 4.0.2 release. 2002-06-11 11:20:31 +03:00
ft_eval.h MI_KEYSEG -> HA_KEYSEG 2002-04-25 15:10:29 +05:00
ft_nlq_search.c Fix for BUG#13582. Theoretically possible to try to overallocate RAM in some fulltext queries. 2005-09-28 19:03:35 -05:00
ft_parser.c followup for for the bug#5686 2005-11-26 19:36:11 +01:00
ft_static.c indexless boolean fulltext search was depending on default_charset_info - Bug#8159 2005-02-04 15:24:06 +01:00
ft_stem.c Update copyright 2001-12-06 14:10:51 +02:00
ft_stopwords.c Fix for the bug #7344 (multiple server_init/server_end lead to crash) 2005-02-18 15:51:55 +04:00
ft_test1.c Merge with 4.0.3 2002-08-30 12:40:40 +03:00
ft_test1.h Update copyright 2001-12-06 14:10:51 +02:00
ft_update.c BUG#16489 - utf8 + fulltext leads to corrupt index file. 2006-01-23 17:15:33 +04:00
ftdefs.h indexless boolean fulltext search was depending on default_charset_info - Bug#8159 2005-02-04 15:24:06 +01:00
fulltext.h ft1->ft2 auto-conversion on INSERT (WL#725) 2003-10-02 20:22:29 +02:00
make-ccc Import changeset 2000-07-31 21:29:14 +02:00
Makefile.am Makefile.am: 2005-07-05 23:24:48 +02:00
mi_cache.c enadling out-of-cache reads for shared IO_CACHE 2003-01-26 14:20:43 +01:00
mi_changed.c Update copyright 2001-12-06 14:10:51 +02:00
mi_check.c Bug#22119 - Changing MI_KEY_BLOCK_LENGTH makes a wrong myisamchk 2006-10-25 13:39:40 +02:00
mi_checksum.c CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTS 2003-11-18 13:47:27 +02:00
mi_close.c Merge with 4.0 for 4.1 release 2004-10-06 19:14:33 +03:00
mi_create.c BUG#26881 - Large MERGE tables report incorrect specification when no 2007-03-13 18:02:06 +04:00
mi_dbug.c Merge mysql.com:/home/mydev/mysql-4.0-4000 2005-09-23 10:49:08 +02:00
mi_delete.c Merge chilla.local:/home/mydev/mysql-4.0-bug22384 2006-09-28 21:47:42 +02:00
mi_delete_all.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
mi_delete_table.c Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail 2006-06-27 11:26:41 +02:00
mi_dynrec.c BUG#23196 - MySQL server does not exit / shutdown when 2006-12-01 19:11:43 +04:00
mi_extra.c Add test for madvise() being declared in C++ code, because it is not 2005-08-31 10:08:55 -07:00
mi_info.c myisam_data_pointer_size 2004-05-01 15:41:59 +02:00
mi_key.c Bug#22052 Trailing spaces are not removed from UNICODE fields in an index 2006-10-03 14:11:57 +05:00
mi_keycache.c mi_keycache.c: 2003-11-25 22:20:31 -08:00
mi_locking.c Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1 2004-10-07 12:51:32 +03:00
mi_log.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_open.c BUG#24401 - MySQL server crashes if you try to retrieve data from 2007-01-22 16:34:58 +04:00
mi_packrec.c Bug#25505 Myisam library compiler error on Windows 2007-01-17 11:51:52 +01:00
mi_page.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_panic.c Merge key cache structures to one 2003-11-20 22:06:25 +02:00
mi_preload.c make LOAD INDEX to work 2005-02-12 00:05:13 +01:00
mi_range.c Bug#25213 - Compiler warnings in MyISAM code 2006-12-20 15:32:02 +01:00
mi_rename.c Code cleanup 2004-01-19 23:51:17 +01:00
mi_rfirst.c Update copyright 2001-12-06 14:10:51 +02:00
mi_rkey.c Bug#14400 - Query joins wrong rows from table which is subject of 2006-09-22 17:23:25 +02:00
mi_rlast.c Update copyright 2001-12-06 14:10:51 +02:00
mi_rnext.c Merging 2004-05-27 16:32:49 +05:00
mi_rnext_same.c Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX 2006-03-10 15:03:04 +01:00
mi_rprev.c Fixed many compiler warnings 2004-04-05 13:56:05 +03:00
mi_rrnd.c just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
mi_rsame.c Update copyright 2001-12-06 14:10:51 +02:00
mi_rsamepos.c Update copyright 2001-12-06 14:10:51 +02:00
mi_scan.c Update copyright 2001-12-06 14:10:51 +02:00
mi_search.c Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255 2006-03-30 01:50:52 +03:00
mi_static.c a fix (bug #4214: Table corruption with myisampack and large BLOB objects). 2005-09-05 16:31:42 +05:00
mi_statrec.c just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
mi_test1.c Bug#25213 - Compiler warnings in MyISAM code 2006-12-20 15:32:02 +01:00
mi_test2.c Bug#12920 - key_read_requests counter appears to re-set 2005-09-14 13:18:16 +02:00
mi_test3.c harmless "buffer overflow" fixed 2004-11-24 11:01:54 +01:00
mi_test_all.res Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert"" 2006-08-10 22:41:19 +03:00
mi_test_all.sh Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert"" 2006-08-10 22:41:19 +03:00
mi_unique.c Fix for bug #20709: Collation not used in group by on 4.1. 2006-08-10 15:06:22 +05:00
mi_update.c BUG#23196 - MySQL server does not exit / shutdown when 2006-12-01 19:11:43 +04:00
mi_write.c Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines 2006-12-30 02:30:19 +04:00
myisam_ftdump.c myisam_ftdump.c: 2006-04-23 19:26:56 -05:00
myisamchk.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
myisamdef.h Bug#8283 - OPTIMIZE TABLE causes data loss 2006-10-09 19:26:55 +02:00
myisamlog.c Several fixes for Netware. 2005-08-24 22:03:34 +03:00
myisampack.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
NEWS Import changeset 2000-07-31 21:29:14 +02:00
rt_index.c Bug#25673 - spatial index corruption, error 126 incorrect key file for table 2007-03-09 16:19:42 +01:00
rt_index.h Merging 2004-06-02 19:17:35 +05:00
rt_key.c Bug#25673 - spatial index corruption, error 126 2007-03-08 09:54:37 +01:00
rt_key.h Merging 2004-06-02 19:17:35 +05:00
rt_mbr.c Bug#17877 - Corrupted spatial index 2006-06-28 14:27:37 +02:00
rt_mbr.h Merging 2004-06-02 19:17:35 +05:00
rt_split.c Bug#25673 - spatial index corruption, error 126 2007-03-08 09:54:37 +01:00
rt_test.c Review of all code pushed since last review 2004-10-20 01:28:42 +03:00
sort.c Merge trift2.:/MySQL/M41/clone-4.1 2006-11-10 15:52:53 +01:00
sp_defs.h WL#1163 To make spatial code optional 2004-03-12 18:51:03 +04:00
sp_key.c a fix (bug #10757: gis-rtree.test fails) 2005-05-20 18:48:18 +05:00
sp_test.c Merging 2004-05-27 16:32:49 +05:00
test_pack Import changeset 2000-07-31 21:29:14 +02:00
TODO Import changeset 2000-07-31 21:29:14 +02:00