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
c9e11120
Commit
c9e11120
authored
Sep 20, 2017
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.0' into 10.1
parents
78f6f2b7
20d4cac6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
mysql-test/r/insert.result
mysql-test/r/insert.result
+28
-0
mysql-test/t/insert.test
mysql-test/t/insert.test
+29
-0
sql/table.cc
sql/table.cc
+3
-0
No files found.
mysql-test/r/insert.result
View file @
c9e11120
...
...
@@ -717,3 +717,31 @@ insert ignore into t1 values (1,12);
Warnings:
Warning 1062 Duplicate entry '1' for key 'f1'
DROP TABLE t1;
#
# MDEV-13290 Assertion Assertion `!is_set() || (m_status == DA_OK_BULK
# && is_bulk_op())' or `! is_set()' failed
#
SET @save_mode= @@sql_mode;
SET sql_mode= 'STRICT_ALL_TABLES';
CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = cast('' as decimal) WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DECIMAL value: ''
SELECT * from t1;
f1 f2
drop view v1;
SELECT 0,0 INTO OUTFILE 't1.txt';
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
LOAD DATA INFILE 't1.txt' INTO TABLE v1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
drop table t1;
SET @@sql_mode= @save_mode;
mysql-test/t/insert.test
View file @
c9e11120
...
...
@@ -573,3 +573,32 @@ insert ignore into t1 values (1,12) on duplicate key update f2=13;
set
@@
old_mode
=
""
;
insert
ignore
into
t1
values
(
1
,
12
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-13290 Assertion Assertion `!is_set() || (m_status == DA_OK_BULK
--
echo
# && is_bulk_op())' or `! is_set()' failed
--
echo
#
SET
@
save_mode
=
@@
sql_mode
;
SET
sql_mode
=
'STRICT_ALL_TABLES'
;
CREATE
TABLE
t1
(
f1
INT
DEFAULT
0
,
f2
INT
);
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
'x'
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
REPLACE
INTO
v1
SET
f2
=
1
;
SELECT
*
from
t1
;
drop
view
v1
;
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
cast
(
''
as
decimal
)
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
REPLACE
INTO
v1
SET
f2
=
1
;
SELECT
*
from
t1
;
drop
view
v1
;
SELECT
0
,
0
INTO
OUTFILE
't1.txt'
;
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
f1
,
f2
FROM
t1
WHERE
f1
=
'x'
WITH
CHECK
OPTION
;
--
error
ER_TRUNCATED_WRONG_VALUE
LOAD
DATA
INFILE
't1.txt'
INTO
TABLE
v1
;
SELECT
*
from
t1
;
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
remove_file
$MYSQLD_DATADIR
/
test
/
t1
.
txt
;
drop
view
v1
;
drop
table
t1
;
SET
@@
sql_mode
=
@
save_mode
;
sql/table.cc
View file @
c9e11120
...
...
@@ -4730,6 +4730,9 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
main_view
->
view_name
.
str
);
return
(
VIEW_CHECK_ERROR
);
}
/* We check thd->error() because it can be set by conversion problem. */
if
(
thd
->
is_error
())
return
(
VIEW_CHECK_ERROR
);
return
(
VIEW_CHECK_OK
);
}
...
...
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