Skip to content

Commit b89cb5d

Browse files
committed
Merge mariadb-10.11.17 into 10.11
2 parents cda397c + 6828ff7 commit b89cb5d

209 files changed

Lines changed: 3706 additions & 7012 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dbug/dbug.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ static struct settings init_settings;
222222
static const char *db_process= 0;/* Pointer to process name; argv[0] */
223223
my_bool _dbug_on_= TRUE; /* FALSE if no debugging at all */
224224
static char * command_line= 0; /* copy of controls */
225+
#define FREE_COMMAND_LINE do{ free(command_line); command_line= 0; }while(0)
226+
225227

226228
typedef struct _db_code_state_ {
227229
const char *process; /* Pointer to process name; usually argv[0] */
@@ -900,7 +902,7 @@ int _db_is_pushed_()
900902
void _db_set_init_(const char *control)
901903
{
902904
CODE_STATE tmp_cs;
903-
/* see Writable() */
905+
FREE_COMMAND_LINE;
904906
command_line= strdup(control);
905907
if (unlikely(!command_line))
906908
{
@@ -1697,11 +1699,7 @@ void _db_end_()
16971699
init_done= 0;
16981700
_dbug_on_= 0;
16991701
/* see Writable() */
1700-
if (command_line)
1701-
{
1702-
free(command_line);
1703-
command_line= 0;
1704-
}
1702+
FREE_COMMAND_LINE;
17051703
}
17061704

17071705

debian/autobake-deb.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
1919
# shellcheck source=/dev/null
2020
source ./VERSION
2121

22+
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
23+
uname_machine=$(uname -m)
24+
2225
# General CI optimizations to keep build output smaller
2326
if [[ $GITLAB_CI ]]
2427
then
@@ -82,9 +85,6 @@ remove_package_notes()
8285
sed -e '/package.notes/d' -i debian/rules debian/control
8386
}
8487

85-
architecture=$(dpkg-architecture -q DEB_BUILD_ARCH)
86-
uname_machine=$(uname -m)
87-
8888
# Parse release name and number from Linux standard base release
8989
# Example:
9090
# $ lsb_release -a

extra/mariabackup/xbstream.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ file_entry_new(extract_ctxt_t *ctxt, const char *path, uint pathlen,
320320
file_entry_t *entry;
321321
ds_file_t *file;
322322

323+
if (*path == '.' || *path == '/' || strstr(path, "/../")) {
324+
msg("%s: invalid filename %s", my_progname, path);
325+
return NULL;
326+
}
327+
323328
entry = (file_entry_t *) my_malloc(PSI_NOT_INSTRUMENTED, sizeof(file_entry_t),
324329
MYF(MY_WME | MY_ZEROFILL));
325330
if (entry == NULL) {

extra/wolfssl/wolfssl

Submodule wolfssl updated 1639 files

include/my_xml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
#define MY_XML_FLAG_RELATIVE_NAMES 1
3535

3636
/*
37-
A flag whether to skip normilization of text values before calling
37+
A flag whether to skip normalization of text values before calling
3838
call-back functions: i.e. skip leading/trailing spaces,
3939
\r, \n, \t characters.
4040
*/

libmariadb

mysql-test/lib/generate-ssl-certs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ openssl rsa -in server-key.pem -out server-key.pem
2727
# sign the server certificate with CA certificate
2828
openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_anything -out server-cert.pem -in demoCA/server-req.pem
2929

30-
# server certificate with different validity period (MDEV-7598)
31-
openssl req -newkey rsa:4096 -keyout server-new-key.pem -out demoCA/server-new-req.pem -days 7301 -nodes -subj '/CN=server-new/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
30+
# server certificate with different validity period (MDEV-7598) and unsafe for shell interpolation (MDEV-39413)
31+
openssl req -newkey rsa:4096 -keyout server-new-key.pem -out demoCA/server-new-req.pem -days 7301 -nodes -subj /CN="'\`touch A\`'"'-"`touch B`"/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
3232
openssl rsa -in server-new-key.pem -out server-new-key.pem
3333
openssl ca -keyfile cakey.pem -days 7301 -batch -cert cacert.pem -policy policy_anything -out server-new-cert.pem -in demoCA/server-new-req.pem
3434

mysql-test/main/alter_table.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3131,6 +3131,29 @@ alter table t1 drop constraint t1_fk_t2_id, drop t2_id, drop t2_id;
31313131
ERROR 42000: Can't DROP COLUMN `t2_id`; check that it exists
31323132
drop table t1, t2;
31333133
#
3134+
# MDEV-34951: InnoDB index corruption when renaming key name with same letter to upper case.
3135+
#
3136+
CREATE TABLE t (a INT, b INT, KEY(a), KEY(b)) ENGINE=INNODB;
3137+
ALTER TABLE t RENAME KEY b TO B;
3138+
SELECT * FROM t;
3139+
a b
3140+
DROP TABLE t;
3141+
CREATE TABLE t (c INT UNIQUE) ENGINE=InnoDB;
3142+
ALTER TABLE t RENAME KEY c TO C;
3143+
SELECT * FROM t;
3144+
c
3145+
DROP TABLE t;
3146+
CREATE TABLE t (c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
3147+
ALTER TABLE t RENAME KEY c to C;
3148+
INSERT INTO t VALUES (1);
3149+
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
3150+
DROP TABLE t;
3151+
CREATE TABLE t (c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
3152+
ALTER TABLE t RENAME KEY c to C;
3153+
INSERT INTO t VALUES (1,1);
3154+
ERROR 21S01: Column count doesn't match value count at row 1
3155+
DROP TABLE t;
3156+
#
31343157
# MDEV-29001 DROP DEFAULT makes SHOW CREATE non-idempotent
31353158
#
31363159
SET @save_sql_mode=@@sql_mode;

mysql-test/main/alter_table.test

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,6 +2417,32 @@ create table t1(id int primary key, t2_id int, constraint t1_fk_t2_id foreign ke
24172417
alter table t1 drop constraint t1_fk_t2_id, drop t2_id, drop t2_id;
24182418
drop table t1, t2;
24192419

2420+
--echo #
2421+
--echo # MDEV-34951: InnoDB index corruption when renaming key name with same letter to upper case.
2422+
--echo #
2423+
2424+
CREATE TABLE t (a INT, b INT, KEY(a), KEY(b)) ENGINE=INNODB;
2425+
ALTER TABLE t RENAME KEY b TO B;
2426+
SELECT * FROM t;
2427+
DROP TABLE t;
2428+
2429+
CREATE TABLE t (c INT UNIQUE) ENGINE=InnoDB;
2430+
ALTER TABLE t RENAME KEY c TO C;
2431+
SELECT * FROM t;
2432+
DROP TABLE t;
2433+
2434+
CREATE TABLE t (c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
2435+
ALTER TABLE t RENAME KEY c to C;
2436+
--error ER_CANT_CREATE_GEOMETRY_OBJECT
2437+
INSERT INTO t VALUES (1);
2438+
DROP TABLE t;
2439+
2440+
CREATE TABLE t (c POINT GENERATED ALWAYS AS (POINT(1,1)) UNIQUE) ENGINE=InnoDB;
2441+
ALTER TABLE t RENAME KEY c to C;
2442+
--error ER_WRONG_VALUE_COUNT_ON_ROW
2443+
INSERT INTO t VALUES (1,1);
2444+
DROP TABLE t;
2445+
24202446
--echo #
24212447
--echo # MDEV-29001 DROP DEFAULT makes SHOW CREATE non-idempotent
24222448
--echo #
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#
2+
# MDEV-4462 mysqld gets SIGFPE when mysql.user table is empty
3+
#
14
create table t1 as select * from mysql.global_priv;
25
truncate table mysql.global_priv;
36
flush privileges;
@@ -14,3 +17,14 @@ connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
1417
connect fail,localhost,u1;
1518
Got one of the listed errors
1619
# switching back from mysql.user to mysql.global_priv
20+
#
21+
# MDEV-39266 Stack Overflow via alloca() in Privilege Table JSON Parser
22+
#
23+
INSERT INTO mysql.global_priv (Host, User, Priv) VALUES
24+
('localhost', 'MDEV-39266', CONCAT(
25+
'{"access":0,"plugin":"mysql_native_password","authentication_string":"',
26+
REPEAT('X', 400000),
27+
'","password_last_changed":0}'));
28+
FLUSH PRIVILEGES;
29+
DROP USER `MDEV-39266`@localhost;
30+
# End if 10.6 tests

0 commit comments

Comments
 (0)