Skip to content

Commit

Permalink
Merge 10.5 into 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Oct 12, 2022
2 parents 15edd69 + 977c385 commit a992c61
Show file tree
Hide file tree
Showing 55 changed files with 3,164 additions and 369 deletions.
2 changes: 1 addition & 1 deletion client/mysqlbinlog.cc
Expand Up @@ -1725,7 +1725,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
7 changes: 2 additions & 5 deletions config.h.cmake
Expand Up @@ -255,9 +255,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 @@ -453,8 +450,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
9 changes: 9 additions & 0 deletions mysql-test/main/create_or_replace.result
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
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;
27 changes: 26 additions & 1 deletion mysql-test/main/grant3.result
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
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

0 comments on commit a992c61

Please sign in to comment.