1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix a few problems after latest bunch of InnoDB snapshot changes:

The binlog_innodb test was sensitive to what tests ran before it.  Now run
FLUSH STATUS before performing operations that need to be checked.

sys_var_thd_ulong::update() was improperly casting an option value from
ulonglong to ulong before comparing it to the max allowed value.  On systems
where ulong and ulonglong are of different size, this caused values greater
than ULONG_MAX to wrap around (not be truncated to ULONG_MAX, which appears to
have been the intention of the original coder), and caused some checks to work
incorrectly.  This wasn't generally visible to the user, because later checks
would prevent the wrapped-around value from being used.  But it caused warning
messages to differ between 32- and 64-bit platforms.  Fix is to just remove the
cast.  Also added a DBUG_ASSERT to ensure that the value really is capped
properly before finally stuffing it into the ulong.
This commit is contained in:
Timothy Smith
2009-01-08 03:06:54 +01:00
parent 09501824a6
commit 88cd7a98a5
3 changed files with 8 additions and 5 deletions

View File

@ -113,16 +113,17 @@ master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE t1;
flush status;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 13
Binlog_cache_use 0
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 14
Binlog_cache_use 1
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
@ -131,7 +132,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 15
Binlog_cache_use 2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1

View File

@ -101,6 +101,7 @@ DROP TABLE t1;
# Actually this test has nothing to do with innodb per se, it just requires
# transactional table.
#
flush status;
show status like "binlog_cache_use";
show status like "binlog_cache_disk_use";