~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/instance.cc

  • Committer: Brian Aker
  • Date: 2010-12-31 02:23:39 UTC
  • mto: (2054.1.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2049.
  • Revision ID: brian@tangent.org-20101231022339-g07ztt32wdwqdz46
Make it so that tables are sent not as raw but actual drop table commands to
the replication system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
  while ((cdef= it++))
64
64
  {
65
65
    *field_arg= getMutableShare()->make_field(NULL,
66
 
                                                 cdef->length,
67
 
                                                 (cdef->flags & NOT_NULL_FLAG) ? false : true,
68
 
                                                 (unsigned char *) ((cdef->flags & NOT_NULL_FLAG) ? 0 : ""),
69
 
                                                 (cdef->flags & NOT_NULL_FLAG) ? 0 : 1,
70
 
                                                 cdef->decimals,
71
 
                                                 cdef->sql_type,
72
 
                                                 cdef->charset,
73
 
                                                 cdef->unireg_check,
74
 
                                                 cdef->interval,
75
 
                                                 cdef->field_name);
 
66
                                              cdef->length,
 
67
                                              (cdef->flags & NOT_NULL_FLAG) ? false : true,
 
68
                                              (unsigned char *) ((cdef->flags & NOT_NULL_FLAG) ? 0 : ""),
 
69
                                              (cdef->flags & NOT_NULL_FLAG) ? 0 : 1,
 
70
                                              cdef->decimals,
 
71
                                              cdef->sql_type,
 
72
                                              cdef->charset,
 
73
                                              cdef->unireg_check,
 
74
                                              cdef->interval,
 
75
                                              cdef->field_name,
 
76
                                              cdef->flags & UNSIGNED_FLAG ? true : false);
76
77
    if (!*field_arg)
77
78
    {
78
79
      throw "Memory allocation failure";
323
324
    }
324
325
 
325
326
    TableIdentifier identifier(getShare()->getSchemaName(), getShare()->getTableName(), getShare()->getTableName());
326
 
    getShare()->getEngine()->doDropTable(*in_use, identifier);
 
327
    plugin::StorageEngine::dropTable(*in_use,
 
328
                                     *getShare()->getEngine(),
 
329
                                     identifier);
327
330
 
328
331
    delete cursor;
329
332
  }