summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2020-06-08 15:05:57 +0300
committerMonty <monty@mariadb.org>2020-06-14 19:39:43 +0300
commit08d475c73b0dab575940162d6181187367368974 (patch)
tree70acd0040f08d998c39ea144d952e6c4936d27a0
parent1cca83784f5063d04f8bfc73f47d0e7b4e709e18 (diff)
downloadmariadb-git-08d475c73b0dab575940162d6181187367368974.tar.gz
Fixed core dump in "echo shutdown | mysqld --bootstrap"
-rw-r--r--sql/sql_bootstrap.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_bootstrap.cc b/sql/sql_bootstrap.cc
index a8c930820a7..dbeb971cd5a 100644
--- a/sql/sql_bootstrap.cc
+++ b/sql/sql_bootstrap.cc
@@ -29,6 +29,7 @@ int read_bootstrap_query(char *query, int *query_length,
int fgets_error= 0;
*error= 0;
+ *query_length= 0;
for ( ; ; )
{
line= (*fgets_fn)(line_buffer, sizeof(line_buffer), input, &fgets_error);