diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-03 10:24:16 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2021-03-18 08:02:48 +0100 |
commit | 9186ff88dad674ba4c335a47e9657e5b54efbf69 (patch) | |
tree | a68edc5fd765a782cfb13d40f3e1be58b1ae217a /scripts/comp_sql.c | |
parent | 601c577142639d7bde947d071ca944c16920340c (diff) | |
download | mariadb-git-9186ff88dad674ba4c335a47e9657e5b54efbf69.tar.gz |
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
Diffstat (limited to 'scripts/comp_sql.c')
-rw-r--r-- | scripts/comp_sql.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |