~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/lock.cc

  • Committer: Brian Aker
  • Date: 2009-06-08 16:51:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1058.
  • Revision ID: brian@gaz-20090608165122-4zvh22zgsaqadcjy
Remove lock_tables list from session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
    if (sql_lock)
274
274
    {
275
275
      mysql_unlock_tables(session,sql_lock);
276
 
      sql_lock=0;
 
276
      sql_lock= NULL;
277
277
    }
278
278
  }
279
279
 
536
536
}
537
537
 
538
538
 
539
 
DRIZZLE_LOCK *mysql_lock_merge(DRIZZLE_LOCK *a,DRIZZLE_LOCK *b)
 
539
DRIZZLE_LOCK *mysql_lock_merge(DRIZZLE_LOCK *a, DRIZZLE_LOCK *b)
540
540
{
541
541
  DRIZZLE_LOCK *sql_lock;
542
542
  Table **table, **end_table;
626
626
    goto end;
627
627
 
628
628
  /* Get command lock or LOCK TABLES lock. Maybe empty for INSERT DELAYED. */
629
 
  if (! (mylock= session->lock ? session->lock : session->locked_tables))
 
629
  if (!(mylock= session->lock))
630
630
    goto end;
631
631
 
632
632
  /* If we have less than two tables, we cannot have duplicates. */
908
908
    }
909
909
  }
910
910
 
911
 
  if (session->locked_tables && session->locked_tables->table_count &&
912
 
      ! find_temporary_table(session, table_list->db, table_list->table_name))
913
 
  {
914
 
    if (found_locked_table)
915
 
      my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, MYF(0), table_list->alias);
916
 
    else
917
 
      my_error(ER_TABLE_NOT_LOCKED, MYF(0), table_list->alias);
918
 
 
919
 
    return -1;
920
 
  }
921
 
 
922
911
  if (!(table= table_cache_insert_placeholder(session, key, key_length)))
923
912
    return -1;
924
913