diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 4c8835f8c08..f001ff11387 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -39,6 +39,7 @@ ELSE() SET(CPACK_RPM_FILE_NAME "RPM-DEFAULT") OPTION(CPACK_RPM_DEBUGINFO_PACKAGE "" ON) MARK_AS_ADVANCED(CPACK_RPM_DEBUGINFO_PACKAGE) + SET(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug/${CPACK_RPM_PACKAGE_NAME}-${VERSION}") ENDIF() SET(CPACK_RPM_PACKAGE_RELEASE "1%{?dist}") @@ -270,7 +271,6 @@ IF(CMAKE_VERSION VERSION_GREATER "3.9.99") SET(CPACK_SOURCE_GENERATOR "RPM") SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS "-DRPM=${RPM}" - "-DCPACK_RPM_BUILD_SOURCE_DIRS_PREFIX=/usr/src/debug/${CPACK_RPM_PACKAGE_NAME}-${VERSION}" ) MACRO(ADDIF var) diff --git a/mysql-test/lib/My/Handles.pm b/mysql-test/lib/My/Handles.pm index c07e2edb09e..e23d3b75490 100644 --- a/mysql-test/lib/My/Handles.pm +++ b/mysql-test/lib/My/Handles.pm @@ -24,8 +24,10 @@ use My::Platform; my $handle_exe; - -if (IS_WINDOWS){ +sub import { + my $self = shift; + my $params = shift; + return if (!IS_WINDOWS || $handle_exe); # Check if handle.exe is available # Pass switch to accept the EULA to avoid hanging # if the program hasn't been run before. @@ -35,7 +37,7 @@ if (IS_WINDOWS){ $handle_exe= "$2.$3" if ($line =~ /(Nth|H)andle v([0-9]*)\.([0-9]*)/); } - if ($handle_exe){ + if ($handle_exe && (!$params || !$params->{suppress_init_messages})){ print "Found handle.exe version $handle_exe\n"; } } diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index 13110f0bc73..3438714fd28 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -135,13 +135,24 @@ select * from v1 { "cost": 2.2044, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 1, + "cost": 2.2044, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 1, - "cost_for_plan": 2.4044 + "cost_for_plan": 2.4044, + "estimated_join_cardinality": 1 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 1", @@ -270,13 +281,24 @@ select * from (select * from t1 where t1.a=1)q { "cost": 2.2044, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 1, + "cost": 2.2044, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 1, - "cost_for_plan": 2.4044 + "cost_for_plan": 2.4044, + "estimated_join_cardinality": 1 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 1", @@ -411,13 +433,24 @@ select * from v2 { "chosen": true, "use_tmp_table": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 1, + "cost": 2.2044, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 1, - "cost_for_plan": 2.4044 + "cost_for_plan": 2.4044, + "estimated_join_cardinality": 1 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 1", @@ -467,13 +500,24 @@ select * from v2 { "cost": 2, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 2, + "cost": 2, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 2, - "cost_for_plan": 2.4 + "cost_for_plan": 2.4, + "estimated_join_cardinality": 2 } ] }, + { + "best_join_order": [""] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -596,13 +640,24 @@ explain select * from v2 { "cost": 2.022, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 2.022, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, - "cost_for_plan": 4.022 + "cost_for_plan": 4.022, + "estimated_join_cardinality": 10 } ] }, + { + "best_join_order": ["t2"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -705,13 +760,24 @@ explain select * from v1 { "chosen": true, "use_tmp_table": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 2.022, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, - "cost_for_plan": 4.022 + "cost_for_plan": 4.022, + "estimated_join_cardinality": 10 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -761,13 +827,24 @@ explain select * from v1 { "cost": 10, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 10, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, - "cost_for_plan": 12 + "cost_for_plan": 12, + "estimated_join_cardinality": 10 } ] }, + { + "best_join_order": [""] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -922,7 +999,14 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { "cost": 2.3174, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 100, + "cost": 2.3174, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 100, "cost_for_plan": 22.317, @@ -947,10 +1031,18 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { "cost": 2.3174, "chosen": false } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 1, + "cost": 200, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 100, - "cost_for_plan": 242.32 + "cost_for_plan": 242.32, + "estimated_join_cardinality": 100 } ] }, @@ -965,7 +1057,14 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { "cost": 2.3174, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 100, + "cost": 2.3174, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 100, "cost_for_plan": 22.317, @@ -990,7 +1089,14 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { "cost": 2.3174, "chosen": false } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 1, + "cost": 200, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 100, "cost_for_plan": 242.32, @@ -1000,6 +1106,9 @@ explain select * from t1,t2 where t1.a=t2.b+2 and t2.a= t1.b { } ] }, + { + "best_join_order": ["t1", "t2"] + }, { "attaching_conditions_to_tables": { "original_condition": "t2.a = t1.b and t1.a = t2.b + 2", @@ -1146,18 +1255,29 @@ EXPLAIN SELECT DISTINCT a FROM t1 { "best_access_path": { "considered_access_paths": [ { - "access_type": "range", + "access_type": "index_merge", "resulting_rows": 5, "cost": 6.75, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "index_merge", + "records": 5, + "cost": 6.75, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 5, - "cost_for_plan": 7.75 + "cost_for_plan": 7.75, + "estimated_join_cardinality": 5 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -1331,13 +1451,24 @@ EXPLAIN SELECT MIN(d) FROM t1 where b=2 and c=3 group by a { "chosen": true, "use_tmp_table": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 0.5849, + "cost": 3.3121, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 0.5849, - "cost_for_plan": 3.4291 + "cost_for_plan": 3.4291, + "estimated_join_cardinality": 0.5849 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.b = 2 and t1.c = 3", @@ -1522,13 +1653,24 @@ EXPLAIN SELECT id,MIN(a),MAX(a) FROM t1 WHERE a>=20010104e0 GROUP BY id { "chosen": true, "use_tmp_table": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 16, + "cost": 2.0312, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 16, - "cost_for_plan": 5.2313 + "cost_for_plan": 5.2313, + "estimated_join_cardinality": 16 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a >= 20010104e0", @@ -1702,13 +1844,24 @@ EXPLAIN SELECT * FROM t1 WHERE a = 20010104e0 GROUP BY id { "chosen": true, "use_tmp_table": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 16, + "cost": 2.0312, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 16, - "cost_for_plan": 5.2313 + "cost_for_plan": 5.2313, + "estimated_join_cardinality": 16 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 20010104e0", @@ -1972,13 +2125,24 @@ explain select * from t1 where a=1 and b=2 order by c limit 1 { "chosen": false, "cause": "cost" } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 21, + "cost": 22, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 21, - "cost_for_plan": 26.2 + "cost_for_plan": 26.2, + "estimated_join_cardinality": 21 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 1 and t1.b = 2", @@ -2202,13 +2366,24 @@ select t1.a from t1 left join t2 on t1.a=t2.a { "cost": 2.0068, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 4, + "cost": 2.0068, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, - "cost_for_plan": 2.8068 + "cost_for_plan": 2.8068, + "estimated_join_cardinality": 4 } ] }, + { + "best_join_order": ["t2", "t1"] + }, { "condition_on_constant_tables": "1" }, @@ -2318,7 +2493,14 @@ explain select * from t1 left join t2 on t2.a=t1.a { "cost": 2.0068, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 4, + "cost": 2.0068, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, "cost_for_plan": 2.8068, @@ -2341,15 +2523,26 @@ explain select * from t1 left join t2 on t2.a=t1.a { "cost": 8.0176, "chosen": false } - ] + ], + "chosen_access_method": { + "type": "eq_ref", + "records": 1, + "cost": 4, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, - "cost_for_plan": 7.6068 + "cost_for_plan": 7.6068, + "estimated_join_cardinality": 4 } ] } ] }, + { + "best_join_order": ["t1", "t2"] + }, { "condition_on_constant_tables": "1" }, @@ -2491,13 +2684,24 @@ explain select t1.a from t1 left join (t2 join t3 on t2.b=t3.b) on t2.a=t1.a and "cost": 2.0068, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 4, + "cost": 2.0068, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, - "cost_for_plan": 2.8068 + "cost_for_plan": 2.8068, + "estimated_join_cardinality": 4 } ] }, + { + "best_join_order": ["t3", "t2", "t1"] + }, { "condition_on_constant_tables": "1" }, @@ -2683,10 +2887,18 @@ explain extended select * from t1 where a in (select pk from t10) { "cost": 2.022, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 2.022, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, - "cost_for_plan": 4.022 + "cost_for_plan": 4.022, + "estimated_join_cardinality": 10 } ] } @@ -2706,7 +2918,14 @@ explain extended select * from t1 where a in (select pk from t10) { "cost": 2.0066, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0066, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6066, @@ -2723,7 +2942,14 @@ explain extended select * from t1 where a in (select pk from t10) { "cost": 2.022, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 2.022, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 30, "cost_for_plan": 10.629, @@ -2746,7 +2972,8 @@ explain extended select * from t1 where a in (select pk from t10) { { "chosen_strategy": "SJ-Materialize" } - ] + ], + "estimated_join_cardinality": 3 } ] }, @@ -2761,7 +2988,14 @@ explain extended select * from t1 where a in (select pk from t10) { "cost": 2.022, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 10, + "cost": 2.022, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, "cost_for_plan": 4.022, @@ -2782,6 +3016,9 @@ explain extended select * from t1 where a in (select pk from t10) { } ] }, + { + "best_join_order": ["t1", ""] + }, { "condition_on_constant_tables": "1" }, @@ -3105,13 +3342,24 @@ explain select * from t1 where pk = 2 and a=5 and b=1 { "chosen": false, "cause": "cost" } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 1, + "cost": 1.0043, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 1, - "cost_for_plan": 1.2043 + "cost_for_plan": 1.2043, + "estimated_join_cardinality": 1 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.pk = 2 and t1.a = 5 and t1.b = 1", @@ -3219,13 +3467,24 @@ select f1(a) from t1 { "cost": 2.0068, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 4, + "cost": 2.0068, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, - "cost_for_plan": 2.8068 + "cost_for_plan": 2.8068, + "estimated_join_cardinality": 4 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -3307,13 +3566,24 @@ select f2(a) from t1 { "cost": 2.0068, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 4, + "cost": 2.0068, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4, - "cost_for_plan": 2.8068 + "cost_for_plan": 2.8068, + "estimated_join_cardinality": 4 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -3354,7 +3624,7 @@ a 2 select length(trace) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; length(trace) -1831 +2205 set optimizer_trace_max_mem_size=100; select * from t1; a @@ -3368,7 +3638,7 @@ select * from t1 { "join_preparation": { "select_id": 1, "steps": [ - 1731 0 + 2105 0 set optimizer_trace_max_mem_size=0; select * from t1; a @@ -3376,7 +3646,7 @@ a 2 select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE; QUERY TRACE MISSING_BYTES_BEYOND_MAX_MEM_SIZE INSUFFICIENT_PRIVILEGES -select * from t1 1831 0 +select * from t1 2205 0 drop table t1; set optimizer_trace='enabled=off'; set @@optimizer_trace_max_mem_size= @save_optimizer_trace_max_mem_size; @@ -3679,7 +3949,14 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 { "cost": 1.407, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "range", + "records": 3, + "cost": 1.407, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.007, @@ -3703,10 +3980,18 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 { "chosen": false, "cause": "cost" } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 1, + "cost": 3.007, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, - "cost_for_plan": 5.614 + "cost_for_plan": 5.614, + "estimated_join_cardinality": 3 } ] }, @@ -3721,7 +4006,14 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 { "cost": 1.407, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "range", + "records": 3, + "cost": 1.407, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.007, @@ -3745,7 +4037,14 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 { "chosen": false, "cause": "cost" } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 2, + "cost": 3.014, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 6, "cost_for_plan": 6.2211, @@ -3755,6 +4054,9 @@ explain delete t0,t1 from t0, t1 where t0.a=t1.a and t1.a<3 { } ] }, + { + "best_join_order": ["t0", "t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = t0.a and t0.a < 3", @@ -3875,13 +4177,24 @@ explain select * from (select rand() from t1)q { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, - "cost_for_plan": 2.6051 + "cost_for_plan": 2.6051, + "estimated_join_cardinality": 3 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -3931,13 +4244,24 @@ explain select * from (select rand() from t1)q { "cost": 3, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 3, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, - "cost_for_plan": 3.6 + "cost_for_plan": 3.6, + "estimated_join_cardinality": 3 } ] }, + { + "best_join_order": [""] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -4129,7 +4453,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4145,10 +4476,18 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, - "cost_for_plan": 6.4103 + "cost_for_plan": 6.4103, + "estimated_join_cardinality": 9 } ] }, @@ -4163,7 +4502,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4187,7 +4533,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4204,7 +4557,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -4221,7 +4581,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 13.815, @@ -4244,7 +4611,8 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ { "chosen_strategy": "SJ-Materialize" } - ] + ], + "estimated_join_cardinality": 3 } ] }, @@ -4259,7 +4627,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -4279,7 +4654,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4297,7 +4679,14 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4321,6 +4710,9 @@ explain select * from t1 where a in (select t_inner_1.a from t1 t_inner_1, t1 t_ } ] }, + { + "best_join_order": ["t1", ""] + }, { "condition_on_constant_tables": "1" }, @@ -4596,7 +4988,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -4613,7 +5012,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -4630,7 +5036,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -4661,7 +5074,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 44.641, @@ -4683,7 +5103,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 62.846, @@ -4706,7 +5133,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 210.66, @@ -4724,7 +5158,8 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { { "chosen_strategy": "DuplicateWeedout" } - ] + ], + "estimated_join_cardinality": 27 } ] }, @@ -4744,7 +5179,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 95.256, @@ -4764,7 +5206,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 41.031, @@ -4786,7 +5235,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 59.246, @@ -4809,7 +5265,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 207.06, @@ -4822,7 +5285,8 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { { "chosen_strategy": "DuplicateWeedout" } - ] + ], + "estimated_join_cardinality": 27 } ] }, @@ -4842,7 +5306,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 59.246, @@ -4862,7 +5333,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 44.641, @@ -4882,7 +5360,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -4899,7 +5384,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 172.44, @@ -4930,7 +5422,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 304.05, @@ -4953,7 +5452,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 451.86, @@ -4987,7 +5493,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 336.46, @@ -5007,7 +5520,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 75.231, @@ -5029,7 +5549,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 514.65, @@ -5052,7 +5579,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 514.65, @@ -5072,7 +5606,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 172.44, @@ -5094,7 +5635,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 611.85, @@ -5126,7 +5674,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 6561, "cost_for_plan": 1486.7, @@ -5148,7 +5703,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 13.815, @@ -5165,7 +5727,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 64.431, @@ -5187,7 +5756,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 503.85, @@ -5210,7 +5786,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 503.85, @@ -5230,7 +5813,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 64.431, @@ -5248,7 +5838,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 64.431, @@ -5268,7 +5865,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -5285,7 +5889,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 172.44, @@ -5307,7 +5918,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 611.85, @@ -5330,7 +5948,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 6561, "cost_for_plan": 1486.7, @@ -5350,7 +5975,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 75.231, @@ -5372,7 +6004,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 514.65, @@ -5395,7 +6034,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 2187, "cost_for_plan": 514.65, @@ -5415,7 +6061,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 172.44, @@ -5437,7 +6090,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -5455,7 +6115,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -5473,7 +6140,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -5491,7 +6165,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -5511,7 +6192,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -5529,7 +6217,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -5547,7 +6242,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -5565,7 +6267,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -5583,7 +6292,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -5595,6 +6311,16 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { { "fix_semijoin_strategies_for_picked_join_order": [] }, + { + "best_join_order": [ + "t_outer_1", + "t_inner_1", + "t_inner_2", + "t_inner_4", + "t_outer_2", + "t_inner_3" + ] + }, { "attaching_conditions_to_tables": { "original_condition": "t_inner_1.a = t_outer_1.a and t_inner_3.a = t_outer_2.a", @@ -5874,7 +6600,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -5890,10 +6623,18 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, - "cost_for_plan": 10.021 + "cost_for_plan": 10.021, + "estimated_join_cardinality": 27 } ] }, @@ -5908,7 +6649,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -5929,7 +6677,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -5945,10 +6700,18 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, - "cost_for_plan": 10.021 + "cost_for_plan": 10.021, + "estimated_join_cardinality": 27 } ] }, @@ -5963,7 +6726,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -5987,7 +6757,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -6004,7 +6781,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -6021,7 +6805,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -6057,7 +6848,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 15.541, @@ -6079,7 +6877,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 33.746, @@ -6102,7 +6907,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 729, "cost_for_plan": 181.56, @@ -6125,7 +6937,8 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { { "chosen_strategy": "SJ-Materialize" } - ] + ], + "estimated_join_cardinality": 27 } ] }, @@ -6145,7 +6958,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 243, "cost_for_plan": 66.156, @@ -6165,7 +6985,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 11.931, @@ -6187,7 +7014,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 30.146, @@ -6210,7 +7044,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 30.146, @@ -6230,7 +7071,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 15.541, @@ -6250,7 +7098,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -6268,7 +7123,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 13.815, @@ -6286,7 +7148,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 81, "cost_for_plan": 24.626, @@ -6306,7 +7175,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -6324,7 +7200,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -6342,7 +7225,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 6.4103, @@ -6360,7 +7250,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": true, + "filter_used": false + } }, "rows_for_plan": 27, "cost_for_plan": 10.021, @@ -6380,7 +7277,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -6398,7 +7302,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -6416,7 +7327,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -6434,7 +7352,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, "cost_for_plan": 2.6051, @@ -6452,7 +7377,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { "cost": 2.0154, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 9, + "cost": 2.0154, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 9, "cost_for_plan": 3.8154, @@ -6487,6 +7419,14 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) { } ] }, + { + "best_join_order": [ + "t_outer_1", + "", + "t_outer_2", + "" + ] + }, { "condition_on_constant_tables": "1" }, @@ -7130,7 +8070,15 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 2.8296, "chosen": true } - ] + ], + "chosen_access_method": + { + "type": "scan", + "records": 5.9375, + "cost": 2.8296, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 5.9375, "cost_for_plan": 4.0171, @@ -7154,10 +8102,19 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 256.85, "chosen": true } - ] + ], + "chosen_access_method": + { + "type": "scan", + "records": 804.69, + "cost": 256.85, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 4777.8, - "cost_for_plan": 1216.4 + "cost_for_plan": 1216.4, + "estimated_join_cardinality": 4777.8 } ] }, @@ -7178,7 +8135,15 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 43.26, "chosen": true } - ] + ], + "chosen_access_method": + { + "type": "scan", + "records": 804.69, + "cost": 43.26, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 804.69, "cost_for_plan": 204.2, @@ -7214,7 +8179,15 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 2.0171, "chosen": true } - ] + ], + "chosen_access_method": + { + "type": "scan", + "records": 10, + "cost": 2.0171, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, "cost_for_plan": 4.0171, @@ -7248,11 +8221,20 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 43.26, "chosen": false } - ] + ], + "chosen_access_method": + { + "type": "ref", + "records": 1, + "cost": 20, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 10, "cost_for_plan": 26.017, - "selectivity": 0.8047 + "selectivity": 0.8047, + "estimated_join_cardinality": 8.0469 } ] }, @@ -7273,7 +8255,15 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.considered_execution_plans')) "cost": 43.26, "chosen": true } - ] + ], + "chosen_access_method": + { + "type": "scan", + "records": 804.69, + "cost": 43.26, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 804.69, "cost_for_plan": 204.2, diff --git a/mysql-test/main/opt_trace_index_merge.result b/mysql-test/main/opt_trace_index_merge.result index 5697e3a771a..7f1bd5163f3 100644 --- a/mysql-test/main/opt_trace_index_merge.result +++ b/mysql-test/main/opt_trace_index_merge.result @@ -207,18 +207,29 @@ explain select * from t1 where a=1 or b=1 { "best_access_path": { "considered_access_paths": [ { - "access_type": "range", + "access_type": "index_merge", "resulting_rows": 2, "cost": 4.1484, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "index_merge", + "records": 2, + "cost": 4.1484, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 2, - "cost_for_plan": 4.5484 + "cost_for_plan": 4.5484, + "estimated_join_cardinality": 2 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.a = 1 or t1.b = 1", diff --git a/mysql-test/main/opt_trace_index_merge_innodb.result b/mysql-test/main/opt_trace_index_merge_innodb.result index 23a500b0720..afcf0b03dae 100644 --- a/mysql-test/main/opt_trace_index_merge_innodb.result +++ b/mysql-test/main/opt_trace_index_merge_innodb.result @@ -208,13 +208,24 @@ explain select * from t1 where pk1 != 0 and key1 = 1 { "chosen": false, "cause": "cost" } - ] + ], + "chosen_access_method": { + "type": "ref", + "records": 1, + "cost": 2, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 1, - "cost_for_plan": 2.2 + "cost_for_plan": 2.2, + "estimated_join_cardinality": 1 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": "t1.key1 = 1 and t1.pk1 <> 0", diff --git a/mysql-test/main/opt_trace_security.result b/mysql-test/main/opt_trace_security.result index c8112fd5f6c..22c5f3ff6f6 100644 --- a/mysql-test/main/opt_trace_security.result +++ b/mysql-test/main/opt_trace_security.result @@ -98,13 +98,24 @@ select * from db1.t1 { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, - "cost_for_plan": 2.6051 + "cost_for_plan": 2.6051, + "estimated_join_cardinality": 3 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, @@ -211,13 +222,24 @@ select * from db1.v1 { "cost": 2.0051, "chosen": true } - ] + ], + "chosen_access_method": { + "type": "scan", + "records": 3, + "cost": 2.0051, + "uses_join_buffering": false, + "filter_used": false + } }, "rows_for_plan": 3, - "cost_for_plan": 2.6051 + "cost_for_plan": 2.6051, + "estimated_join_cardinality": 3 } ] }, + { + "best_join_order": ["t1"] + }, { "attaching_conditions_to_tables": { "original_condition": null, diff --git a/mysql-test/main/selectivity.result b/mysql-test/main/selectivity.result index aca19a7f4a9..43e3c88c0a1 100644 --- a/mysql-test/main/selectivity.result +++ b/mysql-test/main/selectivity.result @@ -1634,8 +1634,6 @@ SELECT @cnt; @cnt 2 alter table t1 force; -set @@use_stat_tables= @save_use_stat_tables; -set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; drop table t1; drop function f1; # diff --git a/mysql-test/main/selectivity.test b/mysql-test/main/selectivity.test index 6e40d8dc69d..a3b69789da6 100644 --- a/mysql-test/main/selectivity.test +++ b/mysql-test/main/selectivity.test @@ -1102,8 +1102,6 @@ set @@optimizer_use_condition_selectivity=4; SELECT * FROM t1 WHERE a = f1(); SELECT @cnt; alter table t1 force; -set @@use_stat_tables= @save_use_stat_tables; -set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; drop table t1; drop function f1; diff --git a/mysql-test/main/selectivity_innodb.result b/mysql-test/main/selectivity_innodb.result index 450f9fb9f5c..3075a060d67 100644 --- a/mysql-test/main/selectivity_innodb.result +++ b/mysql-test/main/selectivity_innodb.result @@ -1644,8 +1644,6 @@ SELECT @cnt; @cnt 2 alter table t1 force; -set @@use_stat_tables= @save_use_stat_tables; -set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; drop table t1; drop function f1; # @@ -1661,19 +1659,19 @@ test.t1 analyze status OK # Check what info the optimizer has about selectivities explain extended select * from t1 use index () where a in (17,51,5); id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 3.83 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 3.90 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`a` in (17,51,5) explain extended select * from t1 use index () where b=2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 1091 5.47 Using where +1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 5.47 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` USE INDEX () where `test`.`t1`.`b` = 2 # Now, the equality is used for ref access, while the range condition # gives selectivity data explain extended select * from t1 where a in (17,51,5) and b=2; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.66 Using where; Using rowid filter +1 SIMPLE t1 ref|filter b,a b|a 5|5 const 59 (3%) 2.90 Using where; Using rowid filter Warnings: Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where `test`.`t1`.`b` = 2 and `test`.`t1`.`a` in (17,51,5) drop table t1; diff --git a/mysql-test/suite/innodb/r/full_crc32_import.result b/mysql-test/suite/innodb/r/full_crc32_import.result index 693ad22bab6..b8ebbb73706 100644 --- a/mysql-test/suite/innodb/r/full_crc32_import.result +++ b/mysql-test/suite/innodb/r/full_crc32_import.result @@ -127,3 +127,51 @@ Table Op Msg_type Msg_text test.t1 check status OK InnoDB 0 transactions not purged DROP TABLE t1; +SET @save_algo = @@GLOBAL.innodb_compression_algorithm; +SET GLOBAL innodb_compression_algorithm=2; +CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB; +INSERT INTO t1 VALUES(1); +FLUSH TABLE t1 FOR EXPORT; +# List before copying files +db.opt +t1.cfg +t1.frm +t1.ibd +backup: t1 +UNLOCK TABLES; +SET GLOBAL innodb_compression_algorithm=0; +ALTER TABLE t1 FORCE; +ALTER TABLE t1 DISCARD TABLESPACE; +db.opt +t1.frm +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +INSERT INTO t1 VALUES(2); +SELECT * FROM t1; +a +1 +2 +SET GLOBAL innodb_compression_algorithm=3; +FLUSH TABLE t1 FOR EXPORT; +# List before copying files +db.opt +t1.cfg +t1.frm +t1.ibd +backup: t1 +UNLOCK TABLES; +SET GLOBAL innodb_compression_algorithm=0; +ALTER TABLE t1 FORCE; +ALTER TABLE t1 DISCARD TABLESPACE; +db.opt +t1.frm +restore: t1 .ibd and .cfg files +ALTER TABLE t1 IMPORT TABLESPACE; +INSERT INTO t1 VALUES(3); +SELECT * FROM t1; +a +1 +2 +3 +DROP TABLE t1; +SET GLOBAL innodb_compression_algorithm=@save_algo; diff --git a/mysql-test/suite/innodb/t/full_crc32_import.test b/mysql-test/suite/innodb/t/full_crc32_import.test index 3916b52d073..c5b50997a70 100644 --- a/mysql-test/suite/innodb/t/full_crc32_import.test +++ b/mysql-test/suite/innodb/t/full_crc32_import.test @@ -137,3 +137,64 @@ DELETE FROM t1; CHECK TABLE t1; --source include/wait_all_purged.inc DROP TABLE t1; + +SET @save_algo = @@GLOBAL.innodb_compression_algorithm; +SET GLOBAL innodb_compression_algorithm=2; +CREATE TABLE t1(a SERIAL) PAGE_COMPRESSED=1 ENGINE=InnoDB; +INSERT INTO t1 VALUES(1); + +FLUSH TABLE t1 FOR EXPORT; +--echo # List before copying files +let MYSQLD_DATADIR =`SELECT @@datadir`; + +--list_files $MYSQLD_DATADIR/test +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; +SET GLOBAL innodb_compression_algorithm=0; +ALTER TABLE t1 FORCE; +ALTER TABLE t1 DISCARD TABLESPACE; + +--list_files $MYSQLD_DATADIR/test +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +INSERT INTO t1 VALUES(2); +SELECT * FROM t1; + +SET GLOBAL innodb_compression_algorithm=3; +FLUSH TABLE t1 FOR EXPORT; +--echo # List before copying files +let MYSQLD_DATADIR =`SELECT @@datadir`; + +--list_files $MYSQLD_DATADIR/test +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_backup_tablespaces("test", "t1"); +EOF + +UNLOCK TABLES; +SET GLOBAL innodb_compression_algorithm=0; +ALTER TABLE t1 FORCE; +ALTER TABLE t1 DISCARD TABLESPACE; + +--list_files $MYSQLD_DATADIR/test +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +ib_discard_tablespaces("test", "t1"); +ib_restore_tablespaces("test", "t1"); +EOF + +ALTER TABLE t1 IMPORT TABLESPACE; +INSERT INTO t1 VALUES(3); +SELECT * FROM t1; +DROP TABLE t1; + +SET GLOBAL innodb_compression_algorithm=@save_algo; diff --git a/mysql-test/suite/mariabackup/big_innodb_log.test b/mysql-test/suite/mariabackup/big_innodb_log.test index 05dc3aa39c5..4a87ecb18fe 100644 --- a/mysql-test/suite/mariabackup/big_innodb_log.test +++ b/mysql-test/suite/mariabackup/big_innodb_log.test @@ -76,6 +76,7 @@ rmdir $targetdir; perl; use lib "lib"; +use My::Handles { suppress_init_messages => 1 }; use My::File::Path; my $install_db_dir = ($ENV{MTR_PARALLEL} == 1) ? "$ENV{'MYSQLTEST_VARDIR'}/install.db" : diff --git a/mysql-test/suite/mariabackup/disabled.def b/mysql-test/suite/mariabackup/disabled.def deleted file mode 100644 index 88a66df052d..00000000000 --- a/mysql-test/suite/mariabackup/disabled.def +++ /dev/null @@ -1,12 +0,0 @@ -############################################################################## -# -# List the test cases that are to be disabled temporarily. -# -# Separate the test case name and the comment with ':'. -# -# : BUG# -# -# Do not use any TAB characters for whitespace. -# -############################################################################## -big_innodb_log : MDEV-20421 2019-08-26 wlad Always fails on Windows buildbot \ No newline at end of file diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff b/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff new file mode 100644 index 00000000000..3326f0ca3d3 --- /dev/null +++ b/mysql-test/suite/mariabackup/encrypted_page_corruption,full_crc32.rdiff @@ -0,0 +1,9 @@ +--- encrypted_page_corruption,crc32.result ++++ encrypted_page_corruption,full_crc32.result +@@ -5,5 +5,5 @@ + # Corrupt the table + # restart + # xtrabackup backup +-FOUND 1 /Database page corruption detected.*/ in backup.log ++NOT FOUND /Database page corruption detected.*/ in backup.log + drop table t1; diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations b/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations new file mode 100644 index 00000000000..79e5f7836ed --- /dev/null +++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.combinations @@ -0,0 +1,5 @@ +[crc32] +--innodb-checksum-algorithm=crc32 + +[full_crc32] +--innodb-checksum-algorithm=full_crc32 diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.opt b/mysql-test/suite/mariabackup/encrypted_page_corruption.opt index bc6d53b6dd9..74a6450a1ef 100644 --- a/mysql-test/suite/mariabackup/encrypted_page_corruption.opt +++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.opt @@ -4,4 +4,3 @@ --loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/filekeys-data.key --loose-file-key-management-filename=$MTR_SUITE_DIR/filekeys-data.enc --loose-file-key-management-encryption-algorithm=aes_cbc ---innodb-checksum-algorithm=crc32 diff --git a/mysql-test/suite/mariabackup/encrypted_page_corruption.test b/mysql-test/suite/mariabackup/encrypted_page_corruption.test index 5ba77597b35..1beb020b463 100644 --- a/mysql-test/suite/mariabackup/encrypted_page_corruption.test +++ b/mysql-test/suite/mariabackup/encrypted_page_corruption.test @@ -19,27 +19,36 @@ use warnings; use Fcntl qw(:DEFAULT :seek); do "$ENV{MTR_SUITE_DIR}/../innodb/include/crc32.pl"; -my $page_size = $ENV{INNODB_PAGE_SIZE}; +my $ps = $ENV{INNODB_PAGE_SIZE}; sysopen IBD_FILE, "$ENV{MYSQLD_DATADIR}/test/t1.ibd", O_RDWR || die "Cannot open t1.ibd\n"; -sysread(IBD_FILE, $_, 38) || die "Cannot read t1.ibd\n"; +sysread(IBD_FILE, $_, 58) || die "Cannot read t1.ibd\n"; my $space = unpack("x[34]N", $_); -sysseek(IBD_FILE, $page_size * 3, SEEK_SET) || die "Cannot seek t1.ibd\n"; +my $full_crc32 = unpack("N",substr($_,54,4)) & 0x10; # FIL_SPACE_FLAGS +sysseek(IBD_FILE, $ps * 3, SEEK_SET) || die "Cannot seek t1.ibd\n"; -my $head = pack("Nx[18]", 3); # better to have a valid page number -my $body = chr(0) x ($page_size - 38 - 8); +# better to have a valid page number (3) +my $page = pack("x[4]Nx[18]Nx[4]N", 3, 1, $space) . chr(0) x ($ps - 38); -# Calculate innodb_checksum_algorithm=crc32 for the unencrypted page. -# The following bytes are excluded: -# bytes 0..3 (the checksum is stored there) -# bytes 26..37 (encryption key version, post-encryption checksum, tablespace id) -# bytes $page_size-8..$page_size-1 (checksum, LSB of FIL_PAGE_LSN) my $polynomial = 0x82f63b78; # CRC-32C -my $ck = mycrc32($head, 0, $polynomial) ^ mycrc32($body, 0, $polynomial); +if ($full_crc32) +{ + # no possibility of bug here + my $ck = mycrc32(substr($page, 0, $ps - 4), 0, $polynomial); + substr($page, $ps - 4, 4) = pack("N", $ck); +} +else +{ + my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^ + mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial)); + substr($page,0,4)=$ck; + substr($page,$ps-8,4)=$ck; + # trigger the bug by having the same "post-encryption" checksum! + substr($page,30,4)=$ck; +} -my $page= pack("N",$ck).$head.pack("NNN",1,$ck,$space).$body.pack("Nx[4]",$ck); -die unless syswrite(IBD_FILE, $page, $page_size) == $page_size; +die unless syswrite(IBD_FILE, $page, $ps) == $ps; close IBD_FILE; EOF @@ -49,8 +58,13 @@ echo # xtrabackup backup; let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log; +let $expect_error= 1; +if (`select @@innodb_checksum_algorithm LIKE '%full_crc32'`) +{ + let $expect_error= 0; +} --disable_result_log ---error 1 +--error $expect_error exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extended-validation --target-dir=$targetdir --core-file > $backuplog; --enable_result_log diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode.result b/mysql-test/suite/vcol/r/vcol_sql_mode.result index b1f5387507d..385939fd037 100644 --- a/mysql-test/suite/vcol/r/vcol_sql_mode.result +++ b/mysql-test/suite/vcol/r/vcol_sql_mode.result @@ -28,29 +28,41 @@ DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v)); DROP TABLE t1; CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v)); -ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100))); -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; @@ -126,67 +138,94 @@ t1 CREATE TABLE `t1` ( DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100))); -ERROR HY000: Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(leading ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(trailing '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(both '' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(trailing 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(both 'x' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(trailing ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(both ' ' from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a) CREATE TABLE t1 ( a CHAR(5), b CHAR(5), v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100))); -ERROR HY000: Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'trim(trailing `b` from `a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,5,' ')) VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; @@ -226,22 +265,28 @@ t1 CREATE TABLE `t1` ( DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'rpad(`a`,4,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 ( a CHAR(5), b CHAR(5), v VARCHAR(5) AS (RPAD(a,NULL,b)) VIRTUAL, KEY(v) ); -ERROR HY000: Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'rpad(`a`,NULL,`b`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + comparison CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; @@ -256,11 +301,14 @@ CREATE TABLE t1 ( a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin, v INT AS (a='a') VIRTUAL, KEY(v) ); -ERROR HY000: Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a` = 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + LIKE CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a%') VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; @@ -281,18 +329,24 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v)); -ERROR HY000: Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a` like 'a'' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v)); -ERROR HY000: Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'octet_length(`a`)' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # # Testing NO_UNSIGNED_SUBTRACTION # @@ -302,33 +356,42 @@ b INT UNSIGNED, c INT GENERATED ALWAYS AS (a-b) VIRTUAL, KEY (c) ); -ERROR HY000: Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warnings: +Warning 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1901 Function or expression '`a` - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION +DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, c INT GENERATED ALWAYS AS (CAST(a AS SIGNED)-b) VIRTUAL, KEY (c) ); -ERROR HY000: Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warnings: +Warning 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1901 Function or expression 'cast(`a` as signed) - `b`' cannot be used in the GENERATED ALWAYS AS clause of `c` Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION +DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, c INT GENERATED ALWAYS AS (a-CAST(b AS SIGNED)) VIRTUAL, KEY (c) ); -ERROR HY000: Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warnings: +Warning 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c` +Warning 1901 Function or expression '`a` - cast(`b` as signed)' cannot be used in the GENERATED ALWAYS AS clause of `c` Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION +DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -369,12 +432,16 @@ c CHAR(5), v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,a-b,' ')) VIRTUAL, KEY (v) ); -ERROR HY000: Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` -SHOW WARNINGS; -Level Code Message -Error 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +SHOW WARNINGS; +Level Code Message +Warning 1901 Function or expression 'rpad(`c`,`a` - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value NO_UNSIGNED_SUBTRACTION +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -382,11 +449,14 @@ c CHAR(5), v VARCHAR(5) GENERATED ALWAYS AS (RPAD(c,CAST(a AS DECIMAL(20,1))-b,' ')) VIRTUAL, KEY (v) ); -ERROR HY000: Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression 'rpad(`c`,cast(`a` as decimal(20,1)) - `b`,' ')' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # ALTER TABLE ADD KEY(vcol_depending_on_sql_mode) --> error CREATE TABLE t1 ( a INT UNSIGNED, @@ -395,32 +465,62 @@ c CHAR(5), v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL ); ALTER TABLE t1 ADD KEY(v); -ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +ALTER TABLE t1 DROP KEY v; +Warnings: +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH CREATE INDEX v ON t1 (v); -ERROR HY000: Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`c`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH DROP TABLE t1; # A virtual column on the second position in an index - cannot depend on sql_mode CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100))); -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; # A persisten virtual column cannot depend on sql_mode CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT); -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SHOW WARNINGS; Level Code Message -Error 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT); SHOW CREATE TABLE t1; Table Create Table diff --git a/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result index d3954770c7b..fe1cb7b5779 100644 --- a/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result +++ b/mysql-test/suite/vcol/r/vcol_sql_mode_upgrade.result @@ -52,40 +52,66 @@ Warnings: Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH CREATE TABLE t2 LIKE t1; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t2; FLUSH TABLES; CREATE TABLE t2 LIKE t1; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` char(5) DEFAULT NULL, `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 ADD b INT DEFAULT a; +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(5) DEFAULT NULL, + `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED, + `b` int(11) DEFAULT `a` +) ENGINE=MyISAM DEFAULT CHARSET=latin1 Warnings: Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH -ALTER TABLE t1 ADD b INT DEFAULT a; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` char(5) DEFAULT NULL, - `v` varchar(5) GENERATED ALWAYS AS (`a`) STORED -) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t1; -a v -1 1 -2 2 -3 3 +a v b +1 1 1 +2 2 2 +3 3 3 FLUSH TABLES; ALTER TABLE t1 ADD c INT DEFAULT a; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SELECT * FROM t1; -a v -1 1 -2 2 -3 3 +a v b c +1 1 1 1 +2 2 2 2 +3 3 3 3 +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH DROP TABLE t1; # # Fixing a Maria-10.2.26 table with a stored VARCHAR column @@ -177,10 +203,18 @@ Warnings: Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH CREATE TABLE t2 LIKE t1; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t2; FLUSH TABLES; CREATE TABLE t2 LIKE t1; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +DROP TABLE t2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -188,19 +222,33 @@ t1 CREATE TABLE `t1` ( `v` varchar(5) GENERATED ALWAYS AS (`a`) VIRTUAL, KEY `v` (`v`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE t1 ADD b INT DEFAULT a; Warnings: Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH -ALTER TABLE t1 ADD b INT DEFAULT a; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH FLUSH TABLES; ALTER TABLE t1 ADD c INT DEFAULT a; -ERROR HY000: Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH SELECT * FROM t1; -a v -1 1 -2 2 -3 3 +a v b c +1 1 1 1 +2 2 2 2 +3 3 3 3 +Warnings: +Warning 1901 Function or expression '`a`' cannot be used in the GENERATED ALWAYS AS clause of `v` +Warning 1105 Expression depends on the @@sql_mode value PAD_CHAR_TO_FULL_LENGTH DROP TABLE t1; # # Fixing a Maria-10.2.26 table with a virtual VARCHAR column diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode.test b/mysql-test/suite/vcol/t/vcol_sql_mode.test index e4cc6d21718..44d3686ac01 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode.test @@ -21,21 +21,25 @@ DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v TIME AS (a) VIRTUAL, KEY(v)); DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (c CHAR(8), v BINARY(8) AS (c), KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v BIT(64) AS (a) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(v(100))); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM resolving dependency @@ -75,52 +79,61 @@ DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM not resolving dependency ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v TEXT AS (TRIM(LEADING ' ' FROM a)) VIRTUAL, KEY(v(100))); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING '' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH '' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING 'x' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH 'x' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED # more than one space +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(TRAILING ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED # more than one space +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (TRIM(BOTH ' ' FROM a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + TRIM(... non_constant FROM a) ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), b CHAR(5), v TEXT AS (TRIM(TRAILING b FROM a)) VIRTUAL, KEY(v(100))); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + RPAD resolving dependency @@ -144,11 +157,12 @@ DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + RPAD not resolving dependency ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RPAD(a,4,' ')) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5), b CHAR(5), @@ -156,6 +170,7 @@ CREATE TABLE t1 ( KEY(v) ); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + comparison @@ -164,12 +179,13 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a='a') VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a CHAR(5) CHARACTER SET latin1 COLLATE latin1_nopad_bin, v INT AS (a='a') VIRTUAL, KEY(v) ); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + LIKE @@ -182,23 +198,25 @@ CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE NULL) VIRTUAL, KEY(v)); SHOW CREATE TABLE t1; DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v INT AS (a LIKE 'a') VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; --echo # PAD_CHAR_TO_FULL_LENGTH + LENGTH(char_column) = hard dependency ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v INT AS (LENGTH(a)) VIRTUAL, KEY(v)); SHOW WARNINGS; +DROP TABLE t1; --echo # --echo # Testing NO_UNSIGNED_SUBTRACTION --echo # ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -206,8 +224,9 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -215,8 +234,9 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; +DROP TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -224,6 +244,7 @@ CREATE TABLE t1 ( KEY (c) ); SHOW WARNINGS; +DROP TABLE t1; CREATE TABLE t1 ( a INT UNSIGNED, @@ -250,7 +271,7 @@ DROP TABLE t1; --echo # Comnination: PAD_CHAR_TO_FULL_LENGTH + NO_UNSIGNED_SUBTRACTION --echo # ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -259,13 +280,14 @@ CREATE TABLE t1 ( KEY (v) ); SHOW WARNINGS; +DROP TABLE t1; # The below solves the dependency on NO_UNSIGNED_SUBTRACTION # but does not solve the dependency on PAD_CHAR_TO_FULL_LENGTH, # because the 'length' argument to RPAD() is not a constant. ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 ( a INT UNSIGNED, b INT UNSIGNED, @@ -274,6 +296,7 @@ CREATE TABLE t1 ( KEY (v) ); SHOW WARNINGS; +DROP TABLE t1; @@ -291,10 +314,12 @@ CREATE TABLE t1 ( c CHAR(5), v VARCHAR(5) GENERATED ALWAYS AS (c) VIRTUAL ); ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD KEY(v); SHOW WARNINGS; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +ALTER TABLE t1 DROP KEY v; + +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE INDEX v ON t1 (v); SHOW WARNINGS; DROP TABLE t1; @@ -302,16 +327,18 @@ DROP TABLE t1; --echo # A virtual column on the second position in an index - cannot depend on sql_mode ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (id int, a CHAR(5), v TEXT AS (a) VIRTUAL, KEY(id, v(100))); SHOW WARNINGS; +DROP TABLE t1; --echo # A persisten virtual column cannot depend on sql_mode ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT); SHOW WARNINGS; +DROP TABLE t1; CREATE TABLE t1 (a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT); SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test index 71e34231ac1..26b76fbcfe1 100644 --- a/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test +++ b/mysql-test/suite/vcol/t/vcol_sql_mode_upgrade.test @@ -25,19 +25,21 @@ SELECT * FROM t1; FLUSH TABLES; SELECT * FROM t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; +DROP TABLE t2; FLUSH TABLES; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; +DROP TABLE t2; SHOW CREATE TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD b INT DEFAULT a; SHOW CREATE TABLE t1; SELECT * FROM t1; FLUSH TABLES; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD c INT DEFAULT a; SELECT * FROM t1; DROP TABLE t1; @@ -90,18 +92,20 @@ SELECT * FROM t1; FLUSH TABLES; SELECT * FROM t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; +DROP TABLE t2; FLUSH TABLES; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED CREATE TABLE t2 LIKE t1; +DROP TABLE t2; SHOW CREATE TABLE t1; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD b INT DEFAULT a; FLUSH TABLES; ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +#--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED ALTER TABLE t1 ADD c INT DEFAULT a; SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 72f92e90d72..99ae288df93 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,146 +23,282 @@ # ############################################################################## # -# Based on 10.4 6dfa085fd5cfa9f4edd91b2a02ebeb8bd71d4966 +# Based on bb-10.4-release 8885e7ba7814b5721bcf1a6c5241aea815a80eb9 +main.alter_table : Modified in 10.4.8 +main.alter_table_mdev539_maria : Include file modified in 10.4.8 +main.alter_table_mdev539_myisam : Include file modified in 10.4.8 main.alter_table_trans : MDEV-12084 - timeout +main.analyze : Modified in 10.4.8 +main.analyze_format_json : Modified in 10.4.8 +main.analyze_stmt : Modified in 10.4.8 +main.analyze_stmt_orderby : Modified in 10.4.8 +main.analyze_stmt_privileges2 : Modified in 10.4.8 main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.auth_named_pipe : MDEV-14724 - System error 2 main.binary_to_hex : MDEV-20211 - Wrong result -main.bootstrap : Modified in 10.1.41 +main.bootstrap : Modified in 10.3.18 +main.bug13633383 : Modified in 10.4.8 +main.cast : Modified in 10.2.27 main.charset_client_win : Added in 10.4.7 main.column_compression : Modified in 10.4.7 -main.connect : MDEV-17282 - Wrong result +main.compound : Modified in 10.4.8 +main.compress : Include file modified in 10.4.8 +main.connect : MDEV-17282 - Wrong result; include file modified in 10.4.8 main.connect-abstract : MDEV-20162 - Could not execute 'check-testcase' main.connect2 : MDEV-13885 - Server crash main.connect_debug : Modified in 10.4.7 +main.constraints : Modified in 10.4.8 main.count_distinct2 : MDEV-11768 - timeout +main.create : Modified in 10.4.8 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result +main.cte_nonrecursive : Modified in 10.4.8 +main.cte_recursive : Modified in 10.4.8 +main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result +main.ctype_create : Modified in 10.2.27 +main.ctype_latin1_de : Modified in 10.2.27 main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_utf16 : MDEV-10675: timeout or extra warnings +main.ctype_utf16_def : Configuration modified in 10.4.8 main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8_def_upgrade : Added in 10.3.16 -main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison +main.ctype_utf8 : Modified in 10.4.8 +main.ctype_utf8mb4 : Modified in 10.4.8 +main.ctype_utf8mb4_heap : Include file modified in 10.4.8 +main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.4.8 +main.ctype_utf8mb4_myisam : Include file modified in 10.4.8 +main.custom_aggregates_i_s : Modified in 10.4.8 main.debug_sync : MDEV-10607 - internal error -main.derived : Modified in 10.4.7 -main.derived_cond_pushdown : Modified in 10.2.25 +main.default : Modified in 10.4.8 +main.derived : Modified in 10.4.8 +main.derived_cond_pushdown : Modified in 10.4.8 main.derived_opt : MDEV-11768 - timeout -main.derived_view : Modified in 10.4.7 +main.derived_split_innodb : Modified in 10.4.8 +main.derived_view : Modified in 10.4.8 main.dirty_close : MDEV-19368 - mysqltest failed but provided no output -main.distinct : MDEV-14194 - Crash +main.distinct : MDEV-14194 - Crash; modified in 10.4.8 main.drop_bad_db_type : MDEV-15676 - Wrong result -main.dyncol : MDEV-19455 - Extra warning -main.events_2 : MDEV-13277 - Crash -main.events_bugs : MDEV-12892 - Crash +main.dyncol : MDEV-19455 - Extra warning; modified in 10.4.8 +main.empty_user_table : Include file modified in 10.4.8 +main.events_1 : Modified in 10.4.8 +main.events_2 : MDEV-13277 - Crash; modified in 10.4.8 +main.events_bugs : MDEV-12892 - Crash; modified in 10.4.8 +main.events_grant : Modified in 10.4.8 main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result +main.except : Modified in 10.4.8 +main.explain_json : Modified in 10.4.8 main.flush : MDEV-19368 - mysqltest failed but provided no output -main.func_json : Modified in 10.3.16 +main.flush2 : Modified in 10.2.27 +main.func_hybrid_type : Modified in 10.4.8 +main.func_isnull : Modified in 10.4.8 +main.func_math : Modified in 10.4.8 +main.func_misc : Modified in 10.4.8 +main.func_str : Modified in 10.4.8 main.func_time : Modified in 10.4.7 +main.function_defaults : Modified in 10.4.8 main.gis : MDEV-13411 - wrong result on P8; modified in 10.4.7 -main.grant : Modified in 10.4.7 +main.grant : Configuration added in 10.4.8 +main.grant2 : Configuration added in 10.4.8 +main.grant4 : Configuration added in 10.4.8 +main.grant_4332 : Include file modified in 10.4.8 +main.grant_cache_no_prot : Include file modified in 10.2.27 +main.grant_cache_ps_prot : Include file modified in 10.2.27 +main.grant_explain_non_select : Modified in 10.4.8 +main.greedy_optimizer : Modified in 10.4.8 +main.group_by : Modified in 10.4.8 +main.group_min_max : Modified in 10.4.8 +main.handlersocket : Configuration added in 10.4.8 main.having : Modified in 10.4.7 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown +main.index_intersect : Modified in 10.4.8 main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Plan mismatch -main.information_schema_parameters : Modified in 10.4.7 -main.innodb_icp : MDEV-20168 - Wrong execution plans +main.information_schema : Modified in 10.4.8 +main.information_schema-big : Modified in 10.4.8 +main.information_schema_parameters : Modified in 10.4.8 +main.information_schema_routines : Modified in 10.4.8 +main.innodb_ext_key : Modified in 10.4.8 +main.innodb_icp : MDEV-20168 - Wrong execution plans; modified in 10.4.8 main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.join : Modified in 10.4.7 -main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.3.16 -main.join_nested : Modified in 10.3.16 +main.intersect : Modified in 10.4.8 +main.invisible_field_debug : Modified in 10.4.8 +main.join : Modified in 10.4.8 +main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.4.8 +main.join_nested_jcl6 : Modified in 10.4.8 main.join_outer : Modified in 10.4.7 -main.join_outer_innodb : Modified in 10.4.7 +main.join_outer_innodb : Modified in 10.4.8 +main.join_outer_jcl6 : Modified in 10.4.8 main.keywords : Modified in 10.4.7 +main.kill : Modified in 10.4.8 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result +main.limit_rows_examined : Modified in 10.4.8 main.loaddata : MDEV-19368 - mysqltest failed but provided no output -main.log_slow : MDEV-13263 - Wrong result +main.locale : MDEV-20521 - Missing warning +main.log_slow : MDEV-13263 - Wrong result; modified in 10.4.8 main.log_tables-big : MDEV-13408 - wrong result +main.long_unique : Modified in 10.4.8 main.mdev-504 : MDEV-15171 - warning +main.mdev13607 : Modified in 10.4.8 main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.merge : MDEV-10607 - sporadic "can't connect" -main.multi_update : Modified in 10.3.16 -main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out; added in 10.3.16 -main.multi_update_innodb : Modified in 10.3.16 -main.mysql : MDEV-20156 - Wrong result -main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue +main.merge : MDEV-10607 - sporadic "can't connect"; modified in 10.4.8 +main.mrr_icp_extra : Modified in 10.4.8 +main.multi_update : Modified in 10.4.8 +main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out +main.myisam : Modified in 10.4.8 +main.myisam_explain_non_select_all : Modified in 10.4.8 +main.myisam_icp : Modified in 10.4.8 +main.myisam_mrr : Modified in 10.4.8 +main.mysql : MDEV-20156 - Wrong result; modified in 10.4.8 +main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; MDEV-19511 - Big endian issue; modified in 10.4.8 main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed -main.mysql_upgrade_noengine : MDEV-14355 - Wrong result +main.mysql_comments : Modified in 10.4.8 +main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; include file modified in 10.4.8 +main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result +main.mysql_upgrade_noengine : MDEV-14355 - Wrong result; include file modified in 10.4.8 main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error main.mysql_upgrade_view : MDEV-20161 - Wrong result -main.mysqlcheck : MDEV-20164 - Wrong result +main.mysqladmin : MDEV-20535 - Wrong result +main.mysqlcheck : MDEV-20164 - Wrong result; modified in 10.4.8 main.mysqld--help : Modified in 10.4.7 -main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.3.16 -main.mysqldump-compat-102 : Added in 10.4.7 +main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.4.8 +main.mysqldump-compat-102 : Modified in 10.4.8 +main.mysqldump-max : Modified in 10.2.27 +main.mysqldump-nl : Modified in 10.4.8 +main.mysqldump-utf8mb4 : Modified in 10.4.8 main.mysqldump_restore : Modified in 10.4.7 main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-13887 - Wrong result +main.named_pipe : Include file modified in 10.4.8 main.old-mode : MDEV-19373 - Wrong result -main.openssl_1 : MDEV-13492 - Unknown SSL error +main.openssl_1 : MDEV-13492 - Unknown SSL error; modified in 10.4.8 main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.opt_trace : Modified in 10.4.7 -main.order_by : Modified in 10.3.16 +main.opt_trace : Modified in 10.4.8 +main.opt_tvc : Modified in 10.4.8 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result main.parser : Modified in 10.4.7 main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_innodb : MDEV-20169 - Wrong result +main.partition_example : Configuration added in 10.4.8 +main.partition_innodb : MDEV-20169 - Wrong result; modified in 10.4.8 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.plugin : Modified in 10.4.7 -main.plugin_auth : Modified in 10.3.17 +main.partition_key_cache : Modified in 10.2.27 +main.partition_pruning : Modified in 10.4.8 +main.partition_range : Modified in 10.4.8 +main.password_expiration : Include file modified in 10.4.8 +main.plugin : Configuration added in 10.4.8 +main.plugin_auth : Include file modified in 10.4.8 main.plugin_auth_qa_2 : MDEV-20165 - Wrong result -main.plugin_not_embedded : Modified in 10.4.7 -main.pool_of_threads : MDEV-18135 - SSL error: key too small -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.4.7 +main.plugin_innodb : Configuration added in 10.4.8 +main.plugin_load : Configuration modified in 10.4.8 +main.plugin_load_option : Configuration modified in 10.4.8 +main.plugin_not_embedded : Configuration added in 10.4.8 +main.pool_of_threads : MDEV-18135 - SSL error: key too small; modified in 10.4.8 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; configuration modified in 10.4.8 main.ps_innodb : Added in 10.4.7 main.query_cache : MDEV-16180 - Wrong result -main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.4.8 +main.query_cache_notembedded : Modified in 10.4.8 +main.query_cache_ps_no_prot : Modified in 10.4.8 +main.range : Modified in 10.4.8 +main.range_interrupted-13751 : Modified in 10.4.8 +main.range_mrr_icp : Modified in 10.4.8 +main.range_vs_index_merge : Modified in 10.4.8 main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away +main.repair : Modified in 10.4.8 main.repair_symlink-5543 : Modified in 10.4.7 -main.rowid_filter_innodb : Modified in 10.4.7 +main.rowid_filter_innodb : MDEV-20538 - Wrong result; modified in 10.4.7 +main.schema : Modified in 10.4.8 +main.select : Modified in 10.4.8 +main.select_jcl6 : MDEV-20532 - Floating point differences +main.select_pkeycache : MDEV-20532 - Floating point differences +main.selectivity : Modified in 10.4.8 +main.selectivity_innodb : Modified in 10.4.8 +main.selectivity_no_engine : Modified in 10.4.8 +main.set_password : Include file modified in 10.4.8 main.set_statement : MDEV-13183 - Wrong result main.set_statement_notembedded : MDEV-19414 - Wrong result main.shm : MDEV-12727 - Mismatch, ERROR 2013 +main.show_bad_definer-5553 : Modified in 10.4.8 +main.show_check : Modified in 10.4.8 main.show_explain : MDEV-10674 - Wrong result code -main.sp : MDEV-7866 - Mismatch; modified in 10.4.7 -main.sp-security : MDEV-10607 - sporadic "can't connect" -main.sp_notembedded : MDEV-10607 - internal error -main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.sp : MDEV-7866 - Mismatch; modified in 10.4.8 +main.sp-anchor-type : Modified in 10.4.8 +main.sp-error : Modified in 10.4.8 +main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.4.8 +main.sp_notembedded : MDEV-10607 - internal error; include file modified in 10.4.8 +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1; modified in 10.4.8 +main.ssl-big : Modified in 10.4.8 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_compress : Modified in 10.4.8 main.ssl_connect : MDEV-13492 - Unknown SSL error main.ssl_crl : MDEV-19119 - Wrong error code main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables : Modified in 10.3.16 +main.stat_tables : Modified in 10.4.8 +main.stat_tables-enospc : Modified in 10.4.8 main.stat_tables_par : MDEV-13266 - Wrong result main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding +main.statistics : Modified in 10.4.8 main.status : MDEV-13255 - Wrong result -main.subselect : Modified in 10.4.7 +main.subselect : Modified in 10.4.8 +main.subselect2 : Modified in 10.4.8 +main.subselect3 : Modified in 10.4.8 +main.subselect3_jcl6 : Modified in 10.4.8 +main.subselect4 : Modified in 10.4.8 +main.subselect_exists2in : Modified in 10.4.8 +main.subselect_extra : Modified in 10.4.8 main.subselect_innodb : MDEV-10614 - Wrong result -main.subselect_no_semijoin : Modified in 10.3.16 -main.subselect_sj : Modified in 10.3.16 -main.subselect_sj_mat : Modified in 10.3.16 +main.subselect_mat_cost : Modified in 10.4.8 +main.subselect_mat_cost_bugs : Modified in 10.4.8 +main.subselect_sj : Modified in 10.4.8 +main.subselect_sj2 : Modified in 10.4.8 +main.subselect_sj2_jcl6 : Modified in 10.3.18 +main.subselect_sj2_mat : Modified in 10.4.8 +main.subselect_sj_jcl6 : Modified in 10.4.8 +main.subselect_sj_mat : Modified in 10.4.8 +main.subselect_sj_nonmerged : Modified in 10.4.8 +main.system_mysql_db_507 : Include file modified in 10.4.8 +main.system_mysql_db_fix50117 : Modified in 10.4.8 +main.system_time_debug : Added in 10.4.8 +main.table_options-5867 : Configuration added in 10.4.8 main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.temp_table : Modified in 10.3.16 +main.timezone2 : Modified in 10.4.8 main.tls_version : MDEV-20170 - Unknown SSL error main.tls_version1 : MDEV-20170 - Unknown SSL error; added in 10.4.7 -main.trigger_null-8605 : Modified in 10.3.16 +main.trigger : Modified in 10.4.8 +main.trigger-compat : Modified in 10.4.8 +main.trigger_notembedded : Modified in 10.4.8 +main.truncate_badse : Configuration added in 10.4.8 main.type_blob : MDEV-15195 - Wrong result -main.type_datetime : Modified in 10.4.7 -main.type_datetime_hires : MDEV-10687 - Timeout -main.type_float : Modified in 10.3.16 -main.type_varchar : Modified in 10.4.7 -main.userstat : MDEV-12904 - SSL errors -main.view : Modified in 10.4.7 +main.type_date : Modified in 10.4.8 +main.type_datetime : Modified in 10.4.8 +main.type_datetime_hires : MDEV-10687 - Timeout; modified in 10.4.8 +main.type_float : MDEV-20532 - Floating point differences +main.type_int : Modified in 10.4.8 +main.type_newdecimal : MDEV-20532 - Floating point differences +main.type_ranges : MDEV-20532 - Floating point differences +main.type_temporal_innodb : Modified in 10.4.8 +main.type_time_6065 : Modified in 10.4.8 +main.type_time_hires : Modified in 10.4.8 +main.type_timestamp : Modified in 10.4.8 +main.type_timestamp_hires : Modified in 10.4.8 +main.type_varchar : Configuration added in 10.4.8 +main.union : Modified in 10.4.8 +main.upgrade : Configuration added in 10.4.8 +main.userstat : MDEV-12904 - SSL errors; configuration added in 10.4.8 +main.variables : Modified in 10.4.8 +main.variables-notembedded : Modified in 10.2.27 +main.view : Modified in 10.4.8 main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query -main.win : Modified in 10.3.16 +main.win : Modified in 10.4.8 +main.win_percentile : Modified in 10.4.8 main.xa : MDEV-11769 - lock wait timeout +main.xtradb_mrr : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -170,6 +306,7 @@ archive.archive-big : MDEV-20167 - Wrong error code archive.archive_bitfield : MDEV-11771 - table is marked as crashed archive.archive_symlink : MDEV-12170 - unexpected error on rmdir archive.discover : MDEV-10510 - Table is marked as crashed +archive.discover_5438 : Configuration added in 10.4.8 archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug #----------------------------------------------------------------------- @@ -179,15 +316,23 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Mismatch +binlog.binlog_innodb : Configuration added in 10.4.8 binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown +binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown; modified in 10.4.8 +binlog.binlog_mixed_cache_stat : Configuration added in 10.4.8 +binlog.binlog_mysqlbinlog2 : Modified in 10.2.27 +binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ +binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ binlog.binlog_mysqlbinlog_stop_never : Added in 10.4.7 binlog.binlog_parallel_replication_marks_row : Include file modified in 10.4.7 binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.4.7 -binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.4.7 -binlog.binlog_stm_drop_tmp_tbl : MDEV-20188 - Unknown table on exec; include file modified in 10.4.7 +binlog.binlog_row_cache_stat : Include file modified in 10.4.8 +binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.4.8 +binlog.binlog_stm_binlog : MDEV-20412 - Wrong result +binlog.binlog_stm_cache_stat : Include file modified in 10.4.8 +binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.4.8 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint -binlog.flashback-largebinlog : MDEV-19764 - Out of memory; added in 10.3.16 +binlog.flashback-largebinlog : MDEV-19764 - Out of memory; modified in 10.4.8 binlog.load_data_stm_view : MDEV-16948 - Wrong result binlog.show_concurrent_rotate : MDEV-20215 - Wrong result @@ -217,9 +362,14 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost c #----------------------------------------------------------------------- -compat/oracle.column_compression : Modified in 10.4.7 -compat/oracle.keywords : Added in 10.4.7 -compat/oracle.mysqldump_restore : Added in 10.4.7 +compat/oracle.column_compression : Modified in 10.4.7 +compat/oracle.keywords : Added in 10.4.7 +compat/oracle.mysqldump_restore : Added in 10.4.7 +compat/oracle.sp : Modified in 10.4.8 +compat/oracle.sp-package : Modified in 10.4.8 +compat/oracle.sp-package-mysqldump : Modified in 10.4.8 +compat/oracle.sp-package-security : Modified in 10.4.8 +compat/oracle.type_blob : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -239,11 +389,11 @@ disks.disks_notembedded : Added in 10.4.7 #----------------------------------------------------------------------- -encryption.compressed_import_tablespace : Added in 10.3.16 -encryption.corrupted_during_recovery : Modified in 10.3.16 +encryption.corrupted_during_recovery : MDEV-20159 - Assertion failure encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace; include file modified in 10.4.7 encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result +encryption.file_creation : Added in 10.4.8 encryption.innochecksum : MDEV-13644 - Assertion failure; modified in 10.4.7 encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket encryption.innodb-checksum-algorithm : MDEV-12898 - Deadlock of threads; MDEV-16896 - Server crash @@ -251,7 +401,7 @@ encryption.innodb-compressed-blob : MDEV-14728 - Unable to get ce encryption.innodb-discard-import : MDEV-19113 - Timeout encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout; modified in 10.4.7 encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition -encryption.innodb-force-corrupt : MDEV-17286 - SSL error; modified in 10.3.16 +encryption.innodb-force-corrupt : MDEV-17286 - SSL error encryption.innodb-missing-key : MDEV-14728 - SSL error encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-page_encryption_log_encryption : MDEV-17339 - Crash on restart @@ -262,7 +412,8 @@ encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait encryption.innodb-spatial-index : MDEV-13746 - Wrong result encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_log : MDEV-13725 - Wrong result -encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result; added in 10.4.7 +encryption.innodb_encrypt_log_corruption : Configuration modified in 10.4.8 +encryption.innodb_encrypt_temporary_tables : Combinations added in 10.4.8 encryption.innodb_encryption : MDEV-15675 - Timeout encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result @@ -274,6 +425,7 @@ encryption.innodb_onlinealter_encryption : MDEV-17287 - SIGABRT on serve encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing +encryption.tempfiles : Modified in 10.2.27 #----------------------------------------------------------------------- @@ -295,12 +447,40 @@ federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617 - Wrong checksum federated.federatedx : MDEV-10617 - Wrong checksum +federated.federatedx_versioning : Modified in 10.4.8 #----------------------------------------------------------------------- -funcs_1.memory_views : MDEV-11773 - timeout -funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result -funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan +funcs_1.innodb_storedproc_07 : Include file modified in 10.4.8 +funcs_1.innodb_storedproc_08 : Include file modified in 10.4.8 +funcs_1.innodb_trig_03e : Modified in 10.4.8 +funcs_1.is_columns : Modified in 10.4.8 +funcs_1.is_columns_innodb : Modified in 10.4.8 +funcs_1.is_columns_memory : Modified in 10.4.8 +funcs_1.is_columns_myisam : Modified in 10.4.8 +funcs_1.is_routines : Include file modified in 10.4.8 +funcs_1.is_routines_embedded : Include file modified in 10.4.8 +funcs_1.is_schemata : Include file modified in 10.4.8 +funcs_1.is_schemata_embedded : Include file modified in 10.4.8 +funcs_1.is_schemata_is_mysql_test : Modified in 10.4.8 +funcs_1.is_tables : Include file modified in 10.4.8 +funcs_1.is_tables_embedded : Include file modified in 10.4.8 +funcs_1.is_tables_innodb : Include file modified in 10.4.8 +funcs_1.is_tables_memory : Include file modified in 10.4.8 +funcs_1.is_tables_myisam : Include file modified in 10.4.8 +funcs_1.is_tables_myisam_embedded : Include file modified in 10.4.8 +funcs_1.is_triggers : Include file modified in 10.4.8 +funcs_1.is_triggers_embedded : Include file modified in 10.4.8 +funcs_1.memory_storedproc_07 : Include file modified in 10.4.8 +funcs_1.memory_storedproc_08 : Include file modified in 10.4.8 +funcs_1.memory_trig_03e : Modified in 10.4.8 +funcs_1.memory_views : MDEV-11773 - timeout +funcs_1.myisam_storedproc_07 : Include file modified in 10.4.8 +funcs_1.myisam_storedproc_08 : Include file modified in 10.4.8 +funcs_1.myisam_trig_03e : Modified in 10.4.8 +funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result +funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan +funcs_1.storedproc : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -309,7 +489,8 @@ funcs_2.myisam_charset : MDEV-11535 - Timeout #----------------------------------------------------------------------- -funcs_2/charset.* : MDEV-10999 - Not maintained +funcs_2/charset.* : MDEV-10999 - Not maintained +funcs_2/charset.charset_master : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -322,27 +503,31 @@ galera_3nodes.* : Suite is not stable yet #----------------------------------------------------------------------- gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' -gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion +gcol.gcol_select_innodb : Include file modified in 10.4.8 +gcol.gcol_select_myisam : Include file modified in 10.4.8 +gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion; modified in 10.4.8 gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure +gcol.innodb_virtual_index : Modified in 10.4.8 gcol.innodb_virtual_purge : Modified in 10.2.25 #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result -innodb.alter_copy : MDEV-16181 - Assertion failure +innodb.alter_copy : MDEV-16181 - Assertion failure; modified in 10.4.8 innodb.alter_crash : MDEV-16944 - The process cannot access the file innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out; added in 10.4.7 innodb.alter_missing_tablespace : Modified in 10.4.7 +innodb.auto_increment_dup : Modified in 10.4.8 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.blob-crash : MDEV-19298 - Assertion failure; added in 10.4.7 innodb.check_ibd_filesize : Added in 10.4.7 -innodb.corrupted_during_recovery : Modified in 10.3.16 innodb.create_select : Added in 10.4.7 innodb.doublewrite : MDEV-12905 - Server crash -innodb.foreign-keys : Modified in 10.4.7 +innodb.foreign-keys : Modified in 10.4.8 +innodb.foreign_key : Modified in 10.4.8 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure innodb.ibuf_not_empty : MDEV-19021 - Wrong result @@ -350,6 +535,7 @@ innodb.innodb-16k : Modified in 10.4.7 innodb.innodb-32k : Modified in 10.4.7 innodb.innodb-32k-crash : MDEV-16953 - Corrupt log record found; modified in 10.4.7 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.4.7 +innodb.innodb-alter : Modified in 10.4.8 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb-alter-tempfile : MDEV-15285 - Table already exists @@ -358,77 +544,87 @@ innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown -innodb.innodb-get-fk : MDEV-13276 - Server crash +innodb.innodb-fkcheck : Modified in 10.4.8 +innodb.innodb-get-fk : MDEV-13276 - Server crash; modified in 10.4.8 innodb.innodb-index-online : MDEV-14809 - Cannot save statistics +innodb.innodb-mdev7046 : Modified in 10.4.8 innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_snappy : MDEV-13644 - Assertion failure innodb.innodb-page_compression_tables : MDEV-13644 - Assertion failure innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem -innodb.innodb-system-table-view : MDEV-20149 - Wrong result; added in 10.4.7 +innodb.innodb-read-view : Added in 10.4.8 +innodb.innodb-system-table-view : Modified in 10.4.8 innodb.innodb-table-online : MDEV-13894 - Wrong result innodb.innodb-virtual-columns-debug : MDEV-20143 - Wrong result; added in 10.4.7 innodb.innodb-wl5522 : MDEV-13644 - Assertion failure -innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno +innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.4.8 innodb.innodb-wl5980-debug : Added in 10.4.7 innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc; added in 10.4.7 innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt innodb.innodb_bug30423 : MDEV-7311 - Wrong result +innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired innodb.innodb_bug48024 : MDEV-14352 - Assertion failure innodb.innodb_bug59641 : MDEV-13830 - Assertion failure +innodb.innodb_bug68148 : Modified in 10.4.8 +innodb.innodb_bug84958 : Added in 10.4.8 +innodb.innodb_bulk_create_index_debug : Include file modified in 10.4.8 +innodb.innodb_bulk_create_index_flush : Configuration added in 10.4.8 innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full -innodb.innodb_force_recovery : Modified in 10.3.16 innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.4.7 innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.4.7 innodb.innodb_monitor : MDEV-10939 - Testcase timeout -innodb.innodb_mysql : MDEV-19873 - Wrong result; modified in 10.4.7 +innodb.innodb_mysql : Include file modified in 10.4.8 +innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_stats_persistent : MDEV-17745 - Wrong result innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.instant_alter : Modified in 10.4.7 -innodb.instant_alter_bugs : Modified in 10.4.7 -innodb.instant_alter_charset : Modified in 10.4.7 +innodb.instant_alter : Modified in 10.4.8 +innodb.instant_alter_bugs : Modified in 10.4.8 +innodb.instant_alter_charset : Modified in 10.4.8 innodb.instant_alter_debug : Modified in 10.4.7 -innodb.leaf_page_corrupted_during_recovery : MDEV-19766 - Added in 10.3.16 +innodb.log_alter_table : Configuration added in 10.4.8 innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start +innodb.log_file : MDEV-20159 - Assertion failure innodb.log_file_name : MDEV-14193 - Exception innodb.log_file_size : MDEV-15668 - Not found pattern innodb.max_record_size : Added in 10.4.7 innodb.missing_tablespaces : Added in 10.4.7 innodb.monitor : MDEV-16179 - Wrong result -innodb.page_id_innochecksum : Added in 10.4.7 +innodb.page_id_innochecksum : Modified in 10.4.8 innodb.purge : Added in 10.4.7 innodb.purge_secondary : MDEV-15681 - Wrong result -innodb.purge_secondary_mdev-16222 : Added in 10.4.7 +innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out; added in 10.4.7 innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash -innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile +innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile; modified in 10.4.8 innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace innodb.strict_mode : Modified in 10.4.7 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temp_table_savepoint : MDEV-16182 - Wrong result innodb.temporary_table : MDEV-13265 - Wrong result +innodb.temporary_table_optimization : MDEV-20531 - Wrong result innodb.truncate_missing : Modified in 10.4.7 -innodb.trx_id_future : MDEV-20138 - Table doesn't exist in engine; added in 10.4.7 +innodb.trx_id_future : Modified in 10.4.8 innodb.undo_log : Modified in 10.4.7 innodb.undo_truncate : MDEV-17340 - Server hung -innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails +innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails; modified in 10.4.8 innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- innodb_fts.fulltext2 : Modified in 10.4.7 -innodb_fts.innodb_ft_aux_table : Added in 10.3.16 -innodb_fts.innodb_fts_misc : Modified in 10.4.7 +innodb_fts.fulltext_table_evict : Modified in 10.4.8 +innodb_fts.innodb_fts_misc : Modified in 10.4.8 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed @@ -439,14 +635,14 @@ innodb_fts.sync_ddl : MDEV-18654 - Assertion failure innodb_gis.alter_spatial_index : MDEV-13745 - Server crash; modified in 10.4.7 innodb_gis.kill_server : MDEV-16941 - Checksum mismatch -innodb_gis.rtree_add_index : Added in 10.3.16 -innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result +innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result; modified in 10.4.8 innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_split : MDEV-14208 - Too many arguments innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed +innodb_gis.update_root : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -455,7 +651,7 @@ innodb_zip.innochecksum : MDEV-20158 - Server failed to shut down innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings innodb_zip.page_size : Include file modified in 10.4.7 innodb_zip.restart : Include file modified in 10.4.7 -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.4.8 innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 @@ -463,17 +659,25 @@ innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- maria.alter : Modified in 10.4.7 +maria.icp : Modified in 10.4.8 maria.insert_select : MDEV-12757 - Timeout maria.insert_select-7314 : MDEV-16492 - Timeout maria.kill : Added in 10.4.7 maria.maria : MDEV-14430 - Extra warning -maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start +maria.maria-big : Modified in 10.4.8 +maria.maria-gis-recovery : Modified in 10.4.8 +maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start; modified in 10.4.8 +maria.maria-recover : Modified in 10.4.8 +maria.maria-recovery : Modified in 10.4.8 +maria.maria3 : Modified in 10.4.8 +maria.partition : Added in 10.4.8 maria.temporary : Added in 10.4.7 #----------------------------------------------------------------------- mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result mariabackup.apply-log-only : MDEV-20135 - Timeout +mariabackup.big_innodb_log : Added in 10.4.8 mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist @@ -509,7 +713,7 @@ mroonga/wrapper.repair_table_no_index_file : MDEV-14807 - Wrong error message multi_source.gtid : MDEV-14202 - Crash multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result -multi_source.mdev-8874 : MDEV-20101 - Assertion failure; added in 10.4.7 +multi_source.mdev-8874 : Re-enabled in 10.4.8 multi_source.mdev-9544 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.multisource : MDEV-10417 - Fails on Mips multi_source.reset_slave : MDEV-10690 - Wrong result @@ -528,7 +732,23 @@ parts.partition_auto_increment_maria : MDEV-14430 - Extra warning parts.partition_basic_innodb : MDEV-20214 - ASAN error parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist parts.partition_exch_qa_10 : MDEV-11765 - wrong result +parts.partition_exch_qa_4_innodb : Include file modified in 10.4.8 +parts.partition_exch_qa_4_myisam : Include file modified in 10.4.8 +parts.partition_exch_qa_8_innodb : Include file modified in 10.4.8 +parts.partition_exch_qa_8_myisam : Include file modified in 10.4.8 parts.partition_innodb_status_file : MDEV-12901 - Valgrind +parts.partition_mgm_lc0_archive : Include file modified in 10.4.8 +parts.partition_mgm_lc0_innodb : Include file modified in 10.4.8 +parts.partition_mgm_lc0_memory : Include file modified in 10.4.8 +parts.partition_mgm_lc0_myisam : Include file modified in 10.4.8 +parts.partition_mgm_lc1_archive : Include file modified in 10.4.8 +parts.partition_mgm_lc1_innodb : Include file modified in 10.4.8 +parts.partition_mgm_lc1_memory : Include file modified in 10.4.8 +parts.partition_mgm_lc1_myisam : Include file modified in 10.4.8 +parts.partition_mgm_lc2_archive : Include file modified in 10.4.8 +parts.partition_mgm_lc2_innodb : Include file modified in 10.4.8 +parts.partition_mgm_lc2_memory : Include file modified in 10.4.8 +parts.partition_mgm_lc2_myisam : Include file modified in 10.4.8 parts.partition_special_innodb : MDEV-16942 - Timeout #----------------------------------------------------------------------- @@ -537,26 +757,42 @@ percona.* : MDEV-10997 - Not maintained #----------------------------------------------------------------------- -perfschema.connect_attrs : MDEV-17283 - Wrong result -perfschema.dml_file_instances : MDEV-15179 - Wrong result -perfschema.dml_threads : MDEV-17746 - Wrong errno -perfschema.func_file_io : MDEV-5708 - fails for s390x -perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash -perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash -perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash -perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash -perfschema.privilege_table_io : MDEV-13184 - Extra lines -perfschema.relaylog : MDEV-18134 - Wrong result -perfschema.rpl_gtid_func : MDEV-16897 - Wrong result -perfschema.socket_instances_func : MDEV-20140 - Wrong result -perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result -perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result -perfschema.stage_mdl_function : MDEV-20157 - Wrong result -perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders -perfschema.stage_mdl_procedure : MDEV-11545 - Missing row -perfschema.stage_mdl_table : MDEV-12638 - Wrong result -perfschema.threads_mysql : MDEV-10677 - Wrong result +perfschema.connect_attrs : MDEV-17283 - Wrong result +perfschema.dml_file_instances : MDEV-15179 - Wrong result +perfschema.dml_threads : MDEV-17746 - Wrong errno +perfschema.func_file_io : MDEV-5708 - fails for s390x +perfschema.func_mutex : MDEV-5708 - fails for s390x +perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash +perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash; configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_again_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash; configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_bad_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_good_allow : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_good_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_noname_allow : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_addrinfo_noname_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_auth_plugin : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_blocked : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_max_con : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_nameinfo_again_allow : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_nameinfo_again_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_nameinfo_noname_allow : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_nameinfo_noname_deny : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_passwd : Configuration modified in 10.4.8 +perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; configuration modified in 10.4.8 +perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created +perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created +perfschema.privilege_table_io : MDEV-13184 - Extra lines +perfschema.relaylog : MDEV-18134 - Wrong result +perfschema.rpl_gtid_func : MDEV-16897 - Wrong result +perfschema.socket_instances_func : MDEV-20140 - Wrong result +perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result +perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result +perfschema.stage_mdl_function : MDEV-20157 - Wrong result; include file modified in 10.4.8 +perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders; configuration added in 10.4.8 +perfschema.stage_mdl_procedure : MDEV-11545 - Missing row; include file modified in 10.4.8 +perfschema.stage_mdl_table : MDEV-12638 - Wrong result; include file modified in 10.4.8 +perfschema.threads_mysql : MDEV-10677 - Wrong result #----------------------------------------------------------------------- @@ -564,17 +800,18 @@ perfschema_stress.* : MDEV-10996 - Not maintained #----------------------------------------------------------------------- -period.versioning : MDEV-20159 - Assertion failure +period.versioning : MDEV-20159 - Assertion failure; modified in 10.4.8 #----------------------------------------------------------------------- -plugins.feedback_plugin_load : Modified in 10.3.16 +plugins.feedback_plugin_load : Modified in 10.4.8 plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such -plugins.multiauth : MDEV-20163 - Plugin could not be loaded +plugins.multiauth : MDEV-20163 - Plugin could not be loaded; include file modified in 10.4.8 plugins.pam : Modified in 10.4.7 plugins.pam_cleartext : Modified in 10.4.7 plugins.pam_v1 : Modified in 10.4.7 plugins.processlist : MDEV-16574 - Wrong result +plugins.qc_info : Modified in 10.4.8 plugins.server_audit : MDEV-14295 - Wrong result plugins.thread_pool_server_audit : MDEV-14295 - Wrong result @@ -591,29 +828,8 @@ rocksdb.drop_index_inplace : MDEV-14162 - Crash on shutdown rocksdb.drop_table : MDEV-14308 - Timeout rocksdb.drop_table3 : MDEV-16949 - Server crash rocksdb.dup_key_update : MDEV-17284 - Wrong result -rocksdb.locking_issues : MDEV-14464 - Wrong result; modified in 10.3.16 -rocksdb.locking_issues_case1_1_rc : Added in 10.3.16 -rocksdb.locking_issues_case1_1_rr : Added in 10.3.16 -rocksdb.locking_issues_case1_2_rc : Added in 10.3.16 -rocksdb.locking_issues_case1_2_rr : Added in 10.3.16 -rocksdb.locking_issues_case2_rc : Added in 10.3.16 -rocksdb.locking_issues_case2_rc_lsr : Added in 10.3.16 -rocksdb.locking_issues_case2_rr : Added in 10.3.16 -rocksdb.locking_issues_case2_rr_lsr : Added in 10.3.16 -rocksdb.locking_issues_case3_rc : Added in 10.3.16 -rocksdb.locking_issues_case3_rr : Added in 10.3.16 -rocksdb.locking_issues_case4_rc : Added in 10.3.16 -rocksdb.locking_issues_case4_rr : Added in 10.3.16 -rocksdb.locking_issues_case5_rc : Added in 10.3.16 -rocksdb.locking_issues_case5_rr : Added in 10.3.16 -rocksdb.locking_issues_case6_rc : Added in 10.3.16 -rocksdb.locking_issues_case6_rr : Added in 10.3.16 -rocksdb.locking_issues_case7_rc : Added in 10.3.16 -rocksdb.locking_issues_case7_rc_lsr : Added in 10.3.16 -rocksdb.locking_issues_case7_rr : Added in 10.3.16 -rocksdb.locking_issues_case7_rr_lsr : Added in 10.3.16 +rocksdb.locking_issues : MDEV-14464 - Wrong result rocksdb.mariadb_ignore_dirs : MDEV-16639 - Server crash -rocksdb.mariadb_plugin : Modified in 10.3.16 rocksdb.mariadb_port_fixes : MDEV-16387 - Wrong plan rocksdb.max_open_files : MDEV-16639 - Server crash rocksdb.perf_context : MDEV-17285 - Wrong results @@ -635,35 +851,38 @@ rocksdb_rpl.rpl_binlog_xid_count : MDEV-16644 - Crash #----------------------------------------------------------------------- rocksdb_sys_vars.rocksdb_rate_limiter_bytes_per_sec_basic : MDEV-16639 - Crash -rocksdb_sys_vars.rocksdb_update_cf_options : MDEV-16955 - Bytes lost -rocksdb_sys_vars.rocksdb_update_cf_options_basic : MDEV-16955 - Bytes lost #----------------------------------------------------------------------- -roles.create_and_grant_role : MDEV-11772 - wrong result +roles.acl_statistics : Configuration added in 10.4.8 +roles.create_and_drop_role_invalid_user_table : Include file modified in 10.4.8 +roles.create_and_grant_role : MDEV-11772 - wrong result +roles.definer : Modified in 10.4.8 +roles.show_create_database-10463 : Modified in 10.4.8 #----------------------------------------------------------------------- rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server -rpl.create_or_replace_mix : Include file modified in 10.4.7 +rpl.create_or_replace_mix : MDEV-20523 - Wrong result; include file modified in 10.4.7 rpl.create_or_replace_row : Include file modified in 10.4.7 -rpl.create_or_replace_statement : Include file modified in 10.4.7 +rpl.create_or_replace_statement : MDEV-20523 - Wrong result; include file modified in 10.4.7 rpl.create_select : MDEV-14121 - Assertion failure rpl.kill_race_condition : Modified in 10.4.7 rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.mdev_17588 : MDEV-20137 - Table doesn't exist; added in 10.4.7 +rpl.mdev_17588 : Modified in 10.4.8 rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log -rpl.rpl_binlog_dup_entry : Added in 10.3.16 rpl.rpl_binlog_errors : MDEV-12742 - Crash rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master -rpl.rpl_blackhole : Modified in 10.3.16 -rpl.rpl_blackhole_row_annotate : Added in 10.3.16 +rpl.rpl_circular_for_4_hosts : MDEV-20536 - Server crash rpl.rpl_colSize : MDEV-16112 - Server crash +rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code +rpl.rpl_create_or_replace_fail : Added in 10.4.8 rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_domain_id_filter : MDEV-20213 - Server crash rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed @@ -671,6 +890,7 @@ rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_drop_temp_table_invaid_lex : Added in 10.4.7 rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_failed_drop_tbl_binlog : Added in 10.4.8 rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection @@ -681,6 +901,7 @@ rpl.rpl_gtid_reconnect : MDEV-14497 - Crash rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings rpl.rpl_gtid_until : MDEV-10625 - warnings in error log +rpl.rpl_ignore_grant : MDEV-20159 - Assertion failure rpl.rpl_ignore_table_update : MDEV-20159 - Assertion failure rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x @@ -690,9 +911,12 @@ rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object +rpl.rpl_known_bugs_detection : Modified in 10.2.27 +rpl.rpl_lcase_tblnames_rewrite_db : MDEV-20213 - Server crash rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed rpl.rpl_mdev6020 : MDEV-15272 - Server crash +rpl.rpl_mdev_17614 : Added in 10.4.8 rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait @@ -719,14 +943,13 @@ rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" fail rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_index_choice : MDEV-15196 - Slave crash -rpl.rpl_row_mysqlbinlog : Modified in 10.3.16 rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_row_type_conv_err_msg : Added in 10.4.8 rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum rpl.rpl_semi_sync : MDEV-11220 - Wrong result rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings -rpl.rpl_semi_sync_skip_repl : Modified in 10.3.16 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_no_slave : MDEV-20159 - Assertion failure rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition @@ -735,6 +958,7 @@ rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning rpl.rpl_show_slave_hosts : MDEV-10681 - Crash rpl.rpl_skip_replication : MDEV-13258 - Extra warning rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock +rpl.rpl_slave_load_in : MDEV-20159 - Assertion failure rpl.rpl_slave_load_tmpdir_not_exist : MDEV-14203 - Extra warning rpl.rpl_slow_query_log : MDEV-13250 - Test abort rpl.rpl_sp_effects : MDEV-13249 - Crash @@ -744,19 +968,23 @@ rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on mast rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash rpl.rpl_sync : MDEV-13830 - Assertion failure +rpl.rpl_sync_with_innodb_thd_conc : Added in 10.4.8 rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_trigger : MDEV-18055 - Wrong result rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error +rpl.rpl_user_variables : MDEV-20522 - Wrong result rpl.rpl_variables : MDEV-20150 - Server crash rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result rpl.show_status_stop_slave_race-7126 : MDEV-17438 - Timeout #----------------------------------------------------------------------- -rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc -rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash +rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc +rpl-tokudb.rpl_deadlock_tokudb : MDEV-20529 - mysqltest failed but provided no output +rpl-tokudb.rpl_extra_col_master_tokudb : MDEV-13258 - Extra warning +rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash #----------------------------------------------------------------------- @@ -803,16 +1031,50 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- +sys_vars.aria_recover_options_basic : Modified in 10.4.8 sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.delayed_insert_limit_func : MDEV-17683 - Wrong result +sys_vars.binlog_cache_size_basic : Modified in 10.4.8 +sys_vars.binlog_stmt_cache_size_basic : Modified in 10.4.8 +sys_vars.character_set_client_basic : Modified in 10.4.8 +sys_vars.character_set_connection_basic : Modified in 10.4.8 +sys_vars.character_set_database_basic : Modified in 10.4.8 +sys_vars.character_set_results_basic : Modified in 10.4.8 +sys_vars.character_set_server_basic : Modified in 10.4.8 +sys_vars.character_set_server_func : Modified in 10.4.8 +sys_vars.collation_connection_basic : Modified in 10.4.8 +sys_vars.collation_database_basic : Modified in 10.4.8 +sys_vars.collation_server_basic : Modified in 10.4.8 +sys_vars.expire_logs_days_basic : Modified in 10.4.8 +sys_vars.histogram_size_basic : Modified in 10.2.27 sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error sys_vars.innodb_ft_result_cache_limit : Modified in 10.2.26 +sys_vars.innodb_max_dirty_pages_pct_basic : Modified in 10.4.8 +sys_vars.innodb_max_dirty_pages_pct_lwm_basic : Modified in 10.4.8 +sys_vars.innodb_read_io_threads_basic : Configuration added in 10.4.8 +sys_vars.innodb_write_io_threads_basic : Configuration added in 10.4.8 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash +sys_vars.log_slow_verbosity_basic : Modified in 10.4.8 +sys_vars.long_query_time_basic : Modified in 10.4.8 +sys_vars.max_connect_errors_basic : Modified in 10.4.8 +sys_vars.max_connections_basic : Modified in 10.4.8 +sys_vars.max_heap_table_size_basic : Modified in 10.4.8 +sys_vars.max_seeks_for_key_func : Modified in 10.4.8 +sys_vars.myisam_recover_options_basic : Configuration added in 10.4.8 +sys_vars.myisam_sort_buffer_size_basic : Modified in 10.4.8 +sys_vars.optimizer_switch_basic : Modified in 10.4.8 +sys_vars.optimizer_use_condition_selectivity_basic : Modified in 10.4.8 +sys_vars.replicate_ignore_table_basic : Modified in 10.4.8 sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion sys_vars.slow_query_log_func : MDEV-14273 - Wrong result +sys_vars.sync_binlog_basic : Modified in 10.4.8 +sys_vars.sysvars_debug : Modified in 10.4.8 +sys_vars.sysvars_innodb : Modified in 10.4.8 +sys_vars.sysvars_server_embedded : Configuration deleted in 10.4.8 +sys_vars.sysvars_server_notembedded : Configuration deleted in 10.4.8 sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result +sys_vars.userstat_basic : Modified in 10.4.8 sys_vars.wait_timeout_func : MDEV-12896 - Wrong result sys_vars.wsrep_provider_basic : MDEV-19457 - Assertion failure @@ -822,6 +1084,10 @@ tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection tokudb.change_column_bin : MDEV-12640 - Lost connection tokudb.change_column_char : MDEV-12822 - Lost connection tokudb.change_column_varbin : MDEV-17682 - Timeout +tokudb.cluster_2968-0 : Modified in 10.4.8 +tokudb.cluster_2968-1 : Modified in 10.4.8 +tokudb.cluster_2968-2 : Modified in 10.4.8 +tokudb.cluster_2968-3 : Modified in 10.4.8 tokudb.cluster_filter : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan @@ -839,6 +1105,7 @@ tokudb.rows-32m-rand-insert : MDEV-12640 - Crash tokudb.rows-32m-seq-insert : MDEV-12640 - Crash tokudb.savepoint-5 : MDEV-15280 - Wrong result tokudb.type_datetime : MDEV-15193 - Wrong result +tokudb.type_varchar : Modified in 10.4.8 #----------------------------------------------------------------------- @@ -860,7 +1127,13 @@ tokudb_bugs.xa-3 : MDEV-16953 - Corrupt log record found #----------------------------------------------------------------------- -tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection +tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection +tokudb_parts.partition_exch_qa_4_tokudb : Include file modified in 10.4.8 +tokudb_parts.partition_exch_qa_8_tokudb : Include file modified in 10.4.8 +tokudb_parts.partition_mgm_lc0_tokudb : Include file modified in 10.4.8 +tokudb_parts.partition_mgm_lc10_tokudb : Include file modified in 10.4.8 +tokudb_parts.partition_mgm_lc1_tokudb : Include file modified in 10.4.8 +tokudb_parts.partition_mgm_lc2_tokudb : Include file modified in 10.4.8 #----------------------------------------------------------------------- @@ -883,29 +1156,50 @@ unit.ma_test_loghandler : MDEV-10638 - record read not ok #----------------------------------------------------------------------- -vcol.not_supported : MDEV-10639 - Testcase timeout -vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout -vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.4.7 +vcol.cross_db : Modified in 10.4.8 +vcol.not_supported : MDEV-10639 - Testcase timeout +vcol.update : Modified in 10.4.8 +vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout +vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.4.7 +vcol.vcol_select_innodb : Modified in 10.4.8 +vcol.vcol_select_myisam : Modified in 10.4.8 +vcol.vcol_sql_mode : Added in 10.4.8 +vcol.vcol_sql_mode_upgrade : Added in 10.4.8 +vcol.vcol_trigger_sp_innodb : Include file modified in 10.4.8 +vcol.vcol_trigger_sp_myisam : Include file modified in 10.4.8 #----------------------------------------------------------------------- -versioning.create : Modified in 10.3.16 -versioning.engines : New combination added in 10.3.16 -versioning.partition : Modified in 10.4.7 -versioning.replace : Modified in 10.3.16 -versioning.rpl : Modified in 10.3.16 -versioning.simple : Modified in 10.3.17 -versioning.truncate : Modified in 10.4.7 -versioning.trx_id : Modified in 10.4.7 -versioning.update-big : MDEV-15458 - Server crash; added in 10.3.16 +versioning.alter : Modified in 10.4.8 +versioning.auto_increment : Include file modified in 10.4.8 +versioning.commit_id : Include file modified in 10.4.8 +versioning.create : Modified in 10.4.8 +versioning.cte : Modified in 10.4.8 +versioning.delete : Modified in 10.4.8 +versioning.derived : Modified in 10.4.8 +versioning.foreign : Modified in 10.4.8 +versioning.insert : Include file modified in 10.4.8 +versioning.online : Modified in 10.4.8 +versioning.partition : Modified in 10.4.8 +versioning.partition_innodb : Modified in 10.4.8 +versioning.replace : Modified in 10.4.8 +versioning.select : Modified in 10.4.8 +versioning.select2 : Include file modified in 10.4.8 +versioning.simple : Modified in 10.3.17 +versioning.truncate : Modified in 10.4.8 +versioning.trx_id : Modified in 10.4.8 +versioning.update : Include file modified in 10.4.8 +versioning.update-big : Modified in 10.4.8 +versioning.view : Modified in 10.4.8 #----------------------------------------------------------------------- -wsrep.* : suite.pm modified in 10.4.7 -wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node -wsrep.mdev_6832 : MDEV-14195 - Check testcase failed -wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use -wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.4.7 +wsrep.* : suite.pm modified in 10.4.7 +wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node +wsrep.mdev_6832 : MDEV-14195 - Check testcase failed +wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.4.8 +wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use +wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.4.7 #----------------------------------------------------------------------- diff --git a/sql/my_json_writer.h b/sql/my_json_writer.h index 07a46f65390..f1f1be70bb0 100644 --- a/sql/my_json_writer.h +++ b/sql/my_json_writer.h @@ -562,6 +562,9 @@ public: /* RAII-based class to disable writing into the JSON document + The tracing is disabled as soon as the object is created. + The destuctor is called as soon as we exit the scope of the object + and the tracing is enabled back. */ class Json_writer_temp_disable diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index de999559b8c..758b1e85646 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -457,7 +457,6 @@ void best_access_path(JOIN *join, JOIN_TAB *s, table_map remaining_tables, uint idx, bool disable_jbuf, double record_count, POSITION *pos, POSITION *loose_scan_pos); -void trace_plan_prefix(JOIN *join, uint idx, table_map remaining_tables); static Item *create_subq_in_equalities(THD *thd, SJ_MATERIALIZATION_INFO *sjm, Item_in_subselect *subq_pred); @@ -3859,7 +3858,7 @@ void fix_semijoin_strategies_for_picked_join_order(JOIN *join) join->cur_sj_inner_tables= 0; Json_writer_object semijoin_strategy(thd); semijoin_strategy.add("semi_join_strategy","LooseScan"); - Json_writer_array semijoin_plan(thd, "join_order"); + Json_writer_array semijoin_plan(thd, "join_order"); for (idx= first; idx <= tablenr; idx++) { if (unlikely(thd->trace_started())) diff --git a/sql/opt_trace.cc b/sql/opt_trace.cc index 4c9aa43669d..d95f0795542 100644 --- a/sql/opt_trace.cc +++ b/sql/opt_trace.cc @@ -416,6 +416,12 @@ size_t Opt_trace_context::remaining_mem_size() return max_mem_size; } +/* + Disable tracing for children if the current trace is already present. + Currently only one trace is stored and there is no mechanism + to restore traces, so disabling tracing for children is the best option. +*/ + bool Opt_trace_context::disable_tracing_if_required() { if (current_trace) @@ -633,6 +639,73 @@ void add_table_scan_values_to_trace(THD *thd, JOIN_TAB *tab) table_rec.add("rows", tab->found_records) .add("cost", tab->read_time); } + + +/* + @brief + Add the tables inside a partial join to the optimizer trace + + @param join join handler + @param idx length of the partial QEP in 'join->positions' + @table_map map of all non-const tables of the join + + @note + This function is used during best_access_path to print the tables + inside the partial join that were considered doing the cost based + analysis of the various join orders. +*/ + +void trace_plan_prefix(JOIN *join, uint idx, table_map join_tables) +{ + THD *const thd= join->thd; + Json_writer_array plan_prefix(thd, "plan_prefix"); + for (uint i= 0; i < idx; i++) + { + TABLE_LIST *const tr= join->positions[i].table->tab_list; + if (!(tr->map & join_tables)) + plan_prefix.add_table_name(join->positions[i].table); + } +} + + +/* + Print the join order of all the tables for top level select. + + For example: + + select * from ot1 + where ot1.a IN (select it1.a from it1, it2 where it1.b=it2.a); + + So this function would print + ot1, ----> For select #1 +*/ + +void print_final_join_order(JOIN *join) +{ + Json_writer_object join_order(join->thd); + Json_writer_array best_order(join->thd, "best_join_order"); + JOIN_TAB *j; + uint i; + for (j= join->join_tab,i=0 ; i < join->top_join_tab_count; + i++, j++) + best_order.add_table_name(j); +} + + +void print_best_access_for_table(THD *thd, POSITION *pos, + enum join_type type) +{ + Json_writer_object trace_best_access(thd, "chosen_access_method"); + trace_best_access.add("type", type == JT_ALL ? "scan" : + join_type_str[type]); + trace_best_access.add("records", pos->records_read); + trace_best_access.add("cost", pos->read_time); + trace_best_access.add("uses_join_buffering", pos->use_join_buffer); + trace_best_access.add("filter_used", + pos->range_rowid_filter_info != NULL); +} + + /* Introduce enum_query_type flags parameter, maybe also allow EXPLAIN also use this function. diff --git a/sql/opt_trace.h b/sql/opt_trace.h index 52318bc6b7f..46adbec2c3c 100644 --- a/sql/opt_trace.h +++ b/sql/opt_trace.h @@ -105,6 +105,10 @@ void opt_trace_print_expanded_query(THD *thd, SELECT_LEX *select_lex, Json_writer_object *trace_object); void add_table_scan_values_to_trace(THD *thd, JOIN_TAB *tab); +void trace_plan_prefix(JOIN *join, uint idx, table_map join_tables); +void print_final_join_order(JOIN *join); +void print_best_access_for_table(THD *thd, POSITION *pos, + enum join_type type); /* Security related (need to add a proper comment here) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1361930b65d..4724f3a7e72 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -121,7 +121,6 @@ static bool best_extension_by_limited_search(JOIN *join, double read_time, uint depth, uint prune_level, uint use_cond_selectivity); -void trace_plan_prefix(JOIN *join, uint idx, table_map remaining_tables); static uint determine_search_depth(JOIN* join); C_MODE_START static int join_tab_cmp(const void *dummy, const void* ptr1, const void* ptr2); @@ -7218,6 +7217,7 @@ best_access_path(JOIN *join, SplM_plan_info *spl_plan= 0; Range_rowid_filter_cost_info *filter= 0; const char* cause= NULL; + enum join_type best_type= JT_UNKNOWN, type= JT_UNKNOWN; disable_jbuf= disable_jbuf || idx == join->const_tables; @@ -7357,7 +7357,8 @@ best_access_path(JOIN *join, */ tmp= prev_record_reads(join->positions, idx, found_ref); records= 1.0; - trace_access_idx.add("access_type", "fulltext") + type= JT_FT; + trace_access_idx.add("access_type", join_type_str[type]) .add("index", keyinfo->name); } else @@ -7380,14 +7381,16 @@ best_access_path(JOIN *join, (!(key_flags & HA_NULL_PART_KEY) || // (2) all_key_parts == notnull_part)) // (3) { - trace_access_idx.add("access_type", "eq_ref") + type= JT_EQ_REF; + trace_access_idx.add("access_type", join_type_str[type]) .add("index", keyinfo->name); tmp = prev_record_reads(join->positions, idx, found_ref); records=1.0; } else { - trace_access_idx.add("access_type", "ref") + type= JT_REF; + trace_access_idx.add("access_type", join_type_str[type]) .add("index", keyinfo->name); if (!found_ref) { /* We found a const key */ @@ -7482,8 +7485,8 @@ best_access_path(JOIN *join, } else { - trace_access_idx.add("access_type", - ref_or_null_part ? "ref_or_null" : "ref") + type = ref_or_null_part ? JT_REF_OR_NULL : JT_REF; + trace_access_idx.add("access_type", join_type_str[type]) .add("index", keyinfo->name); /* Use as much key-parts as possible and a uniq key is better @@ -7698,6 +7701,7 @@ best_access_path(JOIN *join, best_max_key_part= max_key_part; best_ref_depends_map= found_ref; best_filter= filter; + best_type= type; } else { @@ -7751,6 +7755,7 @@ best_access_path(JOIN *join, best_ref_depends_map= 0; best_uses_jbuf= TRUE; best_filter= 0; + best_type= JT_HASH; trace_access_hash.add("type", "hash"); trace_access_hash.add("index", "hj-key"); trace_access_hash.add("cost", rnd_records); @@ -7814,10 +7819,6 @@ best_access_path(JOIN *join, filter= 0; if (s->quick) { - trace_access_scan.add("access_type", "range"); - /* - should have some info about all the different QUICK_SELECT - */ /* For each record we: - read record range through 'quick' @@ -7843,23 +7844,29 @@ best_access_path(JOIN *join, { tmp-= filter->get_adjusted_gain(rows); DBUG_ASSERT(tmp >= 0); - } + } + type= JT_RANGE; } else { + type= JT_INDEX_MERGE; best_filter= 0; } - loose_scan_opt.check_range_access(join, idx, s->quick); } else { - trace_access_scan.add("access_type", "scan"); /* Estimate cost of reading table. */ if (s->table->force_index && !best_key) // index scan + { + type= JT_NEXT; tmp= s->table->file->read_time(s->ref.key, 1, s->records); + } else // table scan + { tmp= s->scan_time(); + type= JT_ALL; + } if ((s->table->map & join->outer_join) || disable_jbuf) // Can't use join cache { @@ -7889,6 +7896,9 @@ best_access_path(JOIN *join, } } + trace_access_scan.add("access_type", type == JT_ALL ? + "scan" : + join_type_str[type]); /* Splitting technique cannot be used with join cache */ if (s->table->is_splittable()) tmp+= s->table->get_materialization_cost(); @@ -7928,6 +7938,7 @@ best_access_path(JOIN *join, best_uses_jbuf= MY_TEST(!disable_jbuf && !((s->table->map & join->outer_join))); spl_plan= 0; + best_type= type; } trace_access_scan.add("chosen", best_key == NULL); } @@ -7959,6 +7970,11 @@ best_access_path(JOIN *join, trace_access_scan.add("use_tmp_table", true); join->sort_by_table= (TABLE*) 1; // Must use temporary table } + trace_access_scan.end(); + trace_paths.end(); + + if (unlikely(thd->trace_started())) + print_best_access_for_table(thd, pos, best_type); DBUG_VOID_RETURN; } @@ -9189,18 +9205,6 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s, } -void trace_plan_prefix(JOIN *join, uint idx, table_map remaining_tables) -{ - THD *const thd= join->thd; - Json_writer_array plan_prefix(thd, "plan_prefix"); - for (uint i= 0; i < idx; i++) - { - TABLE_LIST *const tr= join->positions[i].table->tab_list; - if (!(tr->map & remaining_tables)) - plan_prefix.add_table_name(join->positions[i].table); - } -} - /** Find a good, possibly optimal, query execution plan (QEP) by a possibly exhaustive search. @@ -9499,6 +9503,8 @@ best_extension_by_limited_search(JOIN *join, Hence it may be wrong. */ current_read_time= COST_ADD(current_read_time, current_record_count); + trace_one_table.add("estimated_join_cardinality", + partial_join_cardinality); if (current_read_time < join->best_read) { memcpy((uchar*) join->best_positions, (uchar*) join->positions, @@ -10320,6 +10326,9 @@ bool JOIN::get_best_combination() top_join_tab_count= (uint)(join_tab_ranges.head()->end - join_tab_ranges.head()->start); + if (unlikely(thd->trace_started())) + print_final_join_order(this); + update_depend_map(this); DBUG_RETURN(0); } diff --git a/sql/table.cc b/sql/table.cc index 0b55f3172b9..2cafa5f6034 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -3866,6 +3866,7 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share, outparam->check_constraints= check_constraint_ptr; vcol_init_mode mode= VCOL_INIT_DEPENDENCY_FAILURE_IS_WARNING; +#if MYSQL_VERSION_ID > 100500 switch (thd->lex->sql_command) { case SQLCOM_CREATE_TABLE: @@ -3880,9 +3881,10 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share, default: break; } +#endif - if (unlikely(parse_vcol_defs(thd, &outparam->mem_root, outparam, - &error_reported, mode))) + if (parse_vcol_defs(thd, &outparam->mem_root, outparam, + &error_reported, mode)) { error= OPEN_FRM_CORRUPTED; goto err; diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index 9a395b8d0dc..1f410f7af0e 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -2758,7 +2758,6 @@ fseg_free_page_low( ulint state; ib_id_t descr_id; ib_id_t seg_id; - ulint i; ut_ad(seg_inode != NULL); ut_ad(mtr != NULL); @@ -2794,7 +2793,7 @@ fseg_free_page_low( if (state != XDES_FSEG) { /* The page is in the fragment pages of the segment */ - for (i = 0;; i++) { + for (ulint i = 0;; i++) { if (fseg_get_nth_frag_page_no(seg_inode, i, mtr) == offset) { @@ -2954,7 +2953,6 @@ fseg_free_extent( xdes_t* descr; ulint not_full_n_used; ulint descr_n_used; - ulint i; ut_ad(mtr != NULL); @@ -2970,7 +2968,7 @@ fseg_free_extent( #ifdef BTR_CUR_HASH_ADAPT if (ahi) { - for (i = 0; i < FSP_EXTENT_SIZE; i++) { + for (ulint i = 0; i < FSP_EXTENT_SIZE; i++) { if (!xdes_mtr_get_bit(descr, XDES_FREE_BIT, i, mtr)) { /* Drop search system page hash index @@ -3008,7 +3006,7 @@ fseg_free_extent( fsp_free_extent(space, page, mtr); #ifdef UNIV_DEBUG - for (i = 0; i < FSP_EXTENT_SIZE; i++) { + for (ulint i = 0; i < FSP_EXTENT_SIZE; i++) { buf_page_set_file_page_was_freed( page_id_t(space->id, first_page_in_extent + i)); diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index ea6d8e235c7..bf6172799c4 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -398,13 +398,16 @@ struct fil_space_t { static bool is_flags_full_crc32_equal(ulint flags, ulint expected) { ut_ad(full_crc32(flags)); + ulint page_ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags); if (full_crc32(expected)) { - return get_compression_algo(flags) - == get_compression_algo(expected); + /* The data file may have been created with a + different innodb_compression_algorithm. But + we only support one innodb_page_size for all files. */ + return page_ssize + == FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(expected); } - ulint page_ssize = FSP_FLAGS_FCRC32_GET_PAGE_SSIZE(flags); ulint space_page_ssize = FSP_FLAGS_GET_PAGE_SSIZE(expected); if (page_ssize == 5) { @@ -415,7 +418,7 @@ struct fil_space_t { return false; } - return is_compressed(expected) == is_compressed(flags); + return true; } /** Whether old tablespace flags match full_crc32 flags. @param[in] flags flags present @@ -441,7 +444,7 @@ struct fil_space_t { return false; } - return is_compressed(expected) == is_compressed(flags); + return true; } /** Whether both fsp flags are equivalent */ static bool is_flags_equal(ulint flags, ulint expected) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index bb7fa08f70e..60d28481669 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -2306,6 +2306,8 @@ class Rdb_transaction { bool m_is_delayed_snapshot = false; bool m_is_two_phase = false; + std::unordered_set modified_tables; + private: /* Number of write operations this transaction had when we took the last @@ -3001,6 +3003,25 @@ protected: virtual void start_tx() = 0; virtual void start_stmt() = 0; + protected: + // Non-virtual functions with actions to be done on transaction start and + // commit. + void on_commit() { + time_t tm; + tm = time(nullptr); + for (auto &it : modified_tables) { + it->update_time = tm; + } + modified_tables.clear(); + } + void on_rollback() { + modified_tables.clear(); + } + public: + void log_table_write_op(Rdb_tbl_def *tbl) { + modified_tables.insert(tbl); + } + void set_initial_savepoint() { /* Set the initial savepoint. If the first statement in the transaction @@ -3185,7 +3206,9 @@ class Rdb_transaction_impl : public Rdb_transaction { goto error; } + on_commit(); error: + on_rollback(); /* Save the transaction object to be reused */ release_tx(); @@ -3201,6 +3224,7 @@ class Rdb_transaction_impl : public Rdb_transaction { public: void rollback() override { + on_rollback(); m_write_count = 0; m_insert_count = 0; m_update_count = 0; @@ -3522,7 +3546,9 @@ class Rdb_writebatch_impl : public Rdb_transaction { res = true; goto error; } + on_commit(); error: + on_rollback(); reset(); m_write_count = 0; @@ -3555,6 +3581,7 @@ class Rdb_writebatch_impl : public Rdb_transaction { } void rollback() override { + on_rollback(); m_write_count = 0; m_insert_count = 0; m_update_count = 0; @@ -7698,6 +7725,8 @@ int ha_rocksdb::create_table(const std::string &table_name, goto error; } + m_tbl_def->put_creation_time(&dict_manager, batch, time(nullptr)); + err = dict_manager.commit(batch); if (err != HA_EXIT_SUCCESS) { dict_manager.unlock(); @@ -10334,6 +10363,8 @@ int ha_rocksdb::update_write_row(const uchar *const old_data, row_info.tx->incr_insert_count(); } + row_info.tx->log_table_write_op(m_tbl_def); + if (do_bulk_commit(row_info.tx)) { DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD); } @@ -10813,6 +10844,7 @@ int ha_rocksdb::delete_row(const uchar *const buf) { } tx->incr_delete_count(); + tx->log_table_write_op(m_tbl_def); if (do_bulk_commit(tx)) { DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD); @@ -11011,6 +11043,12 @@ int ha_rocksdb::info(uint flag) { k->rec_per_key[j] = x; } } + + stats.create_time = m_tbl_def->get_creation_time(&dict_manager); + } + + if (flag & HA_STATUS_TIME) { + stats.update_time = m_tbl_def->update_time; } if (flag & HA_STATUS_ERRKEY) { diff --git a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc index 29ec94188a2..3bb766d59b4 100644 --- a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc +++ b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc @@ -121,12 +121,12 @@ set rocksdb_bulk_load=0; --remove_file $file # Make sure row count index stats are correct ---replace_column 6 # 7 # 8 # 9 # +--replace_column 6 # 7 # 8 # 9 # 12 # 13 # SHOW TABLE STATUS WHERE name LIKE 't%'; ANALYZE TABLE t1, t2, t3; ---replace_column 6 # 7 # 8 # 9 # +--replace_column 6 # 7 # 8 # 9 # 12 # 13 # SHOW TABLE STATUS WHERE name LIKE 't%'; # Make sure all the data is there. diff --git a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc index 46aea8f23b5..d6bee980fef 100644 --- a/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc +++ b/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc @@ -121,12 +121,12 @@ set rocksdb_bulk_load=0; --remove_file $file # Make sure row count index stats are correct ---replace_column 6 # 7 # 8 # 9 # +--replace_column 6 # 7 # 8 # 9 # 12 # 13 # SHOW TABLE STATUS WHERE name LIKE 't%'; ANALYZE TABLE t1, t2, t3; ---replace_column 6 # 7 # 8 # 9 # +--replace_column 6 # 7 # 8 # 9 # 12 # 13 # SHOW TABLE STATUS WHERE name LIKE 't%'; # Make sure all the data is there. diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result index aa3958b0b1c..b8a98efa55e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result @@ -40,9 +40,9 @@ pk a b set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N select count(pk),count(a) from t1; count(pk) count(a) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result index 7f97eeeacd6..56b1a8322cc 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result @@ -40,9 +40,9 @@ pk a b set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N select count(pk),count(a) from t1; count(pk) count(a) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result index 1281ec9bc4f..1a260c69fa3 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result @@ -40,9 +40,9 @@ pk a b set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N select count(pk),count(a) from t1; count(pk) count(a) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result index 658b30fce72..e216fb1cc45 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result @@ -40,9 +40,9 @@ pk a b set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -53,9 +53,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_bin NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_bin NULL partitioned 0 N select count(pk),count(a) from t1; count(pk) count(a) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result index 2c380a430e7..63d07a25961 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result @@ -72,9 +72,9 @@ LOAD DATA INFILE INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -85,9 +85,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N select count(a),count(b) from t1; count(a) count(b) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result index 24c7909b06d..a6e0793f5d1 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result @@ -72,9 +72,9 @@ LOAD DATA INFILE INTO TABLE t3; set rocksdb_bulk_load=0; SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N ANALYZE TABLE t1, t2, t3; Table Op Msg_type Msg_text test.t1 analyze status Engine-independent statistics collected @@ -85,9 +85,9 @@ test.t3 analyze status Engine-independent statistics collected test.t3 analyze status OK SHOW TABLE STATUS WHERE name LIKE 't%'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned 0 N +t1 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 2500000 # # # # 0 NULL # # NULL latin1_swedish_ci NULL partitioned 0 N select count(a),count(b) from t1; count(a) count(b) 2500000 2500000 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/issue255.result b/storage/rocksdb/mysql-test/rocksdb/r/issue255.result index d9b8f0e0851..840699ddaa1 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/issue255.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/issue255.result @@ -2,7 +2,7 @@ CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 6 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES ('538647864786478647864'); Warnings: Warning 1264 Out of range value for column 'pk' at row 1 @@ -12,7 +12,7 @@ pk 9223372036854775807 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 2 22 44 0 0 0 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed 2 22 44 0 0 0 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY' SELECT * FROM t1; @@ -21,7 +21,7 @@ pk 9223372036854775807 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY' SELECT * FROM t1; @@ -30,13 +30,13 @@ pk 9223372036854775807 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 9223372036854775807 # # NULL latin1_swedish_ci NULL 0 N DROP TABLE t1; CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 6 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 6 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (1000); Warnings: Warning 1264 Out of range value for column 'pk' at row 1 @@ -46,7 +46,7 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '127' for key 'PRIMARY' SELECT * FROM t1; @@ -55,7 +55,7 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 VALUES (); ERROR 23000: Duplicate entry '127' for key 'PRIMARY' SELECT * FROM t1; @@ -64,5 +64,5 @@ pk 127 SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB # Fixed # # # # # # 127 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB # Fixed # # # # # # 127 # # NULL latin1_swedish_ci NULL 0 N DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result index f720a33e86b..f2f9adebf46 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result @@ -1422,7 +1422,7 @@ create table t1 (i int primary key auto_increment) engine=RocksDB; insert into t1 values (null),(null); show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 1000 0 # 0 0 0 3 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed 1000 0 # 0 0 0 3 # # NULL latin1_swedish_ci NULL 0 N drop table t1; # # Fix Issue #4: Crash when using pseudo-unique keys @@ -2595,7 +2595,7 @@ CREATE TABLE t1(a INT AUTO_INCREMENT KEY); INSERT INTO t1 VALUES(0),(-1),(0); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 1000 0 0 0 0 0 3 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed 1000 0 0 0 0 0 3 # # NULL latin1_swedish_ci NULL 0 N SELECT * FROM t1; a -1 @@ -2606,7 +2606,7 @@ CREATE TABLE t1(a INT AUTO_INCREMENT KEY); INSERT INTO t1 VALUES(0),(10),(0); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 1000 0 0 0 0 0 12 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed 1000 0 0 0 0 0 12 # # NULL latin1_swedish_ci NULL 0 N SELECT * FROM t1; a 1 diff --git a/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result b/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result index 572cac19f4a..457a4822301 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result @@ -7,12 +7,12 @@ set global rocksdb_force_flush_memtable_now = true; CREATE TABLE t3 (a INT, b CHAR(8), pk INT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8; SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' ); Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t2 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N -t3 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL NULL NULL NULL utf8_general_ci NULL 0 N +t1 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL # # NULL latin1_swedish_ci NULL 0 N +t3 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL # # NULL utf8_general_ci NULL 0 N SHOW TABLE STATUS WHERE name LIKE 't2'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t2 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL 0 N +t2 ROCKSDB 10 Fixed 1000 # # 0 0 0 NULL # # NULL latin1_swedish_ci NULL 0 N DROP TABLE t1, t2, t3; CREATE DATABASE `db_new..............................................end`; USE `db_new..............................................end`; @@ -22,3 +22,39 @@ SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.table_statistics WHERE T TABLE_SCHEMA db_new..............................................end TABLE_NAME t1_new..............................................end DROP DATABASE `db_new..............................................end`; +# +# MDEV-17171: Bug: RocksDB Tables do not have "Creation Date" +# +use test; +create table t1 (a int) engine=rocksdb; +select create_time is not null, update_time, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; +create_time is not null update_time check_time +1 NULL NULL +insert into t1 values (1); +select create_time is not null, update_time is not null, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; +create_time is not null update_time is not null check_time +1 1 NULL +flush tables; +select create_time is not null, update_time is not null, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; +create_time is not null update_time is not null check_time +1 1 NULL +select create_time, update_time into @create_tm, @update_tm +from information_schema.tables +where table_schema=database() and table_name='t1'; +select sleep(3); +sleep(3) +0 +insert into t1 values (2); +select +create_time=@create_tm /* should not change */ , +timestampdiff(second, @update_tm, update_time) > 2, +check_time +from information_schema.tables +where table_schema=database() and table_name='t1'; +create_time=@create_tm 1 +timestampdiff(second, @update_tm, update_time) > 2 1 +check_time NULL +drop table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result b/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result index 76d00d90420..47048677079 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result @@ -9,19 +9,19 @@ DROP TABLE t1; CREATE TABLE t1 (a INT KEY AUTO_INCREMENT, c CHAR(8)) ENGINE=rocksdb; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed # # # 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed # # # 0 0 0 1 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 (c) VALUES ('a'),('b'),('c'); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed # # # 0 0 0 4 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed # # # 0 0 0 4 # # NULL latin1_swedish_ci NULL 0 N TRUNCATE TABLE t1; SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed # # # 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed # # # 0 0 0 1 # # NULL latin1_swedish_ci NULL 0 N INSERT INTO t1 (c) VALUES ('d'); SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary -t1 ROCKSDB 10 Fixed # # # 0 0 0 2 NULL NULL NULL latin1_swedish_ci NULL 0 N +t1 ROCKSDB 10 Fixed # # # 0 0 0 2 # # NULL latin1_swedish_ci NULL 0 N SELECT a,c FROM t1; a c 1 d diff --git a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result index c66b17926b7..558924e6513 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/ttl_primary_read_filtering.result @@ -76,6 +76,7 @@ select variable_value-@a from information_schema.global_status where variable_na variable_value-@a 4 DROP TABLE t1; +set global ROCKSDB_COMPACT_CF= 'default'; CREATE TABLE t1 ( a int, b int, diff --git a/storage/rocksdb/mysql-test/rocksdb/suite.pm b/storage/rocksdb/mysql-test/rocksdb/suite.pm index e4f074df471..633e883f46d 100644 --- a/storage/rocksdb/mysql-test/rocksdb/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb/suite.pm @@ -11,7 +11,7 @@ use My::Find; use File::Basename; use strict; -sub is_default { not $::opt_embedded_server } +#sub is_default { not $::opt_embedded_server } my $sst_dump= ::mtr_exe_maybe_exists( diff --git a/storage/rocksdb/mysql-test/rocksdb/t/issue255.test b/storage/rocksdb/mysql-test/rocksdb/t/issue255.test index 370dece0c6c..686f45b4056 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/issue255.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/issue255.test @@ -3,24 +3,25 @@ CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 VALUES ('538647864786478647864'); ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SELECT * FROM t1; +--replace_column 12 # 13 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; @@ -28,24 +29,24 @@ DROP TABLE t1; CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT); INSERT INTO t1 VALUES (5); ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 VALUES (1000); SELECT * FROM t1; ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; --error ER_DUP_ENTRY INSERT INTO t1 VALUES (); SELECT * FROM t1; ---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # +--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test index 96fe1a90bc9..84a9a5bbd5a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test @@ -1207,7 +1207,7 @@ drop table t1; create table t1 (i int primary key auto_increment) engine=RocksDB; insert into t1 values (null),(null); ---replace_column 7 # +--replace_column 7 # 12 # 13 # show table status like 't1'; drop table t1; @@ -1914,11 +1914,13 @@ DROP TABLE t1; # value is 4 while MyRocks will show it as 3. CREATE TABLE t1(a INT AUTO_INCREMENT KEY); INSERT INTO t1 VALUES(0),(-1),(0); +--replace_column 12 # 13 # SHOW TABLE STATUS LIKE 't1'; SELECT * FROM t1; DROP TABLE t1; CREATE TABLE t1(a INT AUTO_INCREMENT KEY); INSERT INTO t1 VALUES(0),(10),(0); +--replace_column 12 # 13 # SHOW TABLE STATUS LIKE 't1'; SELECT * FROM t1; DROP TABLE t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test b/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test index a293b9ee6b8..2aa4c4cc13a 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test @@ -25,7 +25,7 @@ set global rocksdb_force_flush_memtable_now = true; CREATE TABLE t3 (a INT, b CHAR(8), pk INT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8; ---replace_column 6 # 7 # +--replace_column 6 # 7 # 12 # 13 # SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' ); # Some statistics don't get updated as quickly. The Data_length and @@ -49,7 +49,7 @@ set global rocksdb_force_flush_memtable_now = true; # We expect the number of rows to be 10000. Data_len and Avg_row_len # may vary, depending on built-in compression library. ---replace_column 6 # 7 # +--replace_column 6 # 7 # 12 # 13 # SHOW TABLE STATUS WHERE name LIKE 't2'; DROP TABLE t1, t2, t3; @@ -63,3 +63,36 @@ CREATE TABLE `t1_new..............................................end`(a int) en INSERT INTO `t1_new..............................................end` VALUES (1); --query_vertical SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.table_statistics WHERE TABLE_NAME = 't1_new..............................................end' DROP DATABASE `db_new..............................................end`; +--echo # +--echo # MDEV-17171: Bug: RocksDB Tables do not have "Creation Date" +--echo # +use test; +create table t1 (a int) engine=rocksdb; + +select create_time is not null, update_time, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; + +insert into t1 values (1); +select create_time is not null, update_time is not null, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; + +flush tables; +select create_time is not null, update_time is not null, check_time +from information_schema.tables where table_schema=database() and table_name='t1'; + +select create_time, update_time into @create_tm, @update_tm +from information_schema.tables +where table_schema=database() and table_name='t1'; + +select sleep(3); +insert into t1 values (2); + +--vertical_results +select + create_time=@create_tm /* should not change */ , + timestampdiff(second, @update_tm, update_time) > 2, + check_time +from information_schema.tables +where table_schema=database() and table_name='t1'; + +drop table t1; diff --git a/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test b/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test index a61488654a3..1001eeb6cde 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test @@ -29,22 +29,22 @@ DROP TABLE t1; CREATE TABLE t1 (a INT KEY AUTO_INCREMENT, c CHAR(8)) ENGINE=rocksdb; #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # ---replace_column 5 # 6 # 7 # +--replace_column 5 # 6 # 7 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 (c) VALUES ('a'),('b'),('c'); #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # ---replace_column 5 # 6 # 7 # +--replace_column 5 # 6 # 7 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; TRUNCATE TABLE t1; #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # ---replace_column 5 # 6 # 7 # +--replace_column 5 # 6 # 7 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; INSERT INTO t1 (c) VALUES ('d'); #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 # ---replace_column 5 # 6 # 7 # +--replace_column 5 # 6 # 7 # 12 # 13 # SHOW TABLE STATUS LIKE 't1'; --sorted_result diff --git a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test index 4e8b081c4d5..7a7609f456e 100644 --- a/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test +++ b/storage/rocksdb/mysql-test/rocksdb/t/ttl_primary_read_filtering.test @@ -102,6 +102,8 @@ SELECT * FROM t1; select variable_value-@a from information_schema.global_status where variable_name='rocksdb_rows_filtered'; DROP TABLE t1; +# Compact away the dropped data +set global ROCKSDB_COMPACT_CF= 'default'; # Read filtering index scan tests (None of these queries should return any results) CREATE TABLE t1 ( diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm index 79c630f87f1..1cc123b2a2a 100644 --- a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.pm @@ -9,7 +9,7 @@ use My::Find; use File::Basename; use strict; -sub is_default { not $::opt_embedded_server } +#sub is_default { not $::opt_embedded_server } my $sst_dump= ::mtr_exe_maybe_exists( diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm index 3423d34ded5..106a1d6a0e7 100644 --- a/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_stress/suite.pm @@ -11,7 +11,7 @@ use My::Find; use File::Basename; use strict; -sub is_default { not $::opt_embedded_server } +#sub is_default { not $::opt_embedded_server } my $sst_dump= ::mtr_exe_maybe_exists( diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm index c8452b55227..5264d657ef7 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.pm @@ -8,7 +8,7 @@ use My::Find; use File::Basename; use strict; -sub is_default { not $::opt_embedded_server } +#sub is_default { not $::opt_embedded_server } my $sst_dump= ::mtr_exe_maybe_exists( diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc index e369c08dd51..928ee55d3ce 100644 --- a/storage/rocksdb/rdb_datadic.cc +++ b/storage/rocksdb/rdb_datadic.cc @@ -3517,6 +3517,27 @@ Rdb_tbl_def::~Rdb_tbl_def() { } } +void Rdb_tbl_def::put_creation_time(Rdb_dict_manager *dict_manager, + rocksdb::WriteBatchBase *batch, + time_t timeval) { + dict_manager->put_creation_time(batch, + m_key_descr_arr[0]->get_gl_index_id(), + timeval); + create_time = timeval; +} + +time_t Rdb_tbl_def::get_creation_time(Rdb_dict_manager *dict_manager) { + time_t tm; + if (create_time == CREATE_TIME_UNKNOWN) { + if (dict_manager->get_creation_time(m_key_descr_arr[0]->get_gl_index_id(), + &tm)) + create_time = tm; + else + create_time = 0; // Not available + } + return create_time; +} + /* Put table definition DDL entry. Actual write is done at Rdb_dict_manager::commit. @@ -5343,6 +5364,7 @@ rocksdb::Status Rdb_dict_manager::put_auto_incr_val( value_writer.to_slice()); } + bool Rdb_dict_manager::get_auto_incr_val(const GL_INDEX_ID &gl_index_id, ulonglong *new_val) const { Rdb_buf_writer key_writer; @@ -5362,6 +5384,51 @@ bool Rdb_dict_manager::get_auto_incr_val(const GL_INDEX_ID &gl_index_id, return false; } + +rocksdb::Status +Rdb_dict_manager::put_creation_time(rocksdb::WriteBatchBase *batch, + const GL_INDEX_ID &gl_index_id, + time_t timeval) const { + uchar key_buf[Rdb_key_def::INDEX_NUMBER_SIZE * 3] = {0}; + dump_index_id(key_buf, Rdb_key_def::TABLE_CREATION_TS, gl_index_id); + const rocksdb::Slice key = + rocksdb::Slice(reinterpret_cast(key_buf), sizeof(key_buf)); + + // Value is constructed by storing the version and the value. + uchar value_buf[RDB_SIZEOF_TABLE_CREATION_TS_VERSION + + ROCKSDB_SIZEOF_TABLE_CREATION_TS] = {0}; + uchar *ptr = value_buf; + rdb_netbuf_store_uint16(ptr, Rdb_key_def::TABLE_CREATION_TS_VERSION); + ptr += RDB_SIZEOF_TABLE_CREATION_TS_VERSION; + rdb_netbuf_store_uint64(ptr, timeval); + ptr += ROCKSDB_SIZEOF_TABLE_CREATION_TS; + const rocksdb::Slice value = + rocksdb::Slice(reinterpret_cast(value_buf), ptr - value_buf); + + return batch->Put(m_system_cfh, key, value); +} + +bool Rdb_dict_manager::get_creation_time(const GL_INDEX_ID &gl_index_id, + time_t *new_val) const { + uchar key_buf[Rdb_key_def::INDEX_NUMBER_SIZE * 3] = {0}; + dump_index_id(key_buf, Rdb_key_def::TABLE_CREATION_TS, gl_index_id); + + std::string value; + const rocksdb::Status status = get_value( + rocksdb::Slice(reinterpret_cast(key_buf), sizeof(key_buf)), + &value); + + if (status.ok() && value.size() >= RDB_SIZEOF_TABLE_CREATION_TS_VERSION) { + const uchar *const val = reinterpret_cast(value.data()); + + if (rdb_netbuf_to_uint16(val) <= Rdb_key_def::TABLE_CREATION_TS_VERSION) { + *new_val = rdb_netbuf_to_uint64(val + RDB_SIZEOF_TABLE_CREATION_TS_VERSION); + return true; + } + } + return false; +} + uint Rdb_seq_generator::get_and_update_next_number( Rdb_dict_manager *const dict) { DBUG_ASSERT(dict != nullptr); diff --git a/storage/rocksdb/rdb_datadic.h b/storage/rocksdb/rdb_datadic.h index 0a3a747c633..ab67c839153 100644 --- a/storage/rocksdb/rdb_datadic.h +++ b/storage/rocksdb/rdb_datadic.h @@ -201,6 +201,7 @@ const size_t RDB_SIZEOF_INDEX_TYPE = sizeof(uchar); const size_t RDB_SIZEOF_KV_VERSION = sizeof(uint16); const size_t RDB_SIZEOF_INDEX_FLAGS = sizeof(uint32); const size_t RDB_SIZEOF_AUTO_INCREMENT_VERSION = sizeof(uint16); +const size_t RDB_SIZEOF_TABLE_CREATION_TS_VERSION = sizeof(uint16); // Possible return values for rdb_index_field_unpack_t functions. enum { @@ -504,6 +505,7 @@ class Rdb_key_def { MAX_INDEX_ID = 7, DDL_CREATE_INDEX_ONGOING = 8, AUTO_INC = 9, + TABLE_CREATION_TS = 10, END_DICT_INDEX_ID = 255 }; @@ -517,6 +519,7 @@ class Rdb_key_def { MAX_INDEX_ID_VERSION = 1, DDL_CREATE_INDEX_ONGOING_VERSION = 1, AUTO_INCREMENT_VERSION = 1, + TABLE_CREATION_TS_VERSION = 1 // Version for index stats is stored in IndexStats struct }; @@ -1108,6 +1111,13 @@ class Rdb_tbl_def { ~Rdb_tbl_def(); + // time values are shown in SHOW TABLE STATUS + void put_creation_time(Rdb_dict_manager *dict_manager, + rocksdb::WriteBatchBase *batch, time_t timeval); + time_t get_creation_time(Rdb_dict_manager *dict_manager); + + time_t update_time = 0; // in-memory only value, maintained right here + void check_and_set_read_free_rpl_table(); /* Number of indexes */ @@ -1133,6 +1143,12 @@ class Rdb_tbl_def { const std::string &base_tablename() const { return m_tablename; } const std::string &base_partition() const { return m_partition; } GL_INDEX_ID get_autoincr_gl_index_id(); + + private: + const time_t CREATE_TIME_UNKNOWN= 1; + // CREATE_TIME_UNKNOWN means "didn't try to read, yet" + // 0 means "no data available" (and SQL layer shares this) + time_t create_time = CREATE_TIME_UNKNOWN; }; /* @@ -1347,6 +1363,10 @@ class Rdb_binlog_manager { value: version, {max auto_increment so far} max auto_increment is 8 bytes + 10. Table creation timestamp + key: Rdb_key_def::TABLE_CREATION_TIMESTAMP + cf_id + index_id + value: timestamp + Data dictionary operations are atomic inside RocksDB. For example, when creating a table with two indexes, it is necessary to call Put three times. They have to be atomic. Rdb_dict_manager has a wrapper function @@ -1505,6 +1525,11 @@ class Rdb_dict_manager { bool overwrite = false) const; bool get_auto_incr_val(const GL_INDEX_ID &gl_index_id, ulonglong *new_val) const; + rocksdb::Status put_creation_time(rocksdb::WriteBatchBase *batch, + const GL_INDEX_ID &gl_index_id, + time_t timeval_arg) const; + bool get_creation_time(const GL_INDEX_ID &gl_index_id, + time_t *new_val) const; }; struct Rdb_index_info { diff --git a/storage/rocksdb/rdb_global.h b/storage/rocksdb/rdb_global.h index 7213571bf61..b058aace420 100644 --- a/storage/rocksdb/rdb_global.h +++ b/storage/rocksdb/rdb_global.h @@ -228,6 +228,8 @@ const char *const RDB_TTL_COL_QUALIFIER = "ttl_col"; #define ROCKSDB_SIZEOF_AUTOINC_VALUE sizeof(longlong) +#define ROCKSDB_SIZEOF_TABLE_CREATION_TS sizeof(uint64_t) + /* Maximum index prefix length in bytes. */