Merge 10.3 into 10.4
This commit is contained in:
commit
a34c34d9a8
@ -2283,6 +2283,22 @@ connection default;
|
||||
connection master;
|
||||
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'
|
||||
#
|
||||
# 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;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
|
@ -2010,4 +2010,25 @@ connection master;
|
||||
--error ER_CANT_CREATE_FEDERATED_TABLE
|
||||
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;
|
||||
|
@ -328,3 +328,21 @@ WHERE variable_name = 'innodb_instant_alter_column';
|
||||
instants
|
||||
22
|
||||
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;
|
||||
|
@ -362,3 +362,29 @@ FROM information_schema.global_status
|
||||
WHERE variable_name = 'innodb_instant_alter_column';
|
||||
|
||||
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;
|
||||
|
@ -807,12 +807,12 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
|
||||
goto error;
|
||||
|
||||
if (share->hostname[0] == '\0')
|
||||
share->hostname= NULL;
|
||||
share->hostname= strdup_root(mem_root, my_localhost);
|
||||
|
||||
}
|
||||
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;
|
||||
else
|
||||
share->port= MYSQL_PORT;
|
||||
@ -3394,8 +3394,7 @@ int ha_federatedx::create(const char *name, TABLE *table_arg,
|
||||
goto error;
|
||||
|
||||
/* loopback socket connections hang due to LOCK_open mutex */
|
||||
if ((!tmp_share.hostname || !strcmp(tmp_share.hostname,my_localhost)) &&
|
||||
!tmp_share.port)
|
||||
if (0 == strcmp(tmp_share.hostname, my_localhost) && !tmp_share.port)
|
||||
goto error;
|
||||
|
||||
/*
|
||||
|
@ -1166,6 +1166,10 @@ row_log_table_get_pk_col(
|
||||
|
||||
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 (!log->allow_not_null) {
|
||||
return(DB_INVALID_NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user