~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: lbieber
  • Date: 2010-09-09 18:18:37 UTC
  • mfrom: (1736.2.1 alter_table_raw_sql)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: lbieber@orisndriz03-20100909181837-nekiq9dv6g8rwdlk
Merge Joe - Remove old write_bin_log_drop_table() function use GPB and transaction_services to do this

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
  transaction_services.rawStatement(session, query);
113
113
}
114
114
 
115
 
 
116
 
/* Should should be refactored to go away */
117
 
void write_bin_log_drop_table(Session *session, bool if_exists, const char *db_name, const char *table_name)
118
 
{
119
 
  TransactionServices &transaction_services= TransactionServices::singleton();
120
 
  string built_query;
121
 
 
122
 
  if (if_exists)
123
 
    built_query.append("DROP TABLE IF EXISTS ");
124
 
  else
125
 
    built_query.append("DROP TABLE ");
126
 
 
127
 
  built_query.append("`");
128
 
  if (session->db.empty() || strcmp(db_name, session->db.c_str()) != 0)
129
 
  {
130
 
    built_query.append(db_name);
131
 
    built_query.append("`.`");
132
 
  }
133
 
 
134
 
  built_query.append(table_name);
135
 
  built_query.append("`");
136
 
  transaction_services.rawStatement(session, built_query);
137
 
}
138
 
 
139
115
/*
140
116
  Execute the drop of a normal or temporary table
141
117