~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-03-15 22:57:37 UTC
  • mto: This revision was merged to the branch mainline in revision 1344.
  • Revision ID: brian@gaz-20100315225737-72okaenigqt4b3oe
Lets hide stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
592
592
{
593
593
  for (Table *table= temporary_tables ; table ; table= table->next)
594
594
  {
595
 
    if (not db_name.compare(table->s->db.str))
 
595
    if (not db_name.compare(table->s->getSchemaName()))
596
596
    {
597
597
      set_of_names.insert(table->s->table_name.str);
598
598
    }
609
609
  {
610
610
    if (table->s->tmp_table == TEMP_TABLE)
611
611
    {
612
 
      if (not strcmp(db_arg, table->s->db.str))
 
612
      if (not strcmp(db_arg, table->s->getSchemaName()))
613
613
      {
614
614
        if (not strcmp(table_name_arg, table->s->table_name.str))
615
615
        {
1411
1411
    errmsg_printf(ERRMSG_LVL_ERROR, _("Table %s had a open data Cursor in reopen_table"),
1412
1412
                  table->alias);
1413
1413
#endif
1414
 
  table_list.db=         table->s->db.str;
 
1414
  table_list.db=         const_cast<char *>(table->s->getSchemaName());
1415
1415
  table_list.table_name= table->s->table_name.str;
1416
1416
  table_list.table=      table;
1417
1417
 
1508
1508
  for (table= open_tables; table ; table=table->next)
1509
1509
  {
1510
1510
    if (!strcmp(table->s->table_name.str, new_table_name) &&
1511
 
        !strcmp(table->s->db.str, new_db))
 
1511
        !strcmp(table->s->getSchemaName(), new_db))
1512
1512
    {
1513
1513
      table->open_placeholder= true;
1514
1514
      close_handle_and_leave_table_as_lock(table);
1824
1824
  {
1825
1825
    next=table->next;
1826
1826
    if (!strcmp(table->s->table_name.str, table_name) &&
1827
 
        !strcmp(table->s->db.str, db))
 
1827
        !strcmp(table->s->getSchemaName(), db))
1828
1828
    {
1829
1829
      mysql_lock_remove(session, table);
1830
1830
 
1870
1870
  for (table= session->open_tables; table ; table= table->next)
1871
1871
  {
1872
1872
    if (!strcmp(table->s->table_name.str, table_name) &&
1873
 
        !strcmp(table->s->db.str, db))
 
1873
        !strcmp(table->s->getSchemaName(), db))
1874
1874
    {
1875
1875
      /* If MERGE child, forward lock handling to parent. */
1876
1876
      mysql_lock_abort(session, table);
4403
4403
  for (uint32_t idx=0 ; idx < open_cache.records ; idx++)
4404
4404
  {
4405
4405
    Table *table=(Table*) hash_element(&open_cache,idx);
4406
 
    if (not strcmp(table->s->db.str, schema_name.c_str()))
 
4406
    if (not strcmp(table->s->getSchemaName(), schema_name.c_str()))
4407
4407
    {
4408
4408
      table->s->version= 0L;                    /* Free when thread is ready */
4409
4409
      if (not table->in_use)