[MDEV-5879] MySQL WL#5576 Prohibit CREATE TABLE ... SELECT to modify other tables Created: 2014-03-17  Updated: 2018-01-01

Status: Open
Project: MariaDB Server
Component/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Sergey Vojtovich Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: upstream-fixed

Attachments: Text File wl5576.patch    
Issue Links:
PartOf
is part of MDEV-4784 merge test cases from 5.6 Stalled
Relates
relates to MDEV-10719 'create temporary table as select' ge... Open

 Description   

Test case for MySQL "WL#5576 Prohibit CREATE TABLE ... SELECT to modify other tables" fails in 10.0.

Test diff attached. Please try to apply test case as is unless it is applicable.

Relevant 5.6 revision:

revno: 2876.368.90
committer: Libing Song <anders.song@greatopensource.com>
branch nick: mysql-trunk
timestamp: Mon 2011-02-21 10:57:30 +0800
message:
  WL#5576 Prohibit CREATE TABLE ... SELECT to modify other tables
  BUG#11749792 and BUG#11763193 are fixed by this worklog.
 
  In 'CREATE TABLE ... SELECT' statement, SELECT clause could call store functions
  to modify other tables. It made CTS's behavior towards complex and not
  understandable. It also caused some binlogging problem. So the behavior modifying
  other tables is prohibited in this worklog.
 
  In this patch, code is added to check if there is any other table owning WRITE
  lock just after all tables have been locked. CREATE TABLE ... SELECT will fail
  and print an error immediately if any other table has WRITE lock.
  As SELECT ... FOR UPDATE uses WRITE lock too. FOR UPDATE clause is also
  prohibited in CREATE TABLE ... SELECT statement.



 Comments   
Comment by Daniel Black [ 2018-01-01 ]

mysql commit 53fdfe1c9386a7738e70949dae4834a1d8ae992e now that its no longer in bzr.

The error message ER_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT has been ported wit mariadb-10.3 with nothing that uses it.

Like MDEV-10719 I don't see why such a restriction applies.

Generated at Thu Feb 08 07:07:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.