Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions mysql-test/main/opt_context_replay_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
count(*)
20
set optimizer_replay_context='opt_context';
Expand Down Expand Up @@ -549,4 +545,28 @@ select context like '%bar%' from information_schema.optimizer_context;
context like '%bar%'
1
drop table t1;
#
# MDEV-40388: sequence.simple fails on replay
#
set optimizer_record_context=0;
create sequence s1;
select setval(s1, 10);
setval(s1, 10)
10
set optimizer_record_context=1;
select nextval(s1) as nv;
nv
11
select context into dumpfile "../../tmp/dump1.sql"
from information_schema.optimizer_context;
set optimizer_record_context=0;
drop table s1;
set optimizer_replay_context='opt_context';
# Get the last recorded value from the sequence; must have same output as above
select lastval(s1) as nv;
nv
11
set optimizer_replay_context='';
drop table s1;
# End of 13.1 tests
drop database db1;
29 changes: 28 additions & 1 deletion mysql-test/main/opt_context_replay_basic.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--source include/not_embedded.inc
--source include/have_sequence.inc
--source include/no_view_protocol.inc
--source include/no_protocol.inc
--echo #enable optimizer_record_context
set optimizer_trace=0;
set optimizer_record_context=ON;
Expand Down Expand Up @@ -351,4 +351,31 @@ explain select * from t1 where a >'foo' or a < 'bar';
select context like '%bar%' from information_schema.optimizer_context;

drop table t1;

--echo #
--echo # MDEV-40388: sequence.simple fails on replay
--echo #
set optimizer_record_context=0;
create sequence s1;
select setval(s1, 10);
set optimizer_record_context=1;
select nextval(s1) as nv;
select context into dumpfile "../../tmp/dump1.sql"
from information_schema.optimizer_context;
set optimizer_record_context=0;
drop table s1;
--disable_query_log
--disable_result_log
--source "$MYSQLTEST_VARDIR/tmp/dump1.sql"
--enable_query_log
--enable_result_log
set optimizer_replay_context='opt_context';
--echo # Get the last recorded value from the sequence; must have same output as above
select lastval(s1) as nv;

set optimizer_replay_context='';
--remove_file "$MYSQLTEST_VARDIR/tmp/dump1.sql"
drop table s1;
--echo # End of 13.1 tests

drop database db1;
56 changes: 0 additions & 56 deletions mysql-test/main/opt_context_replay_innodb_comp.result
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -323,10 +319,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -444,10 +436,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -569,10 +557,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -698,10 +682,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -823,10 +803,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -933,10 +909,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1033,10 +1005,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1115,10 +1083,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1206,10 +1170,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1295,10 +1255,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1383,10 +1339,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1496,10 +1448,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1634,10 +1582,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down
56 changes: 0 additions & 56 deletions mysql-test/main/opt_context_replay_innodb_pref.result
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -323,10 +319,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -444,10 +436,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -569,10 +557,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -698,10 +682,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -823,10 +803,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -933,10 +909,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1033,10 +1005,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1115,10 +1083,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1206,10 +1170,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1295,10 +1255,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1383,10 +1339,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1496,10 +1448,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down Expand Up @@ -1634,10 +1582,6 @@ Warnings:
Warning 4200 The setting 'optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Warnings:
Note 1007 Can't create database 'db1'; database exists
Warnings:
Note 4092 Unknown VIEW: 'db1.t1'
Warnings:
Note 1051 Unknown table 'db1.t1'
EXPLAIN
{
"query_block": {
Expand Down
Loading
Loading