MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Karthik Kamath 90b9c957ba BUG#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE
THAT ACTUALLY EXISTS

ANALYSIS:
=========
Stored functions updating a view where the view table has a
trigger defined that updates another table, fails reporting
an error that the table doesn't exist.

If there is a trigger defined on a table, a variable
'trg_event_map' will be set to a non-zero value after the
parsed tree creation. This indicates what triggers we need to
pre-load for the TABLE_LIST when opening an associated table.

During the prelocking phase, the variable 'trg_event_map'
will not be set for the view table. This value will be set
after the processing of triggers defined on the table. During
the processing of sub-statements, 'locked_tables_mode' will be
set to 'LTM_PRELOCKED' which denotes that further locking
of tables/functions cannot be done. This results in the other
table not being locked and thus further processing results in
an error getting reported.

FIX:
====
During the prelocking of view, the value of 'trg_event_map'
of the view is copied to 'trg_event_map' of the next table
in the TABLE_LIST. This results in the locking of tables
associated with the trigger as well.
2016-05-18 11:07:29 +05:30
BUILD Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
client Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUES 2016-05-16 13:46:49 +05:30
cmake Bug#21770366 backport bug#21657078 to 5.5 and 5.6 2016-01-07 14:36:19 +05:30
cmd-line-utils Merge branch 'mysql-5.1' into mysql-5.5 2015-04-24 11:31:59 +05:30
dbug BUG#16402143 - STACK CORRUPTION IN DBUG_EXPLAIN 2013-04-10 11:50:41 +05:30
Docs Merging the changes for Bug 16633169 - MYSQL.INFO CONTAINS OUTDATED INFORMATION. 2013-04-16 12:17:18 +02:00
extra Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUES 2016-05-16 13:46:49 +05:30
include BUG#22594514: HANDLE_FATAL_SIGNAL (SIG=11) IN 2016-03-17 08:49:37 +05:30
libmysql Bug#21973610: BUFFER OVERFLOW ISSUES 2015-11-06 16:41:55 +05:30
libmysqld Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG 2014-10-13 09:52:28 +02:00
libservices Updated/added copyright headers 2011-06-30 17:46:53 +02:00
man Exclude NDB man pages from a source tarball, 2011-10-04 12:28:30 +02:00
mysql-test BUG#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE 2016-05-18 11:07:29 +05:30
mysys Bug#23251517: SEMISYNC REPLICATION HANGING 2016-05-13 16:42:45 +05:30
packaging Fix for Bugs#14583183 and 19949163 2016-04-14 14:18:23 +05:30
plugin Bug#21770366 backport bug#21657078 to 5.5 and 5.6 2016-01-07 14:36:19 +05:30
regex Bug#21977380 - POSSIBLE BUFFER OVERFLOW ISSUES 2016-05-16 13:46:49 +05:30
scripts Bug#19920049 - MYSQLD_MULTI MISLEADING WHEN MY_PRINT_DEFAULTS 2016-03-01 13:05:14 +05:30
sql BUG#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE 2016-05-18 11:07:29 +05:30
sql-bench Bug#16395459 TEST AND RESULT FILES WITH EXECUTE BIT 2014-06-25 12:35:50 +02:00
sql-common Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE 2016-03-01 10:17:25 +05:30
storage BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROW 2016-02-26 09:01:49 +05:30
strings Bug #11755818 : LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN 2014-08-12 17:16:51 +05:30
support-files Bug#21527467 - RPM SCRIPTS FAIL WITH MULTIPLE DATADIR 2015-08-26 19:29:00 +02:00
tests Changing the copyright headers a bit to be complaint with the standards 2014-08-27 16:06:50 +02:00
unittest Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
vio Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE 2016-03-01 10:17:25 +05:30
win Updated/added copyright headers 2011-06-30 17:46:53 +02:00
zlib Backport from trunk: 2014-05-07 17:09:14 +02:00
.gitignore Create .gitignore as a copy of .bzrignore 2014-10-06 12:54:53 +02:00
BUILD-CMAKE Updated/added copyright headers 2011-06-30 17:46:53 +02:00
CMakeLists.txt Bug#21770366 backport bug#21657078 to 5.5 and 5.6 2016-01-07 14:36:19 +05:30
config.h.cmake Bug#21770366 backport bug#21657078 to 5.5 and 5.6 2016-01-07 14:36:19 +05:30
configure.cmake Bug#21770366 backport bug#21657078 to 5.5 and 5.6 2016-01-07 14:36:19 +05:30
COPYING Use a new version of "COPYING", the GPL text. 2010-03-04 14:26:27 +01:00
INSTALL-SOURCE Merging the changes for Bug 16633169 - MYSQL.INFO CONTAINS OUTDATED INFORMATION. 2013-04-16 12:17:18 +02:00
INSTALL-WIN-SOURCE Merging the changes for Bug 16633169 - MYSQL.INFO CONTAINS OUTDATED INFORMATION. 2013-04-16 12:17:18 +02:00
README Updated copyright year in user visible text 2016-01-11 14:10:58 +01:00
VERSION Raise version number after cloning 5.5.50 2016-05-02 09:26:00 +02:00

MySQL Server 5.5

This is a release of MySQL, a dual-license SQL database server.
For the avoidance of doubt, this particular copy of the software 
is released under the version 2 of the GNU General Public License. 
MySQL is brought to you by Oracle.

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

License information can be found in the COPYING file.

MySQL FOSS License Exception
We want free and open source software applications under certain
licenses to be able to use specified GPL-licensed MySQL client
libraries despite the fact that not all such FOSS licenses are
compatible with version 2 of the GNU General Public License.  
Therefore there are special exceptions to the terms and conditions 
of the GPLv2 as applied to these client libraries, which are 
identified and described in more detail in the FOSS License 
Exception at 
<http://www.mysql.com/about/legal/licensing/foss-exception.html>.

This distribution may include materials developed by third
parties. For license and attribution notices for these
materials, please refer to the documentation that accompanies
this distribution (see the "Licenses for Third-Party Components"
appendix) or view the online documentation at 
<http://dev.mysql.com/doc/>.

GPLv2 Disclaimer
For the avoidance of doubt, except that if any license choice
other than GPL or LGPL is available it will apply instead, 
Oracle elects to use only the General Public License version 2 
(GPLv2) at this time for any software where a choice of GPL 
license versions is made available with the language indicating 
that GPLv2 or any later version may be used, or where a choice 
of which version of the GPL is applied is otherwise unspecified.

For further information about MySQL or additional documentation, 
see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some Reference Manual sections of special interest:
- If you are migrating from an older version of MySQL, please 
  read the "Upgrading from..." section.
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading
  chapter.
- For the new features/bugfix history, see the MySQL Change History 
  appendix.

You can browse the MySQL Reference Manual online or download it 
in any of several formats at the URL given earlier in this file.
Source distributions include a local copy of the manual in the
Docs directory.