1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
unknown 3f0cdbc4cd Fix for bug #28415 "Some ALTER TABLE statements no longer work under LOCK
TABLES" and failures of alter_table.test on Windows which occured after
pushing fix for bugs #20662, #20903, #24508, #24738 (various problems
with CREATE TABLE SELECT).

ALTER TABLE statements which were handled using "fast" alter table
optimization were not properly working under LOCK TABLES if table
was transactional (for all table types under Windows).

Code implementing "fast" version of ALTER TABLE tried to open and
lock table using open_ltable() after renaming .FRM files (which
corresponds to renaming tables in normal case) in some cases
(for transactional tables or on Windows). This caused problems
under LOCK TABLES and conflicted with name-lock taken by 
ALTER TABLE RENAME on target tables.

This patch solves this issue by using reopen_name_locked_table()
instead of open_ltable().


mysql-test/include/mix1.inc:
  Added test for bug #28415 "Some ALTER TABLE statements no longer work
  under LOCK TABLES" and minimal coverage for fast ALTER TABLE behaviour
  for transactional tables.
mysql-test/r/innodb_mysql.result:
  Added test for bug #28415 "Some ALTER TABLE statements no longer work
  under LOCK TABLES" and minimal coverage for fast ALTER TABLE behaviour
  for transactional tables.
sql/sql_table.cc:
  mysql_alter_table():
    Fixed handling of transactional tables (and all tables on Windows)
    by "fast" ALTER TABLE.
    Code implementing "fast" version of ALTER TABLE tried to open and
    lock table using open_ltable() after renaming .FRM files (which
    corresponds to renaming tables in normal case) for such tables.
    This caused problems under LOCK TABLES and conflicted with name-lock
    taken by ALTER TABLE RENAME on target tables. We solve this issue by
    using reopen_name_locked_table() instead of open_ltable().
2007-05-14 22:38:26 +04:00
..
2007-04-29 00:50:33 +05:00
2007-03-31 20:27:43 +05:00
2007-05-11 21:51:03 +04:00
2007-05-11 21:51:03 +04:00
2007-02-23 18:49:41 +02:00
2007-04-07 23:16:03 +05:00
2007-04-04 21:35:58 +00:00
2007-03-15 17:35:31 +04:00
2007-04-19 21:18:49 +02:00
2007-04-29 18:46:06 +05:00
2007-02-23 13:13:55 +02:00
2007-04-18 21:39:45 +02:00
2007-03-29 12:45:23 +02:00
2007-02-23 13:13:55 +02:00
2007-04-04 14:19:33 +05:00
2007-04-04 16:58:25 +02:00
2007-02-23 13:13:55 +02:00
2007-04-02 13:57:32 +02:00
2007-03-01 18:16:17 +04:00
2007-01-04 04:09:06 +01:00
2007-01-04 04:09:06 +01:00
2007-03-29 16:11:02 +02:00
2007-01-17 18:15:35 -05:00
2007-04-30 15:36:29 -06:00
2007-04-20 17:47:14 -07:00
2007-04-29 18:46:06 +05:00
2007-02-01 18:00:24 +04:00
2007-05-11 21:51:03 +04:00
2007-04-17 12:32:01 +02:00
2007-03-23 01:04:31 +04:00
2007-04-06 16:06:10 +05:00
2007-03-29 09:08:30 +05:00
2007-03-23 01:04:31 +04:00
2007-04-29 18:52:14 +05:00