diff options
author | Michael Widenius <monty@askmonty.org> | 2012-02-28 23:18:52 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-02-28 23:18:52 +0200 |
commit | e4e85cd2ef404958568f967fd7ec780191cd230e (patch) | |
tree | 5aa64d4bafcc7d407ea6ac8e55143080825097f7 /include | |
parent | d206480605cdf70925ba10897ee5856d7c0920ec (diff) | |
download | mariadb-git-e4e85cd2ef404958568f967fd7ec780191cd230e.tar.gz |
Fixed lp:925377 "Querying myisam table metadata while 'alter table..enable keys' is running may corrupt the table"
Fixed wrong mutex order bug in Aria when flush_log_for_bitmap() was called when table is not yet marked for change.
include/my_base.h:
Added flag that table is opened only for status
mysql-test/r/myisam-big.result:
Test case for lp:925377
mysql-test/t/myisam-big.test:
Test case for lp:925377
sql/sql_base.cc:
If thd->version == 0 (happens only when we are opening a table that is flushed under MYSQL_LOCK_IGNORE_FLUSH), open the table in HA_OPEN_FOR_STATUS mode
storage/maria/ma_bitmap.c:
Fixed wrong mutex order bug in Aria when flush_log_for_bitmap() was called when table is not yet marked for change.
storage/maria/ma_dbug.c:
Ignore last_version <= 1 as these are either flushed or only opened for status
storage/maria/ma_open.c:
Use last_version=1 as a marker that table was opened with HA_OPEN_FOR_STATUS.
In this case we just open a new version of the table in read only mode.
storage/myisam/mi_create.c:
Update prototype
storage/myisam/mi_dbug.c:
Ignore last_version <= 1 as these are either flushed or only opened for status
storage/myisam/mi_open.c:
Use last_version=1 as a marker that table was opened with HA_OPEN_FOR_STATUS.
If HA_OPEN_FOR_STATUS is used, we will not assert if there is an old not-to-be-used version of the table existing.
In this case we just open a new version of the table in read only mode.
storage/myisam/myisamdef.h:
Updated prototype
Diffstat (limited to 'include')
-rw-r--r-- | include/my_base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_base.h b/include/my_base.h index 361c0aa0b00..16f8803d2d5 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -54,6 +54,7 @@ /* Internal temp table, used for temporary results */ #define HA_OPEN_INTERNAL_TABLE 512 #define HA_OPEN_MERGE_TABLE 1024 +#define HA_OPEN_FOR_STATUS 2048 /* The following is parameter to ha_rkey() how to use key */ |