Skip to content

Commit

Permalink
Merge branch '10.2' into 10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cvicentiu committed Sep 7, 2021
2 parents 391f6b4 + 528abc7 commit b85b834
Show file tree
Hide file tree
Showing 169 changed files with 4,054 additions and 2,388 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Expand Up @@ -548,7 +548,8 @@ FEATURE_SUMMARY(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES VAR MARIADB_FEATURE_

OPTION(FEATURE_SUMMARY "Print feature summary at the end of configure step" ON)
IF (FEATURE_SUMMARY)
MESSAGE_ONCE(SUMMARY "${MARIADB_FEATURE_SUMMARY}")
MESSAGE("${MARIADB_FEATURE_SUMMARY}")
SET(FEATURE_SUMMARY OFF CACHE BOOL "" FORCE)
ENDIF()

IF(NON_DISTRIBUTABLE_WARNING)
Expand Down
3 changes: 1 addition & 2 deletions client/CMakeLists.txt
Expand Up @@ -81,9 +81,8 @@ MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c)
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqlslap ${CLIENT_LIB})

# "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
IF(WIN32)
MYSQL_ADD_EXECUTABLE(echo echo.c COMPONENT Junk)
MYSQL_ADD_EXECUTABLE(echo echo.c COMPONENT Test)
ENDIF(WIN32)

# async_example is just a code example, do not install it.
Expand Down
4 changes: 4 additions & 0 deletions cmake/build_configurations/mysql_release.cmake
Expand Up @@ -110,6 +110,10 @@ ELSEIF(DEB)
SET(WITH_LIBWRAP ON)
SET(HAVE_EMBEDDED_PRIVILEGE_CONTROL ON)
SET(WITH_JEMALLOC "yes" CACHE STRING "")
SET(WITH_INNODB_BZIP2 OFF CACHE STRING "")
SET(WITH_INNODB_LZMA OFF CACHE STRING "")
SET(WITH_INNODB_LZO OFF CACHE STRING "")
SET(WITH_ROCKSDB_BZip2 OFF CACHE STRING "")
ELSE()
SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_PCRE bundled CACHE STRING "")
Expand Down
2 changes: 2 additions & 0 deletions extra/mariabackup/backup_copy.cc
Expand Up @@ -195,6 +195,8 @@ datadir_iter_new(const char *path, bool skip_first_level = true)
datadir_iter_t *it;

it = static_cast<datadir_iter_t *>(malloc(sizeof(datadir_iter_t)));
if (!it)
goto error;
memset(it, 0, sizeof(datadir_iter_t));

pthread_mutex_init(&it->mutex, NULL);
Expand Down
22 changes: 22 additions & 0 deletions mysql-test/main/truncate.result
Expand Up @@ -159,3 +159,25 @@ HANDLER t1 READ FIRST;
ERROR 42S02: Unknown table 't1' in HANDLER
DROP TABLE t1;
# End of 6.0 tests
#
# 10.2 Test
#
# MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
# is_bulk_op())' failed upon killed TRUNCATE
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
LOCK TABLE t1 READ;
connect con1,localhost,root,,test;
SET SESSION max_session_mem_used= 65536;
LOCK TABLE t1 WRITE;
connection default;
SELECT * FROM t1;
a
UNLOCK TABLES;
connection con1;
TRUNCATE TABLE t1;
ERROR HY000: The MariaDB server is running with the --max-thread-mem-used=65536 option so it cannot execute this statement
disconnect con1;
connection default;
DROP TABLE t1;
# End of 10.2 Test
29 changes: 29 additions & 0 deletions mysql-test/main/truncate.test
Expand Up @@ -163,3 +163,32 @@ DROP TABLE t1;

--echo # End of 6.0 tests

--echo #
--echo # 10.2 Test
--echo #
--echo # MDEV-23365: Assertion `!is_set() || (m_status == DA_OK_BULK &&
--echo # is_bulk_op())' failed upon killed TRUNCATE
--echo #

CREATE TABLE t1 (a INT) ENGINE=MyISAM;
LOCK TABLE t1 READ;

--connect (con1,localhost,root,,test)
SET SESSION max_session_mem_used= 65536;
--send
LOCK TABLE t1 WRITE;

--connection default
SELECT * FROM t1;
UNLOCK TABLES;

--connection con1
--reap
--error ER_OPTION_PREVENTS_STATEMENT
TRUNCATE TABLE t1;

--disconnect con1
--connection default
DROP TABLE t1;

--echo # End of 10.2 Test
2 changes: 1 addition & 1 deletion mysql-test/suite/binlog/include/ctype_ucs_binlog.test
Expand Up @@ -54,7 +54,7 @@ SELECT * FROM t1;
DROP TABLE t1;
FLUSH LOGS;
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ /(^#|created )[0-9]{6} [ 1][0-9]:[0-9]{2}:[0-9]{2}/\1YYMMDD HH:MM:SS/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--replace_regex /TIMESTAMP=[0-9]*/TIMESTAMP=XXX/ /# at [0-9]*/# at #/ /(exec_time=|end_log_pos |Xid = |thread_id=|server id |table id |mapped to number )[0-9]+/\1#/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Gtid list [[][0-9]+-[0-9]+-[0-9]+[\]]/Gtid list [#-#-#]/ /session[.](gtid_domain_id|server_id|gtid_seq_no)=[0-9]+/session.\1=#/ /(^#|created )[0-9]{6} [ 12][0-9]:[0-9]{2}:[0-9]{2}/\1YYMMDD HH:MM:SS/ /collation_server=[0-9]+/collation_server=X/ /character_set_client=[0-9]+/character_set_client=X/ /collation_connection=[0-9]+/collation_connection=X/
--exec $MYSQL_BINLOG --base64-output=decode-rows -vv $MYSQLD_DATADIR/master-bin.000003

SET TIMESTAMP=DEFAULT;
Expand Down
33 changes: 33 additions & 0 deletions mysql-test/suite/galera/r/galera_fk_multibyte.result
@@ -0,0 +1,33 @@
create table p (i varchar(100) primary key, j int) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c1 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk1 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c2 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk2 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into p values('sippo',1);
insert into c1 values(1,'sippo',1);
insert into c2 values(1,'sippo',1);
update c1 set k = 100 where j = 'sippo';
insert into c1 values(2,'sippo',1);
select * from p;
i j
sippo 1
select * from c1;
i j k
1 sippo 100
2 sippo 1
select * from c2;
i j k
1 sippo 1
connection node_2;
select * from p;
i j
sippo 1
select * from c1;
i j k
1 sippo 100
2 sippo 1
select * from c2;
i j k
1 sippo 1
connection node_1;
drop table c1;
drop table c2;
drop table p;
28 changes: 28 additions & 0 deletions mysql-test/suite/galera/r/galera_fulltext.result
Expand Up @@ -62,3 +62,31 @@ COUNT(*)
1
connection node_1;
DROP TABLE t;
connection node_1;
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
CREATE TABLE t (a VARCHAR(5000)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
Expand Up @@ -93,7 +93,6 @@ SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";

--connection node_1
# issue conflicting write to child table, it should fail in certification
--error ER_LOCK_DEADLOCK
--send update child set j=2;

--connection node_1a
Expand All @@ -103,6 +102,7 @@ SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "RESET";

--connection node_1
--error 0,ER_LOCK_DEADLOCK, ER_LOCK_WAIT_TIMEOUT
--reap
--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
--source include/wait_condition.inc
Expand Down
23 changes: 23 additions & 0 deletions mysql-test/suite/galera/t/galera_fk_multibyte.test
@@ -0,0 +1,23 @@
--source include/galera_cluster.inc

create table p (i varchar(100) primary key, j int) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c1 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk1 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create table c2 (i int primary key auto_increment, j varchar(100), k int, key(j), constraint fk2 foreign key (j) references p(i)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into p values('sippo',1);
insert into c1 values(1,'sippo',1);
insert into c2 values(1,'sippo',1);
update c1 set k = 100 where j = 'sippo';
insert into c1 values(2,'sippo',1);
select * from p;
select * from c1;
select * from c2;

--connection node_2
select * from p;
select * from c1;
select * from c2;

--connection node_1
drop table c1;
drop table c2;
drop table p;
24 changes: 24 additions & 0 deletions mysql-test/suite/galera/t/galera_fulltext.test
Expand Up @@ -83,3 +83,27 @@ SELECT COUNT(*) FROM t;

--connection node_1
DROP TABLE t;

#
# Case 2: UTF-8
#
--connection node_1
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
SELECT COUNT(*) FROM t;

--connection node_2
SELECT COUNT(*) FROM t;

--connection node_1
DROP TABLE t;
CREATE TABLE t (a VARCHAR(5000)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
SELECT COUNT(*) FROM t;

--connection node_2
SELECT COUNT(*) FROM t;

--connection node_1
DROP TABLE t;
11 changes: 11 additions & 0 deletions mysql-test/suite/perfschema/r/dml_accounts.result
Expand Up @@ -23,3 +23,14 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.accounts WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='accounts';
column_name column_comment
USER The connection's client user name for the connection, or NULL if an internal thread.
HOST The connection client's host name, or NULL if an internal thread.
CURRENT_CONNECTIONS Current connections for the account.
TOTAL_CONNECTIONS Total connections for the account.
9 changes: 9 additions & 0 deletions mysql-test/suite/perfschema/r/dml_cond_instances.result
Expand Up @@ -18,3 +18,12 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.cond_instances WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='cond_instances';
column_name column_comment
NAME Client user name for the connection, or NULL if an internal thread.
OBJECT_INSTANCE_BEGIN Address in memory of the instrumented condition.
Expand Up @@ -24,3 +24,18 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_account_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_stages_summary_by_account_by_event_name';
column_name column_comment
USER User. Used together with HOST and EVENT_NAME for grouping events.
HOST Host. Used together with USER and EVENT_NAME for grouping events.
EVENT_NAME Event name. Used together with USER and HOST for grouping events.
COUNT_STAR Number of summarized events, which includes all timed and untimed events.
SUM_TIMER_WAIT Total wait time of the timed summarized events.
MIN_TIMER_WAIT Minimum wait time of the timed summarized events.
AVG_TIMER_WAIT Average wait time of the timed summarized events.
MAX_TIMER_WAIT Maximum wait time of the timed summarized events.
Expand Up @@ -24,3 +24,17 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_host_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_stages_summary_by_host_by_event_name';
column_name column_comment
HOST Host. Used together with EVENT_NAME for grouping events.
EVENT_NAME Event name. Used together with HOST for grouping events.
COUNT_STAR Number of summarized events, which includes all timed and untimed events.
SUM_TIMER_WAIT Total wait time of the timed summarized events.
MIN_TIMER_WAIT Minimum wait time of the timed summarized events.
AVG_TIMER_WAIT Average wait time of the timed summarized events.
MAX_TIMER_WAIT Maximum wait time of the timed summarized events.
Expand Up @@ -24,3 +24,17 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_stages_summary_by_thread_by_event_name';
column_name column_comment
THREAD_ID Thread associated with the event. Together with EVENT_NAME uniquely identifies the row.
EVENT_NAME Event name. Used together with THREAD_ID for grouping events.
COUNT_STAR Number of summarized events, which includes all timed and untimed events.
SUM_TIMER_WAIT Total wait time of the timed summarized events.
MIN_TIMER_WAIT Minimum wait time of the timed summarized events.
AVG_TIMER_WAIT Average wait time of the timed summarized events.
MAX_TIMER_WAIT Maximum wait time of the timed summarized events.
Expand Up @@ -24,3 +24,17 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_by_user_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_stages_summary_by_user_by_event_name';
column_name column_comment
USER User. Used together with EVENT_NAME for grouping events.
EVENT_NAME Event name. Used together with USER for grouping events.
COUNT_STAR Number of summarized events, which includes all timed and untimed events.
SUM_TIMER_WAIT Total wait time of the timed summarized events.
MIN_TIMER_WAIT Minimum wait time of the timed summarized events.
AVG_TIMER_WAIT Average wait time of the timed summarized events.
MAX_TIMER_WAIT Maximum wait time of the timed summarized events.
13 changes: 13 additions & 0 deletions mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
Expand Up @@ -23,3 +23,16 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_stages_summary_global_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_stages_summary_global_by_event_name';
column_name column_comment
EVENT_NAME Event name.
COUNT_STAR Number of summarized events, which includes all timed and untimed events.
SUM_TIMER_WAIT Total wait time of the timed summarized events.
MIN_TIMER_WAIT Minimum wait time of the timed summarized events.
AVG_TIMER_WAIT Average wait time of the timed summarized events.
MAX_TIMER_WAIT Maximum wait time of the timed summarized events.
Expand Up @@ -24,3 +24,37 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.events_statements_summary_by_account_by_event_name WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
UNLOCK TABLES;
#
# MDEV-25325 column_comment for performance_schema tables
#
select column_name, column_comment
from information_schema.columns
where table_schema='performance_schema' and table_name='events_statements_summary_by_account_by_event_name';
column_name column_comment
USER User. Used together with HOST and EVENT_NAME for grouping events.
HOST Host. Used together with USER and EVENT_NAME for grouping events.
EVENT_NAME Event name. Used together with USER and HOST for grouping events.
COUNT_STAR Number of summarized events
SUM_TIMER_WAIT Total wait time of the summarized events that are timed.
MIN_TIMER_WAIT Minimum wait time of the summarized events that are timed.
AVG_TIMER_WAIT Average wait time of the summarized events that are timed.
MAX_TIMER_WAIT Maximum wait time of the summarized events that are timed.
SUM_LOCK_TIME Sum of the LOCK_TIME column in the events_statements_current table.
SUM_ERRORS Sum of the ERRORS column in the events_statements_current table.
SUM_WARNINGS Sum of the WARNINGS column in the events_statements_current table.
SUM_ROWS_AFFECTED Sum of the ROWS_AFFECTED column in the events_statements_current table.
SUM_ROWS_SENT Sum of the ROWS_SENT column in the events_statements_current table.
SUM_ROWS_EXAMINED Sum of the ROWS_EXAMINED column in the events_statements_current table.
SUM_CREATED_TMP_DISK_TABLES Sum of the CREATED_TMP_DISK_TABLES column in the events_statements_current table.
SUM_CREATED_TMP_TABLES Sum of the CREATED_TMP_TABLES column in the events_statements_current table.
SUM_SELECT_FULL_JOIN Sum of the SELECT_FULL_JOIN column in the events_statements_current table.
SUM_SELECT_FULL_RANGE_JOIN Sum of the SELECT_FULL_RANGE_JOIN column in the events_statements_current table.
SUM_SELECT_RANGE Sum of the SELECT_RANGE column in the events_statements_current table.
SUM_SELECT_RANGE_CHECK Sum of the SELECT_RANGE_CHECK column in the events_statements_current table.
SUM_SELECT_SCAN Sum of the SELECT_SCAN column in the events_statements_current table.
SUM_SORT_MERGE_PASSES Sum of the SORT_MERGE_PASSES column in the events_statements_current table.
SUM_SORT_RANGE Sum of the SORT_RANGE column in the events_statements_current table.
SUM_SORT_ROWS Sum of the SORT_ROWS column in the events_statements_current table.
SUM_SORT_SCAN Sum of the SORT_SCAN column in the events_statements_current table.
SUM_NO_INDEX_USED Sum of the NO_INDEX_USED column in the events_statements_current table.
SUM_NO_GOOD_INDEX_USED Sum of the NO_GOOD_INDEX_USED column in the events_statements_current table.

0 comments on commit b85b834

Please sign in to comment.