summaryrefslogtreecommitdiff
path: root/include/atomic
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-02-18 14:54:38 +0100
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-02-18 14:54:38 +0100
commitd62496ce611c7c0eccf3ac6c54114e86681f67dd (patch)
treea0aa3df92234543674ec89cc1a34e3e77ec06808 /include/atomic
parent58a076867246ac4f931f89ee729c520600d84ae8 (diff)
downloadmariadb-git-d62496ce611c7c0eccf3ac6c54114e86681f67dd.tar.gz
Bug #48315 Metadata lock is not taken for merged views that use
an INFORMATION_SCHEMA table When a prepared statement using a merged view containing an information schema table was executed, a metadata lock of the view was not taken. This meant that it was possible for concurrent view DDL to execute, thereby breaking the binary log. For example, it was possible for DROP VIEW to appear in the binary log before a query using the view. This also happened when a statement in a stored routine was executed a second time. For such views, the information schema table is merged into the view during the prepare phase (or first execution of a statement in a routine). The problem was that we took a short cut and were not executing full-blown view opening during subsequent executions of the statement. As a result, a metadata lock on the view was not taken to protect the view definition. This patch resolves the problem by making sure a metadata lock is taken for views even after information schema tables are merged into them. Test cased added to view.test.
Diffstat (limited to 'include/atomic')
0 files changed, 0 insertions, 0 deletions