Skip to content

Commit

Permalink
Merge 10.8 into 10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 13, 2022
2 parents 55e07d9 + 618d820 commit 5197d81
Show file tree
Hide file tree
Showing 185 changed files with 4,367 additions and 1,090 deletions.
2 changes: 1 addition & 1 deletion client/mysqlbinlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ that may lead to an endless loop.",
&opt_binlog_rows_event_max_encoded_size, 0,
GET_ULONG, REQUIRED_ARG, UINT_MAX/4, 256, ULONG_MAX, 0, 256, 0},
#endif
{"verify-binlog-checksum", 'c', "Verify checksum binlog events.",
{"verify-binlog-checksum", 'c', "Verify binlog event checksums.",
(uchar**) &opt_verify_binlog_checksum, (uchar**) &opt_verify_binlog_checksum,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"rewrite-db", OPT_REWRITE_DB,
Expand Down
6 changes: 1 addition & 5 deletions client/mysqlimport.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2011, 2017, MariaDB
Copyright (c) 2011, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -382,11 +382,7 @@ static int write_to_table(char *filename, MYSQL *mysql)
{
if (verbose)
fprintf(stdout, "Deleting the old data from table %s\n", tablename);
#ifdef HAVE_SNPRINTF
snprintf(sql_statement, FN_REFLEN*16+256, "DELETE FROM %s", tablename);
#else
sprintf(sql_statement, "DELETE FROM %s", tablename);
#endif
if (mysql_query(mysql, sql_statement))
{
db_error_with_table(mysql, tablename);
Expand Down
1 change: 1 addition & 0 deletions cmake/maintainer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SET(MY_WARNING_FLAGS
-Wenum-conversion
-Wextra
-Wformat-security
-Wmissing-braces
-Wno-format-truncation
-Wno-init-self
-Wno-nonnull-compare
Expand Down
8 changes: 2 additions & 6 deletions config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@
#cmakedefine HAVE_SIGWAIT 1
#cmakedefine HAVE_SIGWAITINFO 1
#cmakedefine HAVE_SLEEP 1
#cmakedefine HAVE_SNPRINTF 1
#cmakedefine HAVE_STPCPY 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRCOLL 1
Expand Down Expand Up @@ -257,9 +256,6 @@
#cmakedefine STRUCT_TIMESPEC_HAS_TV_SEC 1
#cmakedefine STRUCT_TIMESPEC_HAS_TV_NSEC 1

#define USE_MB 1
#define USE_MB_IDENT 1

/* this means that valgrind headers and macros are available */
#cmakedefine HAVE_VALGRIND_MEMCHECK_H 1

Expand Down Expand Up @@ -455,8 +451,8 @@
#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "@MYSQL_DEFAULT_CHARSET_NAME@"
#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "@MYSQL_DEFAULT_COLLATION_NAME@"

#cmakedefine USE_MB 1
#cmakedefine USE_MB_IDENT 1
#cmakedefine USE_MB
#cmakedefine USE_MB_IDENT

/* This should mean case insensitive file system */
#cmakedefine FN_NO_CASE_SENSE 1
Expand Down
1 change: 0 additions & 1 deletion configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ CHECK_FUNCTION_EXISTS (sigwait HAVE_SIGWAIT)
CHECK_FUNCTION_EXISTS (sigwaitinfo HAVE_SIGWAITINFO)
CHECK_FUNCTION_EXISTS (sigset HAVE_SIGSET)
CHECK_FUNCTION_EXISTS (sleep HAVE_SLEEP)
CHECK_FUNCTION_EXISTS (snprintf HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS (stpcpy HAVE_STPCPY)
CHECK_FUNCTION_EXISTS (strcoll HAVE_STRCOLL)
CHECK_FUNCTION_EXISTS (strerror HAVE_STRERROR)
Expand Down
1 change: 0 additions & 1 deletion mysql-test/include/ipv6.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ eval SET PASSWORD FOR testuser1@'$IPv6' = PASSWORD ('9876');
--replace_result ::1 localhost
SELECT USER();
eval DROP USER testuser1@'$IPv6';

2 changes: 2 additions & 0 deletions mysql-test/include/long_test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
# We can use this to schedule such test early (to not be left with
# only one or two long tests running, and rests of works idle), or to
# run a quick test skipping long-running test cases.

--source include/no_valgrind_without_big.inc
2 changes: 2 additions & 0 deletions mysql-test/include/master-slave.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--source include/no_valgrind_without_big.inc

# ==== Purpose ====
#
# Configure two servers to be replication master and slave.
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/alter_table.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc
#
# Test of alter table
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/compress.test
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Turn on compression between the client and server
# and run a number of tests

# Too slow for valgrind
--source include/no_valgrind_without_big.inc
# Can't test with embedded server
-- source include/not_embedded.inc
-- source include/have_compress.inc
Expand Down
9 changes: 9 additions & 0 deletions mysql-test/main/create_or_replace.result
Original file line number Diff line number Diff line change
Expand Up @@ -567,5 +567,14 @@ SELECT * FROM t3;
ERROR HY000: Table 't3' was not locked with LOCK TABLES
UNLOCK TABLES;
DROP TABLE t3;
#
# MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
# upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
#
CREATE TABLE t (a INT) ENGINE=MyISAM;
CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
CREATE OR REPLACE TABLE t LIKE tm;
ERROR HY000: Table 'tm' is specified twice, both as a target for 'CREATE' and as a separate source for data
DROP TABLE IF EXISTS tm, t;
# End of 10.4 tests
SET GLOBAL innodb_stats_persistent=@save_persistent;
12 changes: 12 additions & 0 deletions mysql-test/main/create_or_replace.test
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,18 @@ SELECT * FROM t3;
UNLOCK TABLES;
DROP TABLE t3;

--echo #
--echo # MDEV-29697 Assertion failure in Diagnostics_area::set_ok_status
--echo # upon CREATE OR REPLACE causing ER_UPDATE_TABLE_USED
--echo #
CREATE TABLE t (a INT) ENGINE=MyISAM;
CREATE TABLE tm (a INT) ENGINE=MERGE UNION(t);
--error ER_UPDATE_TABLE_USED
CREATE OR REPLACE TABLE t LIKE tm;

# Cleanup
DROP TABLE IF EXISTS tm, t;

--echo # End of 10.4 tests

SET GLOBAL innodb_stats_persistent=@save_persistent;
1 change: 1 addition & 0 deletions mysql-test/main/ctype_big5.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-- source include/no_valgrind_without_big.inc
-- source include/have_big5.inc

#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/ctype_gb2312.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-- source include/no_valgrind_without_big.inc
-- source include/have_gb2312.inc

#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/ctype_gbk.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/no_valgrind_without_big.inc
-- source include/have_gbk.inc

#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/ctype_sjis.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-- source include/no_valgrind_without_big.inc
-- source include/have_sjis.inc

#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/ctype_utf8.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/no_valgrind_without_big.inc
#
# Tests with the utf8 character set
#
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/func_json_notembedded.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source include/have_profiling.inc;
source include/not_embedded.inc;
source include/no_valgrind_without_big.inc;

set global max_allowed_packet=1073741824;
connect u,localhost,root;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/main/gis-precise.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- source include/have_geometry.inc

--source include/no_valgrind_without_big.inc
--source include/have_geometry.inc

#
# Spatial objects
Expand Down
27 changes: 26 additions & 1 deletion mysql-test/main/grant3.result
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,29 @@ connection default;
DROP USER 'user2'@'%';
DROP DATABASE temp;
set global sql_mode=default;
End of 5.0 tests
#
# End of 5.0 tests
#
create database db1;
create user foo@localhost;
grant create on db1.* to foo@localhost;
connect foo,localhost,foo;
create temporary table t as values (1),(2),(3);
use db1;
create table t1 as select * from test.t;
ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1`
create table t1 as values (1),(2),(3);
ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1`
create table t1 (a int);
disconnect foo;
connection default;
revoke create on db1.* from foo@localhost;
grant insert on db1.* to foo@localhost;
connect foo,localhost,foo;
use db1;
create table t2 as values (1),(2),(3);
ERROR 42000: CREATE command denied to user 'foo'@'localhost' for table `db1`.`t2`
disconnect foo;
connection default;
drop user foo@localhost;
drop database db1;
30 changes: 29 additions & 1 deletion mysql-test/main/grant3.test
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,35 @@ DROP USER 'user2'@'%';
DROP DATABASE temp;

set global sql_mode=default;
--echo End of 5.0 tests
--echo #
--echo # End of 5.0 tests
--echo #

create database db1;
create user foo@localhost;
grant create on db1.* to foo@localhost;
connect foo,localhost,foo;
create temporary table t as values (1),(2),(3);
use db1;
--error ER_TABLEACCESS_DENIED_ERROR
create table t1 as select * from test.t;
--error ER_TABLEACCESS_DENIED_ERROR
create table t1 as values (1),(2),(3);
create table t1 (a int);
disconnect foo;
connection default;

revoke create on db1.* from foo@localhost;
grant insert on db1.* to foo@localhost;
connect foo,localhost,foo;
use db1;
--error ER_TABLEACCESS_DENIED_ERROR
create table t2 as values (1),(2),(3);
disconnect foo;

connection default;
drop user foo@localhost;
drop database db1;

# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc
1 change: 1 addition & 0 deletions mysql-test/main/group_min_max.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# The queries in this file test query execution via QUICK_GROUP_MIN_MAX_SELECT.
#

--source include/no_valgrind_without_big.inc
--source include/default_optimizer_switch.inc
--source include/have_sequence.inc
--source include/have_innodb.inc
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/index_merge_innodb.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#

# Slow test, don't run during staging part
--source include/long_test.inc
--source include/not_staging.inc
--source include/have_innodb.inc

Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/index_merge_myisam.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# wrapper t/index_merge_innodb.test sources now several
# include/index_merge*.inc files
#
--source include/no_valgrind_without_big.inc

SET DEFAULT_STORAGE_ENGINE = MyISAM;
# MyISAM supports Merge tables
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/information_schema_all_engines.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# information_schema_db.test whose results depends on which engines are
# available (since these engines inject tables into INFORMATION_SCHEMA).

--source include/no_valgrind_without_big.inc
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_perfschema.inc
Expand Down
1 change: 1 addition & 0 deletions mysql-test/main/innodb_ext_key.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--source include/innodb_prefix_index_cluster_optimization.inc
--source include/no_valgrind_without_big.inc

SET SESSION DEFAULT_STORAGE_ENGINE='InnoDB';

Expand Down
6 changes: 4 additions & 2 deletions mysql-test/main/join_cache.test
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
--source include/no_valgrind_without_big.inc
--source include/default_optimizer_switch.inc
--source include/default_charset.inc

--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
--enable_warnings
--source include/default_optimizer_switch.inc
--source include/default_charset.inc

set @org_optimizer_switch=@@optimizer_switch;
set @save_join_cache_level=@@join_cache_level;
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/main/log_slow.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
--source include/no_valgrind_without_big.inc

#
# Testing of slow log query options
#
Expand Down
Loading

0 comments on commit 5197d81

Please sign in to comment.