Commit graph

89 commits

Author SHA1 Message Date
holyfoot/hf@mysql.com/hfmain.(none)
0233b13572 tests fixed to work in embedded server 2007-03-20 17:53:55 +04:00
svoj@mysql.com/april.(none)
de21b9b8ef Merge mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.0-engines
2007-03-13 18:11:47 +04:00
svoj@mysql.com/april.(none)
cb132bea8f BUG#26881 - Large MERGE tables report incorrect specification when no
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.
2007-03-13 18:02:06 +04:00
istruewing@chilla.local
7cb031a010 Merge chilla.local:/home/mydev/mysql-4.1-bug26464
into  chilla.local:/home/mydev/mysql-5.0-bug26464
2007-03-06 10:34:14 +01:00
istruewing@chilla.local
629fed6c4d Bug#26464 - insert delayed + update + merge = corruption
Using INSERT DELAYED on MERGE tables could lead to table
corruptions.

The manual lists a couple of storage engines, which can be
used with INSERT DELAYED. MERGE is not in this list.

The attempt to try it anyway has not been rejected yet.
This bug was not detected earlier as it can work under
special circumstances. Most notable is low concurrency.

To be safe, this patch rejects any attempt to use INSERT
DELAYED on MERGE tables.
2007-03-05 11:52:28 +01:00
svoj@mysql.com/june.mysql.com
a28b2ca1eb Merge mysql.com:/home/svoj/devel/mysql/WL3567/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/WL3567/mysql-5.0-engines
2007-01-31 17:09:58 +04:00
svoj@mysql.com/june.mysql.com
a51aae601d WL#3567 - MERGE engine: a check for underlying table conformance
When a merge table is opened compare column and key definition of
underlying tables against column and key definition of merge table.

If any of underlying tables have different column/key definition
refuse to open merge table.
2007-01-31 16:15:20 +04:00
gkodinov@dl145s.mysql.com
892495acaf Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-10-19 14:37:49 +02:00
gkodinov/kgeorge@macbook.gmz
a1310d84be Bug #22367: Optimizer uses ref join type instead of eq_ref for simple join on
strings
MySQL is setting the flag HA_END_SPACE_KEYS for all the keys that reference
text or varchar columns with collation different than binary.
This was done to handle correctly the situation where a lookup on such a key
may return more than 1 row because of the presence of many rows that differ
only by the amount of trailing space in the table's string column.
Inserting such values however appears to violate the unique checks on 
INSERT/UPDATE. Thus that flag must not be set as it will prevent the optimizer
from choosing a faster access method.
This fix removes the setting of the HA_END_SPACE_KEYS flag.
2006-10-16 18:09:58 +03:00
svoj@mysql.com/april.(none)
94040c54b3 Merge mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.0-engines
2006-10-06 11:01:39 +05:00
svoj@mysql.com/april.(none)
c67aa031d6 Addition to fix for bug#10974. Fixed spelling. 2006-10-06 10:54:47 +05:00
svoj@mysql.com/april.(none)
ad7da7f1de Merge mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-5.0-engines
2006-09-29 00:00:27 +05:00
svoj@mysql.com/april.(none)
2de51adffa Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG21617/mysql-4.1-engines
2006-09-28 22:14:31 +05:00
svoj@mysql.com/april.(none)
b271d7653b BUG#21617 - crash when selecting from merge table with inconsistent indexes
Crash may happen when selecting from a merge table that has underlying
tables with less indexes than in a merge table itself.

If number of keys in merge table is not bigger than requested key number,
return error.
2006-09-28 22:10:06 +05:00
svoj@mysql.com/april.(none)
b724a03e08 After merge fix. 2006-09-27 18:33:31 +05:00
svoj@mysql.com/april.(none)
bfb6ff6bdd Merge mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-5.0-engines
2006-09-27 15:42:00 +05:00
svoj@mysql.com/april.(none)
c0ebc0fb2a BUG#10974 - No error message if merge table based on union of innodb, memory
Fixed confusing error message from the storage engine when
it fails to open underlying table. The error message is issued
when a table is _opened_ (not when it is created).
2006-09-20 01:40:59 +05:00
jimw@rama.(none)
8b91a02728 Merge bk-internal:/home/bk/mysql-5.0-engines
into  rama.(none):/home/jimw/my/mysql-5.0-17608
2006-07-18 10:25:04 -07:00
jimw@rama.(none)
005c2a05d4 Bug #17766: The server accepts to create MERGE tables which cannot work
Changed the error reporting (and a crash) when inserting data into a
 MERGE table that has no underlying tables or no INSERT_METHOD specified
 by reporting that it is read-only.
2006-07-11 17:28:50 -07:00
ingo/mydev@chilla.local
dfaa3c78f6 Revoking patch for Bug#10952 on behalf of Brian. 2006-07-10 20:46:05 +02:00
acurtis@xiphis.org
0cd7ac833a Bug#19648
"Merge table does not work with bit types"
   MERGE should have HA_CAN_BIT_FIELD feature bit set or else table row is
   formatted incorrectly.
2006-05-30 17:10:53 -07:00
acurtis@xiphis.org
47e89f208a bug#10952
"alter table from MyISAM to MERGE lost data without errors and warnings"
  Add new handlerton flag which prevent user from altering table storage
  engine to storage engines which would lose data. Both 'blackhole' and 
  'merge' are marked with the new flag.
  Tests included.
2006-05-09 13:31:46 -07:00
sergefp@mysql.com
f95b5b0a5d BUG#17314: Can't use index_merge/intersection for MERGE tables
1. Fix index access costs for MERGE tables, set block_size=myisam_block_size/#underlying_tables 
   instead of 0 which it was before.
2. Make index scans on MERGE table to return records in (key_tuple, merge_table_rowid) order, 
   instead of just (key_tuple) order. This makes an index scan on MERGE table to be truly a ROR-scan
   which is a requirement for index_merge union/intersection.
2006-02-11 21:51:43 +03:00
ingo@mysql.com
b0e84cb999 BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
2005-12-20 16:35:05 +01:00
ingo@mysql.com
5aa315e23a BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables() 
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
2005-12-07 19:52:26 +01:00
ingo@mysql.com
0af6e68acf Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-09-29 14:07:32 +02:00
ingo@mysql.com
5c93e799d8 Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-09-29 13:44:17 +02:00
ingo@mysql.com
1af69fca94 Bug#9112 - Merge table with composite index producing invalid results with some queries
Second platform fix for floating point rounding.
2005-09-29 13:37:30 +02:00
ingo@mysql.com
b3c3db08f0 Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-09-28 14:10:02 +02:00
ingo@mysql.com
a3618b128b Merge mysql.com:/home/mydev/mysql-4.0-4000
into  mysql.com:/home/mydev/mysql-4.1-4100
2005-09-27 15:42:14 +02:00
ingo@mysql.com
d005299a57 Bug#9112 - Merge table with composite index producing invalid results with some queries
Reduced the precision of the test numbers.
Not all platforms could reproduce the exact numbers.
2005-09-27 15:26:16 +02: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
jimw@mysql.com
b7079ed027 Resolve merge from 4.1 2005-05-18 13:54:36 -07:00
ingo@mysql.com
26f2e57ecb Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
After review version.
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().
2005-05-18 19:40:39 +02:00
monty@mishka.local
2d25da2a4b concurrent-insert can now be set to 2 for concurrent inserts when there is holes in the data file
myisam_max_extra_sort_file_size is depricated
Ensure that myisam_data_pointer_size is honoured when creating new MyISAM files
Changed default value of myisam_data_pointer_size from 4 to 6 to get rid of 'table-is-full' errors
2005-05-13 12:08:08 +03:00
serg@sergbook.mysql.com
a04fc26c54 manually merged 2004-12-31 15:26:24 +01:00
monty@mysql.com
34d5331cee Merge with global tree 2004-12-31 00:50:30 +02:00
timour@mysql.com
5eab756a63 Fix for BUG#7377. This fix adds the same implementation for ha_myisammgr::index_type as in version 5.0. 2004-12-27 14:05:35 +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
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
monty@mysql.com
67ce247965 Add support for up to VARCHAR (size up to 65535)
Renamed HA_VAR_LENGTH to HA_VAR_LENGTH_PART
Renamed in all files FIELD_TYPE_STRING and FIELD_TYPE_VAR_STRING to MYSQL_TYPE_STRING and MYSQL_TYPE_VAR_STRING to make it easy to catch all possible errors
Added support for VARCHAR KEYS to heap
Removed support for ISAM
Now only long VARCHAR columns are changed to TEXT on demand (not CHAR)
Internal temporary files can now use fixed length tables if the used VARCHAR columns are short
2004-12-06 02:00:37 +02:00
sergefp@mysql.com
0bf584d9a5 Fix and testcase for BUG#6699 2004-11-29 06:51:30 +03:00
monty@mishka.local
be4ca46fbe More fixes for strict mode:
More tests.
Better error messages.
Fixed bug when checking if we updated all needed columns for INSERT.
Give an error if we encounter a wrong float value during parsing.
Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS.
Fixed UPDATE IGNORE when using STRICT mode.
2004-10-02 22:20:08 +03:00
bell@sanja.is.com.ua
a7de21c3e0 thd pointer fixed 2004-09-10 13:09:27 +03:00
monty@mysql.com
5d71817c70 After merge fixes 2004-09-05 02:31:11 +03:00
monty@mysql.com
9d8555c0f0 Merge with 4.0 to get latest bug fixes 2004-09-04 15:59:49 +03:00
ram@gw.mysql.r18.ru
3acccb988a A fix (Bug #5232: CREATE TABLE ... SELECT can deadlock itself). 2004-08-27 16:43:01 +05:00
serg@serg.mylan
3b59dd1bd0 bug#4008 - merge table cannot determine what key caused "dupl. key" error 2004-06-25 15:12:13 +02:00