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
094b0f86
Commit
094b0f86
authored
Dec 08, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.2 into bb-10.2-ext
parents
38908aaf
bf963106
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
295 additions
and
18 deletions
+295
-18
mysql-test/include/ctype_like_range_mdev14350.inc
mysql-test/include/ctype_like_range_mdev14350.inc
+14
-0
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+25
-0
mysql-test/r/ctype_like_range.result
mysql-test/r/ctype_like_range.result
+45
-0
mysql-test/r/ctype_ucs2_uca.result
mysql-test/r/ctype_ucs2_uca.result
+26
-0
mysql-test/r/ctype_utf16_uca.result
mysql-test/r/ctype_utf16_uca.result
+26
-0
mysql-test/r/ctype_utf32_uca.result
mysql-test/r/ctype_utf32_uca.result
+26
-0
mysql-test/r/ctype_utf8_uca.result
mysql-test/r/ctype_utf8_uca.result
+25
-0
mysql-test/r/ctype_utf8mb4_uca.result
mysql-test/r/ctype_utf8mb4_uca.result
+26
-0
mysql-test/suite/sys_vars/r/sysvars_innodb.result
mysql-test/suite/sys_vars/r/sysvars_innodb.result
+1
-1
mysql-test/suite/sys_vars/t/wsrep_on_basic.opt
mysql-test/suite/sys_vars/t/wsrep_on_basic.opt
+1
-0
mysql-test/t/ctype_latin1.test
mysql-test/t/ctype_latin1.test
+3
-0
mysql-test/t/ctype_like_range.test
mysql-test/t/ctype_like_range.test
+40
-0
mysql-test/t/ctype_ucs2_uca.test
mysql-test/t/ctype_ucs2_uca.test
+4
-0
mysql-test/t/ctype_utf16_uca.test
mysql-test/t/ctype_utf16_uca.test
+5
-0
mysql-test/t/ctype_utf32_uca.test
mysql-test/t/ctype_utf32_uca.test
+5
-0
mysql-test/t/ctype_utf8_uca.test
mysql-test/t/ctype_utf8_uca.test
+3
-0
mysql-test/t/ctype_utf8mb4_uca.test
mysql-test/t/ctype_utf8mb4_uca.test
+5
-0
storage/innobase/dict/dict0defrag_bg.cc
storage/innobase/dict/dict0defrag_bg.cc
+1
-1
storage/innobase/dict/dict0stats.cc
storage/innobase/dict/dict0stats.cc
+6
-8
storage/innobase/include/dict0stats.h
storage/innobase/include/dict0stats.h
+1
-1
strings/ctype-mb.c
strings/ctype-mb.c
+5
-5
strings/ctype-simple.c
strings/ctype-simple.c
+2
-2
No files found.
mysql-test/include/ctype_like_range_mdev14350.inc
0 → 100644
View file @
094b0f86
--
echo
#
--
echo
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
--
echo
#
CREATE
OR
REPLACE
TABLE
t1
AS
SELECT
SPACE
(
50
)
AS
a
,
SPACE
(
50
)
AS
b
;
ALTER
TABLE
t1
ADD
KEY
(
a
),
ADD
KEY
(
b
);
SHOW
CREATE
TABLE
t1
;
INSERT
INTO
t1
VALUES
(
'111'
,
'111'
);
INSERT
INTO
t1
VALUES
(
'222'
,
'222'
);
INSERT
INTO
t1
VALUES
(
'333'
,
'333'
);
INSERT
INTO
t1
VALUES
(
'444'
,
'444'
);
SELECT
*
FROM
t1
WHERE
a
LIKE
'111%'
;
SELECT
*
FROM
t1
IGNORE
INDEX
(
a
)
WHERE
a
LIKE
'111%'
;
DROP
TABLE
t1
;
mysql-test/r/ctype_latin1.result
View file @
094b0f86
...
...
@@ -8804,6 +8804,31 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES latin1;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) DEFAULT NULL,
`b` varchar(50) DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
#
# End of 10.2 tests
#
mysql-test/r/ctype_like_range.result
View file @
094b0f86
...
...
@@ -4430,5 +4430,50 @@ a_ 6100 61FF
a% 61000000000000000000 61FFFFFFFFFFFFFFFFFF
DROP TABLE t1;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_swedish_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 313131
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 313131
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 313131
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 313131
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ucs2 COLLATE ucs2_unicode_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 003100310031
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf16 COLLATE utf16_unicode_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 003100310031
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32 COLLATE utf32_unicode_nopad_ci);
INSERT INTO t1 VALUES ('111%');
SELECT a, HEX(LIKE_RANGE_MIN(a,200)) FROM t1;
a HEX(LIKE_RANGE_MIN(a,200))
111% 000000310000003100000031
DROP TABLE t1;
#
# End of 10.2 tests
#
mysql-test/r/ctype_ucs2_uca.result
View file @
094b0f86
...
...
@@ -559,6 +559,32 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=ucs2_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) CHARACTER SET ucs2 COLLATE ucs2_unicode_520_nopad_ci DEFAULT NULL,
`b` varchar(50) CHARACTER SET ucs2 COLLATE ucs2_unicode_520_nopad_ci DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
SET NAMES utf8;
#
# End of 10.2 tests
#
mysql-test/r/ctype_utf16_uca.result
View file @
094b0f86
...
...
@@ -7866,6 +7866,32 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=utf16_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) CHARACTER SET utf16 COLLATE utf16_unicode_520_nopad_ci DEFAULT NULL,
`b` varchar(50) CHARACTER SET utf16 COLLATE utf16_unicode_520_nopad_ci DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
SET NAMES utf8;
#
# End of 10.2 tests
#
mysql-test/r/ctype_utf32_uca.result
View file @
094b0f86
...
...
@@ -7886,6 +7886,32 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES utf8, collation_connection=utf32_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) CHARACTER SET utf32 COLLATE utf32_unicode_520_nopad_ci DEFAULT NULL,
`b` varchar(50) CHARACTER SET utf32 COLLATE utf32_unicode_520_nopad_ci DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
SET NAMES utf8;
#
# End of 10.2 tests
#
mysql-test/r/ctype_utf8_uca.result
View file @
094b0f86
...
...
@@ -559,6 +559,31 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES utf8 COLLATE utf8_unicode_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_nopad_ci DEFAULT NULL,
`b` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_nopad_ci DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
#
# End of 10.2 tests
#
mysql-test/r/ctype_utf8mb4_uca.result
View file @
094b0f86
...
...
@@ -6576,6 +6576,32 @@ DROP TABLE t1;
# End of ctype_pad.inc
#
SET STORAGE_ENGINE=Default;
SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci;
#
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
#
CREATE OR REPLACE TABLE t1 AS SELECT SPACE(50) AS a, SPACE (50) AS b;
ALTER TABLE t1 ADD KEY(a), ADD KEY(b);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci DEFAULT NULL,
`b` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_nopad_ci DEFAULT NULL,
KEY `a` (`a`),
KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('111', '111');
INSERT INTO t1 VALUES ('222', '222');
INSERT INTO t1 VALUES ('333', '333');
INSERT INTO t1 VALUES ('444', '444');
SELECT * FROM t1 WHERE a LIKE '111%';
a b
111 111
SELECT * FROM t1 IGNORE INDEX (a) WHERE a LIKE '111%';
a b
111 111
DROP TABLE t1;
SET NAMES utf8mb4;
#
# End of 10.2 tests
#
mysql-test/suite/sys_vars/r/sysvars_innodb.result
View file @
094b0f86
...
...
@@ -1614,7 +1614,7 @@ NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST fcfs,vats
READ_ONLY
NO
READ_ONLY
YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
SESSION_VALUE 50
...
...
mysql-test/suite/sys_vars/t/wsrep_on_basic.opt
0 → 100644
View file @
094b0f86
--innodb-lock-schedule-algorithm=FCFS
mysql-test/t/ctype_latin1.test
View file @
094b0f86
...
...
@@ -411,6 +411,9 @@ let $coll='latin1_nopad_bin';
let
$coll_pad
=
'latin1_bin'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
latin1
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
mysql-test/t/ctype_like_range.test
View file @
094b0f86
...
...
@@ -154,6 +154,46 @@ INSERT INTO t1 (a) VALUES ('a'),('a_'),('a%');
SELECT
a
,
HEX
(
mn
),
HEX
(
mx
)
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-14350 Index use with collation utf8mb4_unicode_nopad_ci on LIKE pattern with wrong results
--
echo
#
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
latin1
COLLATE
latin1_swedish_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf8
COLLATE
utf8_general_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf8
COLLATE
utf8_unicode_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
ucs2
COLLATE
ucs2_unicode_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf16
COLLATE
utf16_unicode_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
10
)
CHARACTER
SET
utf32
COLLATE
utf32_unicode_nopad_ci
);
INSERT
INTO
t1
VALUES
(
'111%'
);
SELECT
a
,
HEX
(
LIKE_RANGE_MIN
(
a
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
mysql-test/t/ctype_ucs2_uca.test
View file @
094b0f86
...
...
@@ -16,6 +16,10 @@ let $coll='ucs2_unicode_520_nopad_ci';
let
$coll_pad
=
'ucs2_unicode_520_ci'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
utf8
,
collation_connection
=
ucs2_unicode_520_nopad_ci
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
SET
NAMES
utf8
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
mysql-test/t/ctype_utf16_uca.test
View file @
094b0f86
...
...
@@ -238,6 +238,11 @@ let $coll='utf16_unicode_520_nopad_ci';
let
$coll_pad
=
'utf16_unicode_520_ci'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
utf8
,
collation_connection
=
utf16_unicode_520_nopad_ci
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
SET
NAMES
utf8
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
mysql-test/t/ctype_utf32_uca.test
View file @
094b0f86
...
...
@@ -260,6 +260,11 @@ let $coll='utf32_unicode_520_nopad_ci';
let
$coll_pad
=
'utf32_unicode_520_ci'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
utf8
,
collation_connection
=
utf32_unicode_520_nopad_ci
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
SET
NAMES
utf8
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
mysql-test/t/ctype_utf8_uca.test
View file @
094b0f86
...
...
@@ -14,6 +14,9 @@ let $coll='utf8_unicode_520_nopad_ci';
let
$coll_pad
=
'utf8_unicode_520_ci'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
utf8
COLLATE
utf8_unicode_nopad_ci
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
--
echo
#
--
echo
# End of 10.2 tests
...
...
mysql-test/t/ctype_utf8mb4_uca.test
View file @
094b0f86
...
...
@@ -100,6 +100,11 @@ let $coll='utf8mb4_unicode_520_nopad_ci';
let
$coll_pad
=
'utf8mb4_unicode_520_ci'
;
--
source
include
/
ctype_pad_all_engines
.
inc
SET
NAMES
utf8mb4
COLLATE
utf8mb4_unicode_520_nopad_ci
;
--
source
include
/
ctype_like_range_mdev14350
.
inc
SET
NAMES
utf8mb4
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
storage/innobase/dict/dict0defrag_bg.cc
View file @
094b0f86
...
...
@@ -318,7 +318,7 @@ dict_stats_save_defrag_stats(dict_index_t* index, trx_t* trx)
return
DB_SUCCESS
;
}
lin
t
now
=
ut_time
();
ib_time_
t
now
=
ut_time
();
dberr_t
err
=
dict_stats_save_index_stat
(
index
,
now
,
"n_page_split"
,
index
->
stat_defrag_n_page_split
,
...
...
storage/innobase/dict/dict0stats.cc
View file @
094b0f86
...
...
@@ -2256,7 +2256,7 @@ storage.
dberr_t
dict_stats_save_index_stat
(
dict_index_t
*
index
,
lint
last_update
,
ib_time_t
last_update
,
const
char
*
stat_name
,
ib_uint64_t
stat_value
,
ib_uint64_t
*
sample_size
,
...
...
@@ -2278,7 +2278,7 @@ dict_stats_save_index_stat(
pars_info_add_str_literal
(
pinfo
,
"table_name"
,
table_utf8
);
pars_info_add_str_literal
(
pinfo
,
"index_name"
,
index
->
name
);
UNIV_MEM_ASSERT_RW_ABORT
(
&
last_update
,
4
);
pars_info_add_int4_literal
(
pinfo
,
"last_update"
,
last_update
);
pars_info_add_int4_literal
(
pinfo
,
"last_update"
,
(
lint
)
last_update
);
UNIV_MEM_ASSERT_RW_ABORT
(
stat_name
,
strlen
(
stat_name
));
pars_info_add_str_literal
(
pinfo
,
"stat_name"
,
stat_name
);
UNIV_MEM_ASSERT_RW_ABORT
(
&
stat_value
,
8
);
...
...
@@ -2389,7 +2389,7 @@ dict_stats_save(
const
index_id_t
*
only_for_index
=
NULL
)
{
pars_info_t
*
pinfo
;
lint
now
;
ib_time_t
now
;
dberr_t
ret
;
dict_table_t
*
table
;
char
db_utf8
[
MAX_DB_UTF8_LEN
];
...
...
@@ -2407,16 +2407,14 @@ dict_stats_save(
dict_fs2utf8
(
table
->
name
.
m_name
,
db_utf8
,
sizeof
(
db_utf8
),
table_utf8
,
sizeof
(
table_utf8
));
/* MySQL's timestamp is 4 byte, so we use
pars_info_add_int4_literal() which takes a lint arg, so "now" is
lint */
now
=
(
lint
)
ut_time
();
now
=
ut_time
();
pinfo
=
pars_info_create
();
pars_info_add_str_literal
(
pinfo
,
"database_name"
,
db_utf8
);
pars_info_add_str_literal
(
pinfo
,
"table_name"
,
table_utf8
);
pars_info_add_int4_literal
(
pinfo
,
"last_update"
,
now
);
pars_info_add_int4_literal
(
pinfo
,
"last_update"
,
(
lint
)
now
);
pars_info_add_ull_literal
(
pinfo
,
"n_rows"
,
table
->
stat_n_rows
);
pars_info_add_ull_literal
(
pinfo
,
"clustered_index_size"
,
table
->
stat_clustered_index_size
);
...
...
storage/innobase/include/dict0stats.h
View file @
094b0f86
...
...
@@ -212,7 +212,7 @@ storage.
dberr_t
dict_stats_save_index_stat
(
dict_index_t
*
index
,
lint
last_update
,
ib_time_t
last_update
,
const
char
*
stat_name
,
ib_uint64_t
stat_value
,
ib_uint64_t
*
sample_size
,
...
...
strings/ctype-mb.c
View file @
094b0f86
...
...
@@ -799,9 +799,9 @@ my_bool my_like_range_mb(CHARSET_INFO *cs,
'a\0\0... is the smallest possible string when we have space expand
a\ff\ff... is the biggest possible string
*/
*
min_length
=
(
(
cs
->
state
&
MY_CS_BINSORT
)
?
(
size_t
)
(
min_str
-
min_org
)
:
res_length
);
*
max_length
=
res_length
;
*
min_length
=
(
cs
->
state
&
(
MY_CS_BINSORT
|
MY_CS_NOPAD
))
?
(
size_t
)
(
min_str
-
min_org
)
:
res_length
;
/* Create min key */
do
{
...
...
@@ -1002,9 +1002,9 @@ my_like_range_generic(CHARSET_INFO *cs,
a\min\min... is the smallest possible string
a\max\max... is the biggest possible string
*/
*
min_length
=
(
(
cs
->
state
&
MY_CS_BINSORT
)
?
*
min_length
=
(
cs
->
state
&
(
MY_CS_BINSORT
|
MY_CS_NOPAD
)
)
?
(
size_t
)
(
min_str
-
min_org
)
:
res_length
)
;
res_length
;
*
max_length
=
res_length
;
goto
pad_min_max
;
}
...
...
strings/ctype-simple.c
View file @
094b0f86
...
...
@@ -1059,9 +1059,9 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
if
(
*
ptr
==
w_many
)
/* '%' in SQL */
{
/* Calculate length of keys */
*
min_length
=
(
(
cs
->
state
&
MY_CS_BINSORT
)
?
*
min_length
=
(
cs
->
state
&
(
MY_CS_BINSORT
|
MY_CS_NOPAD
)
)
?
(
size_t
)
(
min_str
-
min_org
)
:
res_length
)
;
res_length
;
*
max_length
=
res_length
;
do
{
...
...
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