summaryrefslogtreecommitdiff
path: root/myisam
Commit message (Collapse)AuthorAgeFilesLines
* Merge synthia.local:/home/mydev/mysql-5.0-amainunknown2007-08-132-6/+6
|\ | | | | | | | | | | | | into synthia.local:/home/mydev/mysql-5.0-axmrg
| * CMakeLists.txt, README, configure.jsunknown2007-08-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several adjustments to make client libraries pass the link test on both win32 and winx64, Visual Studio 2003 and 2005 (bug#30118) win/README: - Removed references to PARTITION engine, 5.1 only win/configure.js: - Removed references to PARTITION engine, 5.1 only extra/CMakeLists.txt: Use the special 'debug' list element to mark that "dbug" library is only to be linked against if build type "Debug". myisam/CMakeLists.txt: Use the special 'debug' list element to mark that "dbug" library is only to be linked against if build type "Debug". scripts/CMakeLists.txt: Use the special 'debug' list element to mark that "dbug" library is only to be linked against if build type "Debug". server-tools/instance-manager/CMakeLists.txt: Use the special 'debug' list element to mark that "dbug" library is only to be linked against if build type "Debug". sql/CMakeLists.txt: Use the special 'debug' list element to mark that "dbug" library is only to be linked against if build type "Debug". mysys/CMakeLists.txt: Restored include path to "mysys" itself dbug/CMakeLists.txt: Changed to optionally be included to give a file list only extra/yassl/CMakeLists.txt: Changed to optionally be included to give a file list only extra/yassl/taocrypt/CMakeLists.txt: Changed to optionally be included to give a file list only zlib/CMakeLists.txt: Changed to optionally be included to give a file list only libmysql/CMakeLists.txt: For compatibility with Visual Studio 2005, list all files that are to be part of the library build, i.e. libraries can't be built from other libraries. Set SOURCE_SUBLIBS and include the file listings from "zlib", "dbug", "taocrypt" and "yassl"
| * Merge production.mysql.com:/usersnfs/jperkin/bk/trees/build/mysql-4.1unknown2007-08-021-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | into production.mysql.com:/usersnfs/jperkin/bk/trees/build/mysql-5.0 myisam/myisamchk.c: Auto merged
| | * myisamchk.c:unknown2007-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix typo in usage. myisam/myisamchk.c: Fix typo in usage.
* | | Merge chilla.local:/home/mydev/mysql-4.1-bug29838unknown2007-08-011-30/+51
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-bug29838 myisam/mi_rkey.c: Auto merged
| * | | Bug#29838 - myisam corruption using concurrent select ... and updateunknown2007-08-011-30/+51
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using concurrent insert with parallel index reads, it could happen that reading sessions found keys that pointed to records yet to be written to the data file. The result was a report of a corrupted table. But it was false alert. When inserting a record in a table with indexes, the keys are inserted into the indexes before the record is written to the data file. When the insert happens concurrently to selects, an index read can find a key that references the record that is not yet written to the data file. To avoid any access to such record, the select saves the current end of file position when it starts. Since concurrent inserts are always appended at end of the data file, the select can easily ignore any concurrently inserted record. The problem was that the ignore was only done for non-exact key searches (partial key or using >, >=, < or <=). The fix is to ignore concurrently inserted records also for exact key searches. No test case. Concurrent inserts cannot be tested with the test suite. Test cases are attached to the bug report. myisam/mi_rkey.c: Bug#29838 - myisam corruption using concurrent select ... and update Fixed mi_rkey() to always ignore records beyond saved eof.
| * | Merge mysql.com:/home/svoj/devel/bk/mysql-4.1unknown2007-05-231-6/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
* | \ \ Merge chilla.local:/home/mydev/mysql-5.0-ateamunknown2007-07-281-128/+128
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-axmrg
| * | | Backported mi_test_all.sh from 5.1.unknown2007-07-281-128/+128
| | | |
* | | | Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-enginesunknown2007-07-271-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG29957/mysql-5.0-engines
| * | | BUG#29957 - alter_table.test failsunknown2007-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INSERT/DELETE/UPDATE followed by ALTER TABLE within LOCK TABLES may cause table corruption on Windows. That happens because ALTER TABLE writes outdated shared state info into index file. Fixed by removing obsolete workaround. Affects MyISAM tables on Windows only. myisam/mi_extra.c: On windows when mi_extra(HA_EXTRA_PREPARE_FOR_DELETE) is called, we release external lock and close index file. If we're in LOCK TABLES, MyISAM state info doesn't get updated until UNLOCK TABLES. That means when we release external lock and we're in LOCK TABLES, we may write outdated state info. As SQL layer closes all table instances, we do not need this workaround anymore. mysql-test/r/alter_table.result: A test case for BUG#29957. mysql-test/t/alter_table.test: A test case for BUG#29957.
* | | | fixed uninitialized variable introduced by the fix for bug 29325unknown2007-07-111-4/+2
| | | |
* | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optunknown2007-07-111-2/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B29325-5.0-opt include/my_base.h: Auto merged
| * | | | Bug #29325: unknown2007-07-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default MyISAM overwrites .MYD and .MYI files no DATA DIRECTORY option is used. This can lead to two tables using the same .MYD and .MYI files (that can't be dropped). To prevent CREATE TABLE from overwriting a file a new option is introduced : keep_files_on_create When this is on the CREATE TABLE throws an error if either the .MYD or .MYI exists for a MyISAM table. The option is off by default (resulting in compatible behavior). include/my_base.h: Bug #29325: introduce keep_files_on_create myisam/mi_create.c: Bug #29325: introduce keep_files_on_create mysql-test/r/create.result: Bug #29325: test case mysql-test/t/create.test: Bug #29325: test case sql/ha_myisam.cc: Bug #29325: introduce keep_files_on_create sql/set_var.cc: Bug #29325: introduce keep_files_on_create sql/sql_class.h: Bug #29325: introduce keep_files_on_create sql/sql_table.cc: Bug #29325: introduce keep_files_on_create sql/unireg.cc: Bug #29325: introduce keep_files_on_create
* | | | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optunknown2007-07-101-42/+29
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B29070-5.0-opt
| * | | | Bug #29070: Error in spatial indexunknown2007-07-091-42/+29
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Threat MBR for a key as double[] and convert it only when about to store it on disk. 2. Remove the redundant function get_double(). myisam/sp_key.c: Bug #29070: 1. threat MBR for a key as double[] and convert it only when about to store it on disk. 2. remove the redundant function get_double() mysql-test/r/gis-rtree.result: Bug #29070: test case mysql-test/t/gis-rtree.test: Bug #29070: test case
* | | | Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-enginesunknown2007-07-061-2/+4
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | into anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines.merge sql/sql_insert.cc: Auto merged
| * | | Merge mysql.com:/home/svoj/devel/bk/mysql-5.0-enginesunknown2007-07-021-2/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG29299/mysql-5.0-engines
| | * | | BUG#29299 - repeatable myisam fulltext index corruptionunknown2007-06-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fulltext index may get corrupt by certain gbk characters. The problem was that when skipping leading non-true-word-characters, we assumed that these characters are always 1 byte long. This is not the case with gbk character set, since non-true-word-characters may be 2 bytes long. Affects 5.0 only. myisam/ft_parser.c: Leading non-true-word-characters may also be multi-byte (e.g. in gbk character set). mysql-test/r/fulltext2.result: A test case for BUG#29299. mysql-test/t/fulltext2.test: A test case for BUG#29299.
* | | | | Bug #26642: create index corrupts table definition in .frmunknown2007-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Martin Friebe for finding and submitting a fix for this bug! A table with maximum number of key segments and maximum length key name would have a corrupted .frm file, due to an incorrect calculation of the complete key length. Now the key length is computed correctly (I hope) :-) MyISAM would reject a table with the maximum number of keys and the maximum number of key segments in all keys. It would allow one less than this total maximum. Now MyISAM accepts a table defined with the maximum. (This is a very minor issue.) myisam/mi_open.c: Bug #26642: change >= to > in a comparison (i.e., error only if key_parts_in_table really is greater than MAX_KEY * MAX_KEY_SEG) mysql-test/r/create.result: Bug #26642: test case mysql-test/t/create.test: Bug #26642: test case sql/table.cc: Bug #26642: In create_frm(), fix formula for key_length; it was too small by (keys * 2) bytes
* | | | | Merge olga.mysql.com:/home/igor/mysql-5.0-optunknown2007-06-261-6/+6
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug29087
| * | | | Fixed bug #29087. This bug manifested itself for queries that performedunknown2007-06-251-6/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a lookup into a BINARY index by a key ended with spaces. It caused an assertion abort for a debug version and wrong results for non-debug versions. The problem occurred because the function _mi_pack_key stripped off the trailing spaces from binary search keys while the function _mi_make_key did not do it when keys were inserted into the index. Now the function _mi_pack_key does not remove the trailing spaces from search keys if they are of the binary type. mysql-test/r/binary.result: Added a test case for bug #29087. mysql-test/t/binary.test: Added a test case for bug #29087.
* | | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maintunknown2007-06-211-2/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | into amd64.(none):/src/bug27029/my50-bug27029 myisam/sort.c: Auto merged
| * | | Bug#27029 alter table ... enable keys crashes mysqld on large tableunknown2007-06-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When creating an index for the sort, the number of rows plus 1 is used to allocate a buffer. In this test case, the number of rows 4294967295 is the max value of an unsigned integer, so when 1 was added to it, a buffer of size 0 was allocated causing the crash. - Create new test suite for this bug's test suite as per QA. myisam/sort.c: Bug#27029 alter table ... enable keys crashes mysqld on large table - Check to make sure the value of records is < UINT_MAX32 to avoid a false positive on the remaining condition. mysql-test/suite/large_tests/README.TXT: Bug#27029 alter table ... enable keys crashes mysqld on large table - New testsuite for large tests. - Added mtr hint for potential testers. mysql-test/suite/large_tests/r/alter_table.result: Bug#27029 alter table ... enable keys crashes mysqld on large table - New testsuite for large tests. - Added results for bug. mysql-test/suite/large_tests/t/alter_table.test: Bug#27029 alter table ... enable keys crashes mysqld on large table - New testsuite for large tests. - Added test for bug.
* | | | Merge mysql.com:/home/svoj/devel/bk/mysql-5.0unknown2007-05-231-6/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
| * \ \ \ Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-enginesunknown2007-05-171-6/+7
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines myisam/mi_check.c: Auto merged mysys/my_seek.c: Manual merge.
| | * | | BUG#25712 - insert delayed and check table run together report crashedunknown2007-05-161-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables In case system doesn't have native pread/pwrite calls (e.g. Windows) and there is CHECK TABLE runs concurrently with another statement that reads from a table, the table may be reported as crashed. This is fixed by locking file descriptor when my_seek is executed on MyISAM index file and emulated pread/pwrite may be executed concurrently. Affects MyISAM tables on platforms that do not have native pread/pwrite calls (e.g. Windows). No deterministic test case for this bug. myisam/mi_check.c: Key file descriptor is shared among threads and mixed set of my_pread/my_pwrite and my_seek calls is possible. This is not a problem on systems that have native pread/pwrite calls. In case system doesn't have native pread/pwrite calls (e.g. Windows) we must ensure that my_pread/my_pwrite are not executed at the same time with my_seek. This is done by passing MY_THREADSAFE flag to my_seek. mysys/my_seek.c: On platforms that do not have native pread/pwrite calls (e.g. Windows) these calls are emulated as follow: lock fd, lseek, read, unlock fd. In case file descriptor is shared among threads, where one thread executes my_pread and another thread executes my_seek, we may read from a wrong position. This may happen because my_seek doesn't lock fd and thus may be executed by another thread after emulated pread has done lseek and before it has done read. To fix problem mentioned above we introduce new flag MY_THREADSAFE to my_seek, which is meaningful only in case pread/pwrite calls are emulated. If this flag is set, lseek operation is performed as follow: lock fd, seek, unlock fd.
* | | | | Bug #27119 server crash with integer division by zero during filesort on ↵unknown2007-05-161-1/+2
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | huge result Added checks to detect integer overflow and fixed other bugs on the error path. myisam/sort.c: Replaced a break statement with a goto statement so that a failure will instead break sql/filesort.cc: Fixed an allocation routine to detect integer overflow, and as an optimization a check that prevents the number of buffpeks being larger than can possibly fit into memory. Fixed several unchecked error codes. Changed an index variable from int to uint to the match the type of the variable it's being compared with. Replaced a break statement with a goto statement so that a failure will instead break out of the higher level while-loop, instead of just the nested for-loop.
* | | | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug27976/my41-bug27976unknown2007-05-041-4/+4
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/bug27976/my50-bug27976 mysql-test/r/repair.result: Auto merged myisam/sort.c: Manual merge.
| * | Bug #27976: Misleading error message, 'Sort buffer to small'unknown2007-05-041-4/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The message is gramatically wrong, and factually wrong. Change it to refer to the myisam_sort_buffer_size variable and change "to" to "too". myisam/sort.c: Change error messages to be gramatically correct and to refer to the correct variable. mysql-test/r/repair.result: Refer to the correct variable. Message changed.
* | Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0-buildunknown2007-04-273-4/+7
|\ \ | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
| * \ Merge mysql.com:/home/svoj/devel/mysql/warn/mysql-4.1-enginesunknown2007-04-191-1/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/warn/mysql-5.0-engines myisam/mi_rkey.c: Auto merged
| | * Fixed a warning on win64.unknown2007-04-191-1/+2
| | |
| * | Merge mysql.com:/home/svoj/devel/mysql/BUG24342/mysql-4.1-enginesunknown2007-04-182-1/+3
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG24342/mysql-5.0-engines myisam/mi_rkey.c: Auto merged myisam/myisamdef.h: Auto merged myisammrg/myrg_rkey.c: Auto merged mysql-test/t/merge.test: Auto merged mysql-test/r/merge.result: SCCS merged
| | * BUG#24342 - Incorrect results with query over MERGE tableunknown2007-04-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MERGE engine may return incorrect values when several representations of equal keys are present in the index. For example "groß" and "gross" or "gross" and "gross " (trailing space), which are considered equal, but have different lengths. The problem was that key length was not recalculated after key lookup. Only MERGE engine is affected. myisam/mi_rkey.c: info->lastkey gets rewritten by mi_search. Later we recalculate found lastkey length. This is done to make sure that mi_rnext_same gets true, found (not searched) lastkey length. Searched and found key lengths may be different, for example in case searched key is "groß" and found is "gross" or in case a key has trailing spaces. Unfortunately we recalculate found lastkey length only for first underlying table. To recalculate found key length for non-first underlying table we need to know how much key segments were used to create this key. When mi_rkey is called for first underlying table of a merge table, store offset to last used key segment. Restore last_used_keyseg variable when mi_rkey is called for non-first underlying table. myisam/myisamdef.h: Added last_used_keyseg variable to MI_INFO. It is used by merge engine to calculate key length. myisammrg/myrg_rkey.c: Pass last used key segment returned by first table key read to other table key reads. mysql-test/r/merge.result: A test case for bug#24342. mysql-test/t/merge.test: A test case for bug#24342.
| * | BUG#27516 - divide by zero crash during optimize tableunknown2007-04-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a table status is requested by statement like SHOW TABLE STATUS and there is another statement (e.g. DELETE) sets number of records to 0 concurrently, we may get division by zero error, which crashes a server. This is fixed by using thread local variable x->records instead of shared info->state->records when we check if it is zero and divide by it. myisam/mi_info.c: Information schema does not lock a table when it requests table state info. If another thread sets info->state->records to 0 after we check if it is 0 and before we divide by it we may get division by zero error. Check and divide by local x->records variable instead of shared info->state->records.
* | | Bug#24732 Executables do not include Vista manifestsunknown2007-04-231-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added script to generate application specific manifest. - Added new CMake MACRO to add customer build events which will first generate a manifest and then embeds that manifest into an executable. BitKeeper/etc/ignore: Bug#24732 Executables do not include Vista manifests - Revise ignore rules to disallow auto-generated cmake files but to allow custom macros defined in a .cmake file. CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Added logic for EMBED_MANIFESTS configuration option. client/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for client executables. extra/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for my_print_default executable. libmysql/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myTest executable. myisam/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for myisam executables. server-tools/instance-manager/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for mysqlmanager executable. sql/CMakeLists.txt: Bug#24732 Executables do not include Vista manifests - Embed manifest with custom CMake MACRO for mysqld executable. win/README: Bug#24732 Executables do not include Vista manifests - Added new configuration option documentation. win/configure.js: Bug#24732 Executables do not include Vista manifests - Added new EMBED_MANIFESTS configuration option. win/create_manifest.js: Bug#24732 Executables do not include Vista manifests - Manifest generator. This script generates a basic manifest. win/mysql_manifest.cmake: Bug#24732 Executables do not include Vista manifests - Define new CMake MACRO for adding Windows manifests to executables.
* | Merge chilla.local:/home/mydev/mysql-4.1-axmrgunknown2007-03-282-8/+70
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-axmrg myisam/mi_range.c: Auto merged myisam/mi_search.c: Auto merged mysql-test/r/heap_btree.result: Auto merged mysql-test/t/myisam.test: Auto merged sql/ha_myisam.cc: Auto merged sql/item_func.cc: Auto merged mysql-test/r/myisam.result: Manual merge from 4.1 mysql-test/t/heap_btree.test: Manual merge from 4.1
| * Merge chilla.local:/home/mydev/mysql-4.1-bug26231unknown2007-03-282-8/+70
| |\ | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-4.1-axmrg
| | * Bug#26231 - select count(*) on myisam table returns wrong valueunknown2007-03-162-8/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when index is used When the table contained TEXT columns with empty contents ('', zero length, but not NULL) _and_ strings starting with control characters like tabulator or newline, the empty values were not found in a "records in range" estimate. Hence count(*) missed these records. The reason was a different set of search flags used for key insert and key range estimation. I decided to fix the set of flags used in range estimation. Otherwise millions of databases around the world would require a repair after an upgrade. The consequence is that the manual must be fixed, which claims that TEXT columns are compared with "end space padding". This is true for CHAR/VARCHAR but wrong for TEXT. See also bug 21335. myisam/mi_range.c: Bug#26231 - select count(*) on myisam table returns wrong value when index is used Added SEARCH_UPDATE to the search flags so that it compares like write/update/delete operations do. Only so it expects the keys at the place where they have been inserted. myisam/mi_search.c: Bug#26231 - select count(*) on myisam table returns wrong value when index is used Added some comments to explain how _mi_get_binary_pack_key() works. mysql-test/r/myisam.result: Bug#26231 - select count(*) on myisam table returns wrong value when index is used Added a test. mysql-test/t/myisam.test: Bug#26231 - select count(*) on myisam table returns wrong value when index is used Added test result.
* | | Removed tabs.unknown2007-03-141-1/+1
| | |
* | | Merge mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-enginesunknown2007-03-131-0/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.0-engines myisam/mi_create.c: Auto merged mysql-test/t/merge.test: Auto merged sql/ha_myisam.cc: Auto merged sql/sql_parse.cc: Use local. mysql-test/r/merge.result: SCCS merged
| * | BUG#26881 - Large MERGE tables report incorrect specification when nounknown2007-03-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge mysql.com:/home/svoj/devel/bk/mysql-5.0unknown2007-03-133-35/+95
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.0-engines myisam/rt_index.c: Auto merged sql/field.h: Auto merged
| * \ \ Merge chilla.local:/home/mydev/mysql-4.1-bug25673unknown2007-03-091-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-bug25673 myisam/rt_index.c: Auto merged
| | * | Bug#25673 - spatial index corruption, error 126 incorrect key file for tableunknown2007-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a compiler warning, deteced by pushbuild only.
| * | | Merge chilla.local:/home/mydev/mysql-4.1-bug25673unknown2007-03-081-3/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-bug25673 myisam/rt_index.c: Auto merged
| | * | Bug#25673 - spatial index corruption, error 126 incorrect key file for tableunknown2007-03-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After backport fix. Added forgotten DBUG_RETURNs, which was detected in 5.1 only.
| * | | Merge chilla.local:/home/mydev/mysql-4.1-bug25673unknown2007-03-083-32/+92
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into chilla.local:/home/mydev/mysql-5.0-bug25673 myisam/rt_index.c: Auto merged myisam/rt_key.c: Auto merged mysql-test/t/gis-rtree.test: Auto merged myisam/rt_split.c: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Manual merge from 4.1 mysql-test/r/gis-rtree.result: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Manual merge from 4.1
| | * | Bug#25673 - spatial index corruption, error 126unknown2007-03-083-32/+92
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incorrect key file for table In certain cases it could happen that deleting a row could corrupt an RTREE index. According to Guttman's algorithm, page underflow is handled by storing the page in a list for later re-insertion. The keys from the stored pages have to be inserted into the remaining pages of the same level of the tree. Hence the level number is stored in the re-insertion list together with the page. In the MySQL RTree implementation the level counts from zero at the root page, increasing numbers for levels down the tree. If during re-insertion of the keys the tree height grows, all level numbers become invalid. The remaining keys will be inserted at the wrong level. The fix is to increment the level numbers stored in the reinsert list after a split of the root block during reinsertion. myisam/rt_index.c: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Added a loop in rtree_delete() to increment the level numbers stored in the reinsert list after a split of the root block during reinsertion. Added comments and DBUG statements. myisam/rt_key.c: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Added DBUG statements. myisam/rt_split.c: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Added DBUG statements. mysql-test/r/gis-rtree.result: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Added the test result. mysql-test/t/gis-rtree.test: Bug#25673 - spatial index corruption, error 126 incorrect key file for table Added a test.