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
a44f2c3e
Commit
a44f2c3e
authored
Feb 15, 2019
by
Igor Babaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into bb-10.4-mdev16188
parents
294b8c42
568dd529
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
111 additions
and
288 deletions
+111
-288
mysql-test/main/constraints.result
mysql-test/main/constraints.result
+17
-0
mysql-test/main/constraints.test
mysql-test/main/constraints.test
+20
-0
mysql-test/suite/galera_sr/disabled.def
mysql-test/suite/galera_sr/disabled.def
+1
-3
mysql-test/suite/galera_sr/r/GCF-574.result
mysql-test/suite/galera_sr/r/GCF-574.result
+0
-11
mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
+2
-0
mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
...st/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
+2
-0
mysql-test/suite/galera_sr/r/galera_sr_load_data.result
mysql-test/suite/galera_sr/r/galera_sr_load_data.result
+1
-0
mysql-test/suite/galera_sr/r/galera_sr_sbr.result
mysql-test/suite/galera_sr/r/galera_sr_sbr.result
+0
-16
mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
+3
-6
mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
+0
-14
mysql-test/suite/galera_sr/t/GCF-574.test
mysql-test/suite/galera_sr/t/GCF-574.test
+0
-27
mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
+8
-0
mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
...-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
+4
-0
mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
...test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
+7
-0
mysql-test/suite/galera_sr/t/galera_sr_load_data.test
mysql-test/suite/galera_sr/t/galera_sr_load_data.test
+10
-0
mysql-test/suite/galera_sr/t/galera_sr_sbr.test
mysql-test/suite/galera_sr/t/galera_sr_sbr.test
+0
-31
mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
+4
-2
mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test
mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test
+0
-23
mysql-test/suite/innodb/r/instant_alter.result
mysql-test/suite/innodb/r/instant_alter.result
+10
-1
mysql-test/suite/innodb/t/instant_alter.test
mysql-test/suite/innodb/t/instant_alter.test
+5
-0
mysys/my_open.c
mysys/my_open.c
+1
-4
sql/item_func.cc
sql/item_func.cc
+5
-6
storage/heap/heapdef.h
storage/heap/heapdef.h
+0
-1
storage/heap/hp_hash.c
storage/heap/hp_hash.c
+2
-133
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+3
-6
storage/innobase/log/log0recv.cc
storage/innobase/log/log0recv.cc
+6
-4
No files found.
mysql-test/main/constraints.result
View file @
a44f2c3e
...
...
@@ -111,3 +111,20 @@ long_enough_name CREATE TABLE `long_enough_name` (
CONSTRAINT `constr` CHECK (`f6` >= 0)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE long_enough_name;
create table t1 (a int check (a>10)) select 100 as 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL CHECK (`a` > 10)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a text default(length(now())) check (length(a) > 1));
insert into t1 values ();
insert into t1 values ("ccc");
insert into t1 values ("");
ERROR 23000: CONSTRAINT `t1.a` failed for `test`.`t1`
select * from t1;
a
19
ccc
drop table t1;
mysql-test/main/constraints.test
View file @
a44f2c3e
...
...
@@ -102,3 +102,23 @@ SELECT * FROM long_enough_name AS tbl;
SHOW
CREATE
TABLE
long_enough_name
;
DROP
TABLE
long_enough_name
;
#
# Check that we don't loose constraints as part of CREATE ... SELECT
#
create
table
t1
(
a
int
check
(
a
>
10
))
select
100
as
'a'
;
show
create
table
t1
;
drop
table
t1
;
#
# Check that we constraints on field with default expressions work
#
create
table
t1
(
a
text
default
(
length
(
now
()))
check
(
length
(
a
)
>
1
));
insert
into
t1
values
();
insert
into
t1
values
(
"ccc"
);
--
error
ER_CONSTRAINT_FAILED
insert
into
t1
values
(
""
);
select
*
from
t1
;
drop
table
t1
;
mysql-test/suite/galera_sr/disabled.def
View file @
a44f2c3e
mysql-wsrep-features#29 : binlog_format=STATEMENT not supported with SR
GCF-574 : CTAS is not supported together with SR
galera_sr_sbr : binlog_format=STATEMENT not supported with SR
galera_sr_table_contents : missing file
mysql-test/suite/galera_sr/r/GCF-574.result
deleted
100644 → 0
View file @
294b8c42
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
SET SESSION wsrep_trx_fragment_size = 1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
wsrep_last_committed_delta
1
SELECT COUNT(*) = 10000 FROM t1;
COUNT(*) = 10000
1
DROP TABLE t1;
DROP TABLE ten;
mysql-test/suite/galera_sr/r/galera_sr_cc_slave.result
View file @
a44f2c3e
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_2;
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
COUNT(*) = 0
...
...
mysql-test/suite/galera_sr/r/galera_sr_kill_all_norecovery.result
View file @
a44f2c3e
connection node_2;
connection node_1;
connection node_1;
connection node_2;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
...
...
mysql-test/suite/galera_sr/r/galera_sr_load_data.result
View file @
a44f2c3e
...
...
@@ -10,4 +10,5 @@ COUNT(*) = 20000
1
wsrep_last_committed_diff
1
connection node_1;
DROP TABLE t1;
mysql-test/suite/galera_sr/r/galera_sr_sbr.result
deleted
100644 → 0
View file @
294b8c42
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET SESSION BINLOG_FORMAT='STATEMENT';
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
COMMIT;
SELECT COUNT(*) = 5 FROM t1;
COUNT(*) = 5
1
DROP TABLE t1;
mysql-test/suite/galera_sr/r/mysql-wsrep-features#148.result
View file @
a44f2c3e
...
...
@@ -6,9 +6,7 @@ CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
connection node_2;
SET GLOBAL wsrep_slave_threads = 2;
SET GLOBAL DEBUG = 'd,sync.wsrep_apply_cb';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET GLOBAL debug_dbug = 'd,sync.wsrep_apply_cb';
connection node_1;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
...
...
@@ -28,9 +26,7 @@ connection node_1;
Got one of the listed errors
connection node_2;
SET GLOBAL wsrep_slave_threads = 1;
SET GLOBAL DEBUG = '';
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET GLOBAL debug_dbug = '';
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
SET DEBUG_SYNC='now SIGNAL signal.wsrep_apply_cb';
...
...
@@ -40,3 +36,4 @@ COUNT(*) = 10
1
DROP TABLE t1;
DROP TABLE t2;
SET DEBUG_SYNC = RESET;
mysql-test/suite/galera_sr/r/mysql-wsrep-features#29.result
deleted
100644 → 0
View file @
294b8c42
SET SESSION wsrep_trx_fragment_size = 1;
SET SESSION binlog_format = STATEMENT;
create table t1 (id int not null, f_id int not null, f int not null,
primary key(f_id, id)) engine=innodb;
create table t2 (id int not null,s_id int not null,s varchar(200),
primary key(id)) engine=innodb;
INSERT INTO t1 VALUES (8, 1, 3);
INSERT INTO t1 VALUES (1, 2, 1);
INSERT INTO t2 VALUES (1, 0, '');
INSERT INTO t2 VALUES (8, 1, '');
DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
WHERE mm.id IS NULL;
DROP TABLE t1;
DROP TABLE t2;
mysql-test/suite/galera_sr/t/GCF-574.test
deleted
100644 → 0
View file @
294b8c42
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
#
# Test CREATE TABLE ... SELECT with Streaming Replication
#
--
connection
node_1
CREATE
TABLE
ten
(
f1
INTEGER
)
ENGINE
=
InnoDB
;
INSERT
INTO
ten
VALUES
(
1
),
(
2
),
(
3
),
(
4
),
(
5
),
(
6
),
(
7
),
(
8
),
(
9
),
(
10
);
--
let
$wsrep_last_committed_before
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
SET
SESSION
wsrep_trx_fragment_size
=
1
;
CREATE
TABLE
t1
(
f1
INTEGER
)
ENGINE
=
InnoDB
SELECT
1
FROM
ten
AS
a1
,
ten
AS
a2
,
ten
AS
a3
,
ten
AS
a4
;
--
let
$wsrep_last_committed_after
=
`SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--
disable_query_log
--
eval
SELECT
(
$wsrep_last_committed_after
-
$wsrep_last_committed_before
)
>
1
AS
wsrep_last_committed_delta
;
--
enable_query_log
--
connection
node_2
SELECT
COUNT
(
*
)
=
10000
FROM
t1
;
--
connection
node_1
DROP
TABLE
t1
;
DROP
TABLE
ten
;
mysql-test/suite/galera_sr/t/galera_sr_cc_slave.test
View file @
a44f2c3e
...
...
@@ -7,6 +7,11 @@
# leave the cluster.
#
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
../../
galera
/
include
/
auto_increment_offset_save
.
inc
# Start with a clean slate
--
connection
node_2
SELECT
COUNT
(
*
)
=
0
FROM
mysql
.
wsrep_streaming_log
;
...
...
@@ -95,3 +100,6 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
DROP
TABLE
t1
;
CALL
mtr
.
add_suppression
(
"points to own listening address, blacklisting"
);
# Restore original auto_increment_offset values.
--
source
../../
galera
/
include
/
auto_increment_offset_restore
.
inc
mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.cnf
View file @
a44f2c3e
...
...
@@ -2,3 +2,7 @@
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.recovery=false'
auto_increment_offset=1
[mysqld.2]
auto_increment_offset=2
mysql-test/suite/galera_sr/t/galera_sr_kill_all_norecovery.test
View file @
a44f2c3e
...
...
@@ -6,6 +6,11 @@
--
source
include
/
galera_cluster
.
inc
--
source
include
/
big_test
.
inc
# Save original auto_increment_offset values.
--
let
$node_1
=
node_1
--
let
$node_2
=
node_2
--
source
../../
galera
/
include
/
auto_increment_offset_save
.
inc
CREATE
TABLE
t1
(
f1
INTEGER
PRIMARY
KEY
)
ENGINE
=
InnoDB
;
SET
SESSION
wsrep_trx_fragment_size
=
1
;
SET
AUTOCOMMIT
=
OFF
;
...
...
@@ -50,4 +55,6 @@ SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT
COUNT
(
*
)
=
0
FROM
t1
;
SELECT
COUNT
(
*
)
=
0
FROM
mysql
.
wsrep_streaming_log
;
--
source
../../
galera
/
include
/
auto_increment_offset_restore
.
inc
DROP
TABLE
t1
;
mysql-test/suite/galera_sr/t/galera_sr_load_data.test
View file @
a44f2c3e
...
...
@@ -24,6 +24,9 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--
connection
node_1
--
disable_query_log
--
disable_warnings
set
global
wsrep_load_data_splitting
=
ON
;
--
enable_warnings
--
eval
LOAD
DATA
INFILE
'$MYSQLTEST_VARDIR/tmp/galera_sr_load_data.csv'
INTO
TABLE
t1
;
--
enable_query_log
...
...
@@ -36,4 +39,11 @@ SELECT COUNT(*) = 20000 FROM t1;
--
eval
SELECT
$wsrep_last_committed_after
-
$wsrep_last_committed_before
=
3
AS
wsrep_last_committed_diff
--
enable_query_log
--
connection
node_1
--
disable_query_log
--
disable_warnings
set
global
wsrep_load_data_splitting
=
OFF
;
--
enable_warnings
--
enable_query_log
DROP
TABLE
t1
;
mysql-test/suite/galera_sr/t/galera_sr_sbr.test
deleted
100644 → 0
View file @
294b8c42
--
source
include
/
galera_cluster
.
inc
--
source
include
/
have_innodb
.
inc
#
# Test that SR does not assert in the presence of statement-based replication events
#
--
connection
node_1
CREATE
TABLE
t1
(
id
INT
)
ENGINE
=
InnoDB
;
SET
SESSION
wsrep_trx_fragment_size
=
1
;
SET
SESSION
BINLOG_FORMAT
=
'STATEMENT'
;
SET
AUTOCOMMIT
=
OFF
;
START
TRANSACTION
;
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
2
);
INSERT
INTO
t1
VALUES
(
3
);
INSERT
INTO
t1
VALUES
(
4
);
INSERT
INTO
t1
VALUES
(
5
);
--
connection
node_2
SET
TRANSACTION
ISOLATION
LEVEL
READ
UNCOMMITTED
;
--
let
$wait_condition
=
SELECT
COUNT
(
*
)
>
0
FROM
t1
;
--
source
include
/
wait_condition
.
inc
--
connection
node_1
COMMIT
;
--
connection
node_2
SELECT
COUNT
(
*
)
=
5
FROM
t1
;
DROP
TABLE
t1
;
mysql-test/suite/galera_sr/t/mysql-wsrep-features#148.test
View file @
a44f2c3e
...
...
@@ -16,7 +16,7 @@ INSERT INTO t2 VALUES (6),(7),(8),(9),(10),(1);
--
connection
node_2
SET
GLOBAL
wsrep_slave_threads
=
2
;
SET
GLOBAL
DEBUG
=
'd,sync.wsrep_apply_cb'
;
SET
GLOBAL
debug_dbug
=
'd,sync.wsrep_apply_cb'
;
# Begin SR transaction
--
connection
node_1
...
...
@@ -48,7 +48,7 @@ COMMIT;
--
connection
node_2
SET
GLOBAL
wsrep_slave_threads
=
1
;
SET
GLOBAL
DEBUG
=
''
;
SET
GLOBAL
debug_dbug
=
''
;
SET
DEBUG_SYNC
=
'now SIGNAL signal.wsrep_apply_cb'
;
SET
DEBUG_SYNC
=
'now SIGNAL signal.wsrep_apply_cb'
;
SET
DEBUG_SYNC
=
'now SIGNAL signal.wsrep_apply_cb'
;
...
...
@@ -58,3 +58,5 @@ SELECT COUNT(*) = 10 FROM t1;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
SET
DEBUG_SYNC
=
RESET
;
mysql-test/suite/galera_sr/t/mysql-wsrep-features#29.test
deleted
100644 → 0
View file @
294b8c42
#
# mysql-wsrep-features#29 Unwarranted deadlock error with SR and a single-node cluster
#
SET
SESSION
wsrep_trx_fragment_size
=
1
;
SET
SESSION
binlog_format
=
STATEMENT
;
create
table
t1
(
id
int
not
null
,
f_id
int
not
null
,
f
int
not
null
,
primary
key
(
f_id
,
id
))
engine
=
innodb
;
create
table
t2
(
id
int
not
null
,
s_id
int
not
null
,
s
varchar
(
200
),
primary
key
(
id
))
engine
=
innodb
;
INSERT
INTO
t1
VALUES
(
8
,
1
,
3
);
INSERT
INTO
t1
VALUES
(
1
,
2
,
1
);
INSERT
INTO
t2
VALUES
(
1
,
0
,
''
);
INSERT
INTO
t2
VALUES
(
8
,
1
,
''
);
DELETE
ml
.*
FROM
t1
AS
ml
LEFT
JOIN
t2
AS
mm
ON
(
mm
.
id
=
ml
.
id
)
WHERE
mm
.
id
IS
NULL
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
mysql-test/suite/innodb/r/instant_alter.result
View file @
a44f2c3e
...
...
@@ -734,6 +734,9 @@ INSERT INTO t1 VALUES (1,1);
ALTER TABLE t1 ADD COLUMN f INT AFTER a;
ALTER TABLE t1 DROP b, DROP f;
DROP TABLE t1;
CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
ALTER TABLE t1 MODIFY COLUMN t TEXT;
DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
...
...
@@ -1414,6 +1417,9 @@ INSERT INTO t1 VALUES (1,1);
ALTER TABLE t1 ADD COLUMN f INT AFTER a;
ALTER TABLE t1 DROP b, DROP f;
DROP TABLE t1;
CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=COMPACT;
ALTER TABLE t1 MODIFY COLUMN t TEXT;
DROP TABLE t1;
CREATE TABLE t1
(id INT PRIMARY KEY, c2 INT UNIQUE,
c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'),
...
...
@@ -2094,10 +2100,13 @@ INSERT INTO t1 VALUES (1,1);
ALTER TABLE t1 ADD COLUMN f INT AFTER a;
ALTER TABLE t1 DROP b, DROP f;
DROP TABLE t1;
CREATE TABLE t1(t TEXT NOT NULL, FULLTEXT(t)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
ALTER TABLE t1 MODIFY COLUMN t TEXT;
DROP TABLE t1;
disconnect analyze;
SELECT variable_value-@old_instant instants
FROM information_schema.global_status
WHERE variable_name = 'innodb_instant_alter_column';
instants
17
0
17
1
SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency;
mysql-test/suite/innodb/t/instant_alter.test
View file @
a44f2c3e
...
...
@@ -633,6 +633,11 @@ ALTER TABLE t1 ADD COLUMN f INT AFTER a;
ALTER
TABLE
t1
DROP
b
,
DROP
f
;
DROP
TABLE
t1
;
# MDEV-18579 Assertion !ctx->online || num_fts_index == 0
eval
CREATE
TABLE
t1
(
t
TEXT
NOT
NULL
,
FULLTEXT
(
t
))
$engine
;
ALTER
TABLE
t1
MODIFY
COLUMN
t
TEXT
;
DROP
TABLE
t1
;
dec
$format
;
}
disconnect
analyze
;
...
...
mysys/my_open.c
View file @
a44f2c3e
...
...
@@ -89,10 +89,7 @@ int my_close(File fd, myf MyFlags)
my_file_info
[
fd
].
type
=
UNOPEN
;
}
#ifndef _WIN32
do
{
err
=
close
(
fd
);
}
while
(
err
==
-
1
&&
errno
==
EINTR
);
err
=
close
(
fd
);
#else
err
=
my_win_close
(
fd
);
#endif
...
...
sql/item_func.cc
View file @
a44f2c3e
...
...
@@ -6330,17 +6330,17 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
if
(
m_sp
->
agg_type
()
==
GROUP_AGGREGATE
)
{
List
<
Item
>
list
;
list
.
empty
();
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
list
.
push_back
(
*
(
args
+
i
));
Item_sum_sp
*
item_sp
;
Query_arena
*
arena
,
backup
;
arena
=
thd
->
activate_stmt_arena_if_needed
(
&
backup
);
if
(
arg_count
)
{
List
<
Item
>
list
;
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
list
.
push_back
(
args
[
i
]);
item_sp
=
new
(
thd
->
mem_root
)
Item_sum_sp
(
thd
,
context
,
m_name
,
sp
,
list
);
}
else
item_sp
=
new
(
thd
->
mem_root
)
Item_sum_sp
(
thd
,
context
,
m_name
,
sp
);
...
...
@@ -6354,7 +6354,6 @@ Item_func_sp::fix_fields(THD *thd, Item **ref)
if
(
err
)
DBUG_RETURN
(
TRUE
);
list
.
empty
();
DBUG_RETURN
(
FALSE
);
}
...
...
storage/heap/heapdef.h
View file @
a44f2c3e
...
...
@@ -81,7 +81,6 @@ extern uchar *hp_search(HP_INFO *info,HP_KEYDEF *keyinfo,const uchar *key,
uint
nextflag
);
extern
uchar
*
hp_search_next
(
HP_INFO
*
info
,
HP_KEYDEF
*
keyinfo
,
const
uchar
*
key
,
HASH_INFO
*
pos
);
extern
ulong
hp_hashnr
(
HP_KEYDEF
*
keyinfo
,
const
uchar
*
key
);
extern
ulong
hp_rec_hashnr
(
HP_KEYDEF
*
keyinfo
,
const
uchar
*
rec
);
extern
void
hp_movelink
(
HASH_INFO
*
pos
,
HASH_INFO
*
next_link
,
HASH_INFO
*
newlink
);
...
...
storage/heap/hp_hash.c
View file @
a44f2c3e
...
...
@@ -19,6 +19,7 @@
#include "heapdef.h"
#include <m_ctype.h>
static
ulong
hp_hashnr
(
HP_KEYDEF
*
keydef
,
const
uchar
*
key
);
/*
Find out how many rows there is in the given range
...
...
@@ -209,11 +210,9 @@ void hp_movelink(HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink)
return
;
}
#ifndef NEW_HASH_FUNCTION
/* Calc hashvalue for a key */
ulong
hp_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
uchar
*
key
)
static
ulong
hp_hashnr
(
HP_KEYDEF
*
keydef
,
const
uchar
*
key
)
{
/*register*/
ulong
nr
=
1
,
nr2
=
4
;
...
...
@@ -350,136 +349,6 @@ ulong hp_rec_hashnr(register HP_KEYDEF *keydef, register const uchar *rec)
return
(
nr
);
}
#else
/*
* Fowler/Noll/Vo hash
*
* The basis of the hash algorithm was taken from an idea sent by email to the
* IEEE Posix P1003.2 mailing list from Phong Vo (kpv@research.att.com) and
* Glenn Fowler (gsf@research.att.com). Landon Curt Noll (chongo@toad.com)
* later improved on their algorithm.
*
* The magic is in the interesting relationship between the special prime
* 16777619 (2^24 + 403) and 2^32 and 2^8.
*
* This hash produces the fewest collisions of any function that we've seen so
* far, and works well on both numbers and strings.
*/
ulong
hp_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
uchar
*
key
)
{
/*
Note, if a key consists of a combination of numeric and
a text columns, it most likely won't work well.
Making text columns work with NEW_HASH_FUNCTION
needs also changes in strings/ctype-xxx.c.
*/
ulong
nr
=
1
,
nr2
=
4
;
HA_KEYSEG
*
seg
,
*
endseg
;
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
{
uchar
*
pos
=
(
uchar
*
)
key
;
key
+=
seg
->
length
;
if
(
seg
->
null_bit
)
{
key
++
;
if
(
*
pos
)
{
nr
^=
(
nr
<<
1
)
|
1
;
/* Add key pack length (2) to key for VARCHAR segments */
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
key
+=
2
;
continue
;
}
pos
++
;
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
,
((
uchar
*
)
key
)
-
pos
,
&
nr
,
&
nr2
);
}
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
{
uint
pack_length
=
2
;
/* Key packing is constant */
uint
length
=
uint2korr
(
pos
);
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
length
,
&
nr
,
&
nr2
);
key
+=
pack_length
;
}
else
{
for
(
;
pos
<
(
uchar
*
)
key
;
pos
++
)
{
nr
*=
16777619
;
nr
^=
(
uint
)
*
pos
;
}
}
}
#ifdef ONLY_FOR_HASH_DEBUGGING
DBUG_PRINT
(
"exit"
,
(
"hash: 0x%lx"
,
nr
));
#endif
return
(
nr
);
}
/* Calc hashvalue for a key in a record */
ulong
hp_rec_hashnr
(
register
HP_KEYDEF
*
keydef
,
register
const
uchar
*
rec
)
{
ulong
nr
=
1
,
nr2
=
4
;
HA_KEYSEG
*
seg
,
*
endseg
;
for
(
seg
=
keydef
->
seg
,
endseg
=
seg
+
keydef
->
keysegs
;
seg
<
endseg
;
seg
++
)
{
uchar
*
pos
=
(
uchar
*
)
rec
+
seg
->
start
;
if
(
seg
->
null_bit
)
{
if
(
rec
[
seg
->
null_pos
]
&
seg
->
null_bit
)
{
nr
^=
(
nr
<<
1
)
|
1
;
continue
;
}
}
if
(
seg
->
type
==
HA_KEYTYPE_TEXT
)
{
uint
char_length
=
seg
->
length
;
/* TODO: fix to use my_charpos() */
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
,
char_length
,
&
nr
,
&
nr2
);
}
else
if
(
seg
->
type
==
HA_KEYTYPE_VARTEXT1
)
/* Any VARCHAR segments */
{
uint
pack_length
=
seg
->
bit_start
;
uint
length
=
(
pack_length
==
1
?
(
uint
)
*
(
uchar
*
)
pos
:
uint2korr
(
pos
));
seg
->
charset
->
coll
->
hash_sort
(
seg
->
charset
,
pos
+
pack_length
,
length
,
&
nr
,
&
nr2
);
}
else
{
uchar
*
end
=
pos
+
seg
->
length
;
if
(
seg
->
type
==
HA_KEYTYPE_BIT
&&
seg
->
bit_length
)
{
uchar
bits
=
get_rec_bits
(
rec
+
seg
->
bit_pos
,
seg
->
bit_start
,
seg
->
bit_length
);
nr
*=
16777619
;
nr
^=
(
uint
)
bits
;
end
--
;
}
for
(
;
pos
<
end
;
pos
++
)
{
nr
*=
16777619
;
nr
^=
(
uint
)
*
pos
;
}
}
}
#ifdef ONLY_FOR_HASH_DEBUGGING
DBUG_PRINT
(
"exit"
,
(
"hash: 0x%lx"
,
nr
));
#endif
return
(
nr
);
}
#endif
/*
Compare keys for two records. Returns 0 if they are identical
...
...
storage/innobase/handler/handler0alter.cc
View file @
a44f2c3e
...
...
@@ -1472,7 +1472,8 @@ instant_alter_column_possible(
&
(
ALTER_STORED_COLUMN_ORDER
|
ALTER_DROP_STORED_COLUMN
|
ALTER_ADD_STORED_BASE_COLUMN
))
{
#if 1 // MDEV-17459: adjust fts_fetch_doc_from_rec() and friends; remove this
if
(
ib_table
.
fts
)
return
false
;
if
(
ib_table
.
fts
||
innobase_fulltext_exist
(
altered_table
))
return
false
;
#endif
#if 1 // MDEV-17468: fix bugs with indexed virtual columns & remove this
for
(
const
dict_index_t
*
index
=
ib_table
.
indexes
.
start
;
...
...
@@ -6408,11 +6409,7 @@ prepare_inplace_alter_table_dict(
||
!
ctx
->
new_table
->
persistent_autoinc
);
if
(
ctx
->
need_rebuild
()
&&
instant_alter_column_possible
(
*
user_table
,
ha_alter_info
,
old_table
,
altered_table
)
#if 1 // MDEV-17459: adjust fts_fetch_doc_from_rec() and friends; remove this
&&
!
innobase_fulltext_exist
(
altered_table
)
#endif
)
{
*
user_table
,
ha_alter_info
,
old_table
,
altered_table
))
{
for
(
uint
a
=
0
;
a
<
ctx
->
num_to_add_index
;
a
++
)
{
ctx
->
add_index
[
a
]
->
table
=
ctx
->
new_table
;
ctx
->
add_index
[
a
]
=
dict_index_add_to_cache
(
...
...
storage/innobase/log/log0recv.cc
View file @
a44f2c3e
...
...
@@ -3071,10 +3071,12 @@ recv_init_missing_space(dberr_t err, const recv_spaces_t::const_iterator& i)
{
if
(
srv_operation
==
SRV_OPERATION_RESTORE
||
srv_operation
==
SRV_OPERATION_RESTORE_EXPORT
)
{
ib
::
warn
()
<<
"Tablespace "
<<
i
->
first
<<
" was not"
" found at "
<<
i
->
second
.
name
<<
" when"
" restoring a (partial?) backup. All redo log"
" for this file will be ignored!"
;
if
(
i
->
second
.
name
.
find
(
TEMP_TABLE_PATH_PREFIX
)
!=
std
::
string
::
npos
)
{
ib
::
warn
()
<<
"Tablespace "
<<
i
->
first
<<
" was not"
" found at "
<<
i
->
second
.
name
<<
" when"
" restoring a (partial?) backup. All redo log"
" for this file will be ignored!"
;
}
return
(
err
);
}
...
...
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