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.
  • MariaDB\ 71.8%
  • C++ 16.4%
  • C 10.4%
  • Shell 0.5%
  • Perl 0.4%
  • Other 0.3%
Find a file
unknown 206a6bb176 5.1 version of fix for:
Bug #23667 "CREATE TABLE LIKE is not isolated from alteration
              by other connections"
  Bug #18950 "CREATE TABLE LIKE does not obtain LOCK_open"
As well as:
  Bug #25578 "CREATE TABLE LIKE does not require any privileges
              on source table".

The first and the second bugs resulted in various errors and wrong
binary log order when one tried to execute concurrently CREATE TABLE LIKE
statement and DDL statements on source table or DML/DDL statements on its
target table.

The problem was caused by incomplete protection/table-locking against
concurrent statements implemented in mysql_create_like_table() routine.
We solve it by simply implementing such protection in proper way.
Most of actual work for 5.1 was already done by fix for bug 20662 and
preliminary patch changing locking in ALTER TABLE.

The third bug allowed user who didn't have any privileges on table create
its copy and therefore circumvent privilege check for SHOW CREATE TABLE.

This patch solves this problem by adding privilege check, which was missing.

Finally it also removes some duplicated code from mysql_create_like_table()
and thus fixes bug #26869 "TABLE_LIST::table_name_length inconsistent with
TABLE_LIST::table_name".


mysql-test/r/create-big.result:
  Added test coverage for concurrency-related issues with CREATE TABLE LIKE.
mysql-test/r/create.result:
  Adjusted error-code in the test case after refactoring code that
  implements CREATE TABLE ... LIKE.
mysql-test/r/grant2.result:
  Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
  on source table".
mysql-test/t/create-big.test:
  Added test coverage for concurrency-related issues with CREATE TABLE LIKE.
mysql-test/t/create.test:
  Adjusted error-code in the test case after refactoring code that
  implements CREATE TABLE ... LIKE.
mysql-test/t/disabled.def:
  Recent code changes ensured that CREATE TABLE LIKE statement is properly
  isolated against other statements, so synchronization.test should no
  longer fail (see fix for bug 20662 and preliminary patch for bug 23667
  changing ALTER TABLE locking).
mysql-test/t/grant2.test:
  Added test for bug#25578 "CREATE TABLE LIKE does not require any privileges
  on source table".
sql/handler.h:
  Introduced new flag for HA_CREATE_INFO::options in order to be able to
  distinguish CREATE TABLE ... LIKE from other types of CREATE TABLE.
sql/mysql_priv.h:
  mysql_create_like_table() now takes source table name not as a
  Table_ident object but as regular table list element.
sql/sql_lex.h:
  Removed LEX::like_name member. Now we use special flag in
  LEX::create_info::options for distinguishing CREATE TABLE ... LIKE
  from other types of CREATE TABLE and store name of source table as
  regular element in statement's table list.
sql/sql_parse.cc:
  CREATE TABLE ... LIKE implementation now uses statement's table list
  for storing information about the source table. We also use flag
  in LEX::create_info.options for distinguishing it from other types
  of CREATE TABLE.
  Finally CREATE TABLE ... LIKE now requires the same privileges on
  the source tables as SHOW CREATE TABLE. Moved this privilege check
  to check_show_create_table_access() function.
sql/sql_partition.cc:
  Now we use special flag in LEX::create_info::options for distinguishing
  CREATE TABLE ... LIKE from other types of CREATE TABLE and store name
  of source table as regular element in statement's table list.
sql/sql_table.cc:
  mysql_create_like_table():  
   - Commented and cleaned-up a bit code which is responsible for achieving
     isolation from concurrent statements. Most of actual work was done by
     fix for bug 20662 and preliminary patch changing locking locking in
     ALTER TABLE, so here we do minor things like relaxing locking on
     source table (we don't need lock on it, to have it open is enough) and
     adjusting code to make it more friendly against code implementing I_S.
   - Get rid of duplicated code related to source database/table name
     handling. All these operations are already done in
     st_select_lex::add_table_to_list(), so we achieve the same effect
     by including source table into the statement's table list.
sql/sql_yacc.yy:
  Now we use special flag in LEX::create_info::options for distinguishing
  CREATE TABLE ... LIKE from other types of CREATE TABLE and store name
  of source table as regular element in statement's table list.
2007-05-23 15:26:16 +04:00
BitKeeper Merge bk-internal.mysql.com:/home/bk/mysql-5.1 2007-02-21 11:36:23 +01:00
BUILD Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-04-24 11:44:41 +02:00
client Merge xiphis.org:/home/antony/work2/mysql-5.1-engines 2007-05-04 23:35:14 -07:00
cmd-line-utils WL#2936 - Falcon & MySQL plugin interface: server variables 2007-04-30 18:49:38 +02:00
config/ac-macros Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-opt 2007-05-10 08:06:09 +02:00
dbug Merge debian.(none):/M50/bug14685-5.0 2007-04-23 18:12:23 +02:00
debian Made changes to debian control files to support building 5.1 packages. 2007-04-20 16:15:30 -07:00
Docs Merge mysql.com:/home/kent/bk/tmp/mysql-5.0-build 2007-03-22 19:44:14 +01:00
extra Merge xiphis.org:/home/antony/work2/mysql-5.1-engines 2007-05-04 23:35:14 -07:00
include Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect 2007-05-09 17:27:14 +05:00
libmysql Bug#24732 Executables do not include Vista manifests 2007-04-23 16:23:32 -04:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Merge trift2.:/MySQL/M50/mysql-5.0 2007-05-02 14:08:43 +02:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test 5.1 version of fix for: 2007-05-23 15:26:16 +04:00
mysys Merge xiphis.org:/home/antony/work2/mysql-5.1-engines 2007-05-04 23:35:14 -07:00
netware Merge trift2.:/MySQL/M50/mysql-5.0 2007-05-02 14:08:43 +02:00
plugin fixed: memleak in --help, sigsegv on shutdown 2007-04-26 21:26:04 +02:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex Many files: 2006-12-31 02:29:11 +01:00
scripts Merge xiphis.org:/home/antony/work2/mysql-5.1-engines 2007-05-04 23:35:14 -07:00
server-tools thread_registry.cc: 2007-04-25 12:08:12 +02:00
sql 5.1 version of fix for: 2007-05-23 15:26:16 +04:00
sql-bench Fixed compiler warnings 2007-02-23 13:13:55 +02:00
sql-common Clear field_alloc when it's moved to result set (allows us to always call free_root on field_alloc) 2007-04-16 17:08:29 +03:00
storage Comment fix. 2007-05-16 17:19:59 +04:00
strings Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect 2007-05-09 17:27:14 +05:00
support-files "ndb_size.tmpl" is gone (NDB change 2007-04-24), so remove it from the spec file. 2007-05-02 17:10:41 +02:00
tests Merge bk@192.168.21.1:mysql-5.1 2007-04-29 18:52:14 +05:00
unittest remove unnecessary line 2007-03-16 19:44:00 +01:00
vio Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint 2007-04-11 22:08:00 +02:00
win Format corrections for various "Makefile.am": Leading tab, no trailing blank. 2007-05-02 14:01:49 +02:00
zlib Merge mysql.com:/home/kent/bk/tmp3/mysql-5.0-build 2007-04-11 01:48:43 +02:00
.bzrignore increase heartbeat interval to avoid load related start up issues in mysql-test-run 2007-05-08 19:03:33 +02:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
CMakeLists.txt Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-build 2007-05-02 19:21:50 +02:00
configure.in Raise version number after cloning 5.1.18-beta 2007-05-08 11:16:41 +02: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
Makefile.am Merge trift-lap.fambruehe:/MySQL/M50/push-5.0 2007-04-26 17:11:33 +02: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.