Commit graph

43 commits

Author SHA1 Message Date
istruewing@chilla.local
209ea105d1 Merge chilla.local:/home/mydev/mysql-4.1-bug29838
into  chilla.local:/home/mydev/mysql-5.0-bug29838
2007-08-01 12:02:18 +02:00
istruewing@chilla.local
e117a36c33 Bug#29838 - myisam corruption using concurrent select ... and update
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.
2007-08-01 11:54:24 +02:00
svoj@mysql.com/june.mysql.com
4653cc495b Merge mysql.com:/home/svoj/devel/mysql/warn/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/warn/mysql-5.0-engines
2007-04-19 11:56:06 +05:00
svoj@mysql.com/june.mysql.com
d55cddad93 Fixed a warning on win64. 2007-04-19 11:53:25 +05:00
svoj@mysql.com/june.mysql.com
2d64de7d7e Merge mysql.com:/home/svoj/devel/mysql/BUG24342/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG24342/mysql-5.0-engines
2007-04-18 16:22:23 +05:00
svoj@mysql.com/april.(none)
bcbcacb8da BUG#24342 - Incorrect results with query over MERGE table
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.
2007-04-11 01:40:35 +05:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
  Don't update the files from BitKeeper
Many files:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
Many files:
  Added GPL copyright text
Removed files:
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/xwf
2006-12-31 01:02:27 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
istruewing@chilla.local
5d509b32d4 Merge chilla.local:/home/mydev/mysql-4.1-bug14400-monty
into  chilla.local:/home/mydev/mysql-5.0-bug14400-monty
2006-09-19 11:27:00 +02:00
istruewing@chilla.local
47dc3fbe8a Merge bk-internal:/home/bk/mysql-4.0
into  chilla.local:/home/mydev/mysql-4.1-bug14400-monty
2006-09-19 10:17:25 +02:00
istruewing@chilla.local
45f7514d03 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-09-15 14:02:43 +02:00
istruewing@chilla.local
97b52dadf3 Merge chilla.local:/home/mydev/mysql-4.1-bug14400
into  chilla.local:/home/mydev/mysql-5.0-bug14400
2006-09-14 17:50:59 +02:00
istruewing@chilla.local
d53ac19620 Bug#14400 - Query joins wrong rows from table which is subject of
"concurrent insert"
After merge fix.
2006-09-14 16:55:57 +02:00
istruewing@chilla.local
38886ffa2b Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-09-12 11:40:24 +02:00
istruewing@chilla.local
50192889a4 Merge chilla.local:/home/mydev/mysql-4.1-bug14400
into  chilla.local:/home/mydev/mysql-5.0-bug14400
2006-09-07 18:46:37 +02:00
istruewing@chilla.local
45ceab9ec5 Merge chilla.local:/home/mydev/mysql-4.0-bug14400
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-09-07 16:46:20 +02:00
istruewing@chilla.local
39c0f0a484 Bug#14400 - Query joins wrong rows from table which is subject of
"concurrent insert"
Additional fix for full keys and test case.
2006-09-07 15:39:31 +02:00
istruewing@chilla.local
7439a52434 Merge chilla.local:/home/mydev/mysql-4.0-bug14400
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-08-29 21:08:40 +02:00
istruewing@chilla.local
0b2a9d01ed Bug#14400 - Query joins wrong rows from table which is
subject of "concurrent insert"
Better fix by Monty: "The previous bug fix didn't work
when using partial keys."
2006-08-29 20:45:04 +02:00
monty@mysql.com/narttu.mysql.fi
7d0b042ec5 Better bug fix for #14400 "Query joins wrong rows from table which is subject of "concurrent insert""
The previous bug fix didn't work when using partial keys.
Don't use GNUC min/max operations are they are depricated.
Fixed valgrind warning
2006-08-10 22:41:19 +03: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
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
lars@mysql.com
57f36732ca Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1
into  mysql.com:/users/lthalmann/bk/mysql-5.0
2005-10-10 17:50:19 +02:00
monty@mysql.com
82855517a1 Review of new code since last pull
- Use %lx instead of %p as %p is not portable
- Don't replace ROW item with Item_null
2005-10-07 03:12:15 +03:00
ingo@mysql.com
b9630b50d2 Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-09-23 17:27:07 +02:00
ingo@mysql.com
bf89c139a4 Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-09-23 10:49:08 +02:00
ingo@mysql.com
4025d2965b Bug#9112 - Merge table with composite index producing invalid results with some queries
The problem was an ab-use of last_rkey_length.
Formerly we saved the packed key length (of the search key)
in this element. But in certain cases it got replaced by 
the (packed) result key length.
Now we use a new element of MI_INFO to save the packed key 
length of the search key.
2005-09-23 10:15:11 +02:00
monty@mysql.com
5e03ebbcad After merge fixes
Cleanup of mi_print_error() handling
Deleted 'merge' directory
2004-12-31 03:47:56 +02:00
ingo@mysql.com
c39be2d0e7 WL#1895 - Print message to error log in case of detected MyISAM corruption
Changed my_error() to print error messages, which come from
arbitrary registered ranges of error messages. Messages can
be unregistered (and should be at end of the program).
Added registration of handler error messages.
Added a new mi_print_error() macro and a new 
mi_report_error() function, which supply error
messages with a table name.
Added calls to mi_print_error() or mi_report_error()
at all places in MyISAM, where table corruption is detected.
2004-12-23 20:11:38 +01:00
hf@deer.(none)
ec457a96ef WL#1163 To make spatial code optional
myisam spatial code isolated
2004-03-12 18:51:03 +04:00
monty@mashka.mysql.fi
6aa8929cf3 After merge fixes
Added initialization of all important global variables
2003-05-21 21:39:58 +03:00
monty@narttu.mysql.fi
dd2b7918cd Merge with 4.0.13 2003-05-19 16:35:49 +03:00
monty@narttu.mysql.fi
9e4f394e59 Fix reference to not initialized memory
Changed handing of priv_host to fix bug in FLUSH PRIVILEGES
2003-04-30 10:15:09 +03:00
monty@mashka.mysql.fi
dd377bfba6 Fixed problem when comparing a key for a multi-byte-character set. (bug 152)
Use 0x.... as strings if 'new' mode. (bug 152)
Don't report -max on windows when InnoDB is enabled. (bug 332)
Reset current_linfo;  This could cause a hang when doing PURGE LOGS.
Fix for row numbers in EXPLAIN (bug 322)
 Fix that USE_FRM works for all table types (bug 97)
2003-04-27 22:12:08 +03:00
serg@serg.mysql.com
5b57077778 myisammrg::index_next_same 2002-11-25 22:18:44 +01:00
bar@gw.udmsearch.izhnet.ru
fc74d81b3f This ChangeSet adds RTREE support into myisam library.
RTREEs will be used for GIS extension in MySQL
2002-02-20 14:11:21 +04:00
monty@hundin.mysql.fi
880026ccf6 Cleaned up SSL documentation
Fixes for embedded server
Made key_cache more configurable
Fixed that one can change key blocksize in MyISAM
A lot of optimizations to make MyISAM slightly faster
2001-10-02 05:53:00 +03:00
monty@donna.mysql.fi
2ba0846a60 Fixed bug when using MERGE on files > 4G
Fixed bug in SELECT db1.table.* FROM db1.table,db2.table
Fixed bug in INSERT DELAYED when doing shutdown and a table was locked
Changed that tmp_table_size =4G-1 means unlimited.
2001-05-17 00:46:50 +03:00
monty@donna.mysql.fi
65822120f5 Fixed bug in ALTER TABLE
Removed _mi_rkey() function
New fork_big.pl multi-thread test
2001-04-01 13:45:48 +03:00
monty@donna.mysql.com
02fd65b970 Fixed indention, removed compiler varnings and fixed a bug
in FULLTEXT indexes.
2000-09-29 00:58:16 +03:00
serg@infomag.ape.relarn.ru
5886090182 PART I: Keys support for MyMERGE tables
myisammrg/             |
Makefile.am            |
mymrgdef.h             |   support for keys
myrg_open.c            |          &
myrg_queue.c           |   bugfixes
myrg_rfirst.c          |
myrg_rkey.c            |
myrg_rlast.c           |
myrg_rnext.c           |
myrg_rprev.c           |
myrg_rrnd.c            |

include/myisammrg.h    | rkey/rnext/etc prototyped

sql/                   |
ha_myisammrg.cc        | support for keys
ha_myisammrg.h         |

myisam/                |
mi_rkey.c              | buf==NULL extension, _mi_rkey()
mi_rnext.c             |
mi_rprev.c             |

include/queues.h       | reinit_queue() - same as init_queue, but w/o malloc
mysys/queues.c         |

PART II: Miscellaneous

myisam/common_words    | deleted (looks like I checked it in by mistake)

some files (like acconfig.h, Makefile.am, COPYING.LIB, etc)
                       | Change mode to -rw-r--r-- (by `chmod a-x ')
2000-08-14 15:27:19 +04:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00