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
unknown 39509d64c3 A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and
pre-locking.

The crash was caused by an implicit assumption in check_table_access() that
table_list parameter is always a part of lex->query_tables.

When iterating over the passed list of tables, check_table_access() used
to stop only when lex->query_tables_last_not_own was reached. 
In case of pre-locking, lex->query_tables_last_own is not NULL and points
to some element of lex->query_tables. When the parameter
of check_table_access() was not part of lex->query_tables, loop invariant
could never be violated and a crash would happen when the current table
pointer would point beyond the end of the provided list.

The fix is to change the signature of check_table_access() to also accept
a numeric limit of loop iterations, similarly to check_grant(), and 
supply this limit in all places when we want to check access of tables
that are outside lex->query_tables, or just want to check access to one table.


mysql-test/r/information_schema.result:
  Update test results (Bug#34166).
mysql-test/t/information_schema.test:
  Add a test case for Bug#34166.
sql/mysql_priv.h:
  Change signature of check_table_access() to accept a numeric limit
  of tables to check.
sql/sp_head.cc:
  Update to the new signature of check_table_access().
sql/sql_acl.cc:
  Improve code clarity: if there is a numeric limit, we should not need
  to look at first_not_own_table.
sql/sql_base.cc:
  Update to the new signature of check_table_access().
sql/sql_cache.cc:
  Update to the new signature of check_table_access().
sql/sql_parse.cc:
  Update to the new signature of check_table_access().
  Change check_table_access() to accept an optional numeric limit of tables
  to check. A crash would happen when check_table_access() was
  passed a list of tables that is not part of lex->query_tables and
  lex->query_tables_last_own was not NULL.
sql/sql_plugin.cc:
  Update to the new signature of check_table_access().
sql/sql_prepare.cc:
  Update to the new signature of check_table_access().
sql/sql_show.cc:
  Update to the new signature of check_table_access().
  Ensure that check_table_access() only checks access to the first
  table in the table list when called from list_open_tables().
  list_open_tables() supplies a table list that is created on stack,
  whereas check_table_access() used to assume that the supplied list is a part
  of thd->lex.
sql/sql_trigger.cc:
  Update to the new signature of check_table_access().
sql/sql_view.cc:
  Update to the new signature of check_table_access().
2008-01-30 18:27:41 +03:00
BitKeeper Merge chorlton.adsl.perkin.org.uk:/Users/jonathan/work/bk/mysql-5.0 2007-12-14 16:02:31 +00:00
BUILD autorun.sh: 2007-10-29 22:48:58 +01:00
client Merge kaamos.(none):/data/src/mysql-5.1 2008-01-10 20:44:23 +03:00
cmd-line-utils Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-18431 2007-11-19 14:55:15 +01:00
config/ac-macros Bug#30296 2007-10-25 21:19:28 -07:00
dbug Bug #27099: system_mysql fail in pushbuild windows 2007-10-15 19:56:24 +03:00
Docs ReadMe.txt, INSTALL-WIN-SOURCE, INSTALL-BINARY, INSTALL-SOURCE: 2007-11-23 10:15:55 +01:00
extra Merge ramayana.hindu.god:/home/tsmith/m/bk/51 2007-10-10 14:15:09 -06:00
include Post merge fix for BUG 33728 2008-01-11 21:34:23 -02:00
libmysql Merge station.:/mnt/raid/alik/MySQL/devel/5.1 2007-12-14 16:30:22 +03:00
libmysql_r Makefile.am: 2007-10-08 20:55:44 +02:00
libmysqld Merge station.:/mnt/raid/alik/MySQL/devel/5.1 2007-12-14 16:30:22 +03:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and 2008-01-30 18:27:41 +03:00
mysys Bug#30331 Table_locks_waited shows inaccurate values 2008-01-28 10:52:41 -02:00
netware Merge trift2.:/MySQL/M50/merge-5.0 2007-12-21 13:13:22 +01:00
plugin Makefile.am: 2007-09-26 18:47:55 +02:00
pstack Makefile.am, configure.in: 2007-09-27 21:39:23 +02:00
regex Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel 2007-08-16 18:21:47 +02:00
scripts Merge trift2.:/MySQL/M51/mysql-5.1 2007-12-17 13:40:06 +01:00
server-tools Bug#12713 "Error in a stored function called from a SELECT doesn't 2007-12-12 18:21:01 +03:00
sql A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and 2008-01-30 18:27:41 +03:00
sql-bench Fixed compiler warnings 2007-02-23 13:13:55 +02:00
sql-common Merge station.:/mnt/raid/alik/MySQL/devel/5.1 2007-12-14 16:30:22 +03:00
storage Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-12-15 16:59:43 +03:00
strings Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt 2008-01-17 18:36:04 +01:00
support-files ReadMe.txt, INSTALL-WIN-SOURCE, INSTALL-BINARY, INSTALL-SOURCE: 2007-11-23 10:15:55 +01:00
tests Bug#33699: The UPDATE statement allows NULL as new value on a NOT NULL 2008-01-11 05:06:08 +04:00
unittest Fixes Bug#30127: --debug-info no longer prints memory usage in mysql 2007-08-01 22:59:05 +03:00
vio Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint 2007-08-28 11:36:10 +02:00
win Merge ramayana.hindu.god:/home/tsmith/m/bk/51 2007-09-28 10:55:28 -06:00
zlib CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
.bzrignore Merge mysql.com:/home/gluh/MySQL/Merge/5.1 2007-12-13 15:56:04 +04:00
.cvsignore
CMakeLists.txt Merge alf.(none):/src/bug31319/my50-bug31319 2007-11-02 15:17:37 -04:00
configure.in Merge ibm.:/home/alik/Documents/MySQL/devel/5.1 2008-01-19 22:32:48 +03:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
INSTALL-SOURCE ReadMe.txt, INSTALL-WIN-SOURCE, INSTALL-BINARY, INSTALL-SOURCE: 2007-11-23 10:15:55 +01:00
INSTALL-WIN-SOURCE ReadMe.txt, INSTALL-WIN-SOURCE, INSTALL-BINARY, INSTALL-SOURCE: 2007-11-23 10:15:55 +01:00
Makefile.am Merge debian.(none):/MySQL/M51/indent-5.1 2007-12-11 20:50:09 +01:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


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 manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- 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 Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.