Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a34c34d9
Commit
a34c34d9
authored
Nov 25, 2019
by
Aleksey Midenkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.3 into 10.4
parents
33f55789
1d5f6a00
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
4 deletions
+88
-4
mysql-test/suite/federated/federatedx.result
mysql-test/suite/federated/federatedx.result
+16
-0
mysql-test/suite/federated/federatedx.test
mysql-test/suite/federated/federatedx.test
+21
-0
mysql-test/suite/innodb/r/instant_alter_debug.result
mysql-test/suite/innodb/r/instant_alter_debug.result
+18
-0
mysql-test/suite/innodb/t/instant_alter_debug.test
mysql-test/suite/innodb/t/instant_alter_debug.test
+26
-0
storage/federatedx/ha_federatedx.cc
storage/federatedx/ha_federatedx.cc
+3
-4
storage/innobase/row/row0log.cc
storage/innobase/row/row0log.cc
+4
-0
No files found.
mysql-test/suite/federated/federatedx.result
View file @
a34c34d9
...
@@ -2283,6 +2283,22 @@ connection default;
...
@@ -2283,6 +2283,22 @@ connection default;
connection master;
connection master;
CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1';
CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1'
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1'
#
# MDEV-21049 Segfault in create federatedx table with empty hostname
#
connection master;
CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED
CONNECTION='mysql://root@:SLAVE_PORT/federated/t1';
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: 'root' hostname: 'localhost'
connection slave;
CREATE TABLE federated.t1(x int);
connection master;
CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED
CONNECTION='mysql://root@:SLAVE_PORT/federated/t1';
DROP TABLE federated.t1;
connection slave;
DROP TABLE federated.t1;
connection default;
connection master;
connection master;
DROP TABLE IF EXISTS federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP DATABASE IF EXISTS federated;
...
...
mysql-test/suite/federated/federatedx.test
View file @
a34c34d9
...
@@ -2010,4 +2010,25 @@ connection master;
...
@@ -2010,4 +2010,25 @@ connection master;
--
error
ER_CANT_CREATE_FEDERATED_TABLE
--
error
ER_CANT_CREATE_FEDERATED_TABLE
eval
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1'
;
eval
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1'
;
--
echo
#
--
echo
# MDEV-21049 Segfault in create federatedx table with empty hostname
--
echo
#
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
--
error
ER_CANT_CREATE_FEDERATED_TABLE
eval
CREATE
TABLE
federated
.
t1
(
x
int
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://root@:$SLAVE_MYPORT/federated/t1'
;
connection
slave
;
CREATE
TABLE
federated
.
t1
(
x
int
);
connection
master
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
CREATE
TABLE
federated
.
t1
(
x
int
)
ENGINE
=
FEDERATED
CONNECTION
=
'mysql://root@:$SLAVE_MYPORT/federated/t1'
;
DROP
TABLE
federated
.
t1
;
connection
slave
;
DROP
TABLE
federated
.
t1
;
connection
default
;
source
include
/
federated_cleanup
.
inc
;
source
include
/
federated_cleanup
.
inc
;
mysql-test/suite/innodb/r/instant_alter_debug.result
View file @
a34c34d9
...
@@ -328,3 +328,21 @@ WHERE variable_name = 'innodb_instant_alter_column';
...
@@ -328,3 +328,21 @@ WHERE variable_name = 'innodb_instant_alter_column';
instants
instants
22
22
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;
#
# MDEV-21045 AddressSanitizer: use-after-poison in mem_heap_dup / row_log_table_get_pk_col
#
CREATE TABLE t1 (a TEXT) ENGINE = InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 (a) VALUES ('foo');
ALTER TABLE t1 ADD COLUMN b INT DEFAULT 0,algorithm=instant;
connect con2,localhost,root,,test;
SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL onlinealter WAIT_FOR update';
ALTER TABLE t1 ADD PRIMARY KEY (b);
connection default;
SET DEBUG_SYNC='now WAIT_FOR onlinealter';
UPDATE t1 SET b = 1;
SET DEBUG_SYNC='now SIGNAL update';
connection con2;
connection default;
SET DEBUG_SYNC='RESET';
disconnect con2;
DROP TABLE t1;
mysql-test/suite/innodb/t/instant_alter_debug.test
View file @
a34c34d9
...
@@ -362,3 +362,29 @@ FROM information_schema.global_status
...
@@ -362,3 +362,29 @@ FROM information_schema.global_status
WHERE
variable_name
=
'innodb_instant_alter_column'
;
WHERE
variable_name
=
'innodb_instant_alter_column'
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
@
save_frequency
;
SET
GLOBAL
innodb_purge_rseg_truncate_frequency
=
@
save_frequency
;
--
echo
#
--
echo
# MDEV-21045 AddressSanitizer: use-after-poison in mem_heap_dup / row_log_table_get_pk_col
--
echo
#
CREATE
TABLE
t1
(
a
TEXT
)
ENGINE
=
InnoDB
ROW_FORMAT
=
REDUNDANT
;
INSERT
INTO
t1
(
a
)
VALUES
(
'foo'
);
ALTER
TABLE
t1
ADD
COLUMN
b
INT
DEFAULT
0
,
algorithm
=
instant
;
--
connect
(
con2
,
localhost
,
root
,,
test
)
SET
DEBUG_SYNC
=
'innodb_inplace_alter_table_enter SIGNAL onlinealter WAIT_FOR update'
;
--
send
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
b
);
--
connection
default
SET
DEBUG_SYNC
=
'now WAIT_FOR onlinealter'
;
UPDATE
t1
SET
b
=
1
;
SET
DEBUG_SYNC
=
'now SIGNAL update'
;
--
connection
con2
--
reap
--
connection
default
SET
DEBUG_SYNC
=
'RESET'
;
--
disconnect
con2
DROP
TABLE
t1
;
storage/federatedx/ha_federatedx.cc
View file @
a34c34d9
...
@@ -807,12 +807,12 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
...
@@ -807,12 +807,12 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
goto
error
;
goto
error
;
if
(
share
->
hostname
[
0
]
==
'\0'
)
if
(
share
->
hostname
[
0
]
==
'\0'
)
share
->
hostname
=
NULL
;
share
->
hostname
=
strdup_root
(
mem_root
,
my_localhost
)
;
}
}
if
(
!
share
->
port
)
if
(
!
share
->
port
)
{
{
if
(
!
share
->
hostname
||
strcmp
(
share
->
hostname
,
my_localhost
)
==
0
)
if
(
0
==
strcmp
(
share
->
hostname
,
my_localhost
)
)
share
->
socket
=
(
char
*
)
MYSQL_UNIX_ADDR
;
share
->
socket
=
(
char
*
)
MYSQL_UNIX_ADDR
;
else
else
share
->
port
=
MYSQL_PORT
;
share
->
port
=
MYSQL_PORT
;
...
@@ -3394,8 +3394,7 @@ int ha_federatedx::create(const char *name, TABLE *table_arg,
...
@@ -3394,8 +3394,7 @@ int ha_federatedx::create(const char *name, TABLE *table_arg,
goto
error
;
goto
error
;
/* loopback socket connections hang due to LOCK_open mutex */
/* loopback socket connections hang due to LOCK_open mutex */
if
((
!
tmp_share
.
hostname
||
!
strcmp
(
tmp_share
.
hostname
,
my_localhost
))
&&
if
(
0
==
strcmp
(
tmp_share
.
hostname
,
my_localhost
)
&&
!
tmp_share
.
port
)
!
tmp_share
.
port
)
goto
error
;
goto
error
;
/*
/*
...
...
storage/innobase/row/row0log.cc
View file @
a34c34d9
...
@@ -1166,6 +1166,10 @@ row_log_table_get_pk_col(
...
@@ -1166,6 +1166,10 @@ row_log_table_get_pk_col(
field
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
field
=
rec_get_nth_field
(
rec
,
offsets
,
i
,
&
len
);
if
(
len
==
UNIV_SQL_DEFAULT
)
{
field
=
log
->
instant_field_value
(
i
,
&
len
);
}
if
(
len
==
UNIV_SQL_NULL
)
{
if
(
len
==
UNIV_SQL_NULL
)
{
if
(
!
log
->
allow_not_null
)
{
if
(
!
log
->
allow_not_null
)
{
return
(
DB_INVALID_NULL
);
return
(
DB_INVALID_NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment