Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3a91af9a
Commit
3a91af9a
authored
Sep 10, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6647 MariaDB CLI client doesnt show CREATE INDEX progress
SQLCOM_CREATE_INDEX was missing CF_REPORT_PROGRESS flag
parent
30d78605
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+19
-1
No files found.
sql/sql_parse.cc
View file @
3a91af9a
...
@@ -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
;
...
...
tests/mysql_client_test.c
View file @
3a91af9a
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment