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
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.
sql/sql_db.cc:
mysql_rm_known_files() modified: ignore possible ENOENT error
when trying delete all table's files. Such aggressive
algorithm permits skip already deleted (in another thread)
files.
Installation of Drop_table_error_handler as internal error handler
moved from mysql_rm_db() to mysql_rm_knowns_files() near to place
where source of possible errors (call to mysql_rm_table_part2) located.
storage/myisam/mi_check.c:
mi_repair() was modified: set param->retry_repair= 0
in order to don't call following failover procedure
in ha_myisam::repair().
my_seek() and my_tell() functions now honour MY_WME flag.
include/mysys_err.h:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/errors.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- EE_CANT_SEEK added, used in my_seek() and my_tell() functions.
mysys/my_seek.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- my_seek() and my_tell() handle MY_WME flag.
mysys/my_symlink.c:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- __attribute__((unused)) removed, as myf MyFlags is
actually used in the my_realpath() function.
storage/myisam/ha_myisam.cc:
Fix for bug#48451: my_seek and my_tell ignore MY_WME flag
- check my_seek() result.
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.
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
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).
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.
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.
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.
cmd-line-utils/readline/bind.c:
Bug#57996: Compiler flag change build error on OSX 10.5 : bind.c
Initialize variable to work around a false positive warning.
include/m_string.h:
Bug#57994: Compiler flag change build error : my_redel.c
The expansion of stpcpy (in glibc) causes warnings if the
return value of strmov is not being used. Since stpcpy is
a GNU extension and the expansion ends up using a built-in
provided by GCC, use the compiler provided built-in directly
when possible.
include/my_compiler.h:
Define a dummy MY_GNUC_PREREQ when not compiling with GCC.
libmysql/libmysql.c:
Bug#58057: 5.1 libmysql/libmysql.c unused variable/compile failure
Variable might not be used in some cases. So, tag it as unused.
mysys/mf_keycache.c:
Bug#57992: Compiler flag change build error on FreeBsd : mf_keycache.c
Use UNINIT_VAR to work around a false positive warning.
mysys/my_getncpus.c:
Bug#57995: Compiler flag change build error on OSX 10.4: my_getncpus.c
Declare variable in the same block where it is used.
regex/regexec.c:
Bug#57993: Compiler flag change build error on FreeBsd 7.0 : regexec.c
Work around a compiler bug which causes the cast to not be enforced.
sql/debug_sync.cc:
Bug#57997: Compiler flag change build error on OSX 10.6: debug_sync.cc
Use UNINIT_VAR to work around a false positive warning.
sql/handler.cc:
Use UNINIT_VAR to work around a false positive warning.
sql/slave.cc:
Use UNINIT_VAR to work around a false positive warning.
sql/sql_partition.cc:
Use UNINIT_VAR to work around a false positive warning.
storage/myisam/ft_nlq_search.c:
Use UNINIT_VAR to work around a false positive warning.
storage/myisam/mi_create.c:
Use UNINIT_VAR to work around a false positive warning.
storage/myisammrg/myrg_open.c:
Use UNINIT_VAR to work around a false positive warning.
tests/mysql_client_test.c:
Change function to take a pointer to const, no need for a cast.
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.
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.
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
Replace the array of mutexes that used to protect
dict_index_t::stat_n_diff_key_vals[] with an array of rw locks that protects
all the stats related members in dict_table_t and all of its indexes.
Approved by: Jimmy (rb://503)
columns again
This is follow-up to Bug #54358. Not all occurrences of the bug were fixed.
We need to check all calls to btr_copy_externally_stored_field_prefix_low()
and do the right thing when the pointer to the off-page column is null
(full of zero bytes).
It turns out that only the call to btr_copy_externally_stored_field_prefix()
in row_sel_sec_rec_is_for_blob() needs to be changed.
For fetching complete off-page columns rather than prefixes, the function
btr_rec_copy_externally_stored_field() already checks if the pointer
is null (all-zero). Two of its callers (row_merge_copy_blobs() and
row_sel_fetch_columns()) are never executed as READ COMMITTED and can
rightfully assert that the fetch succeeded. The third caller,
row_sel_store_mysql_rec(), already does the right thing.
The calls in row_upd_ext_fetch() and trx_undo_page_fetch_ext() must
expect that the off-page column exists. Update and rollback are
locking operations, never READ UNCOMMITTED.
On Windows, the parameter for number of bytes passed into WriteFile()
and ReadFile() is DWORD. Casting is needed to silence the warning on
64-bit Windows.
Also, adding several asserts to ensure the variable for number of bytes
is no more than 32 bits, even on 64-bit Windows.
This is for InnoDB Plugin.
rb://415
Approved by: Inaam
On Windows, the parameter for number of bytes passed into WriteFile()
and ReadFile() is DWORD. Casting is needed to silence the warning on
64-bit Windows.
Also, adding several asserts to ensure the variable for number of bytes
is no more than 32 bits, even on 64-bit Windows.
This is for built-in InnoDB.
rb://415
Approved by: Inaam
rb://498
Fix handling of update_undo_logs at trx commit. Previously, when
rseg->update_undo_list grows beyond 500 the update_undo_logs were
marked with state TRX_UNDO_TO_FREE which should have been
TRX_UNDO_TO_PURGE.
Approved by: Sunny Bains
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.
This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.
include/my_compiler.h:
Use GCC's __builtin_unreachable if available. It allows
GCC to deduce the unreachability of certain code paths,
thus avoiding warnings that, for example, accused that a
variable could be used without being initialized (due to
unreachable code paths).
Ensure that fdatasync is properly declared as on Mac OS X, the
function is available but there is no prototype. Also, port a
fix for a warning from the InnoDB plugin over to the builtin.
configure.in:
Check that fdatasync is declared.
mysys/my_sync.c:
Use fdatasync only if it is declared.
storage/innobase/include/ut0dbg.h:
Port over from the plugin a fix for a warning.
row_search_for_mysql(): When a secondary index record might not be
visible in the current transaction's read view and we consult the
clustered index and optionally some undo log records, return the
relevant columns of the clustered index record to MySQL instead of the
secondary index record.
ibuf_insert_to_index_page_low(): New function, refactored from
ibuf_insert_to_index_page().
ibuf_insert_to_index_page(): When we are inserting a record in place
of a delete-marked record and some fields of the record differ, update
that record just like row_ins_sec_index_entry_by_modify() would do.
btr_cur_update_alloc_zip(): Make the function public.
mysql_row_templ_t: Add clust_rec_field_no.
row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
flag rec_clust, for returning data at clust_rec_field_no instead of
rec_field_no. Resurrect the debug assertion that the record not be
marked for deletion. (Bug #55626)
[UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
buf_flush_page_try():
Implement innodb_change_buffering_debug=1 for evicting pages from the
buffer pool, so that change buffering will be attempted more
frequently.
row_search_for_mysql(): When a secondary index record might not be
visible in the current transaction's read view and we consult the
clustered index and optionally some undo log records, return the
relevant columns of the clustered index record to MySQL instead of the
secondary index record.
REC_INFO_DELETED_FLAG: Move the definition from rem0rec.ic to rem0rec.h.
ibuf_insert_to_index_page_low(): New function, refactored from
ibuf_insert_to_index_page().
ibuf_insert_to_index_page(): When we are inserting a record in place
of a delete-marked record and some fields of the record differ, update
that record just like row_ins_sec_index_entry_by_modify() would do.
mysql_row_templ_t: Add clust_rec_field_no.
row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
flag rec_clust, for returning data at clust_rec_field_no instead of
rec_field_no. Resurrect the debug assertion that the record not be
marked for deletion. (Bug #55626)
buf_LRU_free_block(): Refactored from
buf_LRU_search_and_free_block(). This is needed for the
innodb_change_buffering_debug diagnostics.
[UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
buf_flush_page_try():
Implement innodb_change_buffering_debug=1 for evicting pages from the
buffer pool, so that change buffering will be attempted more
frequently.
This is a merge from 5.1/builtin to 5.1/plugin of:
--------------
revision-id: vasil.dimov@oracle.com-20101018104811-nwqhg9vav17kl5s1
committer: Vasil Dimov <vasil.dimov@oracle.com>
timestamp: Mon 2010-10-18 13:48:11 +0300
message:
Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
In order to fix this bug we need to distinguish whether ha_innobase::info()
has been called from ::analyze() or not. Rename ::info() to ::info_low()
and add a boolean parameter that tells whether the call is from ::analyze()
or not. Create a new simple ::info() that just calls
::info_low(false => not called from analyze). From ::analyze() instead of
::info() call ::info_low(true => called from analyze).
Approved by: Jimmy (rb://487)
--------------
In order to fix this bug we need to distinguish whether ha_innobase::info()
has been called from ::analyze() or not. Rename ::info() to ::info_low()
and add a boolean parameter that tells whether the call is from ::analyze()
or not. Create a new simple ::info() that just calls
::info_low(false => not called from analyze). From ::analyze() instead of
::info() call ::info_low(true => called from analyze).
Approved by: Jimmy (rb://487)
This is a port of the following changeset from
5.1/storage/innobase to 5.1/storage/innodb_plugin:
------------------------------------------------------------
revno: 3626
revision-id: vasil.dimov@oracle.com-20101013171859-gi9n558yj89x9v3w
parent: klewis@mysql.com-20101012175933-ce9kkgl0z8oeqffa
committer: Vasil Dimov <vasil.dimov@oracle.com>
branch nick: mysql-5.1-innodb
timestamp: Wed 2010-10-13 20:18:59 +0300
message:
Fix Bug#56143 too many foreign keys causes output of show create table to become invalid
Just remove the check whether the file is "too big".
A similar code exists in ha_innobase::update_table_comment() but that
method does not seem to be used.
Also use a CREATE statement with all the FKs instead of ALTERing the
table 550 times because it is faster.
Just remove the check whether the file is "too big".
A similar code exists in ha_innobase::update_table_comment() but that
method does not seem to be used.
No mysql-test case. Tested by creating a table, removing a *.frm file and
attempting to create the table again. Code coverage tested by
instrumentation. Tested with Valgrind.
This is a regression from the fix for bug no 38999. A storage engine capable
of reading only a subset of a table's columns updates corresponding bits in
the read buffer to signal that it has read NULL values for the corresponding
columns. It cannot, and should not, update any other bits. Bug no 38999
occurred because the implementation of UPDATE statements compare the NULL bits
using memcmp, inadvertently comparing bits that were never requested from the
storage engine. The regression was caused by the storage engine trying to
alleviate the situation by writing to all NULL bits, even those that it had no
knowledge of. This has devastating effects for the index merge algorithm,
which relies on all NULL bits, except those explicitly requested, being left
unchanged.
The fix reverts the fix for bug no 38999 in both InnoDB and InnoDB plugin and
changes the server's method of comparing records. For engines that always read
entire rows, we proceed as usual. For engines capable of reading only select
columns, the record buffers are now compared on a column by column basis. An
assertion was also added so that non comparable buffers are never read. Some
relevant copy-pasted code was also consolidated in a new function.
This is a simple optimization issue. All stats are related to only indexed
columns, index size or number of rows in the whole table. UPDATEs that touch
only non-indexed columns cannot affect stats and we can avoid calling the
function row_update_statistics_if_needed() which may result in unnecessary I/O.
Approved by: Marko (rb://466)
TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)
it is not documented what happens if the two arguments are of different
type like it was before: the first one was lock_word_t (byte) and the
second one was 1 or 0 (int).
Approved by: Marko (via IRC)
Use UNINIT_VAR workaround instead of LINT_INIT. The former can
also be used to silence false-positives in non-debug builds as
it actually does not cause new code to be generated.
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_truncate_end':
trx/trx0undo.c:1069:14: error: variable 'rseg' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_set_state_at_prepare':
trx/trx0undo.c:1871:16: error: variable 'page_hdr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0trx.c: In function 'trx_prepare_off_kernel':
trx/trx0trx.c:1808:11: error: variable 'update_hdr_page' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0sys.c: In function 'trx_sys_create_doublewrite_buf':
trx/trx0sys.c:244:15: error: variable 'new_block' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
trx/trx0roll.c: In function 'trx_undo_arr_remove_info':
trx/trx0roll.c:744:9: error: variable 'n' set but not used [-Werror=unused-but-set-variable]
trx/trx0roll.c:743:9: error: variable 'n_used' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_rec_release':
trx/trx0purge.c:1071:18: error: variable 'arr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_rseg_get_next_history_log':
trx/trx0purge.c:660:15: error: variable 'seg_hdr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_add_update_undo_to_history':
trx/trx0purge.c:307:15: error: variable 'seg_header' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_add_update_undo_to_history':
trx/trx0purge.c:309:16: error: variable 'page_header' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0vers.c: In function 'row_vers_impl_x_locked_off_kernel':
row/row0vers.c:74:9: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0umod.c: In function 'row_undo_mod_clust_low':
row/row0umod.c:117:9: error: variable 'success' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0purge.c: In function 'row_purge_step':
row/row0purge.c:687:9: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
que/que0que.c: In function 'que_run_threads_low':
que/que0que.c:1287:9: error: variable 'cumul_resource' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
os/os0file.c: In function 'os_file_create':
os/os0file.c:1371:14: error: variable 'purpose_str' set but not used [-Werror=unused-but-set-variable]
os/os0file.c:1370:14: error: variable 'type_str' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
log/log0recv.c: In function 'recv_synchronize_groups':
log/log0recv.c:562:14: error: variable 'limit_lsn' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
log/log0recv.c: In function 'recv_recovery_from_checkpoint_start_func':
log/log0recv.c:2894:14: error: variable 'archived_lsn' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
handler/i_s.cc: In function 'int trx_i_s_common_fill_table(THD*, TABLE_LIST*, COND*)':
handler/i_s.cc:931:8: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
handler/ha_innodb.cc: In function 'void innobase_drop_database(handlerton*, char*)':
handler/ha_innodb.cc:7010:6: error: variable 'error' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
handler/ha_innodb.cc: In function 'bool innodb_show_status(handlerton*, THD*, bool (*)(THD*, const char*, uint, const char*, uint, const char*, uint))':
handler/ha_innodb.cc:8851:7: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
eval/eval0eval.c: In function 'eval_notfound':
eval/eval0eval.c:388:14: error: variable 'arg2' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
dict/dict0dict.c: In function 'dict_index_print_low':
dict/dict0dict.c:4444:14: error: variable 'type_string' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
dict/dict0crea.c: In function 'dict_create_index_tree_step':
dict/dict0crea.c:630:16: error: variable 'table' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
buf/buf0flu.c: In function 'buf_flush_batch':
buf/buf0flu.c:1274:9: error: variable 'old_page_count' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
buf/buf0flu.c: In function 'buf_flush_delete_from_flush_rbt':
buf/buf0flu.c:131:8: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0sea.c: In function 'btr_search_update_hash_on_delete':
btr/btr0sea.c:1498:9: error: variable 'found' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0pcur.c: In function 'btr_pcur_move_backward_from_page':
btr/btr0pcur.c:455:9: error: variable 'space' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0cur.c: In function 'btr_free_externally_stored_field':
btr/btr0cur.c:4281:16: error: variable 'rec_block' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0cur.c: In function 'btr_cur_optimistic_update':
btr/btr0cur.c:1839:10: error: variable 'orig_rec' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0btr.c: In function 'btr_compress':
btr/btr0btr.c:2564:9: error: variable 'level' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
btr/btr0btr.c: In function 'btr_page_split_and_insert':
btr/btr0btr.c:1898:11: error: variable 'insert_page' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
./include/ut0rnd.ic: In function 'ut_rnd_gen_ulint':
./include/ut0rnd.ic:88:8: error: variable 'n_bits' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
handler/ha_innodb.cc: In function 'bool innodb_show_status(handlerton*, THD*, bool (*)(THD*, const char*, uint, const char*, uint, const char*, uint))':
handler/ha_innodb.cc:7539:7: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
handler/ha_innodb.cc: In function 'void innobase_drop_database(handlerton*, char*)':
handler/ha_innodb.cc:5969:6: error: variable 'error' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_set_state_at_prepare':
trx/trx0undo.c:1798:16: error: variable 'page_hdr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_truncate_end':
trx/trx0undo.c:1015:14: error: variable 'rseg' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0trx.c: In function 'trx_prepare_off_kernel':
trx/trx0trx.c:1830:11: error: variable 'update_hdr_page' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0sys.c: In function 'trx_sys_create_doublewrite_buf':
trx/trx0sys.c:168:10: error: variable 'new_page' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
trx/trx0roll.c: In function 'trx_undo_arr_remove_info':
trx/trx0roll.c:717:9: error: variable 'n' set but not used [-Werror=unused-but-set-variable]
trx/trx0roll.c:716:9: error: variable 'n_used' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_rec_release':
trx/trx0purge.c:1007:18: error: variable 'arr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_rseg_get_next_history_log':
trx/trx0purge.c:599:15: error: variable 'seg_hdr' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
trx/trx0purge.c: In function 'trx_purge_add_update_undo_to_history':
trx/trx0purge.c:254:16: error: variable 'page_header' set but not used [-Werror=unused-but-set-variable]
trx/trx0purge.c:252:15: error: variable 'seg_header' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0vers.c: In function 'row_vers_impl_x_locked_off_kernel':
row/row0vers.c:62:9: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0upd.c: In function 'row_upd_in_place_in_select':
row/row0upd.c:2040:9: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0umod.c: In function 'row_undo_mod_clust_low':
row/row0umod.c:92:9: error: variable 'success' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
row/row0purge.c: In function 'row_purge_step':
row/row0purge.c:660:9: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
(row_purge() always returns DB_SUCCESS)
Fix compiler warning:
que/que0que.c: In function 'que_thr_dec_refer_count':
que/que0que.c:805:11: error: variable 'sess' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
que/que0que.c: In function 'que_run_threads_low':
que/que0que.c:1295:9: error: variable 'cumul_resource' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
os/os0file.c: In function 'os_file_create':
os/os0file.c:1318:14: error: variable 'purpose_str' set but not used [-Werror=unused-but-set-variable]
os/os0file.c:1317:14: error: variable 'type_str' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
log/log0recv.c: In function 'recv_synchronize_groups':
log/log0recv.c:403:10: error: variable 'limit_lsn' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
log/log0recv.c: In function 'recv_recovery_from_checkpoint_start':
log/log0recv.c:2509:10: error: variable 'archived_lsn' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
lock/lock0lock.c: In function 'lock_print_info_all_transactions':
lock/lock0lock.c:4299:10: error: variable 'page' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
eval/eval0eval.c: In function 'eval_notfound':
eval/eval0eval.c:371:14: error: variable 'arg2' set but not used [-Werror=unused-but-set-variable]
Fix compiler warning:
buf/buf0flu.c: In function 'buf_flush_batch':
buf/buf0flu.c:844:9: error: variable 'old_page_count' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
btr/btr0sea.c: In function 'btr_search_update_hash_on_delete':
btr/btr0sea.c:1404:9: error: variable 'found' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
btr/btr0pcur.c: In function 'btr_pcur_move_backward_from_page':
btr/btr0pcur.c:432:8: error: variable 'space' set but not used [-Werror=unused-but-set-variable]
Fix compiler warnings:
btr/btr0cur.c: In function 'btr_store_big_rec_extern_fields':
btr/btr0cur.c:3368:10: error: variable 'rec_page' set but not used [-Werror=unused-but-set-variable]
btr/btr0cur.c: In function 'btr_free_externally_stored_field':
btr/btr0cur.c:3542:8: error: variable 'offset' set but not used [-Werror=unused-but-set-variable]
btr/btr0cur.c:3539:10: error: variable 'rec_page' set but not used [-Werror=unused-but-set-variable]
bug #49251 (deadlock/crash with concurrent truncate table and index
statistics calculation) by backporting a solution from #54678 fixed
for 5.1 plugin and 5.5.
dict_update_statistics_low(): Create bogus statistics for those
indexes that cannot be accessed because of the innodb_force_recovery
setting.
ha_innobase::info(): Calculate statistics for each index, even if
innodb_force_recovery is set. Fill in bogus data for those indexes
that are not accessed because of the innodb_force_recovery setting.
dict_update_statistics_low(): Create bogus statistics for those
indexes that cannot be accessed because of the innodb_force_recovery
setting.
ha_innobase::info(): Calculate statistics for each index, even if
innodb_force_recovery is set. Fill in bogus data for those indexes
that are not accessed because of the innodb_force_recovery setting.