Commit graph

3670 commits

Author SHA1 Message Date
Georgi Kodinov
afe532317a merge 2011-01-10 15:08:33 +02:00
Vasil Dimov
2d32d7c9a9 Increment InnoDB Plugin version from 1.0.14 to 1.0.15.
InnoDB Plugin 1.0.14 has been released with MySQL 5.1.54.
2011-01-08 16:51:19 +02:00
Vasil Dimov
c4aee1b45a Followup to vasil.dimov@oracle.com-20110107091222-q23qpb5skev0j9gc
Do not use nested AC_CHECK_FUNC() because they result in:

./configure: line 52688: syntax error: unexpected end of file

(which happens only on some platforms and does not happen on others,
I have no idea what is the reason for this)
2011-01-07 16:52:44 +02:00
Georgi Kodinov
666d84c006 automerge 2011-01-07 15:30:42 +02:00
Vasil Dimov
d8a01ff5b7 Merge mysql-5.1 -> mysql-5.1-innodb 2011-01-07 13:46:21 +02:00
Vasil Dimov
05231aeef0 Fix Bug#59327 Fix autoconf usage for innodb_plugin
AC_CHECK_FUNCS(f1 f2 f3, ACTION_IF_PRESENT)
ACTION_IF_PRESENT is executed if any of f1, f2 or f3 is present.
Fix this misusage, we want the action to be executed if all of the
functions are present.
2011-01-07 11:12:22 +02:00
Jimmy Yang
cd47d29d7a Backport Bug #58643 InnoDB: too long table name. Also fix Bug #59312 examine
MAX_FULL_NAME_LEN in InnoDB to address possible insufficient name buffer

Bug #59312 Approved by Sunny Bains
2011-01-06 23:45:59 -08:00
Jimmy Yang
25d285ce9c Fix Bug #55397 cannot select from innodb_trx when trx_query contains blobs
that aren't strings

rb://560 approved by Sunny Bains
2011-01-06 19:36:20 -08:00
Vasil Dimov
00cbd03fd8 (InnoDB Plugin) Fix Bug#59303 Correct URL in crash message
old URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
new URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

Notice that there is a redirect from the old URL to the new URL, so visiting
the old URL does not give "page not found" error.
2011-01-06 09:12:53 +02:00
Vasil Dimov
b9f2234890 (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message
old URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
new URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

Notice that there is a redirect from the old URL to the new URL, so visiting
the old URL does not give "page not found" error.
2011-01-06 09:05:45 +02:00
Jimmy Yang
7a9120a119 Fix Bug #59197 double quote in field comment prevents foreign key
constraint creation

rb://557 Approved by Sunny Bains
2011-01-04 22:44:12 -08:00
Jimmy Yang
0f412ffb59 Fix Bug #59157 valgrind conditional jump warning from dict_load_foreign.
This is 5.1 built-in specific as the dict_table_t strcture is allocated
with mem_heap_zalloc since 5.1 plugin.

Approved by Sunny Bains
2011-01-04 22:31:46 -08:00
Kent Boortz
920d185fd8 Merge 2010-12-29 00:47:05 +01:00
Calvin Sun
ac326735a7 Fix a build error on Windows, introduced by revision-id:
marko.makela@oracle.com-20101221112722-1yxxzzgqtem8bcm7

The fix was suggested by Jimmy.
2010-12-27 22:55:49 -06:00
Marko Mäkelä
91df7abd36 Bug #55284 Double BLOB free due to lock wait while updating PRIMARY KEY
This bug fix requires that Bug #58912 be fixed as well (bzr revision id
marko.makela@oracle.com-20101221093919-mcmmgd4zpse9567d). Otherwise,
another double BLOB free could occur when InnoDB would try to perform
an update-in-place as delete-and-insert-by-update-in-place.

row_upd_clust_rec_by_insert(): Do not disown the externally stored
columns from the old record (btr_cur_mark_extern_inherited_fields())
until after checking the foreign key constraints and successfully
inserting the updated record. If a lock wait timeout occurs between
the delete-marking of the old record and the insertion of the updated
record, mark the columns inherited before retrying the insert.
Distinguish the state UPD_NODE_INSERT_BLOB from
UPD_NODE_INSERT_CLUSTERED.

btr_cur_del_mark_set_clust_rec(): Replace the cursor with
block,rec,index,offsets so that the offsets need not be recalculated.
Assert that rec is on a clustered index leaf page.

btr_cur_disown_inherited_fields(): Renamed from
btr_cur_mark_extern_inherited_fields(). Use
upd_get_field_by_field_no(). Assert that there are externally stored
columns. Assert that a mini-transaction is passed. Remove the return
status. (The only caller, row_upd_clust_rec_by_insert(), will have
determined that some fields have changed ownership.)

btr_cur_mark_dtuple_inherited_extern(): Rename to
row_upd_clust_rec_by_insert_inherit_func() and declare as static. Add
the debug parameters rec, offsets. When rec is given, assert that the
off-page columns match those in the inesrt tuple and that the off-page
columns are owned by the record. Assert that the non-updated off-page
columns in the insert tuple are owned, and mark them inherited.

row_upd_clust_rec_by_insert_inherit(): A wrapper macro for
row_upd_clust_rec_by_insert_inherit_func().

row_undo_mod_upd_exist_sec(): Adjust a comment about
row_upd_clust_rec_by_insert().

rb:508 approved by Jimmy Yang
2010-12-21 13:27:22 +02:00
Marko Mäkelä
2317da0d00 Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefix indexes
row_upd_changes_ord_field_binary(): Do not return TRUE if the update
vector changes a column that is covered by a prefix index, but does
not change the column prefix. Add the row_ext_t parameter for
determining whether the prefixes of externally stored columns match.

dfield_datas_are_binary_equal(): Add the parameter len, for comparing
column prefixes when len > 0.

innodb.test: Add a test case where the patch of Bug #55284 failed
without this fix.

rb:537 approved by Jimmy Yang
2010-12-21 11:39:19 +02:00
Georgi Kodinov
c8853ae5e5 merge 2010-12-17 15:05:50 +02:00
Vasil Dimov
204af03033 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-12-12 11:21:17 +02:00
Jimmy Yang
ee321e803b Fix Bug #57600 output of I/O sum[%lu] can go negative
rb://532 approved by Sunny Bains
2010-12-09 01:19:46 -08:00
Dmitry Shulga
dfb622726a Fixed bug#54486 - assert in my_seek, concurrent
DROP/CREATE SCHEMA, CREATE TABLE, REPAIR.

The cause of assert was concurrent execution of
DROP DATABASE and REPAIR TABLE where first statement
deleted table's file .TMD at the same time as
REPAIR TABLE tried to read file details from the old file
that was just removed.

Additionally was fixed trouble when DROP TABLE try delete
all files belong to table being dropped at the same time
when REPAIR TABLE statement has just deleted .TMD file.

No regression test added because this would require adding a
sync point to mysys/my_redel.c. Since this bug is not present in
5.5+, adding test coverage was considered unnecessary.
The patch has been verified using RQG testing.
2010-12-10 13:48:50 +06:00
Ramil Kalimullin
cc1288349f Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
my_seek() and my_tell() functions now honour MY_WME flag.
2010-12-09 12:59:12 +03:00
Marko Mäkelä
55a12f888a Bug#58623: Bogus debug assertion failure in i_s_locks_row_validate()
This bogus assertion was introduced in the fix of Bug #57802:
Empty ASSERTION parameter passed to the HASH_SEARCH macro.
2010-12-01 10:03:53 +02:00
kevin.lewis@oracle.com
03d1576b60 RB://518 approved by Jimmy Yang and Sunny bains
Code cleanup after changes for Bug 56628.  The general approach for 
InnoDB is to make a reference to each enum value whenever it is used in a
switch statement.  In addition, no default case should be used for switch 
statements on enum types.  This assures that if there is ever any change 
in the enum values, the switch will need to change to reflect it since a 
compiler warning will occur.  In this case, the enum row_type is declared 
in handler.h and could be changed for another storage engine.  If so, a 
warning will occur in the InnoDB build.  

Other changes;
* This patch uses 2 macros to help consolidate warning messages that
   need to occur twice in the single switch for row_format.
* Using row_format as the variable name to distinguish it from the enum
  type.
* Function declaration format correction.
2010-11-30 10:03:55 -06:00
Sunny Bains
9a0a5a9d0b Fix Bug# 56228 - Dropping tables from within an active statement crashes server
InnoDB AUTOINC code expects the locks to be released in strict reverse order
at the end of the statement. However, nested stored proedures and partition
tables break this rule. We now allow the locks to be deleted from the
trx->autoinc_locks vector in any order but optimise for the common (old) case.

rb://441 Approved by Marko Makela
2010-11-30 20:11:26 +11:00
Vasil Dimov
6d315aa4f8 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-11-29 09:07:11 +02:00
Georgi Kodinov
c5987223db merge 2010-11-26 14:51:48 +02:00
Vasil Dimov
951244c650 Bug#47350 Support innodb plugin without separate shared object
Add a _commented_ workaround for Bug#47350. The full solution is tricky
to get right as explained in the bug report. It is not worth the effort
to extend the deprecated autotools framework to support conflicting
plugins and would be too risky for MySQL 5.1 (GA).
2010-11-25 08:55:47 +02:00
Sunny Bains
239ca6006b Fix bug# 18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
OPTIMIZE TABLE recreates the whole table. That is why the counter gets reset.
Making the next autoinc column persistent is a separate issue from resetting
the value after an OPTIMIZE TABLE. We already have a check for ALTER TABLE
and CREATE INDEX to preserve the value on table recreate. We should be able to
add an additional check for OPTIMIZE TABLE to preserve the next value.

rb://519 Approved by Jimmy Yang.
2010-11-24 14:07:43 +11:00
Ramil Kalimullin
0628752fe9 Manual-merge from mysql-5.1-bugteam. 2010-11-22 12:21:10 +03:00
Vasil Dimov
3ff58881bd Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-11-18 15:45:36 +02:00
Ramil Kalimullin
7a4708cfd7 Auto-merge from mysql-5.1-bugteam. 2010-11-18 13:40:57 +03:00
Marko Mäkelä
defbc95a40 Fix a debug assertion failure in the Bug#57802 fix.
thr_local_create(): Initialize local->slot_no to ULINT_UNDEFINED.
thr_local_validate(): Allow local->slot_no to be ULINT_UNDEFINED.
2010-11-11 15:12:39 +02:00
Vasil Dimov
1c827fa9d2 Remove unused parameter has_dict_mutex of dict_update_statistics_low()
Also delete dict_update_statistics() and rename dict_update_statistics_low()
to dict_update_statistics() because the only thing that distinguished those
two functions was the removed parameter.
2010-11-11 13:11:52 +02:00
Marko Mäkelä
0c2b495189 Bug#57802 Empty ASSERTION parameter passed to the HASH_SEARCH macro
thr_local_validate(), i_s_locks_row_validate(): New validate
functions, used in UNIV_DEBUG code for checking the state of internal
memory structures.
2010-11-11 11:55:35 +02:00
Marko Mäkelä
34eba1fa24 Declarations and code do not mix in C90, not even within UNIV_DEBUG. 2010-11-11 11:39:09 +02:00
Jimmy Yang
8b7eaab37d Fix Bug #48026 Log start and end of InnoDB buffer pool initialization
to the error log

rb://513 approved by Sunny Bains
2010-11-10 21:32:12 -08:00
Jimmy Yang
f5c5d23a20 Port fix for Bug #48026 to 5.1 built-in and plugin: Log start and end
of InnoDB buffer pool initialization to the error log
2010-11-10 21:27:10 -08:00
Davi Arnaut
80246ac8b8 Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure
Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c
Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c
Bug#57994: Compiler flag change build error : my_redel.c
Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c
Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c
Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc

Fix assorted compiler generated warnings.
2010-11-10 19:14:47 -02:00
Sergey Vojtovich
8428d2116e BUG#58079 - Remove the IBM DB2 storage engine 2010-11-11 13:03:17 +03:00
Vasil Dimov
5c2d2b576f Merge mysql-5.1-innodb from bk-internal into my local repo 2010-11-10 10:40:22 +02:00
Vasil Dimov
f97201dcb9 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-11-08 16:46:26 +02:00
Marko Mäkelä
7b0f7a4374 row_ins_index_entry(): Note that only CREATE INDEX sets foreign=FALSE. 2010-11-04 15:12:15 +02:00
Sunny Bains
2a36ae5d59 Add change log entry for bug#54538 fix. 2010-11-04 09:41:36 +11:00
Georgi Kodinov
7e2fa49edf merge 2010-11-03 16:09:17 +02:00
Marko Mäkelä
bf770f3615 rw_lock_debug_print(): Output the thread ID in unsigned format. 2010-11-03 14:38:36 +02:00
Vasil Dimov
add4af2959 Add ChangeLog entry for Bug#53046 2010-11-03 11:30:08 +02:00
Marko Mäkelä
88a7d55f6b Bug#57947 InnoDB diagnostics shows btr_block_get calls instead of real callers
Improve the diagnostics of buffer pool accesses for B-trees,
so that the file names and line numbers of the real calls are shown
instead of the line of the buf_page_get() call in btr_block_get().

btr_page_get(): Replaced with a macro.

btr_block_get_func(): Renamed from btr_block_get(). Add file, line.

btr_block_get(): A macro that passes the __FILE__, __LINE__ to
btr_block_get_func().

dict_truncate_index_tree(): Replace a btr_page_get() call
with btr_block_get(), since we are only latching the page, not accessing it.
2010-11-03 11:19:12 +02:00
Marko Mäkelä
20ca82fad9 Non-functional change: Remove bogus const qualifiers
and make some function comments more accurate.
2010-11-03 11:16:11 +02:00
Sunny Bains
cb2d2ab1fb Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance.
This patch doesn't get rid of the need to acquire the dict_sys->mutex but
reduces the need to keep the mutex locked for the duration of the query
to fsp_get_available_space_in_free_extents() from ha_innobase::info().
 
This is a port of revno:3548 from the builtin to the plugin.

rb://501 Approved by Jimmy Yang and Marko Makela.
2010-11-03 12:40:53 +11:00
kevin.lewis@oracle.com
585379214d In this patch, existing tests innodb_bug54679.test and innodb_bug56632.test are
removed and replaced by the comprehensive innodb-create-options.test.
It uses the rules listed in the comments at the top of that test.
  
This patch introduces these differences from previous behavior;
1)  KEY_BLOCK_SIZE=0 is allowed by Innodb in both strict and non-strict mode
with no errors or warnings. It was previously used by the server to set 
KEY_BLOCK_SIZE to undefined.  (Bug#56628)
2)  An explicit valid non-DEFAULT ROW_FORMAT always takes priority over a
valid KEY_BLOCK_SIZE. (bug#56632)
3)  Automatic use of COMPRESSED row format is only done if the ROW_FORMAT
is DEFAULT or unspecified.
4)  ROW_FORMAT=FIXED is prevented in strict mode.

This patch also includes various formatting changes for consistency with
InnoDB coding standards.

Related Bugs
Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error
Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED
2010-11-02 17:28:34 -05:00