Skip to content
Browse files

copy column defs from source table, since dest. table would not exist…

… when using replication

git-svn-id: http://kazuho.31tools.com/svn/incline/trunk@244 4d3e2a30-9d6d-0410-bc8c-dac56cff10b3
  • Loading branch information...
1 parent 3aafdb5 commit ac257856345f0a02e759eb79a8425659a69ea8be kazuho committed Nov 2, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/incline_driver_async_qtable.cc
View
5 src/incline_driver_async_qtable.cc
@@ -103,8 +103,11 @@ incline_driver_async_qtable::_create_table_of(const incline_def_async_qtable*
for (map<string, string>::const_iterator ci = def->columns().begin();
ci != def->columns().end();
++ci) {
+ string::size_type dot_at = ci->first.find('.');
+ assert(dot_at != string::npos);
col_defs.push_back(ci->second + ' '
- + dbh->get_column_def(def->destination(), ci->second));
+ + dbh->get_column_def(ci->first.substr(0, dot_at),
+ ci->first.substr(dot_at + 1)));
}
return string("CREATE TABLE ") + (if_not_exists ? "IF NOT EXISTS " : "")
+ table_name + " (_iq_id " + incline_dbms::factory_->serial_column_type()

0 comments on commit ac25785

Please sign in to comment.
Something went wrong with that request. Please try again.