Commit graph

47 commits

Author SHA1 Message Date
serg@serg.mylan
367bcf8c40 limit HEAP table size with max_heap_table_size, better estimation for mem_per_row 2005-01-14 19:49:45 +01:00
sergefp@mysql.com
1cc999fbd4 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-heap-bug
2004-11-16 21:36:31 +03:00
monty@mysql.com
8b6839e644 Fixed wrong range test code for HEAP tables. This caused a crash when doing a range test with a key that didn't have lower or upper bound (Bug #6082)
More test cases
2004-10-23 03:30:27 +03:00
sergefp@mysql.com
a0ba02d740 Fix for bug#5138 continued: added comments, removed extra debug printf calls, changed ha_heap::records_in_range to use table->rec_per_key. 2004-10-12 18:21:25 +04:00
gluh@gluh.mysql.r18.ru
2a621e275b Fix for bug #5555: "GROUP BY enum_field" returns incorrect results 2004-10-05 17:02:09 +04:00
dlenev@brandersnatch.localdomain
2511990c97 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
2004-10-01 18:54:06 +04: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
bar@mysql.com
d81136e3e1 Bug 4531: unique key prefix interacts poorly with utf8
Check HEAP+HASH, binary collation
2004-08-19 16:07:18 +05:00
serg@serg.mylan
e1237cbc53 manually merged 2004-08-18 19:57:55 +02:00
vva@eagle.mysql.r18.ru
e1f264748c fixed Bug #4973 Memory is not released when HEAP table is dropped 2004-08-11 18:55:12 +05:00
serg@serg.mylan
3f1c4ba745 handler interface cleanups:
more logical table/index_flags
  return  HA_ERR_WRONG_COMMAND instead of abstract methods where appropriate
  max_keys and other limits renamed to max_supported_keys/etc
  max_keys/etc are now wrappers to max_supported_keys/etc 
  ha_index_init/ha_rnd_init/ha_index_end/ha_rnd_end are now wrappers to real {index,rnd}_{init,end} to enforce strict pairing
2004-06-23 12:29:05 +02:00
serg@serg.mylan
eb93657507 typo fixed 2004-05-17 11:10:22 +02:00
monty@mishka.local
314a8bf114 key_cmp -> key_cmp_if_same
New records_in_range() interface (similar to read_range())
Macros for faster bitmap handling
Simplify read_range() code (#WL1786)
New general key_cmp() function to compare keys
2004-05-16 14:48:32 +03:00
ingo@mysql.com
784c9526ec WL#1687 - Optimize UNION DISTINCT ... UNION ALL (again).
HEAP: Copies the key count to a backup variable and sets the key count to zero.
That way, no HEAP function will ever try to touch any index.
Re-enabling is done by copying back the backup variable.
To avoid memory leak at table close, disable deletes all index trees.
Re-enabling must be done with empty indexes and data anyway. Otherwise,
the indexes would need to be repaired, wich HEAP is not capable of.
MyISAM: Only the key_map is cleared and set.
Re-enabling must be done with empty indexes and data. Otherwise, repair needs
to be done which will enable all keys persistently.
The former implementation disabled only non-unique keys and maked this persistent.
The new implementation additionally can disable all keys, but only without
making this persistent. Re-enabling all keys can be done without repair,
if data file and indexes are empty.
2004-05-06 15:53:01 +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
dlenev@jabberwock.localdomain
f6bff2e6c6 WL#1266 "Separate auto-set logic from TIMESTAMP type."
Final version of patch.

Adds support for specifying of DEFAULT NOW() and/or ON UPDATE NOW()
clauses for TIMESTAMP field definition.
Current implementation allows only one such field per table and
uses several unireg types for storing info about this properties of
field. It should be replaced with better implementation when new
.frm format is introduced.
2004-04-02 10:12:53 +04:00
monty@mysql.com
ebc3b3afac BTREE-indexes in HEAP tables can now be used to optimize ORDER BY
Don't read character set files if we are using only the default charset. In most cases the user will not anymore get a warning about missing character set files
Compare strings with space extend instead of space strip. Now the following comparisons holds:  "a" == "a " and "a\t" < "a". (Bug #3152).
Note: Because of the above fix, one has to do a REPAIR on any table that has an ascii character < 32 last in a CHAR/VARCHAR/TEXT columns.
2004-03-25 15:05:01 +02: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
06432eac36 Added --compact to mysqlbinlog
Fixed output from mysqlbinlog when using --skip-comments
Fixed warnings from valgrind
Fixed ref_length when used with HEAP tables
More efficent need_conversion()
Fixed error handling in UPDATE with not updateable tables
Fixed bug in null handling in CAST to signed/unsigned
2004-02-09 12:31:03 +01:00
guilhem@mysql.com
e71325caf9 Fix for BUG#2477 "Slave stop with error after master reboot if use HEAP tables":
when we open the HEAP table for the first time since server restart,
in hp_open(), we set a flag to propagate this info to the handler level
which then writes a DELETE FROM this_heap_table to the binlog.
It is not a perfect solution for the bug, because between the server start and 
the first open of the table, the slave still had old data in his table so
a SELECT on the slave may show wrong content. But if there is a --init-file
to populate the HEAP table on master as startup, then this is a safe fix
(I'll put a note about init-file in the HEAP section of the manual).
2004-01-30 00:05:34 +01:00
monty@mysql.com
ede8169d24 Added missing SSL library (Should be in source distribution)
Fixed compiler warnings (a lot of hidden variables detected by the Forte compiler)
Added a lot of 'version_xxx' strings to 'show variables'
Prevent copying of TMP_TABLE_PARAM (This caused core dump bug on Solaris)
Fixed problem with printing sub selects to debug log
2003-11-28 12:18:13 +02:00
ram@mysql.r18.ru
6acfa37935 ::index_read_last() method has been added 2002-11-28 15:19:42 +04:00
monty@mashka.mysql.fi
dac6498f9b Merge with 4.0 2002-11-21 15:56:48 +02:00
monty@mashka.mysql.fi
7a70332836 Portability fix when using -DBIG_TABLES 2002-11-14 12:21:36 +02:00
bar@bar.mysql.r18.ru
86b633379c Some charset code clean-ups 2002-11-06 17:01:12 +04:00
ram@mysql.r18.ru
2e1a0c031a auto_increment for heap tables
test case
2002-10-07 17:49:03 +05:00
ram@mysql.r18.ru
d5ca940a4b Merge mysql.r18.ru:/usr/home/ram/mysql-4.1.last
into mysql.r18.ru:/usr/home/ram/mysql-4.1
2002-10-03 17:26:05 +05:00
ram@mysql.r18.ru
032a4a927a Additional key segment (HA_KEYTYPE_END) creation has been moved from handler to hp_create.c 2002-10-03 14:55:02 +05:00
monty@narttu.mysql.fi
7134ffec21 Merge with 4.0.3
Some simple optimzations, more comments and indentation changes.
Add ` around database in 'use database' in binary log.
Moved max_error_count and max_warning_count to variables struct.
Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls.
Changed string functions to use character set of first string argument as default return characterset
(Each string function can change the above assumption if needed)
2002-08-30 12:40:40 +03:00
jani@rhols221.adsl.netsonic.fi
7cad1f9313 Added interface for first set of dynamic variables. 2002-06-28 19:30:09 +03:00
ram@gw.udmsearch.izhnet.ru
5953779053 heap_create() <-> heap_open() 2002-06-07 16:47:36 +05:00
ram@gw.udmsearch.izhnet.ru
3b43cb2960 BTREE heap key structure is now the same as MyISAM
_mi_compare_text -> mi_compate_text
Changes according Monty's suggestions
2002-05-21 21:54:08 +05:00
bar@gw.udmsearch.izhnet.ru
7fce07d52d Now several character sets can live in the same table,
However some hacks were used while waiting for new FRM file
2002-05-14 20:58:38 +05:00
ram@gw.udmsearch.izhnet.ru
06ed215c37 Index number argument
Fix in test results
2002-04-29 13:53:29 +05:00
ram@gw.udmsearch.izhnet.ru
b8a12a8cec MI_KEYSEG -> HA_KEYSEG
_mi_key_cmp -> ha_key_cmp
2002-04-25 15:10:29 +05:00
bar@gw.udmsearch.izhnet.ru
eab2893dac RB-Tree indexes support in HEAP tables
Renamed _hp_func  ->  hp_func
mi_key_cmp moved to /mysys/my_handler.c
New tests for HEAP tables
2002-04-25 13:36:55 +05:00
monty@hundin.mysql.fi
4d10a0cb7e Add support for NULL=NULL in keys (Used in GROUP BY optimization)
Add ISAM to Windows version
Fix of test results
Fixes for NULL keys in HEAP tables.
2002-01-16 00:42:52 +02:00
monty@tik.mysql.fi
7dd4eb71fe Added support of null keys in HEAP tables
Added ORDER BY optimization
2002-01-12 15:42:54 +02:00
monty@hundin.mysql.fi
b658662ae4 Update copyright
Fixed memory leak on shutdown (Affects the embedded version & MyODBC)
2001-12-06 14:10:51 +02:00
monty@hundin.mysql.fi
a1be2a894f Fix of UNION code
Added heap_delete_table
Added HA_EXTRA_PREPARE_FOR_DELETE
Added and use my_dup() for faster open of tables.
Removed not working no-mix-table-type
2001-08-19 14:43:51 +03:00
monty@donna.mysql.com
0732f7475e Fixed for bugs that was found when getting full code coverage of BDB
Fixed bug with HEAP tables on windows
Fixed bug with HAVING on empty tables
2001-01-17 03:15:20 +02:00
jani@prima.mysql.com
16a833a2a9 Bug fix, max_heap_table_size variable was not used. 2000-12-07 14:17:07 +02:00
monty@tramp.mysql.fi
e32799e4dd RIGHT JOIN, part of automatic repair of MyISAM tables, backup on repair,
reading from FIFO, fixes for FULLTEXT, @@IDENTITY
2000-09-26 00:33:25 +03:00
monty@donna.mysql.com
b581f17be2 Fixes for MERGE TABLES and HEAP tables 2000-09-14 02:39:07 +03:00
monty@donna.mysql.com
066d55c0c0 Bug fixes for 3.23.23 2000-08-29 12:31:01 +03:00
bk@work.mysql.com
f4c589ff6c Import changeset 2000-07-31 21:29:14 +02:00