Merge revisions 2837:2852 from branches/5.1:
------------------------------------------------------------------------
r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/include/row0mysql.h
M /branches/5.1/row/row0mysql.c
branches/5.1: Return the actual error code encountered when allocating
a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
when we introduced the new AUTOINC locking model.
rb://31
Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors
------------------------------------------------------------------------
r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/handler/ha_innodb.h
branches/5.1: Backport r2724 from branches/zip
Check column value against the col max value before updating the table's
global autoinc counter value. This is part of simplifying the AUTOINC
sub-system. We extract the type info from MySQL data structures at runtime.
This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
------------------------------------------------------------------------
in the fix of Mantis issue #73. With key_block_size=16, we will also
have to check the available space on the uncompressed page.
Otherwise, the clustered index record can be almost 16 kilobytes in
size, and the undo log record will not fit.
column of a compressed table, the BTR_EXTERN_LEN field in the BLOB pointer
will be written as 0. Tolerate this in the functions that deal with
externally stored columns. This fixes Issue #80 and was posted at rb://26.
Note that the clustered index record is always deleted or purged last,
after any secondary index records referring to it have been deleted.
btr_free_externally_stored_field(): On an uncompressed table, zero out
the BTR_EXTERN_LEN, so that half-deleted BLOBs can be detected after
crash recovery.
btr_copy_externally_stored_field_prefix(): Return 0 if the BLOB has been
half-deleted.
row_upd_ext_fetch(): Assert that the externally stored column exists.
row_ext_cache_fill(): Allow btr_copy_externally_stored_field_prefix()
to return 0.
row_sel_sec_rec_is_for_blob(): Return FALSE if the BLOB has been half-deleted.
This is correct, because the clustered index record would have been deleted
or purged last, after any secondary index records referring to it had been
deleted.
and the adaptive hash index. This should fix Issue #95 and Issue #87.
page_zip_copy_recs(): Copy PAGE_MAX_TRX_ID as well, to have similar behavior
to page_copy_rec_list_start() and page_copy_rec_list_end().
btr_root_raise_and_insert(), btr_page_split_and_insert(), btr_lift_page_up():
Update the lock table and the adaptive hash index.
This should hopefully address Issue #85.
ha_innobase::add_index(): Lock the data dictionary before invoking
row_merge_rename_indexes() or row_merge_drop_indexes(), because neither
function will commit the transaction.
ha_innobase::final_drop_index(): Commit the transactions before
unlocking the data dictionary.
row_merge_drop_index(), row_merge_drop_indexes(), row_merge_rename_tables(),
row_merge_rename_indexes(): Note and assert that the data dictionary must
have been exclusively locked by the caller, because the transaction will
not be committed.
row_drop_database_for_mysql(): Commit the transaction immediately after
dropping each table. When MySQL is holding open handles to some tables,
it can otherwise occur than the data dictionary is unlocked while the
transaction has not been committed. This bug was introduced in r2739,
which changed the semantics of row_drop_table_for_mysql().
row_drop_database_for_mysql(): Postpone mem_free(table_name), so that
an error printout will not dereference freed memory.
to the data dictionary records. This should fix Issue #83.
row_drop_table_for_mysql_no_commit(): Rename back to
row_drop_table_for_mysql(). Commit the transaction if the data
dictionary was not locked when the function was called. Otherwise,
neither commit the transaction nor unlock the data dictionary.
row_merge_drop_table(): Let row_drop_table_for_mysql() take care of
locking the data dictionary.
dict_create_or_check_foreign_constraint_tables(),
trx_rollback_active(), row_create_table_for_mysql(),
row_create_index_for_mysql(), row_table_add_foreign_constraints():
Explicitly commit the transaction, because row_drop_table_for_mysql()
would no longer commit it, given that the data dictionary will be
locked during the calls.
Approved by Sunny (over IM). rb://23
ignore intermittent differences in the "predefined minimum record" flag.
page_zip_validate_low(): Renamed from page_zip_validate(), with an
additional parameter: ibool sloppy. Ignore REC_INFO_MIN_REC_FLAG when
sloppy == TRUE.
page_zip_validate(): Wrapper for page_zip_validate_low(). Pass
sloppy = recv_recovery_is_on().
recv_recover_page(): After applying the changes from the redo log to a
compressed B-tree page, invoke page_zip_validate_low() in strict mode.
non-determinism related to reading the table's autoinc value for the first
time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
bytes because we don't need the dict_table_t::autoinc_inited field anymore.
This also fixes Bug#39830 Table autoinc value not updated on first insert.
rb://16
------------------------------------------------------------------------
r2702 | sunny | 2008-09-30 11:41:56 +0300 (Tue, 30 Sep 2008) | 13 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1: Since handler::get_auto_increment() doesn't allow us
to return the cause of failure we have to inform MySQL using the
sql_print_warning() function to return the cause for autoinc failure.
Previously we simply printed the error code, this patch prints the
text string representing the following two error codes:
DB_LOCK_WAIT_TIMEOUT
DB_DEADLOCK.
Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
Approved by Marko.
------------------------------------------------------------------------
r2709 | vasil | 2008-10-01 10:13:13 +0300 (Wed, 01 Oct 2008) | 10 lines
Changed paths:
M /branches/5.1/include/lock0lock.h
M /branches/5.1/lock/lock0lock.c
A /branches/5.1/mysql-test/innodb_bug38231.result
A /branches/5.1/mysql-test/innodb_bug38231.test
M /branches/5.1/row/row0mysql.c
branches/5.1:
Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
In TRUNCATE TABLE and discard tablespace: do not remove table-level S
and X locks and do not assert on such locks not being wait locks.
Leave such locks alone.
Approved by: Heikki (rb://14)
------------------------------------------------------------------------
r2710 | vasil | 2008-10-01 14:13:58 +0300 (Wed, 01 Oct 2008) | 6 lines
Changed paths:
M /branches/5.1/include/sync0sync.ic
branches/5.1:
Silence a compilation warning in UNIV_DEBUG.
Approved by: Marko (via IM)
------------------------------------------------------------------------
r2719 | vasil | 2008-10-03 18:17:28 +0300 (Fri, 03 Oct 2008) | 49 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
A /branches/5.1/mysql-test/innodb_bug39438-master.opt
A /branches/5.1/mysql-test/innodb_bug39438.result
A /branches/5.1/mysql-test/innodb_bug39438.test
branches/5.1:
Fix Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
In ha_innobase::info() - do not try to get the free space for a tablespace
which has been discarded with ALTER TABLE ... DISCARD TABLESPACE or if the
.ibd file is missing for some other reason.
ibd_file_missing and tablespace_discarded are manipulated only in
row_discard_tablespace_for_mysql() and in row_import_tablespace_for_mysql()
and the manipulation is protected/surrounded by
row_mysql_lock_data_dictionary()/row_mysql_unlock_data_dictionary() thus we
do the same in ha_innobase::info() when checking the values of those members
to avoid race conditions. I have tested the code-path with UNIV_DEBUG and
UNIV_SYNC_DEBUG.
Looks like it is not possible to avoid mysqld printing warnings in the
mysql-test case and thus this test innodb_bug39438 must be added to the
list of exceptional test cases that are allowed to print warnings. For this,
the following patch must be applied to the mysql source tree:
--- cut ---
=== modified file 'mysql-test/lib/mtr_report.pl'
--- mysql-test/lib/mtr_report.pl 2008-08-12 10:26:23 +0000
+++ mysql-test/lib/mtr_report.pl 2008-10-01 11:57:41 +0000
@@ -412,7 +412,10 @@
# When trying to set lower_case_table_names = 2
# on a case sensitive file system. Bug#37402.
- /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./
+ /lower_case_table_names was set to 2, even though your the file system '.*' is case sensitive. Now setting lower_case_table_names to 0 to avoid future problems./ or
+
+ # this test is expected to print warnings
+ ($testname eq 'main.innodb_bug39438')
)
{
next; # Skip these lines
--- cut ---
The mysql-test is currently somewhat disabled (see inside
innodb_bug39438.test), after the above patch has been applied to the mysql
source tree, the test can be enabled.
rb://20
Reviewed by: Inaam, Calvin
Approved by: Heikki
------------------------------------------------------------------------
r2720 | vasil | 2008-10-03 19:52:39 +0300 (Fri, 03 Oct 2008) | 8 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1:
Print a warning if an attempt is made to get the free space for a table
whose .ibd file is missing or the tablespace has been discarded. This is a
followup to r2719.
Suggested by: Inaam
------------------------------------------------------------------------
r2721 | sunny | 2008-10-04 02:08:23 +0300 (Sat, 04 Oct 2008) | 6 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1: We need to send the messages to the client because
handler::get_auto_increment() doesn't allow a way to return the
specific error for why it failed.
rb://18
------------------------------------------------------------------------
r2722 | sunny | 2008-10-04 02:48:04 +0300 (Sat, 04 Oct 2008) | 18 lines
Changed paths:
M /branches/5.1/dict/dict0mem.c
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/include/dict0mem.h
M /branches/5.1/include/row0mysql.h
M /branches/5.1/mysql-test/innodb-autoinc.result
M /branches/5.1/mysql-test/innodb-autoinc.test
M /branches/5.1/row/row0mysql.c
branches/5.1: This bug has always existed but was masked by other errors. The
fix for bug# 38839 triggered this bug. When the offset and increment are > 1
we need to calculate the next value taking into consideration the two
variables. Previously we simply assumed they were 1 particularly offset was
never used. MySQL does its own calculation and that's probably why it seemed
to work in the past. We would return what we thought was the correct next
value and then MySQL would recalculate the actual value from that and return
it to the caller (e.g., handler::write_row()). Several new tests have been
added that try and catch some edge cases. The tests exposed a wrap around
error in MySQL next value calculation which was filed as bug#39828. The tests
will need to be updated once MySQL fix that bug.
One good side effect of this fix is that dict_table_t size has been
reduced by 8 bytes because we have moved the autoinc_increment field to
the row_prebuilt_t structure. See review-board for a detailed discussion.
rb://3
------------------------------------------------------------------------
(Bug #36285, rb://9).
innodb-index.test, innodb-index.result: Set innodb_lock_wait_timeout as
a session variable instead of relying on the global value.
innodb-index-master.opt: Remove.
innodb-timeout.test: Test that setting the innodb_lock_wait_timeout
works as advertised.
thd_lock_wait_timeout(): New function, to retrieve the lock wait timeout
for a given MySQL client connection (thd), or the global value (thd==NULL).
srv_lock_wait_timeout, innobase_lock_wait_timeout: Remove.
Replace MYSQL_SYSVAR_LONG(lock_wait_timeout)
with MYSQL_THDVAR_ULONG(lock_wait_timeout).
in r2631. Include the node pointer field in the size calculation.
rec_get_converted_size_comp_prefix(): New function, to compute the storage
size of the prefix of an ordinary record in COMPACT format.
rec_get_converted_size_comp(): Use rec_get_converted_size_comp_prefix().
buf_block_dbg_add_level(block, level): Define as an empty macro when
UNIV_SYNC_DEBUG is not defined. Remove #ifdef UNIV_SYNC_DEBUG around
all invocations.
the maximum record size will never exceed the B-tree page size limit.
For uncompressed tables, there should always be enough space for two
records in an empty B-tree page. For compressed tables, there should
be enough space for storing two node pointer records or one data
record in an empty page in uncompressed format.
dict_build_table_def_step(): Remove the inaccurate check for table row
size.
dict_index_too_big_for_tree(): New function: check if the index
records would be too big for a B-tree page.
dict_index_add_to_cache(): Add the parameter "strict". Invoke
dict_index_too_big_for_tree() if it is set.
trx_is_strict(), thd_is_strict(): New functions, for determining if
innodb_strict_mode is enabled for the current transaction.
dict_create_index_step(): Pass the new parameter strict of
dict_index_add_to_cache() as trx_is_strict(trx). All other callers
pass it as FALSE.
innodb.test: Enable innodb_strict_mode before attempting to create a
table with a too big record size.
innodb-zip.test: Remove the test of inserting random data. Add tests
for checking that the maximum record lengths are enforced at table
creation time.
Add the parameter struct charset_info_st* cs, so that the call
thd_charset(current_thd) can be avoided. The macro current_thd has no
defined value in the Windows plugin.
there will always be enough space for two node pointer records in an
empty B-tree page. This was reported as Mantis issue #73.
page_zip_rec_needs_ext(): Add the parameter n_fields, for accurate
estimation of the compressed size of the data dictionary information.
Given that this function is only invoked for records on leaf pages,
require that there be enough space for one record in the compressed
page. We check elsewhere that there will be enough room for two node
pointer records on higher-level pages.
btr_cur_optimistic_insert(): Ensure that there will be enough room for
two node pointer records on an empty non-leaf page. The rule for
leaf-page records will be enforced by the callers of
page_zip_rec_needs_ext().
btr_cur_pessimistic_insert(): Remove the insufficient check that the
leaf page record should be compressible by itself. Instead, now we
require that two node pointer records fit on a non-leaf page, and one
record will fit in uncompressed form on the leaf page.
page_zip_write_header(), page_zip_write_rec(): Re-enable the debug
assertions that were violated by the insufficient check in
btr_cur_pessimistic_insert().
innodb_bug36172.test: Use a larger compressed page size.
btr_search_drop_page_hash_index(): Add const qualifiers to the local
variables page, rec, and index, to ensure that they are not modified
by this function.
page_get_infimum_offset(), page_get_supremum_offset(): New functions.
page_get_infimum_rec(), page_get_supremum_rec(): Replaced by
const-preserving macros that invoke the accessor functions.
foreign key constraint, find a truly equivalent index for it.
If none is available, refuse to drop the index. MySQL can drop
an index when creating a "stronger" index.
This was reported as Mantis issue #70 and MySQL Bug #38786.
innodb-index.test: Add a test case.
dict_foreign_find_equiv_index(): New function, to replace the
incorrectly written function dict_table_find_equivalent_index().
dict_table_replace_index_in_foreign_list(): Simplify the implementation.
Merge 2537:2605 from branches/5.1:
------------------------------------------------------------------------
r2545 | vasil | 2008-07-25 17:24:23 +0300 (Fri, 25 Jul 2008) | 37 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1:
Fix Bug#38185 ha_innobase::info can hold locks even when called with HA_STATUS_NO_LOCK
The fix is to call fsp_get_available_space_in_free_extents() from
ha_innobase::info() only if HA_STATUS_NO_LOCK is not present in the flag
*AND*
change get_schema_tables_record() in MySQL's sql/sql_show.cc to call
::info() *without* HA_STATUS_NO_LOCK whenever a user issues SELECT FROM
information_schema.tables;
Without the change to sql/sql_show.cc this patch would lead to Bug#32440
resurfacing. I.e. delete_length would never be updated in ::info() and
will remain 0 forever, resulting in the free space not being shown
anywhere.
This is the change to sql/sql_show.cc for reference, it needs to be
committed to the MySQL repo before or at the same time with this change
to ha_innodb.cc:
--- patch begins here ---
--- sql/sql_show.cc.orig 2008-07-23 09:32:14.000000000 +0300
+++ sql/sql_show.cc 2008-07-23 09:32:19.000000000 +0300
@@ -3549,8 +3549,7 @@ static int get_schema_tables_record(THD
if(file)
{
- file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_AUTO |
- HA_STATUS_NO_LOCK);
+ file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_AUTO);
enum row_type row_type = file->get_row_type();
switch (row_type) {
case ROW_TYPE_NOT_USED:
--- patch ends here ---
Approved by: Heikki
------------------------------------------------------------------------
r2603 | marko | 2008-08-21 16:25:05 +0300 (Thu, 21 Aug 2008) | 10 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/include/ha_prototypes.h
M /branches/5.1/row/row0sel.c
branches/5.1: Identify SELECT statements by thd_sql_command() == SQLCOM_SELECT
instead of parsing the query string. This fixes MySQL Bug #37885 without
us having to implement lexical analysis of SQL comments in yet another place.
thd_is_select(): A new predicate.
row_search_for_mysql(): Use thd_is_select().
Approved by Heikki.
------------------------------------------------------------------------
dict_table_get_referenced_constraint(), dict_table_get_foreign_constraint():
Simplify the iteration loop.
dict_table_find_equivalent_index(): Correct the function comment.
cache, especially buf_pool->LRU_old and bpage->old.
buf_LRU_old_adjust_len(), buf_LRU_remove_block(): Check that blocks in
buf_pool->LRU_old have the "old" flag set and the blocks preceding
buf_pool->LRU_old have the "old" flag clear.
buf_LRU_add_block_low(), buf_relocate(): Check that buf_pool->LRU_old
is the first block in the LRU list whose "old" flag is set.
buf_LRU_free_block(): When replacing a control block in the LRU list
with a control block for a compressed page, assert that the "old"
flags in the neighboring LRU list entries grow monotonically.
buf_page_set_old(): Assert that the "old" flags in the neighboring LRU
list entries grow monotonically.
buf_pool->LRU_old_len. However, we forgot to check if buf_pool->LRU_old
happens to point to b's successor in the LRU list. If it does, we must
assign buf_pool->LRU_old = b. The following invariants hold:
In the LRU list, the "old" flag should grow monotonically, i.e., it is 0
for the first few items and 1 from thereafter.
If buf_pool->LRU_old != NULL, it must point to the first item with old=1
in the LRU list, and there must be buf_pool->LRU_old_len old items in the list.
This should fix Mantis issue#50 and issue#68.
The cardinality of every index (the number of different key values) is
calculated when the table is opened, at SHOW TABLE STATUS,
ANALYZE TABLE and on other circumstances (like when the table has
changed too much). Note that if the mysql client is running with the
auto-rehash setting turned on (default) this causes all tables to be
opened when it starts.
Previously InnoDB sampled 8 random pages from the index to get an
estimate of the cardinality. Now the number of sampled pages can be
changed via the global parameter innodb_stats_sample_pages which can
be tuned at runtime. The default value for this parameter is 8.
If the value of this parameter is changed, there may be serious problems:
- small values (say, 1) can cause an error in table stats;
- values much larger than 8 (say, 100), can cause a big slowdown in
table opening time, SHOW TABLE status, etc.
- query plans may be different from the old ones.
Approved by: Heikki
recovery, tolerate clustered index records whose externally stored
columns have not been written. This should remove the assertion failures
that were reported as Mantis issue#58, issue#62, issue#64.
trx_is_recv(): New function: TRUE if this transaction is rolling back
an incomplete transaction in crash recovery.
enum trx_rbmode: Rollback modes: no rollback, normal rollback, crash recovery.
btr_cur_pessimistic_delete(), btr_free_externally_stored_field(),
btr_rec_free_externally_stored_fields():
Replace the ibool parameter with enum trx_rbmode.
btr_free_externally_stored_field(): If field_ref is zero, return
but assert ut_a(rbmode == RB_RECOVERY). Unless InnoDB has crashed
while inserting a clustered index record, field_ref should not be zero.
btr_rec_free_updated_extern_fields(): Add the parameter enum trx_rbmode.
btr_cur_pessimistic_update(): Pass the rbmode parameter to
btr_rec_free_updated_extern_fields().
row_undo_ins(), row_undo_mod_upd_del_sec(): If row_build_index_entry()
fails, assert trx_is_recv() and skip this secondary index.
row_undo_mod_upd_del_sec(): Empty the heap at the end of each loop
iteration in order to conserve memory and to reduce the number of
low-level memory allocations.
buf_block_align() on a non-file page frame that was created in
btr_cur_pessimistic_insert(), to see if a record fits on a compressed
page by itself. These assertions caused an assertion failure in
buf_block_align() in innodb_bug36172.test.
page_zip_write_rec(), page_zip_write_header(): Remove the assertion
that calls buf_frame_get_page_zip().
This fix makes two basic changes in blob handling:
(The bug was introduced in r2252)
1) The blob prefixes are no longer stored in the undo if
a) We are modifying a delete marked record and
b) The record was delete marked by an already committed trx.
2) When building old row version to check if one of these versions
can hold an implicit lock on the record we stop our probe if
a) The version is delete marked and
b) The delete marking is done by a trx which is different from
the current active trx on the record.
Reviewed by: Heikki
------------------------------------------------------------------------
r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
branches/5.1 issue# 4
Fixed a timing hole where a thread dropping an index can free the
in-memory index struct while another thread is still using
that structure to remove entries from adaptive hash index belonging
to one of the pages that belongs to the index being dropped.
The fix is to have a reference counter in the index struct and to
wait for this counter to drop to zero beforing freeing the struct.
Reviewed by: Heikki
------------------------------------------------------------------------
This is to fix an unintended side effect of file_format_check changes.
We were reading the trx system page (TRX_SYS_PAGE_NO) before starting
recovery and that resulted in redo logs not being applied to the page.
The fix is to force a reread by calling buf_pool_invalidate().
This, however, made necessary that any writes to page are deferred to
until after the redo log application.
Reviewed by: Sunny
(r2478 was skipped for the obvious reason)
------------------------------------------------------------------------
r2464 | vasil | 2008-05-19 17:59:42 +0300 (Mon, 19 May 2008) | 9 lines
branches/5.1:
Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
by removing the Innodb_buffer_pool_pages_latched variable from
SHOW STATUS output in non-UNIV_DEBUG compilation.
Approved by: Heikki
------------------------------------------------------------------------
r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
branches/5.1:
Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
link hack
The crash was due to un-handled error 3 (path not found). In the case
of file per table, change the call to os_file_handle_error_no_exit()
from os_file_handle_error(). Also, checks for full path pattern during
table create (Windows only), which is used in symbolic link and temp
table creation.
Approved by: Heikki
------------------------------------------------------------------------
r2478 | sunny | 2008-05-23 08:29:08 +0300 (Fri, 23 May 2008) | 3 lines
branches/5.1: Fix for bug# 36793. This is a back port from branches/zip. This
code has been tested on a big-endian machine too.
------------------------------------------------------------------------
r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
branches/5.1:
Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
by retrying gettimeofday() several times if it fails in ut_usectime().
If it fails on all calls then return error to the caller to be handled
at higher level.
Update the variable innodb_row_lock_time_max in SHOW STATUS output only
if ut_usectime() was successful.
------------------------------------------------------------------------
r2482 | sunny | 2008-05-28 12:18:35 +0300 (Wed, 28 May 2008) | 5 lines
branches/5.1: Fix for Bug#35602, "Failed to read auto-increment value from
storage engine". The test for REPLACE was an error of ommission since it's
classified as a simple INSERT. For REPLACE statements we don't acquire
the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
------------------------------------------------------------------------
r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
branches/5.1:
Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
Discussed with: Sunny (via IM)
------------------------------------------------------------------------
Implement the system tablespace tagging described on the wiki:
https://svn.innodb.com/innobase/InnoDB_version_and_feature_compatibility
A brief description of the changes:
* The file format tag will be saved in the trx system page, starting at
(UNIV_PAGE_SIZE - 16) for 8 bytes.
* The configuration parameter innodb_file_format_check is introduced.
This variable can be set to on/off and any of the supported file
formats in the configuration file, but can only be set to any of
the supported file formats during runtime. The default is on.
* During table create/open, check the current file format against
the max in file_format_max. If the current file format is newer,
update file_format_max and tag the system tablespace with the
newer one in a normal mtr.
* During startup, write the tag to the error log and check it against
DICT_TF_FORMAT_MAX. Refuse to start with error, if
-- DICT_TF_FORMAT_MAX < the tag, and
-- innodb_file_format_check is ON
Print out a warning , if
-- DICT_TF_FORMAT_MAX < the tag, but
-- innodb_file_format_check is off
* The system tablespace tag is re-settable using:
set innodb_file_format_check = <file_format>
Approved by: Sunny
Add InnoDB version in these places:
* In INFORMATION_SCHEMA.PLUGINS.PLUGIN_VERSION, only 1.2 out of 1.2.3
because MySQL supports only one dot there
* At startup:
"080501 12:28:06 InnoDB Plugin 1.0.1 started; log sequence number 46509"
* In a server variable innodb_version;
mysql> select @@innodb_version;
+------------------+
| @@innodb_version |
+------------------+
| 1.0.1 |
+------------------+
Approved by: Sunny
Fix Mantis issue#34 https://svn.innodb.com/mantis/view.php?id=34
"I_S plugins should refuse to load if the storage engine plugin is not loaded"
and MySQL Bug#36310 http://bugs.mysql.com/36310
"InnoDB plugin crash"
* Make srv_was_started public
* Set srv_was_started at the end of innobase_start_or_create_for_mysql()
so it is not set to TRUE if innodb encounters some startup error
* Refuse to start any of the I_S plugins if srv_was_started is not TRUE
Approved by: Heikki
INNODB_COMPRESSION_BUDDY and INNODB_COMPRESSION_BUDDY_RESET.
buf_buddy_stat_struct, buf_buddy_stat_t, buf_buddy_stat[]:
Statistics of the buddy system grouped by block size.
i_s_innodb_compression_buddy, i_s_innodb_compression_buddy_reset:
New INFORMATION_SCHEMA plugins.
i_s_compression_buddy_fields_info[]: Define the fields:
size, used, free, relocated, relocated_sec.
i_s_compression_buddy_fill_low(), i_s_compression_buddy_fill(),
i_s_compression_buddy_reset_fill(): Fill the fields.
i_s_compression_buddy_init(), i_s_compression_buddy_reset_init():
Initialize the tables.