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
7e756437
Commit
7e756437
authored
Nov 14, 2018
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' into 10.2
parents
01d3e401
9e23171c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
1 deletion
+62
-1
mysql-test/r/partition_innodb.result
mysql-test/r/partition_innodb.result
+29
-0
mysql-test/t/partition_innodb.test
mysql-test/t/partition_innodb.test
+32
-0
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
mysql-test/r/partition_innodb.result
View file @
7e756437
...
...
@@ -901,6 +901,35 @@ ERROR HY000: Table definition has changed, please retry transaction
disconnect con1;
DROP TABLE t1;
#
# MDEV-11167: InnoDB: Warning: using a partial-field key prefix
# in search, results in assertion failure or "Can't find record" error
#
set @save_sql_mode = @@sql_mode;
set sql_mode="";
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (b INT, c INT, KEY(b)) ENGINE=InnoDB PARTITION BY HASH(c) PARTITIONS 2;
CREATE ALGORITHM = MERGE VIEW v AS SELECT a, b FROM t1 STRAIGHT_JOIN t2 WHERE b = 'foo' WITH CHECK OPTION;
INSERT INTO t1 VALUES (1),(2);
INSERT IGNORE INTO t2 VALUES (2,2),('three',3),(4,4);
Warnings:
Warning 1366 Incorrect integer value: 'three' for column 'b' at row 2
UPDATE v SET a = NULL;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
DROP view v;
DROP TABLE t1, t2;
SET @save_isp=@@innodb_stats_persistent;
SET GLOBAL innodb_stats_persistent= ON;
CREATE TABLE t (f1 INT, f2 INT, KEY(f2)) ENGINE=InnoDB PARTITION BY HASH (f1) PARTITIONS 2;
INSERT IGNORE INTO t VALUES (NULL,0),(NULL,0),(0,21),(4,0),(1,8),(5,66);
CREATE ALGORITHM=MERGE VIEW v AS SELECT t1.* FROM t t1 JOIN t t2 WHERE t1.f1 < t2.f2 WITH LOCAL CHECK OPTION;
UPDATE v SET f2 = NULL;
ERROR 44000: CHECK OPTION failed `test`.`v`
SET GLOBAL innodb_stats_persistent= @save_isp;
DROP view v;
DROP TABLE t;
set sql_mode= @save_sql_mode;
#
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
# MYSQL.INNODB_TABLE_STATS
#
...
...
mysql-test/t/partition_innodb.test
View file @
7e756437
...
...
@@ -992,6 +992,38 @@ SELECT b FROM t1 WHERE b = 0;
--
disconnect
con1
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-11167: InnoDB: Warning: using a partial-field key prefix
--
echo
# in search, results in assertion failure or "Can't find record" error
--
echo
#
set
@
save_sql_mode
=
@@
sql_mode
;
set
sql_mode
=
""
;
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
InnoDB
;
CREATE
TABLE
t2
(
b
INT
,
c
INT
,
KEY
(
b
))
ENGINE
=
InnoDB
PARTITION
BY
HASH
(
c
)
PARTITIONS
2
;
CREATE
ALGORITHM
=
MERGE
VIEW
v
AS
SELECT
a
,
b
FROM
t1
STRAIGHT_JOIN
t2
WHERE
b
=
'foo'
WITH
CHECK
OPTION
;
INSERT
INTO
t1
VALUES
(
1
),(
2
);
INSERT
IGNORE
INTO
t2
VALUES
(
2
,
2
),(
'three'
,
3
),(
4
,
4
);
UPDATE
v
SET
a
=
NULL
;
DROP
view
v
;
DROP
TABLE
t1
,
t2
;
SET
@
save_isp
=@@
innodb_stats_persistent
;
SET
GLOBAL
innodb_stats_persistent
=
ON
;
CREATE
TABLE
t
(
f1
INT
,
f2
INT
,
KEY
(
f2
))
ENGINE
=
InnoDB
PARTITION
BY
HASH
(
f1
)
PARTITIONS
2
;
INSERT
IGNORE
INTO
t
VALUES
(
NULL
,
0
),(
NULL
,
0
),(
0
,
21
),(
4
,
0
),(
1
,
8
),(
5
,
66
);
CREATE
ALGORITHM
=
MERGE
VIEW
v
AS
SELECT
t1
.*
FROM
t
t1
JOIN
t
t2
WHERE
t1
.
f1
<
t2
.
f2
WITH
LOCAL
CHECK
OPTION
;
--
error
ER_VIEW_CHECK_FAILED
UPDATE
v
SET
f2
=
NULL
;
SET
GLOBAL
innodb_stats_persistent
=
@
save_isp
;
DROP
view
v
;
DROP
TABLE
t
;
set
sql_mode
=
@
save_sql_mode
;
--
echo
#
--
echo
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
--
echo
# MYSQL.INNODB_TABLE_STATS
...
...
sql/sql_update.cc
View file @
7e756437
...
...
@@ -2360,7 +2360,7 @@ int multi_update::do_updates()
check_opt_it
.
rewind
();
while
(
TABLE
*
tbl
=
check_opt_it
++
)
{
if
((
local_error
=
tbl
->
file
->
ha_rnd_init
(
1
)))
if
((
local_error
=
tbl
->
file
->
ha_rnd_init
(
0
)))
{
err_table
=
tbl
;
goto
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