Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
-
Patched myisam_recover.test (attached patch u.diff)
Description
Reproduce
Patch myisam_recover.test and run
--- a/mysql-test/t/myisam_recover.test
|
+++ b/mysql-test/t/myisam_recover.test
|
@@ -88,6 +88,8 @@ flush table t1;
|
--remove_file $MYSQLD_DATADIR/test/t1.MYI
|
--copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI
|
--remove_file $MYSQLD_DATADIR/test/t1_copy.MYI
|
+lock tables t1 write, t1_mrg write;
|
+flush table t1;
|
--echo # check table is needed to mark the table as crashed.
|
check table t1;
|
--echo #
|
@@ -100,6 +102,8 @@ select * from t1_mrg;
|
--echo #
|
--echo # Cleanup
|
--echo #
|
+unlock tables;
|
+select * from t1_mrg;
|
drop table t1, t1_mrg;
|
connection con1;
|
unlock tables; |
Result
--- /home/midenok/src/mariadb/10.2/src/mysql-test/r/myisam_recover.result 2019-11-07 10:25:52.814204742 +0300
|
+++ /home/midenok/src/mariadb/10.2/src/mysql-test/r/myisam_recover.reject 2020-04-18 18:38:52.040652191 +0300
|
@@ -66,6 +66,8 @@
|
flush table t1;
|
insert into t1 (a) values (4), (5), (6);
|
flush table t1;
|
+lock tables t1 write, t1_mrg write;
|
+flush table t1;
|
# check table is needed to mark the table as crashed.
|
check table t1;
|
Table Op Msg_type Msg_text
|
@@ -86,13 +88,22 @@
|
4
|
5
|
6
|
-Warnings:
|
-Error 145 Table 't1' is marked as crashed and should be repaired
|
-Error 1194 Table 't1' is marked as crashed and should be repaired
|
-Error 1034 Number of rows changed from 3 to 6
|
#
|
# Cleanup
|
#
|
+unlock tables;
|
+select * from t1_mrg;
|
+a
|
+1
|
+2
|
+3
|
+4
|
+5
|
+6
|
+Warnings:
|
+Error 145 Table './test/t1' is marked as crashed and should be repaired
|
+Error 1194 Table 't1' is marked as crashed and should be repaired
|
+Error 1034 Number of rows changed from 3 to 6
|
drop table t1, t1_mrg;
|
connection con1;
|
unlock tables; |
As we see auto-repair moved from original SELECT to the next one executed after table is unlocked.
Attachments
Issue Links
- blocks
-
MDEV-23639 Auto-create does not work under LOCK TABLES or inside triggers
-
- Closed
-
- is duplicated by
-
MDEV-23639 Auto-create does not work under LOCK TABLES or inside triggers
-
- Closed
-
- relates to
-
MDEV-15939 Locked_tables_list::reopen_tables is conceptually broken
-
- Open
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
h3. Reproduce
Patch myisam_recover.test and run {code:diff} --- a/mysql-test/t/myisam_recover.test +++ b/mysql-test/t/myisam_recover.test @@ -88,6 +88,8 @@ flush table t1; --remove_file $MYSQLD_DATADIR/test/t1.MYI --copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI --remove_file $MYSQLD_DATADIR/test/t1_copy.MYI +lock tables t1 write, t1_mrg write; +flush table t1; --echo # check table is needed to mark the table as crashed. check table t1; --echo # @@ -100,6 +102,8 @@ select * from t1_mrg; --echo # --echo # Cleanup --echo # +unlock tables; +select * from t1_mrg; drop table t1, t1_mrg; connection con1; unlock tables; {code} |
h3. Reproduce
Patch *myisam_recover.test* and run {code:diff} --- a/mysql-test/t/myisam_recover.test +++ b/mysql-test/t/myisam_recover.test @@ -88,6 +88,8 @@ flush table t1; --remove_file $MYSQLD_DATADIR/test/t1.MYI --copy_file $MYSQLD_DATADIR/test/t1_copy.MYI $MYSQLD_DATADIR/test/t1.MYI --remove_file $MYSQLD_DATADIR/test/t1_copy.MYI +lock tables t1 write, t1_mrg write; +flush table t1; --echo # check table is needed to mark the table as crashed. check table t1; --echo # @@ -100,6 +102,8 @@ select * from t1_mrg; --echo # --echo # Cleanup --echo # +unlock tables; +select * from t1_mrg; drop table t1, t1_mrg; connection con1; unlock tables; {code} h3. Result {code:diff} --- /home/midenok/src/mariadb/10.2/src/mysql-test/r/myisam_recover.result 2019-11-07 10:25:52.814204742 +0300 +++ /home/midenok/src/mariadb/10.2/src/mysql-test/r/myisam_recover.reject 2020-04-18 18:38:52.040652191 +0300 @@ -66,6 +66,8 @@ flush table t1; insert into t1 (a) values (4), (5), (6); flush table t1; +lock tables t1 write, t1_mrg write; +flush table t1; # check table is needed to mark the table as crashed. check table t1; Table Op Msg_type Msg_text @@ -86,13 +88,22 @@ 4 5 6 -Warnings: -Error 145 Table 't1' is marked as crashed and should be repaired -Error 1194 Table 't1' is marked as crashed and should be repaired -Error 1034 Number of rows changed from 3 to 6 # # Cleanup # +unlock tables; +select * from t1_mrg; +a +1 +2 +3 +4 +5 +6 +Warnings: +Error 145 Table './test/t1' is marked as crashed and should be repaired +Error 1194 Table 't1' is marked as crashed and should be repaired +Error 1034 Number of rows changed from 3 to 6 drop table t1, t1_mrg; connection con1; unlock tables; {code} As we see auto-repair moved from original SELECT to the next one executed after table is unlocked. |
Attachment | u.diff [ 51324 ] |
Attachment | u.diff [ 51324 ] |
Attachment | u.diff [ 51325 ] |
Link | This issue relates to MDEV-15939 [ MDEV-15939 ] |
Assignee | Aleksey Midenkov [ midenok ] |
Workflow | MariaDB v3 [ 107388 ] | MariaDB v4 [ 141896 ] |
Link |
This issue is duplicated by |
Fix Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.3 [ 22126 ] |
Fix Version/s | 10.4 [ 22408 ] |
Priority | Major [ 3 ] | Minor [ 4 ] |