From 9186ff88dad674ba4c335a47e9657e5b54efbf69 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 3 Mar 2021 10:24:16 +0100 Subject: MDEV-9077 - sys schema preparation - increase MAX_BOOTSTRAP_QUERY_SIZE (sys.schema has SP over 50K large) don't allocate bootstrap query on heap anymore. - support DELIMITER in bootstrap --- scripts/comp_sql.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts/comp_sql.c') diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c index 5cd5642c9d0..1ce7889a90f 100644 --- a/scripts/comp_sql.c +++ b/scripts/comp_sql.c @@ -36,7 +36,7 @@ - do not duplicate the code either. so just add the sql_bootstrap.cc code as is. */ -#include "../sql/sql_bootstrap.cc" +#include "../sql/sql_bootstrap.h" FILE *in, *out; @@ -121,9 +121,10 @@ static void print_query(FILE *out, const char *query) fprintf(out, "\\n\",\n"); } +static char query[MAX_BOOTSTRAP_QUERY_SIZE]; + int main(int argc, char *argv[]) { - char query[MAX_BOOTSTRAP_QUERY_SIZE]; char* struct_name= argv[1]; char* infile_name= argv[2]; char* outfile_name= argv[3]; @@ -151,7 +152,7 @@ int main(int argc, char *argv[]) for ( ; ; ) { rc= read_bootstrap_query(query, &query_length, - (fgets_input_t) in, fgets_fn, &error); + (fgets_input_t) in, fgets_fn, 1, &error); if (rc == READ_BOOTSTRAP_EOF) break; -- cgit v1.2.1