Commit graph

116 commits

Author SHA1 Message Date
igor@rurik.mysql.com
d6af1b6e39 Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0
2006-04-01 02:57:56 -08:00
evgen@sunlight.local
eb075f2255 Manual merge 2006-03-30 17:14:55 +04:00
monty@mysql.com
c04660e85e Cleanup during review of new pushed code 2006-03-30 03:11:37 +03:00
monty@mysql.com
c3e7c7aa4b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-03-29 17:28:40 +03:00
monty@mysql.com
1994ed49ec Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
2006-03-29 14:27:36 +03:00
msvensson@shellback.
1d30dfdc00 Remove unused variable 2006-03-28 19:34:44 +02:00
guilhem@mysql.com
0071749595 WL#2977 and WL#2712 global and session-level variable to set the binlog format (row/statement),
and new binlog format called "mixed" (which is statement-based except if only row-based is correct,
in this cset it means if UDF or UUID is used; more cases could be added in later 5.1 release):
SET GLOBAL|SESSION BINLOG_FORMAT=row|statement|mixed|default;
the global default is statement unless cluster is enabled (then it's row) as in 5.1-alpha.
It's not possible to use SET on this variable if a session is currently in row-based mode and has open temporary tables (because CREATE
TEMPORARY TABLE was not binlogged so temp table is not known on slave),  or if NDB is enabled (because
NDB does not support such change on-the-fly, though it will later), of if in a stored function (see below).
The added tests test the possibility or impossibility to SET, their effects, and the mixed mode,
including in prepared statements and in stored procedures and functions.
Caveats:
a) The mixed mode will not work for stored functions: in mixed mode, a stored function will
always be binlogged as one call and in a statement-based way (e.g. INSERT VALUES(myfunc()) or SELECT myfunc()).
b) for the same reason, changing the thread's binlog format inside a stored function is
refused with an error message.
c) the same problems apply to triggers; implementing b) for triggers will be done later (will ask
Dmitri).
Additionally, as the binlog format is now changeable by each user for his session, I remove the implication
which was done at startup, where row-based automatically set log-bin-trust-routine-creators to 1
(not possible anymore as a user can now switch to stmt-based and do nasty things again), and automatically
set --innodb-locks-unsafe-for-binlog to 1 (was anyway theoretically incorrect as it disabled
phantom protection).
Plus fixes for compiler warnings.
2006-02-25 22:21:03 +01:00
konstantin@mysql.com
19018128a3 Merge mysql.com:/home/kostja/mysql/tmp_merge1
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-09 00:21:22 +03:00
konstantin@mysql.com
5ed755d0d8 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-08 23:53:45 +03:00
konstantin@mysql.com
303ad65fb2 Post-merge fixes. 2006-02-03 00:07:36 +03: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
stewart@mysql.com
5c3d5e28af WL#1359 NDB: Add table handler and table information available from SQL commands
add a FILES table that allows the user to run SQL queries on the files used
to store their tables.

Currently supports NDB
2006-01-28 16:16:23 +13:00
pappa@c-5c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
173a8ad4ed Added comments to specify why no much mutex is needed. 2006-01-27 12:44:33 -05:00
mikron@c-1e0be253.1238-1-64736c10.cust.bredbandsbolaget.se
e802a94284 WL #2604: Partition Management
Optimised version of ADD/DROP/REORGANIZE partitions for
non-NDB storage engines.
New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
Quite a few bug fixes
2006-01-17 08:40:00 +01:00
jonas@perch.ndb.mysql.com
161645c81e wl2723 - ndb opt. nr 2006-01-11 11:35:25 +01:00
acurtis@xiphis.org
13a776778c Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code
2005-12-21 10:18:40 -08:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
pappa@c-5608e253.1238-1-64736c10.cust.bredbandsbolaget.se
4282ad92cb Bug #12796: Record lost in HEAP table
Two handler objects were present, one was used for an insert and the other for a select
The state of the statistics was local to the handler object and thus the other handler
object didn't notice the insert.
Fix included:
1) Add a new variable key_stat_version added to whenever statistics was considered in need
of update (previously key_stats_ok= FALSE in those places)
2) Add a new handler variable key_stat_version assigned whenever key_stats_ok= TRUE was set
previously
3) Fix records_in_range to return records if records <= 1
4) Fix records_in_range to add 2 to rec_per_key to ensure we don't specify 0 or 1 when it isn't
and thus invoking incorrect optimisations.
5) Fix unique key handling for HEAP table in records_in_range
2005-11-08 00:26:37 -05:00
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
ramil@ndbmaster.mysql.com
7678149864 WL #528: Faster free_tmp_table 2005-11-06 08:29:03 +01:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
brian@zim.(none)
0ba8ca2a17 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0
2005-10-02 20:13:18 -07:00
brian@zim.(none)
54a958993c Next big patch for loadable storage engines!
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail.
2005-10-02 19:44:28 -07:00
eric@mysql.com
5008a5f208 Move handler specific options into handlerton flag check
BUG#13108
2005-09-30 16:26:48 -07:00
brian@zim.(none)
616c324436 Cleanup for handlerton structure to allow for loadable engine work. This is the first in a series of patches. 2005-09-19 12:06:23 -07:00
jani@a193-229-222-105.elisa-laajakaista.fi
8f10662eab Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1
2005-07-23 00:15:53 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
2657e48c64 Faster alter table code for 5.1. 2005-07-22 23:43:59 +03:00
konstantin@mysql.com
21957c423e Implement MySQL framework to support consistent read views in
cursors. This should fix Bug#11813 when InnoDB part is in 
(tested with a draft patch).
The idea of the patch is that if a storage engine supports
consistent read views, we open one when open a cursor,
set is as the active view when fetch from the cursor, and close
together with cursor close.
2005-07-20 20:02:36 +04:00
konstantin@mysql.com
14344b658a A fix and a test case for Bug#10760 and complementary cleanups.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same 
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.
2005-07-19 22:21:12 +04:00
ingo@mysql.com
1c33fbc4c1 Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
Bug#10568 - Function 'LAST_DAY(date)' does not return NULL for invalid argument.
Manual merge.
2005-06-24 19:47:18 +02:00
ingo@mysql.com
2dcf451b81 Bug#10178 - failure to find a row in heap table by concurrent UPDATEs
Moved the key statistics update to info().
The table is not locked in open(). This made wrong stats possible.

No test case for the test suite.
This happens only with heavy concurrency.
A test script is added to the bug report.
2005-06-24 17:47:09 +02:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +02:00
brian@zim.(none)
efb5ed5bab Merge 2005-06-01 18:48:29 -07:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
brian@zim.(none)
ba9b9f8993 Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina. 2005-06-01 17:34:10 -07:00
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
jimw@mysql.com
80933d9f95 Merge 2005-05-07 08:25:58 -07:00
jimw@mysql.com
ef183de687 Merge mysql.com:/home/jimw/my/mysql-4.1-8497
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-05-07 01:00:24 -07:00
msvensson@neptunus.(none)
c12ee8dc16 BUG#9714 libsupc++ problem
- Remove linking of libsupc++
 - Move all local static variables to filescope
2005-04-27 11:25:08 +02:00
monty@mysql.com
49e721677f Fixed errors descovered by valgrind 2.4
Added suppression file for some valgrind warnings that are not real errors
2005-04-06 17:22:21 +03:00
gluh@gluh.mysql.r18.ru
edb4dd5366 after merge fix 2005-03-17 18:44:24 +03:00
gluh@gluh.mysql.r18.ru
b435d6e862 Merge 4.1 -> 5.0 2005-03-17 16:51:07 +03:00
monty@mysql.com
fde941e5b4 Partly reverty back patch (in heap-auto-increment-key detection) to ensure that auto_key and auto_key_type are calculated the same way 2005-03-16 01:15:45 +02:00
ramil@mysql.com
4ee9cc5a98 after merge fix 2005-03-15 19:43:32 +04:00
ramil@mysql.com
d5e3ba70f3 merging 2005-03-15 19:31:52 +04:00
ramil@mysql.com
46613bafbe A fix (bug #8489: Strange auto_increment behaviour with HEAP table). 2005-03-15 13:32:12 +04:00