Commit 3a91af9a authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-6647 MariaDB CLI client doesnt show CREATE INDEX progress

SQLCOM_CREATE_INDEX was missing CF_REPORT_PROGRESS flag
parent 30d78605
...@@ -281,7 +281,7 @@ void init_update_queries(void) ...@@ -281,7 +281,7 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE | sql_command_flags[SQLCOM_CREATE_TABLE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS |
CF_CAN_GENERATE_ROW_EVENTS; CF_CAN_GENERATE_ROW_EVENTS;
sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS; sql_command_flags[SQLCOM_CREATE_INDEX]= CF_CHANGES_DATA | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS;
sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND | sql_command_flags[SQLCOM_ALTER_TABLE]= CF_CHANGES_DATA | CF_WRITE_LOGS_COMMAND |
CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS | CF_AUTO_COMMIT_TRANS | CF_REPORT_PROGRESS |
CF_INSERTS_DATA; CF_INSERTS_DATA;
......
...@@ -18707,13 +18707,31 @@ static void test_progress_reporting() ...@@ -18707,13 +18707,31 @@ static void test_progress_reporting()
rc= mysql_query(conn, "insert into t1 (f2) select f2 from t2"); rc= mysql_query(conn, "insert into t1 (f2) select f2 from t2");
myquery(rc); myquery(rc);
} }
rc= mysql_query(conn, "alter table t1 add f1 int primary key auto_increment, add key (f2), order by f2");
progress_stage= progress_max_stage= progress_count= 0;
rc= mysql_query(conn, "alter table t1 add f1 int primary key auto_increment, order by f2");
myquery(rc); myquery(rc);
if (!opt_silent) if (!opt_silent)
printf("Got progress_count: %u stage: %u max_stage: %u\n", printf("Got progress_count: %u stage: %u max_stage: %u\n",
progress_count, progress_stage, progress_max_stage); progress_count, progress_stage, progress_max_stage);
DIE_UNLESS(progress_count > 0 && progress_stage >=2 && progress_max_stage == 3); DIE_UNLESS(progress_count > 0 && progress_stage >=2 && progress_max_stage == 3);
progress_stage= progress_max_stage= progress_count= 0;
rc= mysql_query(conn, "create index f2 on t1 (f2)");
myquery(rc); myquery(rc);
if (!opt_silent)
printf("Got progress_count: %u stage: %u max_stage: %u\n",
progress_count, progress_stage, progress_max_stage);
DIE_UNLESS(progress_count > 0 && progress_stage >=2 && progress_max_stage == 2);
progress_stage= progress_max_stage= progress_count= 0;
rc= mysql_query(conn, "drop index f2 on t1");
myquery(rc);
if (!opt_silent)
printf("Got progress_count: %u stage: %u max_stage: %u\n",
progress_count, progress_stage, progress_max_stage);
DIE_UNLESS(progress_count > 0 && progress_stage >=2 && progress_max_stage == 2);
rc= mysql_query(conn, "set @@global.progress_report_time=@save"); rc= mysql_query(conn, "set @@global.progress_report_time=@save");
myquery(rc); myquery(rc);
mysql_close(conn); mysql_close(conn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment