3262 Marko Mäkelä 2010-08-19
Bug#56114 Disallow trx->dict_operation_lock_mode==RW_X_LATCH in srv_suspend_mysql_thread()
Trigger an assertion failure when
trx->dict_operation_lock_mode is neither 0 nor RW_S_LATCH in
srv_suspend_mysql_thread(). Transactions that modify InnoDB
data dictionary tables must be free of lock waits, because they
must be holding the data dictionary latch in exclusive mode.
The transactions must not be accessing any other tables other than
the data dictionary tables.
The handling of RW_X_LATCH was accidentally added in the InnoDB Plugin,
as a wrong fix of an assertion failure. (Fast index creation was accessing
both data dictionary tables and user tables in the same transaction.)
modified:
storage/innobase/srv/srv0srv.c
3261 Marko Mäkelä 2010-08-19 [merge]
Merge mysql-5.5-innodb to mysql-trunk-innodb.
modified:
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0start.c
3260 Vasil Dimov 2010-08-19
Disable 2 perfschema failing tests until they are fixed
modified:
mysql-test/suite/perfschema/t/disabled.def
=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c revid:vasil.dimov@stripped11836-c2x51ninj4wors8u
+++ b/storage/innobase/srv/srv0srv.c revid:marko.makela@strippedb8t1fqq
@@ -1587,14 +1587,20 @@ srv_suspend_mysql_thread(
had_dict_lock = trx->dict_operation_lock_mode;
switch (had_dict_lock) {
+ case 0:
+ break;
case RW_S_LATCH:
/* Release foreign key check latch */
row_mysql_unfreeze_data_dictionary(trx);
break;
- case RW_X_LATCH:
- /* Release fast index creation latch */
- row_mysql_unlock_data_dictionary(trx);
- break;
+ default:
+ /* There should never be a lock wait when the
+ dictionary latch is reserved in X mode. Dictionary
+ transactions should only acquire locks on dictionary
+ tables, not other tables. All access to dictionary
+ tables should be covered by dictionary
+ transactions. */
+ ut_error;
}
ut_a(trx->dict_operation_lock_mode == 0);
@@ -1606,13 +1612,8 @@ srv_suspend_mysql_thread(
/* After resuming, reacquire the data dictionary latch if
necessary. */
- switch (had_dict_lock) {
- case RW_S_LATCH:
+ if (had_dict_lock) {
row_mysql_freeze_data_dictionary(trx);
- break;
- case RW_X_LATCH:
- row_mysql_lock_data_dictionary(trx);
- break;
}
if (was_declared_inside_innodb) {
=== modified file 'storage/innobase/srv/srv0start.c'
--- a/storage/innobase/srv/srv0start.c revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0start.c revid:marko.makela@oracle.com-20100819123609-5lryfm8zmb8t1fqq
@@ -1334,8 +1334,27 @@ innobase_start_or_create_for_mysql(void)
fil_init(srv_file_per_table ? 50000 : 5000,
srv_max_n_open_files);
+ /* Print time to initialize the buffer pool */
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+ " InnoDB: Initializing buffer pool, size =");
+
+ if (srv_buf_pool_size >= 1024 * 1024 * 1024) {
+ fprintf(stderr,
+ " %.1fG\n",
+ ((double) srv_buf_pool_size) / (1024 * 1024 * 1024));
+ } else {
+ fprintf(stderr,
+ " %.1fM\n",
+ ((double) srv_buf_pool_size) / (1024 * 1024));
+ }
+
err = buf_pool_init(srv_buf_pool_size, srv_buf_pool_instances);
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+ " InnoDB: Completed initialization of buffer pool\n");
+
if (err != DB_SUCCESS) {
fprintf(stderr,
"InnoDB: Fatal error: cannot allocate the memory"
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100819123609-5lryfm8zmb8t1fqq.bundle
| Thread |
|---|
| • bzr push into mysql-trunk-innodb branch (marko.makela:3260 to 3262) Bug#56114 | marko.makela | 19 Aug |