diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-19 21:45:18 +0200 |
commit | 76f0b94bb0b2994d639353530c5b251d0f1a204b (patch) | |
tree | 9ed50628aac34f89a37637bab2fc4915b86b5eb4 /storage/maria/ma_pagecrc.c | |
parent | 4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff) | |
parent | 5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff) | |
download | mariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz |
merge with 5.3
sql/sql_insert.cc:
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
******
CREATE ... IF NOT EXISTS may do nothing, but
it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
small cleanup
******
small cleanup
Diffstat (limited to 'storage/maria/ma_pagecrc.c')
-rw-r--r-- | storage/maria/ma_pagecrc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/maria/ma_pagecrc.c b/storage/maria/ma_pagecrc.c index 640bb8880f4..58e3b4b203d 100644 --- a/storage/maria/ma_pagecrc.c +++ b/storage/maria/ma_pagecrc.c @@ -355,9 +355,7 @@ my_bool maria_flush_log_for_page(uchar *page, uchar *data_ptr __attribute__((unused))) { LSN lsn; -#ifndef DBUG_OFF - const MARIA_SHARE *share= (MARIA_SHARE*) data_ptr; -#endif + MARIA_SHARE *share= (MARIA_SHARE*) data_ptr; DBUG_ENTER("maria_flush_log_for_page"); /* share is 0 here only in unittest */ DBUG_ASSERT(!share || (share->page_type == PAGECACHE_LSN_PAGE && @@ -365,6 +363,12 @@ my_bool maria_flush_log_for_page(uchar *page, lsn= lsn_korr(page); if (translog_flush(lsn)) DBUG_RETURN(1); + /* + Now when log is written, it's safe to incremented 'open' counter for + the table so that we know it was not closed properly. + */ + if (share && !share->global_changed) + _ma_mark_file_changed_now(share); DBUG_RETURN(0); } |