history. This addresses Mantis issue #116.
dict_index_t: Enable the storage of trx_id.
row_prebuilt_t: Make many fields bit-fields to reduce the memory
footprint. Add index_usable.
ha_innobase::change_active_index(): Check if the index is usable and
set prebuilt->index_usable accordingly. Unfortunately, the return
status of this function is ignored by MySQL, and the actual refusal to
use the index must be made in row_search_for_mysql().
row_search_for_mysql(): Return DB_MISSING_HISTORY if
!prebuilt->index_usable.
convert_error_code_to_mysql(): Map DB_MISSING_HISTORY to
HA_ERR_TABLE_DEF_CHANGED.
innodb-index.test: Add a test case where access to a newly created
secondary index must be blocked for old transactions.
rb://100 approved by Heikki Tuuri
------------------------------------------------------------------------
r4481 | marko | 2009-03-19 15:01:48 +0200 (Thu, 19 Mar 2009) | 6 lines
branches/5.1: row_unlock_for_mysql(): Do not unlock records that were
modified by the current transaction. This bug was introduced or unmasked
in r4400.
rb://97 approved by Heikki Tuuri
------------------------------------------------------------------------
------------------------------------------------------------------------
r4399 | marko | 2009-03-12 09:38:05 +0200 (Thu, 12 Mar 2009) | 2 lines
branches/5.1: row_sel_get_clust_rec_for_mysql(): Store the cursor position
also for unlock_row(). (Bug #39320)
------------------------------------------------------------------------
r4400 | marko | 2009-03-12 10:06:44 +0200 (Thu, 12 Mar 2009) | 5 lines
branches/5.1: Fix a bug in multi-table semi-consistent reads.
Remember the acquired record locks per table handle (row_prebuilt_t)
rather than per transaction (trx_t), so that unlock_row should successfully
unlock all non-matching rows in multi-table operations.
This deficiency was found while investigating Bug #39320.
------------------------------------------------------------------------
These were submitted as rb://94 and rb://96 and approved by Heikki Tuuri.
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal
[Step 26/28]
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal
[Step 25/28]
To the files touched by the Google patch from c4144 (excluding
include/os0sync.ic because later we removed Google code from that file):
* Remove the Google license
* Remove old Innobase copyright lines
* Add a reference to the Google license and to the GPLv2 license at the top,
as recommended by the lawyers at Oracle Legal.
This patch changes the innodb mutexes and rw_locks implementation.
On supported platforms it uses GCC builtin atomics. These changes
are based on the patch sent by Mark Callaghan of Google under BSD
license. More technical discussion can be found at rb://30
Approved by: Heikki
SYS_INDEXES when looking for partially created indexes. Use the
transaction isolation level READ UNCOMMITTED to avoid interfering with
locks held by incomplete transactions that will be rolled back in a
subsequent step in the recovery. (Issue #152)
Approved by Heikki Tuuri
if any of the fields are NULL. While the tuples are equal in the
sorting order, SQL NULL is defined to be logically inequal to
anything else. (Bug #41904)
rb://70 approved by Heikki Tuuri
------------------------------------------------------------------------
r3601 | marko | 2008-12-22 16:05:19 +0200 (Mon, 22 Dec 2008) | 9 lines
branches/5.1: Make
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1.
This fixes an error that was introduced in r370, causing
semi-consistent read not to not unlock rows in READ COMMITTED mode.
(Bug #41671, Issue #146)
rb://67 approved by Heikki Tuuri
------------------------------------------------------------------------
------------------------------------------------------------------------
r3588 | inaam | 2008-12-18 14:26:54 +0200 (Thu, 18 Dec 2008) | 8 lines
branches/5.1
It is a bug in unused code. If we don't calculate the hash value when
calculating the mutex number then two pages which map to same hash
value can get two different mutex numbers.
Approved by: Marko
------------------------------------------------------------------------
r3590 | marko | 2008-12-18 15:33:36 +0200 (Thu, 18 Dec 2008) | 11 lines
branches/5.1: When converting a record to MySQL format, copy the default
column values for columns that are SQL NULL. This addresses failures in
row-based replication (Bug #39648).
row_prebuilt_t: Add default_rec, for the default values of the columns in
MySQL format.
row_sel_store_mysql_rec(): Use prebuilt->default_rec instead of
padding columns.
rb://64 approved by Heikki Tuuri
------------------------------------------------------------------------
r3598 | marko | 2008-12-22 15:28:03 +0200 (Mon, 22 Dec 2008) | 6 lines
branches/5.1: ibuf_delete_rec(): When the record cannot be found and
the tablespace has been dropped, commit the mini-transaction, so that
InnoDB will not hold the insert buffer tree latch in exclusive mode,
causing a potential deadlock. This bug was introduced in the fix of
Bug #27276 in r2924.
------------------------------------------------------------------------
interpreter. It was only used for updating the InnoDB internal data
dictionary when renaming or dropping tables. It could have caused
deadlocks after acquiring latches on insert buffer bitmap pages.
This and r3544 should fix Issue #135.
Furthermore, the update-in-place-in-select does not account for
compression failure. That was not a problem yet, since the InnoDB SQL
interpreter has so far assumed ROW_FORMAT=REDUNDANT.
rb://63 approved by Heikki Tuuri
Merge 2929:3458 from branches/5.1 (resolving conflict in c3257,
note also that r3363 reverted r2933 so there are not changes in
mysql-test/innodb-autoinc.result with the current merge):
------------------------------------------------------------------------
r2933 | calvin | 2008-10-30 02:57:31 +0200 (Thu, 30 Oct 2008) | 10 lines
Changed paths:
M /branches/5.1/mysql-test/innodb-autoinc.result
branches/5.1: correct the result file innodb-autoinc.result
Change the followings:
auto_increment_increment
auto_increment_offset
to
auto-increment-increment
auto-increment-offset
------------------------------------------------------------------------
r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 5 lines
Changed paths:
M /branches/5.1/row/row0mysql.c
branches/5.0: row_mysql_store_col_in_innobase_format(): Correct a misleading
comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
------------------------------------------------------------------------
r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1: fix bug#40386: Not flushing query cache after truncate
ha_statistics.records can not be 0 unless the table is empty, set to
1 instead. The original problem of bug#29507 is fixed in the server.
Additional test was done with the fix of bug#29507 in the server.
Approved by: Heikki (on IM)
------------------------------------------------------------------------
r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/srv/srv0srv.c
M /branches/5.1/trx/trx0trx.c
branches/5.1 bug#40760
The config param innodb_thread_concurrency is dynamically set and is
read when a thread enters/exits innodb. If the value is changed between
the enter and exit time the behaviour becomes erratic.
The fix is not to use srv_thread_concurrency when exiting, instead use
the flag trx->declared_to_be_inside_innodb.
rb://57
Approved by: Marko
------------------------------------------------------------------------
r3363 | calvin | 2008-12-04 19:00:20 +0200 (Thu, 04 Dec 2008) | 13 lines
Changed paths:
M /branches/5.1/mysql-test/innodb-autoinc.result
branches/5.1: revert the changes in r2933
The changes in r2933 causes test failure on Linux.
More investigation is needed for Windows.
Change the followings in innodb-autoinc.result:
auto-increment-increment
auto-increment-offset
back to:
auto_increment_increment
auto_increment_offset
------------------------------------------------------------------------
r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
Changed paths:
M /branches/5.1/trx/trx0undo.c
branches/5.1:
Add the traditional 2 spaces after the timestamp so the message does
not look like:
070223 13:26:01InnoDB: Warning: canno....
------------------------------------------------------------------------
r3458 | vasil | 2008-12-09 11:21:08 +0200 (Tue, 09 Dec 2008) | 51 lines
Changed paths:
M /branches/5.1/mysql-test/innodb_bug34300.test
branches/5.1:
Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test:
main.innodb_bug34300 [ fail ]
mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
Aborting: main.innodb_bug34300 failed in default mode.
The changeset is this:
------------------------------------------------------------
revno: 2709.1.10
committer: Staale Smedseng <staale.smedseng@sun.com>
branch nick: b22891-51-bugteam
timestamp: Thu 2008-11-20 08:51:48 +0100
message:
A fix for Bug#22891 "session level max_allowed_packet can be
set but is ignored".
This patch makes @@session.max_allowed_packed and
@@session.net_buffer_length read-only as suggested in the bug
report. The user will have to use SET GLOBAL (and reconnect)
to alter the session values of these variables.
The error string ER_VARIABLE_IS_READONLY is introduced.
Tests are modified accordingly.
modified:
mysql-test/r/func_compress.result
mysql-test/r/max_allowed_packet_basic.result
mysql-test/r/max_allowed_packet_func.result
mysql-test/r/net_buffer_length_basic.result
mysql-test/r/packet.result
mysql-test/r/union.result
mysql-test/r/variables.result
mysql-test/t/func_compress.test
mysql-test/t/innodb_bug34300.test
mysql-test/t/max_allowed_packet_basic.test
mysql-test/t/max_allowed_packet_func.test
mysql-test/t/net_buffer_length_basic.test
mysql-test/t/packet.test
mysql-test/t/union.test
mysql-test/t/variables.test
sql/set_var.cc
sql/set_var.h
sql/share/errmsg.txt
------------------------------------------------------------
------------------------------------------------------------------------
the secondary index entry cannot be found, and this is not an incomplete
transaction that is being rolled back in crash recovery. The source code
comments were suggested by Heikki.
WHILE 1=1 in the SQL procedure, so that the loop will actually be
entered and temporary indexes be dropped during crash recovery.
Thanks to Sunny Bains for pointing this out.
Tested as follows:
Set a breakpoint in row_merge_rename_indexes.
CREATE TABLE t(a INT)ENGINE=InnoDB;
CREATE INDEX a ON t(a);
-- The breakpoint will be reached. Kill and restart mysqld.
SHOW CREATE TABLE t;
-- This shows the MySQL .frm file, without and index.
CREATE TABLE innodb_table_monitor(a INT)ENGINE=InnoDB;
-- This will dump the InnoDB dictionary to the error log, without the index.
warnings about prev_trx_id and vers_del being possibly uninitialized,
by handling the case prev_version == NULL in a single if block.
rb://45 approved by Inaam Rana.
1. We add a vector of locks to trx_t. This array contains the autoinc
locks granted to a transaction. There is one per table.
2. We enforce releasing of these locks in the reverse order from the
one in which they are acquired. The assumption is that since the
AUTOINC locks are statement level locks. Nested statements introduced
by triggers are stacked it should hold.
There was some cleanup done to the vector code too by adding const and
some new functions. Rename dict_table_t::auto_inc_lock to autoinc_lock.
Fix Bug#26316 Triggers create duplicate entries on auto-increment columns
rb://22
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
------------------------------------------------------------------------
Fix Mantis issue#61:
In row_undo_ins_parse_undo_rec(): if we find that a table has no indexes
(dict_table_get_first_index() returns NULL) do not try to call
trx_undo_rec_get_row_ref() with a NULL pointer because that would lead to
a crash. Instead, print a warning and set node->table to NULL just like
it is done if the .ibd file is missing.
Approved by: Heikki (via IM)
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.
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
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
------------------------------------------------------------------------
Return earlier when this function is called on an index that
is being created. Luckily, mtr_start() does not allocate any
resources. Thus, there was no memory leak.
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.
in fast index creation. In r1399, we wrote undo log records about
creating indexes. The special undo log records were deemed
unnecessary later, but this special handling was not removed then.
row_merge_create_index(): Do not assign index->id.
dict_build_index_def_step(): Unconditionally assign index->id.
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.
------------------------------------------------------------------------
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.
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
Fixed the issue where an unchanged blob column that is part of the
primary key as well is lost if it is externally stored.
The fix is provided by Marko.
Reviewed by: Sunny
------------------------------------------------------------------------
r2386 | vasil | 2008-03-27 07:45:02 +0200 (Thu, 27 Mar 2008) | 22 lines
branches/5.1:
Merge change from MySQL (this fixes the failing innodb test):
ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00, gshchepa@host.loc +9 -0
Fixed bug#30059.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
any mode.
Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.
Binary-encoded string/BLOB columns are not affected.
------------------------------------------------------------------------
r2387 | vasil | 2008-03-27 08:49:05 +0200 (Thu, 27 Mar 2008) | 8 lines
branches/5.1:
Check whether *trx->mysql_query_str is != NULL in addition to
trx->mysql_query_str. This adds more safety.
This may or may not fix Bug#35226 RBR event crashes slave.
------------------------------------------------------------------------
r2388 | vasil | 2008-03-27 14:02:34 +0200 (Thu, 27 Mar 2008) | 7 lines
branches/5.1:
Swap the order in which mysql_thd, mysql_query_str and *mysql_query_str
are checked for non-NULL.
Suggested by: Marko
------------------------------------------------------------------------
r2419 | vasil | 2008-04-23 19:08:06 +0300 (Wed, 23 Apr 2008) | 9 lines
branches/5.1:
Change the fix for Bug#32440 to show bytes instead of kilobytes in
INFORMATION_SCHEMA.TABLES.DATA_FREE.
Suggested by: Domas Mituzas <domas@mysql.com>
Approved by: Heikki
------------------------------------------------------------------------
r2420 | calvin | 2008-04-24 15:25:30 +0300 (Thu, 24 Apr 2008) | 4 lines
branches/5.1: Fix bug#29507 TRUNCATE shows to many rows effected
In InnoDB, the row count is only a rough estimate used by SQL
optimization. InnoDB is now return row count 0 for TRUNCATE operation.
------------------------------------------------------------------------
r2421 | calvin | 2008-04-24 15:32:30 +0300 (Thu, 24 Apr 2008) | 6 lines
branches/5.1: Fix bug#35537 - Innodb doesn't increment handler_update
and handler_delete
Add the calls to ha_statistic_increment() in ha_innobase::delete_row()
and ha_innobase::update_row().
------------------------------------------------------------------------
r2422 | vasil | 2008-04-24 16:00:30 +0300 (Thu, 24 Apr 2008) | 11 lines
branches/5.1:
Fix Bug#36169 create innodb compressed table with too large row size crashed
Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed so copy the
table name to a safe place beforehand and use the copy.
Approved by: Sunny
------------------------------------------------------------------------
Fix Bug#36169 create innodb compressed table with too large row size crashed
Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed, so copy the
table name to a safe place beforehand and use the copy.
Approved by: Sunny
single-table tablespaces. This bug was reported by Sunny as Mantis issue #26.
fil_space_create(), fil_create_new_single_table_tablespace(),
fil_open_single_table_tablespace(), fsp_header_init_fields():
Add ut_a(flags != DICT_TF_COMPACT).
dict_build_table_def_step(), row_import_tablespace_for_mysql(),
row_truncate_table_for_mysql(): Pass correct flags to
fil_create_new_single_table_tablespace() or fil_open_single_table_tablespace().