Commit f7708d68 authored by Sergei Golubchik's avatar Sergei Golubchik

fixes for --embedded

parent d0d6284c
......@@ -8,8 +8,6 @@ a
2
drop table t1;
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL No tables used
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 INSERT t1 ALL NULL NULL NULL NULL NULL NULL 100.00 100.00 NULL
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 SIMPLE t1 ALL NULL NULL NULL NULL 10 10 100.00 30.00 Using where
......
......@@ -1020,24 +1020,6 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
SET @@default_storage_engine=@save_dfs;
SELECT @@MAX_STATEMENT_TIME;
@@MAX_STATEMENT_TIME
0.000000
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(1);
SLEEP(1)
0
SHOW STATUS LIKE "max_statement_time_exceeded";
Variable_name Value
Max_statement_time_exceeded 0
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(3);
SLEEP(3)
1
SHOW STATUS LIKE "max_statement_time_exceeded";
Variable_name Value
Max_statement_time_exceeded 1
SELECT @@MAX_STATEMENT_TIME;
@@MAX_STATEMENT_TIME
0.000000
SET STATEMENT keycache1.key_buffer_size=1024 FOR SELECT 1;
ERROR HY000: Variable 'key_buffer_size' is a GLOBAL variable and should be set with SET GLOBAL
set @save_general_log=@@global.general_log;
......@@ -1064,10 +1046,6 @@ set statement rand_seed2=default for select 1;
ERROR 42000: The system variable rand_seed2 cannot be set in SET STATEMENT.
set statement skip_replication=default for select 1;
ERROR 42000: The system variable skip_replication cannot be set in SET STATEMENT.
set statement default_master_connection=default for select 1;
ERROR 42000: The system variable default_master_connection cannot be set in SET STATEMENT.
set statement default_master_connection=default for select 1;
ERROR 42000: The system variable default_master_connection cannot be set in SET STATEMENT.
set statement last_insert_id=1 for select 1;
ERROR 42000: The system variable last_insert_id cannot be set in SET STATEMENT.
set statement sql_log_off=default for select 1;
......
SELECT @@MAX_STATEMENT_TIME;
@@MAX_STATEMENT_TIME
0.000000
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(1);
SLEEP(1)
0
SHOW STATUS LIKE "max_statement_time_exceeded";
Variable_name Value
Max_statement_time_exceeded 0
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(3);
SLEEP(3)
1
SHOW STATUS LIKE "max_statement_time_exceeded";
Variable_name Value
Max_statement_time_exceeded 1
SELECT @@MAX_STATEMENT_TIME;
@@MAX_STATEMENT_TIME
0.000000
set statement default_master_connection=default for select 1;
ERROR 42000: The system variable default_master_connection cannot be set in SET STATEMENT.
set statement default_master_connection=default for select 1;
ERROR 42000: The system variable default_master_connection cannot be set in SET STATEMENT.
......@@ -152,6 +152,19 @@ def information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19
def information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(4)
def information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL 0 NULL NULL datetime
def information_schema FILES VERSION 25 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def information_schema GEOMETRY_COLUMNS COORD_DIMENSION 11 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2)
def information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN 4 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG 1 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema GEOMETRY_COLUMNS F_TABLE_NAME 3 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE 10 0 NO int NULL NULL 10 0 NULL NULL NULL int(7)
def information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN 8 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG 5 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema GEOMETRY_COLUMNS G_TABLE_NAME 7 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA 6 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GEOMETRY_COLUMNS MAX_PPR 12 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2)
def information_schema GEOMETRY_COLUMNS SRID 13 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5)
def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 0 NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2)
def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
......@@ -309,6 +322,10 @@ def information_schema SESSION_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NU
def information_schema SESSION_STATUS VARIABLE_VALUE 2 NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NO varchar 1024 3072 NULL NULL NULL utf8 utf8_general_ci varchar(1024)
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512)
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5)
def information_schema SPATIAL_REF_SYS SRID 1 0 NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5)
def information_schema SPATIAL_REF_SYS SRTEXT 4 NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048)
def information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(21)
def information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL NULL utf8 utf8_general_ci varchar(1)
def information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64)
......@@ -490,6 +507,7 @@ NULL datetime NULL NULL
NULL decimal NULL NULL
NULL double NULL NULL
NULL int NULL NULL
NULL smallint NULL NULL
NULL tinyint NULL NULL
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
......@@ -657,6 +675,19 @@ NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime
NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20)
3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255)
3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GEOMETRY_COLUMNS F_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GEOMETRY_COLUMNS F_GEOMETRY_COLUMN varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GEOMETRY_COLUMNS G_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GEOMETRY_COLUMNS G_GEOMETRY_COLUMN varchar 64 192 utf8 utf8_general_ci varchar(64)
NULL information_schema GEOMETRY_COLUMNS STORAGE_TYPE tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema GEOMETRY_COLUMNS GEOMETRY_TYPE int NULL NULL NULL NULL int(7)
NULL information_schema GEOMETRY_COLUMNS COORD_DIMENSION tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema GEOMETRY_COLUMNS MAX_PPR tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema GEOMETRY_COLUMNS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
......@@ -814,6 +845,10 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 1024 3072 utf8 utf8_general_ci varchar(1024)
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512)
NULL information_schema SPATIAL_REF_SYS AUTH_SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema SPATIAL_REF_SYS SRTEXT varchar 2048 6144 utf8 utf8_general_ci varchar(2048)
3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512)
3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64)
3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64)
......
......@@ -290,6 +290,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME GEOMETRY_COLUMNS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME GLOBAL_STATUS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -635,6 +658,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME SPATIAL_REF_SYS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -1180,6 +1226,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME GEOMETRY_COLUMNS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME GLOBAL_STATUS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......@@ -1525,6 +1594,29 @@ user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME SPATIAL_REF_SYS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
VERSION 10
ROW_FORMAT Fixed
TABLE_ROWS #TBLR#
AVG_ROW_LENGTH #ARL#
DATA_LENGTH #DL#
MAX_DATA_LENGTH #MDL#
INDEX_LENGTH #IL#
DATA_FREE #DF#
AUTO_INCREMENT NULL
CREATE_TIME #CRT#
UPDATE_TIME #UT#
CHECK_TIME #CT#
TABLE_COLLATION utf8_general_ci
CHECKSUM NULL
CREATE_OPTIONS #CO#
TABLE_COMMENT #TC#
user_comment
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA information_schema
TABLE_NAME STATISTICS
TABLE_TYPE SYSTEM VIEW
ENGINE MEMORY
......
......@@ -1337,6 +1337,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_FILE_HASH_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 512
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 512
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Number of hash buckets for open and changed files. If you have a lot of MyISAM files open you should increase this for faster flush of changes. A good value is probably 1/10 of number of possible open MyISAM files.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME KEY_CACHE_SEGMENTS
SESSION_VALUE NULL
GLOBAL_VALUE 0
......@@ -2135,6 +2149,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME MYSQL56_TEMPORAL_FORMAT
SESSION_VALUE NULL
GLOBAL_VALUE ON
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE ON
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME NET_BUFFER_LENGTH
SESSION_VALUE 16384
GLOBAL_VALUE 16384
......@@ -3766,7 +3794,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Specify whether to time mutexes (only InnoDB mutexes are currently supported)
VARIABLE_COMMENT Specify whether to time mutexes. Deprecated, has no effect.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
......
......@@ -15,9 +15,8 @@ perl;
my $slow_log_file= $ENV{'SLOW_LOG_FILE'} or die "SLOW_LOG_FILE not set";
open(FILE, $slow_log_file) or die "Failed to open $slow_log_file";
while(<FILE>) {
if (/explain:/) {
print $_;
}
next if 1../create table t1/; # skip entries generated by mtr prelude
print if /explain:/;
}
close(FILE);
......
......@@ -965,16 +965,6 @@ SHOW CREATE TABLE t1;
drop table t1;
SET @@default_storage_engine=@save_dfs;
#
# statement timeout
#
SELECT @@MAX_STATEMENT_TIME;
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(1);
SHOW STATUS LIKE "max_statement_time_exceeded";
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(3);
SHOW STATUS LIKE "max_statement_time_exceeded";
SELECT @@MAX_STATEMENT_TIME;
#
# MDEV-6946:Assertion `0' failed in mysql_execute_command on SET STATEMENT
# keycache1.key_buffer_size=.. FOR
......@@ -1011,10 +1001,6 @@ set statement rand_seed2=default for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement skip_replication=default for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement default_master_connection=default for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement default_master_connection=default for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement last_insert_id=1 for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement sql_log_off=default for select 1;
......
--source include/not_embedded.inc
#
# statement timeout
#
SELECT @@MAX_STATEMENT_TIME;
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(1);
SHOW STATUS LIKE "max_statement_time_exceeded";
SET STATEMENT MAX_STATEMENT_TIME=2 FOR SELECT SLEEP(3);
SHOW STATUS LIKE "max_statement_time_exceeded";
SELECT @@MAX_STATEMENT_TIME;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement default_master_connection=default for select 1;
--error ER_SET_STATEMENT_NOT_SUPPORTED
set statement default_master_connection=default for select 1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment