Skip to content

Commit

Permalink
Merge pull request #9 from guangzhouzhang/master
Browse files Browse the repository at this point in the history
Add limit 1 while generating DDL
  • Loading branch information
wjzeng authored Nov 4, 2016
2 parents 9a669d5 + 4c646b4 commit 6feea08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dbsync/mysql2pgsql.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ mysql2pgsql_copy_data(void *arg)
nspname,
relname);

if (get_ddl_only)
{
appendPQExpBufferStr(query, "limit 1");
}

fprintf(stderr, "Query to get source data for target table %s: %s \n", relname, query->data);
ret = mysql_query(origin_conn, query->data);
if (ret != 0)
Expand Down

0 comments on commit 6feea08

Please sign in to comment.