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
68c96b8a
Commit
68c96b8a
authored
Mar 25, 2010
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
a1590d2e
41249cca
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
mysql-test/r/query_cache_with_views.result
mysql-test/r/query_cache_with_views.result
+13
-0
mysql-test/t/query_cache_with_views.test
mysql-test/t/query_cache_with_views.test
+17
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/query_cache_with_views.result
View file @
68c96b8a
...
...
@@ -193,4 +193,17 @@ show status like "Qcache_hits";
Variable_name Value
Qcache_hits 2
drop table t1;
#
# Bug46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table
#
CREATE TABLE t1 (c1 INT, c2 INT);
CREATE TABLE t2 LIKE t1;
SET AUTOCOMMIT=OFF;
CREATE VIEW t1_view AS SELECT c1 FROM t1 NATURAL JOIN t2 ;
INSERT INTO t1_view (c1, c2) SELECT c1, c2 FROM t1;
ERROR 42S22: Unknown column 'c2' in 'field list'
DROP TABLE t1;
DROP TABLE t2;
DROP VIEW t1_view;
SET AUTOCOMMIT=DEFAULT;
set GLOBAL query_cache_size=default;
mysql-test/t/query_cache_with_views.test
View file @
68c96b8a
...
...
@@ -126,5 +126,22 @@ show status like "Qcache_inserts";
show
status
like
"Qcache_hits"
;
drop
table
t1
;
--
echo
#
--
echo
# Bug46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table
--
echo
#
CREATE
TABLE
t1
(
c1
INT
,
c2
INT
);
CREATE
TABLE
t2
LIKE
t1
;
SET
AUTOCOMMIT
=
OFF
;
CREATE
VIEW
t1_view
AS
SELECT
c1
FROM
t1
NATURAL
JOIN
t2
;
# Before the bug patch the below INSERT stmt used to
# crash when other fields than the ones listed in the
# view definition were used.
--
error
ER_BAD_FIELD_ERROR
INSERT
INTO
t1_view
(
c1
,
c2
)
SELECT
c1
,
c2
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t2
;
DROP
VIEW
t1_view
;
SET
AUTOCOMMIT
=
DEFAULT
;
# Reset default environment.
set
GLOBAL
query_cache_size
=
default
;
sql/sql_parse.cc
View file @
68c96b8a
...
...
@@ -3241,7 +3241,7 @@ mysql_execute_command(THD *thd)
TODO: this is workaround. right way will be move invalidating in
the unlock procedure.
*/
if
(
first_table
->
lock_type
==
TL_WRITE_CONCURRENT_INSERT
&&
if
(
!
res
&&
first_table
->
lock_type
==
TL_WRITE_CONCURRENT_INSERT
&&
thd
->
lock
)
{
/* INSERT ... SELECT should invalidate only the very first table */
...
...
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