Skip to content
Permalink
Browse files
Merge branch '10.1' into 10.2
  • Loading branch information
vuvova committed Jun 21, 2018
2 parents fe3f9fa + c09a8b5 commit b942aa3
Show file tree
Hide file tree
Showing 185 changed files with 2,873 additions and 1,955 deletions.
@@ -126,6 +126,7 @@ scripts/mytop
scripts/wsrep_sst_common
scripts/wsrep_sst_mysqldump
scripts/wsrep_sst_rsync
scripts/wsrep_sst_rsync_wan
scripts/wsrep_sst_mariabackup
scripts/wsrep_sst_xtrabackup
scripts/wsrep_sst_xtrabackup-v2
@@ -494,3 +495,9 @@ UpgradeLog*.htm

# Microsoft Fakes
FakesAssemblies/

# macOS garbage
.DS_Store

# QtCreator && CodeBlocks
*.cbp
@@ -5008,6 +5008,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
if (opt_xml)
print_xml_tag(md_result_file, "", "\n", "database", "name=", db, NullS);


/* obtain dump of routines (procs/functions) */
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
{
DBUG_PRINT("info", ("Dumping routines for database %s", db));
dump_routines_for_db(db);
}

if (opt_single_transaction && mysql_get_server_version(mysql) >= 50500)
{
verbose_msg("-- Setting savepoint...\n");
@@ -5017,7 +5025,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
DBUG_RETURN(1);
}
}

/* Dump each selected table */
for (pos= dump_tables; pos < end; pos++)
{
@@ -5079,12 +5086,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
DBUG_PRINT("info", ("Dumping events for database %s", db));
dump_events_for_db(db);
}
/* obtain dump of routines (procs/functions) */
if (opt_routines && mysql_get_server_version(mysql) >= 50009)
{
DBUG_PRINT("info", ("Dumping routines for database %s", db));
dump_routines_for_db(db);
}
free_root(&glob_root, MYF(0));
if (opt_xml)
{
@@ -853,7 +853,7 @@ build_table_string(void)

if (auto_generate_sql_guid_primary)
{
dynstr_append(&table_string, "id varchar(32) primary key");
dynstr_append(&table_string, "id varchar(36) primary key");

if (num_int_cols || num_char_cols || auto_generate_sql_guid_primary)
dynstr_append(&table_string, ",");
@@ -868,7 +868,7 @@ build_table_string(void)
if (count) /* Except for the first pass we add a comma */
dynstr_append(&table_string, ",");

if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(32) unique key", count)
if (snprintf(buf, HUGE_STRING_LENGTH, "id%d varchar(36) unique key", count)
> HUGE_STRING_LENGTH)
{
fprintf(stderr, "Memory Allocation error in create table\n");
@@ -8747,6 +8747,7 @@ void init_re(void)
"[[:space:]]*SELECT[[:space:]]|"
"[[:space:]]*CREATE[[:space:]]+TABLE[[:space:]]|"
"[[:space:]]*DO[[:space:]]|"
"[[:space:]]*HANDLER[[:space:]]+.*[[:space:]]+READ[[:space:]]|"
"[[:space:]]*SET[[:space:]]+OPTION[[:space:]]|"
"[[:space:]]*DELETE[[:space:]]+MULTI[[:space:]]|"
"[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
@@ -351,7 +351,7 @@ Depends: bsdutils,
findutils,
galera-3 (>=25.3),
gawk,
iproute2,
iproute | iproute2,
libdbi-perl,
lsb-base (>= 3.0-10),
lsof,
@@ -598,6 +598,8 @@ typedef SOCKET_SIZE_TYPE size_socket;
#endif
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#else
#define HAVE_SOCK_CLOEXEC
#endif

/* additional file share flags for win32 */
@@ -561,6 +561,12 @@ inline_mysql_socket_socket
(key, (const my_socket*)&mysql_socket.fd, NULL, 0);
}
#endif

/* SOCK_CLOEXEC isn't always a number - can't preprocessor compare */
#if defined(HAVE_FCNTL) && defined(FD_CLOEXEC) && !defined(HAVE_SOCK_CLOEXEC)
(void) fcntl(mysql_socket.fd, F_SETFD, FD_CLOEXEC);
#endif

return mysql_socket;
}

@@ -5698,7 +5698,7 @@ sub lldb_arguments {
$input = $input ? "< $input" : "";

# write init file for mysqld or client
mtr_tofile($lldb_init_file, "set args $str $input\n");
mtr_tofile($lldb_init_file, "process launch --stop-at-entry -- $str $input\n");

print "\nTo start lldb for $type, type in another window:\n";
print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n";
@@ -2237,6 +2237,29 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# MDEV-14668 ADD PRIMARY KEY IF NOT EXISTS on composite key
#
CREATE TABLE t1 (
`ID` BIGINT(20) NOT NULL,
`RANK` MEDIUMINT(4) NOT NULL,
`CHECK_POINT` BIGINT(20) NOT NULL,
UNIQUE INDEX `HORIZON_UIDX01` (`ID`, `RANK`)
) ENGINE=InnoDB;
ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ID` bigint(20) NOT NULL,
`RANK` mediumint(4) NOT NULL,
`CHECK_POINT` bigint(20) NOT NULL,
PRIMARY KEY (`ID`,`CHECK_POINT`),
UNIQUE KEY `HORIZON_UIDX01` (`ID`,`RANK`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t1 ADD PRIMARY KEY IF NOT EXISTS (`ID`, `CHECK_POINT`);
Warnings:
Note 1061 Multiple primary key defined
DROP TABLE t1;
#
# End of 10.0 tests
#
#
@@ -306,7 +306,7 @@ ANALYZE
"r_rows": 10,
"r_total_time_ms": "REPLACED",
"filtered": 100,
"r_filtered": 1,
"r_filtered": 100,
"attached_condition": "t0.a is not null"
}
}
@@ -538,6 +538,35 @@ pk
1
drop table t1;
#
# End of 5.3 tests
#
#
# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA
#
CREATE TABLE t1 (
id TINYINT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` tinyint(4) NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (name) VALUES ('dog');
UPDATE t1 SET id=-1 WHERE id=1;
INSERT INTO t1 (name) VALUES ('cat');
SELECT * FROM t1;
id name
-1 dog
2 cat
DROP TABLE t1;
#
# End of 5.5 tests
#
#
# MDEV-15352 AUTO_INCREMENT breaks after updating a column value to a negative number
#
SET @engine='MyISAM';
@@ -657,3 +686,6 @@ id name
-1 dog
2 cat
DROP PROCEDURE autoinc_mdev15353_one;
#
# End of 10.2 tests
#
@@ -711,6 +711,23 @@ a ct
set sql_mode=@save_sql_mode;
drop table t1;
#
# mdev-16235: impossible HAVING in query without aggregation
#
explain extended
select * from mysql.help_topic where example = 'foo' having description is null;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING
Warnings:
Note 1003 select `mysql`.`help_topic`.`help_topic_id` AS `help_topic_id`,`mysql`.`help_topic`.`name` AS `name`,`mysql`.`help_topic`.`help_category_id` AS `help_category_id`,`mysql`.`help_topic`.`description` AS `description`,`mysql`.`help_topic`.`example` AS `example`,`mysql`.`help_topic`.`url` AS `url` from `mysql`.`help_topic` where `mysql`.`help_topic`.`example` = 'foo' having 0
select * from mysql.help_topic where example = 'foo' having description is null;
help_topic_id name help_category_id description example url
#
# End of 5. tests
#
#
# Start of 10.0 tests
#
#
# Bug mdev-5160: two-way join with HAVING over the second table
#
CREATE TABLE t1 (c1 varchar(6)) ENGINE=MyISAM;
@@ -1472,7 +1472,7 @@ USE test;
End of 5.0 tests.
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
MyISAM DEFAULT MyISAM storage engine NO NO NO
MyISAM DEFAULT Non-transactional engine with good performance and small data footprint NO NO NO
grant select on *.* to user3148@localhost;
connect con3148,localhost,user3148,,test;
connection con3148;
@@ -146,3 +146,19 @@ a
16
DROP TABLE t1;
End of 5.1 tests
#
# mdev-16235: SELECT over a table with LIMIT 0
#
EXPLAIN
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
SELECT * FROM mysql.slow_log WHERE sql_text != 'foo' LIMIT 0;
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text thread_id rows_affected
EXPLAIN
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Zero limit
SELECT * FROM mysql.help_topic WHERE help_category_id != example LIMIT 0;
help_topic_id name help_category_id description example url
End of 5.5 tests
@@ -406,7 +406,7 @@ LOCK TABLE t1 WRITE;
HANDLER t1 OPEN;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
HANDLER t1 READ FIRST;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
Got one of the listed errors
HANDLER t1 CLOSE;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
UNLOCK TABLES;
@@ -5598,6 +5598,21 @@ DROP DATABASE db1;
DROP DATABASE db2;
FOUND 1 /Database: mysql/ in bug11505.sql
#
# MDEV-15021: Fix the order in which routines are called
#
use test;
CREATE FUNCTION f() RETURNS INT RETURN 1;
CREATE VIEW v1 AS SELECT f();
# Running mysqldump -uroot test --routines --tables v1 > **vardir**/test.dmp
DROP VIEW v1;
DROP FUNCTION f;
# Running mysql -uroot test < **vardir**/test.dmp
#
# Cleanup after succesful import.
#
DROP VIEW v1;
DROP FUNCTION f;
#
# Test for --add-drop-trigger
#
use test;
@@ -255,3 +255,6 @@ Benchmark
# MDEV-4684 - Enhancement request: --init-command support for mysqlslap
#
DROP TABLE t1;
#
# Bug MDEV-15789 (Upstream: #80329): MYSQLSLAP OPTIONS --AUTO-GENERATE-SQL-GUID-PRIMARY and --AUTO-GENERATE-SQL-SECONDARY-INDEXES DONT WORK
#
@@ -766,3 +766,25 @@ b
NULL
DROP TABLE t1, t2;
End of 5.0 tests
#
# Start of 10.1 tests
#
#
# MDEV-16190 Server crashes in Item_null_result::field_type on SELECT with time field, ROLLUP and HAVING
#
CREATE TABLE t1 (t TIME) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('12:12:12');
SELECT t, COUNT(*) FROM t1 GROUP BY t WITH ROLLUP HAVING t > '00:00:00';
t COUNT(*)
12:12:12 1
DROP TABLE t1;
CREATE TABLE t1 (t TIME) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('12:12:12'),('12:12:13');
SELECT t, COUNT(*) FROM t1 GROUP BY t WITH ROLLUP HAVING t > '00:00:00';
t COUNT(*)
12:12:12 1
12:12:13 1
DROP TABLE t1;
#
# End of 10.1 tests
#
@@ -4365,7 +4365,46 @@ LINE3 3
drop table t1;
# End of 5.5 tests
#
# Start of 10.2 tests
# End of 10.0 tests
#
#
# MDEV-12060 Crash in EXECUTE IMMEDIATE with an expression returning a GRANT command
# (the 10.1 part)
#
CREATE PROCEDURE p2 ()
BEGIN
SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END;
/
CALL p2();
1
1
DROP PROCEDURE p2;
BEGIN NOT ATOMIC
SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END;
/
1
1
BEGIN NOT ATOMIC
SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR PREPARE stmt FROM 'SELECT 1';
DEALLOCATE PREPARE stmt;
END;
/
BEGIN NOT ATOMIC
PREPARE stmt FROM 'SELECT 1';
SET STATEMENT join_cache_level=CAST(CONCAT(_utf8'6',_latin1'') AS INT) FOR EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END;
/
1
1
#
# End of 10.1 tests
#
#
# MDEV-10709 Expressions as parameters to Dynamic SQL
@@ -237,14 +237,6 @@ a a
5 10
DROP TABLE temp1, temp2;

# MDEV-14185 CREATE TEMPORARY TABLE AS SELECT causes error 1290 with read_only and InnoDB.

CREATE TEMPORARY TABLE temp1 ENGINE=INNODB AS SELECT a FROM t1;
SELECT * FROM temp1;
a
1
DROP TABLE temp1;

# Disconnect and cleanup

disconnect con1;

0 comments on commit b942aa3

Please sign in to comment.