Commit graph

71 commits

Author SHA1 Message Date
istruewing@chilla.local
5f08a83186 Bug#8283 - OPTIMIZE TABLE causes data loss
OPTIMIZE TABLE with myisam_repair_threads > 1 performs a non-quick 
parallel repair. This means that it does not only rebuild all 
indexes, but also the data file.

Non-quick parallel repair works so that there is one thread per 
index. The first of the threads rebuilds also the new data file.

The problem was that all threads shared the read io cache on the
old data file. If there were holes (deleted records) in the table,
the first thread skipped them, writing only contiguous, non-deleted
records to the new data file. Then it built the new index so that
its entries pointed to the correct record positions. But the other
threads didn't know the new record positions, but put the positions
from the old data file into the index.

The new design is so that there is a shared io cache which is filled
by the first thread (the data file writer) with the new contiguous
records and read by the other threads. Now they know the new record
positions.

Another problem was that for the parallel repair of compressed
tables a common bit_buff and rec_buff was used. I changed it so
that thread specific buffers are used for parallel repair.

A similar problem existed for checksum calculation. I made this
multi-thread safe too.
2006-10-09 19:26:55 +02:00
svoj@may.pils.ru
37cdb0fbf3 BUG#18036 - update of table joined to self reports table as crashed
Certain updates of table joined to self results in unexpected
behavior.

The problem was that record cache was mistakenly enabled for
self-joined table updates. Normally record cache must be disabled
for such updates.

Fixed wrong condition in code that determines whether to use
record cache for self-joined table updates.

Only MyISAM tables were affected.
2006-06-19 14:05:14 +05:00
ingo@mysql.com
d0c6eb885d Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
For "count(*) while index_column = value" an index read
is done. It consists of an index scan and retrieval of
each key.

For efficiency reasons the index scan stores the key in
the special buffer 'lastkey2' once only. At the first 
iteration it notes this fact with the flag 
HA_STATE_RNEXT_SAME in 'info->update'.

For efficiency reasons, the key retrieval for blobs
does not allocate a new buffer, but uses 'lastkey2'...

Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
buffer has been polluted. In this case, the index scan
copies the key value again (and sets the flag again).
2006-03-10 15:03:04 +01:00
ingo@mysql.com
8996fd40cf Merge mysql.com:/home/mydev/mysql-4.0-bug14616
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-11-15 16:07:05 +01:00
ingo@mysql.com
1f3df2e669 Bug#14616 - Freshly imported table returns error 124 when using LIMIT
Initialized usable_keys from table->keys_in_use instead of ~0
in test_if_skip_sort_order(). It was possible that a disabled
index was used for sorting.
2005-11-07 12:16:49 +01:00
sergefp@mysql.com
8b9bab2763 Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key segment,
do advance the source pointer over 2 bytes that specify value length.
2005-10-28 23:31:32 +04:00
sergefp@mysql.com
15a78334c3 BUG#9622, stage 2, work together with fix for BUG#12232:
added "nulls_ignored" index statistics collection method for MyISAM tables.
(notification trigger: this is about BUG#9622).
2005-10-21 06:29:17 +04:00
sergefp@mysql.com
f9475d1d15 BUG#12232: Add a server option to treat NULL values as equal when calculating MyISAM index
statistics (like 4.0 did) (patch #3, with review #1 & #2 feedback addressed)
2005-09-21 02:18:29 +04:00
ingo@mysql.com
330eb04536 Bug#12296 - CHECKSUM TABLE reports 0 for the table
Skipping deleted records instead of breaking the loop
during checksum calculation.
2005-08-29 17:08:41 +02:00
hf@deer.(none)
b16812e6ca Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-4.1.11083
2005-08-04 16:30:36 +05:00
monty@mysql.com
3c12d0ae54 Added end marker for tests to make future merges easier 2005-07-28 03:22:47 +03:00
hf@deer.(none)
67e5b2c83c Fix for bug #11083 (myisam test fails witout-geometry) 2005-07-27 21:54:02 +05:00
sergefp@mysql.com
480957e7e6 Fix for BUG#9622: Make index statistics collection in MyISAM behave the same
way in ALTER TABLE ... ENABLE KEYS, ANALYZE TABLE and after bulk insert:
now statistics collection always assumes NULLs are inequal.
2005-05-14 00:21:53 +02:00
ingo@mysql.com
3add511de7 Bug#9188 - Corruption Can't open file: 'table.MYI' (errno: 145)
Since 4.1 keys are compared with trailing spaces. 
Thus, a "x " key can be inserted between a couple of "x" keys.
The existing code did not take this into account. Though the
comments in the code claimed it did.
2005-04-08 14:13:02 +02:00
ingo@mysql.com
d3d7c46b1c Bug#8306 - TRUNCATE leads to index corruption
Added a check, if the table, which we are going to create, is open.
This can happen if a MERGE mapped table is TRUNCATEd.
2005-03-02 10:35:00 +01:00
dlenev@brandersnatch.localdomain
30f0c495b7 Backport of fix making myisam test results repeatable 2004-11-22 14:17:04 +03:00
serg@serg.mylan
994d648dda space-stripping in _mi_prefix_search: BUG#5284 2004-08-30 16:12:53 +02:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
serg@serg.mylan
f4244cd00e bug#4816. index search for NULL in blob 2004-08-01 13:26:01 +02:00
serg@serg.mylan
6fc74e13e7 post-review fixes
HA_EXTRA_WRITE_CACHE now part of start_bulk_insert()
test cleanups
2004-04-07 16:04:28 +02:00
serg@serg.mylan
e8eda8129f ::reset(), HA_FAST_KEY_READ, disable_indexes(), enable_indexes(), start_bulk_insert(), end_bulk_insert()
Field::val_str simplification, comment
2004-04-06 21:35:26 +02:00
monty@mysql.com
dc2f606fb8 Merge with 4.0 to get lastest bug fixes 2004-03-29 19:21:53 +03:00
monty@mysql.com
48680ee3a0 Allow keys with 0 segements in MyISAM
This fixed a bug in SELECT DISTINCT when all selected parts where constants. (Bug #3203)
2004-03-26 14:44:52 +02:00
serg@serg.mylan
7ff24eb01f longer myisam keys 2004-02-20 20:38:34 +01:00
monty@mysql.com
f43093ec0e After merge fixes
Added more DBUG statements
Ensure that we are comparing end space with BINARY strings
Use 'any_db' instead of '' to mean any database. (For HANDLER command)
Only strip ' ' when comparing CHAR, not other space-like characters (like \t)
2004-02-16 10:03:25 +02:00
monty@mysql.com
ce14578909 Merge with 4.0.18 2004-02-11 00:06:46 +01:00
monty@mysql.com
151b558e21 Mark that strings may change on index only reads (for BDB tables).
This fixed problem with index reads on character fields with BDB tables. (Bug #2509)
2004-01-29 15:16:48 +01:00
serg@serg.mylan
faa8252b10 test moved to an appropriate file 2004-01-21 23:39:35 +01:00
serg@serg.mylan
0371c68e3e two more bugfixes for "space stripping in MyISAM indexes" 2004-01-21 23:29:17 +01:00
serg@serg.mylan
e7a37d41b0 test case for MyISAM sort-repair bug 2004-01-21 21:43:41 +01:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
fcf96dbb18 WorkLog#1323
Deprecate the use of TYPE=... Preferred syntax is ENGINE=
2003-12-10 04:31:42 +00:00
monty@narttu.mysql.fi
12009f5d04 Merge with 3.23 to get 4.0 tree in sync (no relevant changes to 4.0 tree) 2003-10-23 13:25:16 +03:00
monty@mashka.mysql.fi
c60a75e9ba Add warnings for single line inserts. To do this I had to convert count_cuted_fields to an enum (to be able to detect setting a NOT NULL field to NULL) 2003-10-11 23:26:39 +03:00
monty@mishka.mysql.fi
498e1c6d95 Fixed memory leak in send_file 2003-10-08 21:02:53 +03:00
monty@mashka.mysql.fi
73f66f68fd merge with 4.0.15 2003-09-11 20:24:14 +03:00
monty@mashka.mysql.fi
45aa92c574 After merge fixes.
Note that mix_innodb_myisam_binlog and union fails after this patch (Will be fixed shortly by maintaners of this code)
2003-09-11 19:06:23 +03:00
monty@mashka.mysql.fi
75b2c4a62f Fixed rare bug in MYISAM introduced in 4.0.3 where the index file header was not updated directly after an UPDATE of split dynamic rows. 2003-09-05 06:42:55 +03:00
monty@narttu.mysql.fi
4b3b4b9250 merge 2003-09-03 19:53:08 +03:00
serg@serg.mylan
755455e15c merged 2003-09-03 12:07:18 +02:00
serg@serg.mylan
2fcab1c2ee CHECKSUM TABLE table1, table2, ... [ QUICK | EXTENDED ] 2003-09-03 11:34:32 +02:00
monty@narttu.mysql.fi
77a70a0a24 merge with 4.0.15 2003-08-29 13:44:35 +03:00
monty@narttu.mysql.fi
8a77f97079 Add detection of in_addr_t
Add pack_bits to pack_reclength for dynamic rows.  This solves buffer a possible buffer overflow on update.
(This will probably solve bug #563)
Fix test for available file descriptors in mysqltest
Fixed core dump bug in replication tests when running without transactional table support
2003-08-28 06:08:17 +03:00
monty@mashka.mysql.fi
4f7512160b After merge fixes
Use server character set if --default-character-set is not used
Added convert_string() for more efficient alloc+character-set convert of strings
2003-08-19 00:08:08 +03:00
monty@narttu.mysql.fi
a7708c7904 Merge with 4.0 2003-04-03 21:19:12 +03:00
monty@narttu.mysql.fi
618857b6eb Merge with 3.23 to get fixes for:
mysqldump --delete-master-logs
Portability fix for hammer
Memory overrun for MyISAM
LOAD DATA LOCAL replication bug fix.
2003-04-03 12:33:13 +03:00
Sinisa@sinisa.nasamreza.org
a496daf777 A fix for a bug in MyISAM with large number of NULL columns and at
least one BLOB column.
2003-03-25 14:49:43 +02:00
Sinisa@sinisa.nasamreza.org
e6a724fd83 A fix for a bug when INSERT is attempted into a table with a BLOB and
many NULL columns.

It could be ported back to 3.23 too ....
2003-03-20 19:04:30 +02:00
monty@mashka.mysql.fi
e327393e9d Fixed a lot of wrong memory references as reported by valgrind
Portability fixes
Added new client function: mysql_get_server_version()
New server help code (From Victor Vagin)
Fixed wrong usage of binary()
Disabled RTREE usage for now.
2003-02-12 21:55:37 +02:00
monty@mashka.mysql.fi
bf683af4ce Post merge fix
Allow empty key list in USE|IGNORE|FORCE INDEX()
2003-01-09 22:42:31 +02:00
monty@mashka.mysql.fi
f8e660d88c merge with 4.0.9
To get bug fixes for TCP/IP connections, FORCE INDEX and OPTIMIZE TABLE with NULL keys
2003-01-09 03:55:26 +02:00