~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lock.cc

  • Committer: Jay Pipes
  • Date: 2008-12-18 16:03:09 UTC
  • mfrom: (713 testable)
  • mto: This revision was merged to the branch mainline in revision 717.
  • Revision ID: jpipes@serialcoder-20081218160309-rx3w2zsonf9ffo7v
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
    count                       The number of tables to lock.
109
109
    flags                       Options:
110
110
      DRIZZLE_LOCK_IGNORE_GLOBAL_READ_LOCK      Ignore a global read lock
111
 
      DRIZZLE_LOCK_IGNORE_GLOBAL_READ_ONLY      Ignore SET GLOBAL READ_ONLY
112
111
      DRIZZLE_LOCK_IGNORE_FLUSH                 Ignore a flush tables.
113
112
      DRIZZLE_LOCK_NOTIFY_IF_NEED_REOPEN        Instead of reopening altered
114
113
                                              or dropped tables by itself,
202
201
      }
203
202
    }
204
203
 
205
 
    if (!(flags & DRIZZLE_LOCK_IGNORE_GLOBAL_READ_ONLY) &&
206
 
        write_lock_used &&
207
 
        opt_readonly &&
208
 
        !session->slave_thread)
209
 
    {
210
 
      /*
211
 
        Someone has issued SET GLOBAL READ_ONLY=1 and we want a write lock.
212
 
        We do not wait for READ_ONLY=0, and fail.
213
 
      */
214
 
      reset_lock_data_and_free(&sql_lock);
215
 
      my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
216
 
      break;
217
 
    }
218
 
 
219
204
    session->set_proc_info("System lock");
220
205
    if (sql_lock->table_count && lock_external(session, sql_lock->table,
221
206
                                               sql_lock->table_count))