Commit graph

999 commits

Author SHA1 Message Date
istruewing@chilla.local
79e099e8a6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-01-29 17:20:18 +01:00
svoj@mysql.com/june.mysql.com
02212e6ace Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24401/mysql-4.1-engines
2007-01-24 11:38:23 +04:00
svoj@mysql.com/june.mysql.com
afaebb6d62 BUG#24401 - MySQL server crashes if you try to retrieve data from
corrupted table

Accessing a table with corrupted column definition results in server
crash.

This is fixed by refusing to open such tables. Affects MyISAM only.
No test case, since it requires crashed table.
2007-01-22 16:34:58 +04:00
istruewing@chilla.local
568106c297 Merge chilla.local:/home/mydev/mysql-4.1--team
into  chilla.local:/home/mydev/mysql-4.1-bug24607
2007-01-17 14:52:36 +01:00
msvensson@pilot.mysql.com
29be5ce836 Bug#25505 Myisam library compiler error on Windows 2007-01-17 11:51:52 +01:00
svoj@mysql.com/june.mysql.com
c606e30f35 BUG#24855 - Crash mysqld 4.1.21 with corrupted tables
Accessing fixed record format table with crashed key definition results
in server/myisamchk segmentation fault.

This is fixed by refusing to open such tables. Affects MyISAM only.
No test case, since it requires crashed table.
2007-01-16 18:05:37 +04:00
istruewing@chilla.local
a66da6203d Bug#24607 - MyISAM pointer size determined incorrectly
The function mi_get_pointer_length() computed too small
pointer size for very large tables.

Inserted missing 'else' between the branches for very
large tables.
2007-01-05 10:26:51 +01:00
svoj@mysql.com/april.(none)
45aeb7f04d Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG23196/mysql-4.1-engines
2006-12-30 02:30:19 +04:00
istruewing@chilla.local
d9b9778e53 Bug#25213 - Compiler warnings in MyISAM code
Compiler warnings due to non-matching conversion
specifications in format strings in DBUG_PRINT calls,
due to non-used parameters (in non-debug mode), and
due to seemingly uninitialized variables.

Initialized variables, declared parameters unused, and
casted DBUG_PRINT arguments to get rid of warnings.
2006-12-20 15:32:02 +01:00
istruewing@chilla.local
1d69857c4d Bug#25208 - Warnings in mi_packrec.c
Compiler warnings due to non-matching conversion
specifications in format strings in DBUG_PRINT calls.

Fixed DBUG_PRINT format specifiactions.
2006-12-20 15:18:09 +01:00
istruewing@chilla.local
ca62c94230 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2006-12-08 12:20:48 +01:00
andrey@example.com
b275089b66 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  example.com:/work/bug24395-v2/my41
2006-12-01 23:11:44 +01:00
svoj@mysql.com/april.(none)
5e733ee8fa BUG#23196 - MySQL server does not exit / shutdown when
storage engine returns errno 12

If there is not enough memory to store or update blob record
(while allocating record buffer), myisam marks table as crashed.

With this fix myisam attempts to roll an index back and return
an error, not marking a table as crashed.

Affects myisam tables with blobs only. No test case for this fix.
2006-12-01 19:11:43 +04:00
istruewing@chilla.local
ab70ed5e48 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2006-12-01 15:49:49 +01:00
istruewing@chilla.local
0c273a79fc Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2006-12-01 15:46:58 +01:00
istruewing@chilla.local
474203d527 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug23139
2006-11-29 23:05:04 +01:00
andrey@example.com
100dd45ec4 Fix for bug#24395:
ALTER TABLE DISABLE KEYS doesn't work when modifying the table
  
ENABLE|DISABLE KEYS combined with another ALTER TABLE option, different
than RENAME TO did nothing. Also, if the table had disabled keys
and was ALTER-ed then the end table was with enabled keys.
  
Fixed by checking whether the table had disabled keys and enabling them
in the copied table.
2006-11-28 18:27:32 +01:00
istruewing@chilla.local
671575211b Bug#23139 - myisamchk and mysqld crash when trying to access table
A corrupted compressed table could crash the server and
myisamchk.

The data file of an uncompressed table contains just the records.
There is no header in the data file.

However the data file of a compressed table has a header.
The header describes how the table was compressed. This
information is necessary to extract the records from the
compressed data file.

Part of the compressed data file header are the [de]code tables.
They are numeric representations of the Huffman trees used for
coding and decoding. A Huffman tree is a binary tree. Every
node has two childs. A child can be a leaf or a branch. Leaves
contain the decoded value. Branches point to another tree node.

Since the [de]code table is represented as an array of childs,
the branches need to point at a child within the same array.
The corruption of the compressed data file from the bug report
was a couple of branches that pointed outside their array.
This condition had not been correctly checked.

I added some checks for the pointers in the decode tables.
This type of corruption will no longer crash the server or
myisamchk.

No test case. A corrupted compressed table is required.
2006-11-28 15:46:01 +01:00
istruewing@chilla.local
c378a8ee49 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2006-11-13 21:49:00 +01:00
lars@mysql.com/black.(none)
de01754c19 Merge mysql.com:/home/bkroot/mysql-4.1-rpl
into  mysql.com:/home/bk/MERGE/mysql-4.1-merge
2006-11-13 12:44:24 +01:00
joerg@trift2.
2ab3d0bfb4 Merge trift2.:/MySQL/M41/clone-4.1
into  trift2.:/MySQL/M41/push-4.1
2006-11-10 15:52:53 +01:00
lars/lthalmann@mysql.com/dl145h.mysql.com
db8aa4ab6c Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-11-07 12:00:55 +01:00
iggy@rolltop.ignatz42.dyndns.org
1d66d35fb3 Fix compile failure. 2006-11-02 21:03:41 -05:00
kent/mysqldev@suse9-x86.mysql.com
7c2ff3c307 sort.c:
Create block around DBUG_ENTER late in function
2006-11-03 02:35:09 +01:00
cmiller@zippy.cornsilk.net
c34f3219b3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-11-02 17:27:42 -05:00
istruewing@chilla.local
c6d33b5dc3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-merge
2006-10-27 15:02:45 +02:00
istruewing@chilla.local
9cb21f220e Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug22119
2006-10-26 09:42:11 +02:00
lars/lthalmann@mysql.com/dl145h.mysql.com
31abddb5e1 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-10-25 17:08:57 +02:00
istruewing@chilla.local
7dc7af51e0 Bug#22119 - Changing MI_KEY_BLOCK_LENGTH makes a wrong myisamchk
When compiling with a default key block size greater than the
smallest key block size used in a table, checking that table
failed with bogus errors. The table was marked corrupt. This
affected myisamchk and the server.

The problem was that the default key block size was used at
some places where sizes less or equal to the block size of the
index in check was required.

We do now use the key block size of the particular index
when checking.

A test case is available for later versions only.
2006-10-25 13:39:40 +02:00
svoj@mysql.com/april.(none)
cdb8358503 BUG#22053 - REPAIR table can crash server for some
really damaged MyISAM tables

When unpacking a blob column from broken row server crash
could happen. This could rather happen when trying to repair
a table using either REPAIR TABLE or myisamchk, though it
also could happend when trying to access broken row using
other SQL statements like SELECT if table is not marked as
crashed.

Fixed ulong overflow when trying to extract blob from
broken row.

Affects MyISAM only.
2006-10-25 15:40:10 +05:00
gkodinov@dl145s.mysql.com
0612a212d1 Merge bk-internal:/home/bk/mysql-4.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
2006-10-20 10:57:38 +02:00
gkodinov@dl145s.mysql.com
1dacdd4c85 Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
2006-10-19 14:34:56 +02:00
svoj@mysql.com/april.(none)
a2e0059f3c BUG#23175 - MYISAM crash/repair failed during repair
Repair table could crash a server if there is not sufficient
memory (myisam_sort_buffer_size) to operate. Affects not only
repair, but also all statements that use create index by sort:
repair by sort, parallel repair, bulk insert.

Return an error if there is not sufficient memory to store at
least one key per BUFFPEK.

Also fixed memory leak if thr_find_all_keys returns an error.
2006-10-18 17:57:29 +05:00
andrey@example.com
f0cfcd90c0 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  example.com:/work/bug23074/my41-bug23074
2006-10-11 13:58:31 +02:00
andrey@example.com
a846909e6a Fix a typo regarding checking whether HA_VAR_LENGTH_KEY is
set. This has always worked because when flag is !=0 then
HA_VAR_LENGTH_KEY is always set. Therefore, a test case cannot
reveal a faulty behavior.

Fix for bug#23074: typo in myisam/sort.c
2006-10-11 11:07:25 +02:00
bar@mysql.com/bar.intranet.mysql.r18.ru
a55b0cbc34 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1-rpl
into  mysql.com:/usr/home/bar/mysql-4.1-rpl.b22052
2006-10-11 12:51:09 +05:00
istruewing@chilla.local
1daa6a710d Merge chilla.local:/home/mydev/mysql-4.1-bug8283
into  chilla.local:/home/mydev/mysql-4.1-bug8283-one
2006-10-09 19:40:16 +02:00
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
bar@mysql.com/bar.intranet.mysql.r18.ru
5c38da179c Bug#22052 Trailing spaces are not removed from UNICODE fields in an index
Fix: using charset-aware functions cs->cset->lengthsp() and cs->cset->fill()
  instead of single byte code which is not UCS2 compatible.
2006-10-03 14:11:57 +05:00
svoj@mysql.com/april.(none)
7afbe5f86e Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
2006-10-02 14:42:12 +05:00
holyfoot/hf@mysql.com/deer.(none)
8eec4bf164 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  mysql.com:/home/hf/work/21888/my41-21888
2006-10-01 19:04:08 +05:00
istruewing@chilla.local
5ad8f1c464 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug22384
2006-09-29 17:17:01 +02:00
holyfoot/hf@mysql.com/deer.(none)
8190b7231b bug #21888 (Query on GEOMETRY field crashes the server)
RTree keys are really different from BTree and need specific
paramters to be set by optimizer to work.
Sometimes optimizer doesn't set those properly.
Here we decided just to add code to check that the parameters
are correct. Hope to fix optimizer sometimes.
2006-09-29 17:56:02 +05:00
istruewing@chilla.local
fd2a6a7a40 Merge chilla.local:/home/mydev/mysql-4.0-bug22384
into  chilla.local:/home/mydev/mysql-4.1-bug22384
2006-09-28 21:47:42 +02:00
istruewing@chilla.local
4027fc8dca Bug#22384 - DELETE FROM table causes "Incorrect key file for table"
Deletes on a big index could crash the index when it needs to
shrink.

Put a forgotten negation operator in.

No test case. It is too big for the test suite. And it does not
work with 4.0, only with higher versions. It is attached to the
bug report.
2006-09-28 11:41:38 +02:00
gkodinov@dl145s.mysql.com
55cc4fd5c6 Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
2006-09-28 10:19:25 +02:00
istruewing@chilla.local
ac778232cd Bug#20719 - Reading dynamic records with write buffer could fail
After merge fix.
2006-09-27 11:55:30 +02:00
istruewing@chilla.local
6ff6d80e57 Merge chilla.local:/home/mydev/mysql-4.1-bug20719
into  chilla.local:/home/mydev/mysql-4.1-bug20719-m
2006-09-27 09:30:54 +02:00
holyfoot/hf@mysql.com/deer.(none)
14b16d89d9 Merge mysql.com:/home/hf/work/mysql-4.1.12991
into  mysql.com:/home/hf/work/mysql-4.1.15428
2006-09-25 16:35:57 +05:00
istruewing@chilla.local
2b121cd0e1 Bug#14400 - Query joins wrong rows from table which is subject of
"concurrent insert"
After merge fix.
2006-09-22 17:23:25 +02:00