~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/log/log0log.c

Merge Revision revid:sunny.bains@oracle.com-20100510031717-vw5a99w2v7rot6f9 from MySQL InnoDB

Original revid:sunny.bains@oracle.com-20100510031717-vw5a99w2v7rot6f9

Original Authors: Sunny Bains <Sunny.Bains@Oracle.Com>
Original commit message:
Fix bug#53499 - purge thread is active during shutdown, assert buf/buf0buf.c line 4115.

Check that all background threads are suspended or shutdown instead of just
checking for the master thread.
rb://333

Show diffs side-by-side

added added

removed removed

Lines of Context:
3133
3133
 
3134
3134
        mutex_exit(&kernel_mutex);
3135
3135
 
3136
 
        /* Check that the master thread is suspended */
 
3136
        /* Check that the background threads are suspended */
3137
3137
 
3138
 
        if (srv_is_master_thread_active()) {
 
3138
        if (srv_is_any_background_thread_active()) {
3139
3139
                goto loop;
3140
3140
        }
3141
3141
 
3196
3196
 
3197
3197
        mutex_exit(&(log_sys->mutex));
3198
3198
 
3199
 
        /* Check that the master thread has stayed suspended */
3200
 
        if (srv_is_master_thread_active()) {
 
3199
        /* Check that the background threads stay suspended */
 
3200
        if (srv_is_any_background_thread_active()) {
3201
3201
                fprintf(stderr,
3202
 
                        "InnoDB: Warning: the master thread woke up"
 
3202
                        "InnoDB: Warning: some background thread woke up"
3203
3203
                        " during shutdown\n");
3204
3204
 
3205
3205
                goto loop;
3221
3221
        srv_shutdown_state = SRV_SHUTDOWN_LAST_PHASE;
3222
3222
 
3223
3223
        /* Make some checks that the server really is quiet */
3224
 
        ut_a(!srv_is_master_thread_active());
 
3224
        ut_a(!srv_is_any_background_thread_active());
3225
3225
 
3226
3226
        ut_a(buf_all_freed());
3227
3227
        ut_a(lsn == log_sys->lsn);
3243
3243
        fil_close_all_files();
3244
3244
 
3245
3245
        /* Make some checks that the server really is quiet */
3246
 
        ut_a(!srv_is_master_thread_active());
 
3246
        ut_a(!srv_is_any_background_thread_active());
3247
3247
 
3248
3248
        ut_a(buf_all_freed());
3249
3249
        ut_a(lsn == log_sys->lsn);