Skip to content
Permalink
Browse files
Merge 10.4 into 10.5
  • Loading branch information
dr-m committed Oct 25, 2022
2 parents 2f7a007 + 667d3fb commit 9a0b9e3
Show file tree
Hide file tree
Showing 87 changed files with 1,754 additions and 240 deletions.
@@ -6952,7 +6952,12 @@ int main(int argc, char **argv)
if (flush_logs || opt_delete_master_logs)
{
if (mysql_refresh(mysql, REFRESH_LOG))
{
fprintf(stderr,
"Flush logs or delete master logs failure in server \n");
first_error= EX_MYSQLERR;
goto err;
}
verbose_msg("-- main : logs flushed successfully!\n");
}

@@ -1,8 +1,11 @@
#!/usr/bin/make -f

# Enable Debian Hardening
# https://wiki.debian.org/Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DH_VERBOSE=1
export DEB_BUILD_HARDENING=1

# enable Debian Hardening
# see: https://wiki.debian.org/Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
DPKG_EXPORT_BUILDFLAGS = 1
# Include all defaults, including buildflags.mk
include /usr/share/dpkg/default.mk
@@ -276,8 +276,8 @@ enum ha_base_keytype {
#define HA_GENERATED_KEY 8192U /* Automatically generated key */

/* The combination of the above can be used for key type comparison. */
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_AUTO_KEY | \
HA_FULLTEXT | HA_UNIQUE_CHECK | \
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)

/*
@@ -34,12 +34,13 @@ extern "C" {
#ifndef __cplusplus
#define inline __inline
#endif
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <stdlib.h>
#else
#include <stdlib.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#endif
#endif

/* returned from encryption_key_get_latest_version() */
#define ENCRYPTION_KEY_VERSION_INVALID (~(unsigned int)0)
@@ -0,0 +1,53 @@
#
# Start of 10.4 tests
#
#
# MDEV-29481 mariadb-upgrade prints confusing statement
#
SET @debug_key_flags=NULL;
SET default_storage_engine=ARIA;
CREATE PROCEDURE debug_show_key_flags()
BEGIN
IF @debug_key_flags IS TRUE
THEN
FLUSH TABLES;
-- Wrap SET into EXECUTE IMMEDIATE to avoid
-- parse time "Unknown system variable" errors in release builds.
EXECUTE IMMEDIATE "SET debug_dbug='+d,key'";
SELECT * FROM t1 LIMIT 0;
EXECUTE IMMEDIATE "SET debug_dbug=''";
END IF;
END;
$$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` double(18,7) DEFAULT NULL,
KEY `d` (`d`)
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
CHECK TABLE t1 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=INSTANT;
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY;
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 FORCE;
CALL debug_show_key_flags();
DROP TABLE t1;
DROP PROCEDURE debug_show_key_flags;
#
# End of 10.4 tests
#
@@ -0,0 +1,21 @@
--source include/have_aria.inc

--echo #
--echo # Start of 10.4 tests
--echo #

--echo #
--echo # MDEV-29481 mariadb-upgrade prints confusing statement
--echo #

let $table= std_data/mysql_upgrade/mdev29481_100104_aria;
let $EXT_DAT= MAD;
let $EXT_IDX= MAI;
SET @debug_key_flags=NULL;
SET default_storage_engine=ARIA;
--source alter_table_upgrade_mdev29481_myisam_aria.inc


--echo #
--echo # End of 10.4 tests
--echo #
@@ -0,0 +1,59 @@
let $datadir=`select @@datadir`;

DELIMITER $$;
CREATE PROCEDURE debug_show_key_flags()
BEGIN
IF @debug_key_flags IS TRUE
THEN
FLUSH TABLES;
-- Wrap SET into EXECUTE IMMEDIATE to avoid
-- parse time "Unknown system variable" errors in release builds.
EXECUTE IMMEDIATE "SET debug_dbug='+d,key'";
SELECT * FROM t1 LIMIT 0;
EXECUTE IMMEDIATE "SET debug_dbug=''";
END IF;
END;
$$
DELIMITER ;$$


copy_file $table.frm $datadir/test/t1.frm;
copy_file $table.$EXT_DAT $datadir/test/t1.$EXT_DAT;
copy_file $table.$EXT_IDX $datadir/test/t1.$EXT_IDX;
SHOW CREATE TABLE t1;
CHECK TABLE t1 FOR UPGRADE;
DROP TABLE t1;

copy_file $table.frm $datadir/test/t1.frm;
copy_file $table.$EXT_DAT $datadir/test/t1.$EXT_DAT;
copy_file $table.$EXT_IDX $datadir/test/t1.$EXT_IDX;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=INSTANT;
CALL debug_show_key_flags();
DROP TABLE t1;

copy_file $table.frm $datadir/test/t1.frm;
copy_file $table.$EXT_DAT $datadir/test/t1.$EXT_DAT;
copy_file $table.$EXT_IDX $datadir/test/t1.$EXT_IDX;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY;
CALL debug_show_key_flags();
DROP TABLE t1;

copy_file $table.frm $datadir/test/t1.frm;
copy_file $table.$EXT_DAT $datadir/test/t1.$EXT_DAT;
copy_file $table.$EXT_IDX $datadir/test/t1.$EXT_IDX;
CALL debug_show_key_flags();
REPAIR TABLE t1;
CALL debug_show_key_flags();
DROP TABLE t1;

copy_file $table.frm $datadir/test/t1.frm;
copy_file $table.$EXT_DAT $datadir/test/t1.$EXT_DAT;
copy_file $table.$EXT_IDX $datadir/test/t1.$EXT_IDX;
CALL debug_show_key_flags();
ALTER TABLE t1 FORCE;
CALL debug_show_key_flags();
DROP TABLE t1;

DROP PROCEDURE debug_show_key_flags;
@@ -0,0 +1,52 @@
#
# Start of 10.4 tests
#
#
# MDEV-29481 mariadb-upgrade prints confusing statement
#
SET @debug_key_flags=NULL;
CREATE PROCEDURE debug_show_key_flags()
BEGIN
IF @debug_key_flags IS TRUE
THEN
FLUSH TABLES;
-- Wrap SET into EXECUTE IMMEDIATE to avoid
-- parse time "Unknown system variable" errors in release builds.
EXECUTE IMMEDIATE "SET debug_dbug='+d,key'";
SELECT * FROM t1 LIMIT 0;
EXECUTE IMMEDIATE "SET debug_dbug=''";
END IF;
END;
$$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` double(18,7) DEFAULT NULL,
KEY `d` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CHECK TABLE t1 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=INSTANT;
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY;
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
CALL debug_show_key_flags();
DROP TABLE t1;
CALL debug_show_key_flags();
ALTER TABLE t1 FORCE;
CALL debug_show_key_flags();
DROP TABLE t1;
DROP PROCEDURE debug_show_key_flags;
#
# End of 10.4 tests
#
@@ -0,0 +1,17 @@
--echo #
--echo # Start of 10.4 tests
--echo #

--echo #
--echo # MDEV-29481 mariadb-upgrade prints confusing statement
--echo #

let $table= std_data/mysql_upgrade/mdev29481_100104_myisam;
let $EXT_DAT= MYD;
let $EXT_IDX= MYI;
SET @debug_key_flags=NULL;
--source alter_table_upgrade_mdev29481_myisam_aria.inc

--echo #
--echo # End of 10.4 tests
--echo #
@@ -0,0 +1,92 @@
#
# Start of 10.4 tests
#
#
# MDEV-29481 mariadb-upgrade prints confusing statement
#
SET @debug_key_flags=TRUE;
CREATE PROCEDURE debug_show_key_flags()
BEGIN
IF @debug_key_flags IS TRUE
THEN
FLUSH TABLES;
-- Wrap SET into EXECUTE IMMEDIATE to avoid
-- parse time "Unknown system variable" errors in release builds.
EXECUTE IMMEDIATE "SET debug_dbug='+d,key'";
SELECT * FROM t1 LIMIT 0;
EXECUTE IMMEDIATE "SET debug_dbug=''";
END IF;
END;
$$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`d` double(18,7) DEFAULT NULL,
KEY `d` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CHECK TABLE t1 FOR UPGRADE;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=INSTANT;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000068 (HA_NULL_PART_KEY|HA_BINARY_PACK_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
ALTER TABLE t1 FORCE;
CALL debug_show_key_flags();
d
Warnings:
Note 1105 DBUG: ha_myisam::open: name=`d` flags=00000048 (HA_NULL_PART_KEY|HA_VAR_LENGTH_KEY)
Note 1105 DBUG: seg[0].type=6 DOUBLE
Note 1105 DBUG: seg[0].flag=00000850 (HA_CAN_MEMCMP|HA_SWAP_KEY|HA_NULL_PART)
DROP TABLE t1;
DROP PROCEDURE debug_show_key_flags;
#
# End of 10.4 tests
#
@@ -0,0 +1,19 @@
--source include/have_debug.inc

--echo #
--echo # Start of 10.4 tests
--echo #

--echo #
--echo # MDEV-29481 mariadb-upgrade prints confusing statement
--echo #

let $table= std_data/mysql_upgrade/mdev29481_100104_myisam;
let $EXT_DAT= MYD;
let $EXT_IDX= MYI;
SET @debug_key_flags=TRUE;
--source alter_table_upgrade_mdev29481_myisam_aria.inc

--echo #
--echo # End of 10.4 tests
--echo #
@@ -6398,6 +6398,17 @@ DEALLOCATE PREPARE stmt;
# End of 10.2 tests
#
#
# Start of 10.3 tests
#
#
# MDEV-14983 Wrong error message with SET sql_mode=sha2(ucs2_value)
#
SET sql_mode=sha2(CONVERT('a' USING ucs2),0);
ERROR 42000: Variable 'sql_mode' can't be set to the value of '022a6979e6dab7aa5ae4c3e5e45f7e977112a7e63593820dbec1ec738a24f93c'
#
# End of 10.3 tests
#
#
# Start of 10.4 tests
#
#

0 comments on commit 9a0b9e3

Please sign in to comment.