Skip to content

Commit

Permalink
Add limit 1 while generating DDL
Browse files Browse the repository at this point in the history
  • Loading branch information
MingXu committed Nov 3, 2016
1 parent 30bfaea commit 4c646b4
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 @@ -503,6 +503,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 4c646b4

Please sign in to comment.