Commit graph

1075 commits

Author SHA1 Message Date
kostja@bodhi.local
f1d949a856 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-08 21:45:02 +04:00
kostja@bodhi.local
a2c0cdd75b Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-08 02:30:07 +04:00
acurtis@xiphis.org
86132d5d8f Bug#8706
"temporary table with data directory option fails"
  myisam should not use user-specified table name when creating
  temporary tables and use generated connection specific real name.
  Test included.
2006-07-05 17:18:59 -07:00
ingo@mysql.com
4c00805951 Merge mysql.com:/home/mydev/mysql-4.1-bug19835
into  mysql.com:/home/mydev/mysql-5.0-ateam
2006-07-05 11:24:50 +02:00
ingo@mysql.com
5025bf32b2 Merge mysql.com:/home/mydev/mysql-4.1-bug17877
into  mysql.com:/home/mydev/mysql-5.0-ateam
2006-07-05 11:23:21 +02:00
ingo@mysql.com
a21071d912 Merge mysql.com:/home/mydev/mysql-4.1-bug14400
into  mysql.com:/home/mydev/mysql-5.0-ateam
2006-07-05 11:20:10 +02:00
ingo@mysql.com
20a152d5c3 Merge mysql.com:/home/mydev/mysql-4.1-bug11824
into  mysql.com:/home/mydev/mysql-5.0-ateam
2006-07-05 11:11:40 +02:00
ingo@mysql.com
40c103478d Merge mysql.com:/home/mydev/mysql-4.0-bug14400
into  mysql.com:/home/mydev/mysql-4.1-bug14400
2006-07-04 19:10:13 +02:00
ingo@mysql.com
99ad23ec7c Bug#14400 - Query joins wrong rows from table which is subject of "concurrent insert"
It was possible that fetching a record by an exact key value 
(including the record pointer) could return a record with a 
different key value. This happened only if a concurrent insert 
added a record with the searched key value after the fetching 
statement locked the table for read.

The search succeded on the key value, but the record was
rejected as it was past the file length that was remembered
at start of the fetching statement. With other words it was 
rejected as being a concurrently inserted record.

The action to recover from this problem was to fetch the 
record that is pointed at by the next key of the index. 
This was repeated until a record below the file length was 
found.

I do now avoid this loop if an exact match was searched. 
If this match is beyond the file length, it is now treated 
as "key not found". There cannot be another key with the 
same record pointer.
2006-06-28 18:55:30 +02:00
ingo@mysql.com
9dd5bc3843 Bug#19835 - Binary copy of corrupted tables crash the server when issuing a query
A corrupt table with dynamic record format can crash the 
server when trying to select from it.
        
I fixed the crash that resulted from the particular type 
of corruption that has been reported for this bug.

No test case. To test it, one needs a table with a very special
corruption. The bug report contains a file with such a table.
2006-06-28 16:07:39 +02:00
ingo@mysql.com
d8499f2d8f Bug#17877 - Corrupted spatial index
CHECK TABLE could complain about a fully intact spatial index.
A wrong comparison operator was used for table checking. 
The result was that it checked for non-matching spatial keys. 
This succeeded if at least two different keys were present, 
but failed if only the matching key was present.

I fixed the key comparison.
2006-06-28 14:27:37 +02:00
ingo@mysql.com
e67bdaf604 Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail
Very complex select statements can create temporary tables
that are too big to be represented as a MyISAM table.

This was not checked at table creation time, but only at
open time. The result was an attempt to delete the 
"impossible" table.

But if the server is built --with-raid, MyISAM tries to 
open the table before deleting the files. It needs to find 
out if the table uses the raid support and how many raid 
chunks there are. This is done with an open "for repair",
which will almost always succeed.

But in this case we have an "impossible" table. The open
failed. Hence the files were not deleted. Also the error
message was a bit unspecific.

I turned an open error in this situation into the assumption 
of having no raid support on the table. Thus the normal data 
file is tried to be deleted. This may however leave existing 
raid chunks behind.

I also added a check in mi_create() to prevent the creation
of an "impossible" table. A more decriptive error message is
given in this case.

No test case. The required select statement is way too
large for the test suite. I added a test script to the
bug report.
2006-06-27 11:26:41 +02:00
ingo@mysql.com
6345502b53 Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment
CHECK TABLE did temporarily clear the auto_increment value.
It runs with a read lock, allowing other readers and
conurrent INSERTs. The latter could grab the wrong value
in this moment.

CHECK TABLE does no longer modify the auto_increment value.
Not even for a short moment.
2006-05-31 10:22:44 +02:00
ingo@mysql.com
42e35c6be3 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug10405
2006-05-06 13:35:48 +02:00
svoj@april.(none)
23d304b312 Merge april.(none):/home/svoj/devel/mysql/BUG18160/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/BUG17810/mysql-5.0
2006-05-03 16:36:00 +05:00
ingo@mysql.com
5135a28d38 Merge mysql.com:/home/mydev/mysql-4.1-bug10405
into  mysql.com:/home/mydev/mysql-5.0-bug10405
2006-05-02 11:01:38 +02:00
ingo@mysql.com
3c317fef53 Merge mysql.com:/home/mydev/mysql-4.0-bug10405
into  mysql.com:/home/mydev/mysql-4.1-bug10405
2006-04-29 19:38:41 +02:00
svoj@april.(none)
64922fe6a7 BUG#17810 - REPAIR says ok, CHECK says broken (repeatable)
Write operations on tables created in 4.x with index on variable
length column results in index crash. Even REPAIR TABLE wasn't able
to fix broken index.

Problem was that packed key length size wasn't restored correctly.
In 5.0 packed key length size is either 1 or 2. In 4.x this length
is always 2, but is saved as 0.

This fix ensures that key length size is restored correctly for 4.x
tables.
2006-04-27 12:51:33 +05:00
paul@polar.kitebird.com
5907ce40e8 Merge polar.kitebird.com:/src/extern/MySQL/bk/mysql-4.1
into  polar.kitebird.com:/src/extern/MySQL/bk/mysql-5.0
2006-04-23 19:49:05 -05:00
paul@polar.kitebird.com
3cd7e135d4 myisam_ftdump.c:
myisam_ftdump options: --help first, then rest in
  lexical order.
2006-04-23 19:26:56 -05:00
svoj@april.(none)
06ce215f10 BUG#18160 - Memory-/HEAP Table endless growing indexes
Updating data in HEAP table with BTREE index results in wrong index_length
counter value, which keeps growing after each update.

When inserting new record into tree counter is incremented by:
sizeof(TREE_ELEMENT) + key_size + tree->size_of_element
But when deleting element from tree it doesn't decrement counter by key_size:
sizeof(TREE_ELEMENT) + tree->size_of_element

This fix makes accurate allocated memory counter for tree. That is
decrease counter by key_size when deleting tree element.
2006-04-19 15:13:50 +05:00
svoj@april.(none)
8a7adb196d Merge april.(none):/home/svoj/devel/mysql/BUG17917/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/BUG17917/mysql-5.0
2006-04-15 16:08:03 +05:00
svoj@april.(none)
7412db5e56 BUG#17917 - SELECT from compressed MyISAM table crashes MySQL server
Retrieving data from compressed MyISAM table which is bigger than 4G on 32-bit box
with mmap() support results in server crash.

mmap() accepts length of bytes to be mapped in second param, which is 32-bit
size_t. But we pass data_file_length, which is 64-bit my_off_t. As a result only
first data_file_length % 4G were mapped.

This fix adds additional condition for mmap() usage, that is use mmap() for
compressed table which size is no more than 4G on 32-bit platform.
2006-04-13 14:37:03 +05:00
ingo@mysql.com
d1e25f9770 Bug#10405 - myisamchk damages auto_increment columns when changing character set
Whenever 'myisamchk' needed to recreate a table,
the auto increment information was lost.

Now the forgotten element of the table creation
information is set correctly.
2006-04-10 13:38:56 +02:00
evgen@sunlight.local
eb075f2255 Manual merge 2006-03-30 17:14:55 +04:00
monty@mysql.com
84e7c9633a Fix error in prefix compression of keys in MyISAM when key length changed from 254 -> 255
Bug #17705 "FT Index corruption occurs with UTF8 data..."
(Actually, the bug had nothing to do with FT index but with general key compression)
2006-03-30 01:50:52 +03:00
ingo@mysql.com
1173185891 Merge mysql.com:/home/mydev/mysql-4.1-bug14980
into  mysql.com:/home/mydev/mysql-5.0-bug14980
2006-03-10 15:06:04 +01: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
svoj@april.(none)
18681229a0 Merge april.(none):/home/svoj/devel/mysql/BUG16489/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/BUG16489/mysql-5.0
2006-01-23 20:07:26 +04:00
svoj@april.(none)
4dc4502ab3 BUG#16489 - utf8 + fulltext leads to corrupt index file.
Fixed that UPDATE statement crashes multi-byte charset fulltext index.
2006-01-23 17:15:33 +04:00
monty@mysql.com
fd4a040325 Fixes during review of new pushed code:
Remove wrong fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
Safety fix for bug #13855 "select distinct with group by caused server crash"
2006-01-06 21:42:17 +02:00
serg@serg.mylan
30c09d6dc0 merged 2006-01-03 18:12:03 +01:00
serg@serg.mylan
14f94dc0ca many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
stewart@mysql.com
efbdf7b225 Merge mysql.com:/home/stewart/Documents/MySQL/4.1/main
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main
2005-12-28 00:57:18 +11:00
serg@serg.mylan
c063819075 locking issues,
test for LONGLONG_MIN in decimal.c
2005-12-23 20:50:28 +01:00
serg@serg.mylan
297d80dc11 BUG#11336 - fulltext index corruption after repair_by_sort and mi_delete
for uca collation isalnum and strnncollsp don't agree on whether
0xC2A0 is a space (strnncollsp is right, isalnum is wrong).

they still don't, the bug was fixed by avoiding strnncollsp
2005-12-18 13:30:01 +01:00
jani@a193-229-222-105.elisa-laajakaista.fi
d88d8081da Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-12-04 15:34:47 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
669a12fdb0 A set of Netware related patches. 2005-12-04 15:02:06 +02:00
SergeyV@selena.
22b43351f8 Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0
into  selena.:H:/MYSQL/src/#14902-mysql-5.0
2005-12-01 20:29:48 +03:00
serg@serg.mylan
6a83b75764 Merge serg.mylan:/usr/home/serg/Abk/mysql-4.1
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-11-26 20:23:20 +01:00
serg@serg.mylan
701de9be0a followup for for the bug#5686 2005-11-26 19:36:11 +01:00
SergeyV@selena.
e4cfca0758 Fixes bug #14902. When analysing a table with FT index that contains stopwords
table statistics is not updated, so the next execution of analyze table will
try to update statistics again.
2005-11-23 18:18:41 +03:00
joerg@mysql.com
b3b124f9e4 Merge the last 5.0.16 (Unix, Windows) and 5.0.16a (Netware) changes to the general tree. 2005-11-21 15:49:34 +01:00
jamppa@suse9-x86.mysql.com
a50cc250ff Netware specific changes for 5.0.16a 2005-11-18 18:25:46 +01:00
bell@sanja.is.com.ua
a2b8128398 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0
2005-11-15 19:22:00 +02:00
svoj@mysql.com
5d8cefe0b4 Fix for BUG#5686 - #1034 - Incorrect key file for table - only utf8 2005-11-12 11:25:14 +04:00
sergefp@mysql.com
41bc233699 Merge mysql.com:/home/psergey/mysql-4.1-bug13814
into mysql.com:/home/psergey/mysql-4.1-nov08-push
2005-11-08 05:36:25 +03:00
evgen@moonbone.local
bbe58c7e26 Manually merged 2005-11-01 19:47:53 +03:00
monty@mysql.com
19502e8eb5 Review of new pushed code
Removed wrong fix for bug #14009 (use of abs() on null value causes problems with filesort)
Mark that add_time(), time_diff() and str_to_date() can return null values
2005-11-01 13:00:02 +02: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