~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Paul McCullagh
  • Date: 2008-10-09 20:41:41 UTC
  • mto: (499.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 505.
  • Revision ID: paul.mccullagh@primebase.org-20081009204141-o0ze6szpomhjfbll
PBXT needs to call mysql_create_table() to create a .frm file, but the LOCK_open is already held when the call is made

Show diffs side-by-side

added added

removed removed

Lines of Context:
1712
1712
                                HA_CREATE_INFO *create_info,
1713
1713
                                Alter_info *alter_info,
1714
1714
                                bool internal_tmp_table,
1715
 
                                uint32_t select_field_count)
 
1715
                                uint32_t select_field_count,
 
1716
                                bool lock_open_lock)
1716
1717
{
1717
1718
  char          path[FN_REFLEN];
1718
1719
  uint32_t          path_length;
1787
1788
    goto err;
1788
1789
  }
1789
1790
 
1790
 
  pthread_mutex_lock(&LOCK_open);
 
1791
  if (lock_open_lock)
 
1792
    pthread_mutex_lock(&LOCK_open);
1791
1793
  if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
1792
1794
  {
1793
1795
    if (!access(path,F_OK))
1903
1905
    write_bin_log(thd, true, thd->query, thd->query_length);
1904
1906
  error= false;
1905
1907
unlock_and_end:
1906
 
  pthread_mutex_unlock(&LOCK_open);
 
1908
  if (lock_open_lock)
 
1909
    pthread_mutex_unlock(&LOCK_open);
1907
1910
 
1908
1911
err:
1909
1912
  thd->set_proc_info("After create");
1979
1982
  result= mysql_create_table_no_lock(thd, db, table_name, create_info,
1980
1983
                                     alter_info,
1981
1984
                                     internal_tmp_table,
1982
 
                                     select_field_count);
 
1985
                                     select_field_count, true);
1983
1986
 
1984
1987
unlock:
1985
1988
  if (name_lock)