Commit graph

178 commits

Author SHA1 Message Date
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
msvensson@neptunus.(none)
31aa966718 Fix running tests suite with non standard tmp dir.
Default is "var/tmp"
2006-08-25 10:46:14 +02:00
evgen@sunlight.local
dda7a95c59 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
2006-08-01 09:24:19 +04:00
sergefp@mysql.com
699291a8e6 BUG#14940 "MySQL choose wrong index", v.2
- Make the range-et-al optimizer produce E(#table records after table 
                                           condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show 
  fraction of records left after table condition is applied
- Adjust test results, add comments
2006-07-28 21:27:01 +04:00
kostja@bodhi.local
024960aa2d Post-merge fixes. 2006-07-27 14:12:41 +04:00
kostja@bodhi.local
73189969f3 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-07-26 23:33:25 +04:00
kostja@bodhi.local
d7f5d73fc2 Fix test results to be vardir-independent. 2006-07-10 16:22:42 +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
elliot@mysql.com
bc2b96fee3 Merge mysql.com:/home/emurphy/src/bk-clean/tmp_merge
into  mysql.com:/home/emurphy/src/bk-clean/mysql-5.1
2006-06-25 09:59:34 -04:00
svoj@may.pils.ru
ffd8ea244d Merge may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-5.0
2006-06-21 19:41:09 +05:00
svoj@may.pils.ru
e560564cfa Merge april:devel/BitKeeper/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG20357/mysql-4.1
2006-06-21 17:51:16 +05:00
svoj@may.pils.ru
8b98be2844 BUG#20357 - Got error 124 from storage engine using MIN and MAX
functions in queries

Using MAX()/MIN() on table with disabled indexes (by ALTER TABLE)
results in error 124 (wrong index) from storage engine.

The problem was that optimizer use disabled index to optimize
MAX()/MIN(). Normally it must skip disabled index and perform
table scan.

This patch skips disabled indexes for min/max optimization.
2006-06-21 17:30:59 +05:00
svoj@may.pils.ru
1c42c9730d Merge may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.0
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.1
2006-06-20 16:45:51 +05:00
svoj@may.pils.ru
6a90aede13 Merge may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG18036/mysql-5.0
2006-06-19 16:06:29 +05: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
serg@sergbook.mysql.com
976f1da21f don't introduce a deprecated syntax 2006-05-08 16:06:16 -04:00
monty@mysql.com
343644dd5d Added support for key_block_size for key and table level (WL#602)
Added support for key_block_size to MyISAM.
Simplify interface to 'new Key' to make it easier to add new key options.
mysqld option --new is used to define where key options are printed.
(In 5.3 we should move all key options to after key part definition to avoid problem with reserved names)
Fixed some compiler warnings and a memory leak in ssl
2006-05-03 15:59:17 +03:00
ingo@mysql.com
5fc79af387 Merge mysql.com:/home/mydev/mysql-5.0-bug14980
into  mysql.com:/home/mydev/mysql-5.1-bug14980
2006-03-10 17:52:28 +01: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
msvensson@neptunus.(none)
c4b1fb68b4 Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case 2006-02-22 10:09:59 +01:00
ingo@mysql.com
65a4e27633 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug8841
2006-02-16 08:59:55 +01:00
ingo@mysql.com
b4b5dc18c4 Merge mysql.com:/home/mydev/mysql-5.0-bug8841
into  mysql.com:/home/mydev/mysql-5.1-bug8841
2006-02-14 09:29:37 +01:00
ingo@mysql.com
b9bc1e9108 Merge mysql.com:/home/mydev/mysql-5.1
into  mysql.com:/home/mydev/mysql-5.1-wl1563-msg
2006-02-10 20:00:22 +01:00
konstantin@mysql.com
98091b152a Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-02-02 18:17:18 +03:00
ingo@mysql.com
c5a7bffcee Bug#8841 - CHECKSUM TABLE is broken in MyISAM
There are (at least) two implementations of the checksum
computation. One is in MyISAM for the quick checksum. It
is executed on every row change. The other is in the
SQL layer for the extended checksum. It retrieves all rows
of a table via the respective storage engine.

In former MySQL versions varchars were stored with their 
maximum length, but now with their real length similar to
blobs.

This change had been forgotten to take care of in the
extended checksum calculation. Hence too much data was
checksumed. In MyISAM this change had been taken care of 
already. Only the real data is included in the checksum.

I changed mysql_checksum_table() so that it uses the
length information of true varchar fields instead
of the field length like in former varchar 
implementations.
2006-02-01 16:46:44 +01:00
ingo@mysql.com
b6e28c99d0 WL#1563 - Modify MySQL to support fast CREATE/DROP INDEX
Change "duplicate key" message to print key name
instead of key number.
2006-01-23 12:17:05 +01:00
pappa@c-5608e253.1238-1-64736c10.cust.bredbandsbolaget.se
9cae862623 Changed report of records to 2 from 1 previously in records_in_range in certain situations
causes change of test behaviour
2005-11-22 12:58:55 -05:00
ingo@mysql.com
3df2007147 Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-11-16 10:23:42 +01:00
ingo@mysql.com
aa1f46a819 Bug#14616 - Freshly imported table returns error 124 when using LIMIT
After merge fix.
2005-11-15 18:01:30 +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
sergefp@mysql.com
c5276ebcb0 Merge, will need post-merge fixes. 2005-11-08 11:22:51 +03: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
jani@ua141d10.elisa.omakaista.fi
cbe21a8eb6 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
2005-10-27 23:43:20 +03: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
71d8990f8e Fix for BUG#13455: Make "ref" optimizer able to make this inference:
"t.key BETWEEN c1 AND c2" and c1 = c2 -> can access table t using "t.key = c1".
2005-09-30 01:34:19 +04:00
sergefp@mysql.com
9a05a887de Manually merged 2005-09-24 02:39:52 +04:00
sergefp@mysql.com
d90b988da7 BUG#12232: Addressing docs team feedback: s/inequal/unequal/ 2005-09-24 01:39:50 +04:00
serg@serg.mylan
a083ff160e merged 2005-09-21 13:53:22 +02: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
5d41d5e0f4 Merge mysql.com:/home/mydev/mysql-4.1-4100
into  mysql.com:/home/mydev/mysql-5.0-5000
2005-08-29 18:18:30 +02:00
ingo@mysql.com
5845a6e553 Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
Added a switch to reject illegal values for PACK_KEYS.
2005-08-29 17:24:07 +02: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)
293cfafd37 Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-08-04 16:36:14 +05:00
hf@deer.(none)
67e5b2c83c Fix for bug #11083 (myisam test fails witout-geometry) 2005-07-27 21:54:02 +05:00
jimw@mysql.com
3f6aad900c Resolve merge from 4.1 2005-05-18 11:06:34 -07: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
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
ramil@mysql.com
db2b729c73 A fix (bug #10176: problem with varchar keys). 2005-04-26 19:46:52 +05:00
ingo@mysql.com
ab0acbe14d Merge 2005-04-16 17:58:11 +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
monty@mysql.com
aa6ab3b49c Move handler dependent tests to the specific handler (myisam, bdb, innodb)
Enabled VARCHAR testing for innodb

NOTE: innodb.test currently fails becasue of a bug in InnoDB. 
I have informed Heikki about this and expect him to fix this ASAP
2005-03-17 01:22:12 +02:00
ingo@mysql.com
306bd2fc69 Merge 2005-03-02 10:56:13 +01: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
monty@mysql.com
cd78e701a5 Show all generated warnings in SHOW ERROR
Previously we only stored the first given error (the error sent to the client)
2005-02-24 23:33:42 +02:00
monty@mysql.com
f55e200248 Fixed compiler warnings
Fixed failing myisam.test and rpl_rotate_logs.test on some configurations
2005-02-22 14:15:50 +02:00
monty@mysql.com
f5acf0be01 Generate warning in ha_delete_table() if files is missing in handler 2005-02-21 20:41:48 +02:00
bar@mysql.com
691b3283d2 If VARCHAR strips only trailing spaces, then produce
a note, not a warning or error.
2005-01-11 16:49:45 +04:00
sergefp@mysql.com
034c59ed59 Fix test results to account for difference between release BDB, debug BDB and MyISAM. 2004-12-31 14:48:11 +03:00
monty@mysql.com
e4ffff2918 Fix max_key_length and max_unique_length to take into account varchar and null extra lengths
This fixes a bug found by bdb.test
Fixes a portability issue with bdb tables
2004-12-31 11:56:50 +02:00
monty@mysql.com
3fb088a075 Add 0x before pointers (to help with debugging)
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
2004-12-18 05:19:21 +02:00
monty@mysql.com
77207d19f2 Merge with new VARCHAR code 2004-12-06 19:18:35 +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
dlenev@brandersnatch.localdomain
30f0c495b7 Backport of fix making myisam test results repeatable 2004-11-22 14:17:04 +03:00
serg@serg.mylan
05bf95dc15 make the test results repeatable 2004-11-21 15:37:52 +01:00
sergefp@mysql.com
2c9d2cf671 Fix for bug#5138: hash indexes on heap tables support statistics.
KEY::rec_per_key is updated every time 1/HEAP_STATS_UPDATE_THRESHOLD part of table records has been changed.
2004-09-08 02:07:53 +04:00
serg@serg.mylan
994d648dda space-stripping in _mi_prefix_search: BUG#5284 2004-08-30 16:12:53 +02:00
bar@mysql.com
87537752e2 "SELECT BINARY x" now means "SELECT CAST(x AS BINARY)". 2004-08-26 16:31:37 +05:00
bar@mysql.com
2496e85b84 Bug#4521: unique key prefix interacts poorly with utf8.
Fix for binary collations for MyISAM and HEAP BTREE.
This patch also changes trailing spaces behaviour for
binary collations. Binary collations now have PAD 
characteristic too.
2004-08-19 15:15:10 +05:00
serg@serg.mylan
3f2210c064 after merge fixes 2004-08-19 03:02:09 +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
4bc6b551f8 false/true -> FALSE/TRUE
Fixes after last merge
2004-03-30 02:32:41 +03: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
serg@serg.mylan
6af8a93052 Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-02-17 17:07:14 +01:00
serg@serg.mylan
b8e161be4b if a key length exceeds the supported maximum and it is safe to auto-decrease it, do it. 2004-02-17 16:57:39 +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
eaf9f35db8 Fix results after merge 2003-10-23 14:04:06 +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@mashka.mysql.fi
2263e3e51f Merge with 4.0.14 2003-08-11 22:44:43 +03:00
monty@mashka.mysql.fi
34919a03c4 Added thread variable max_seeks_for_key
Change optimizer to prefer key lookups before table scan
Change table scans to be done after tables with constrains on scanned table
2003-06-27 03:04:54 +03:00