mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge gw.mysql.r18.ru:/usr/home/ram/work/4.1.b7261
into gw.mysql.r18.ru:/usr/home/ram/work/5.0 mysql-test/r/lowercase_table2.result: Auto merged sql/sql_table.cc: Auto merged
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3;
|
DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3,tT;
|
||||||
DROP DATABASE IF EXISTS `TEST_$1`;
|
DROP DATABASE IF EXISTS `TEST_$1`;
|
||||||
DROP DATABASE IF EXISTS `test_$1`;
|
DROP DATABASE IF EXISTS `test_$1`;
|
||||||
CREATE TABLE T1 (a int);
|
CREATE TABLE T1 (a int);
|
||||||
@ -131,3 +131,13 @@ show tables like 't1%';
|
|||||||
Tables_in_test (t1%)
|
Tables_in_test (t1%)
|
||||||
t1
|
t1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create temporary table tT(a int(11), b varchar(8));
|
||||||
|
insert into tT values (1, 'abc');
|
||||||
|
select * from tT;
|
||||||
|
a b
|
||||||
|
1 abc
|
||||||
|
alter table tT add index (a);
|
||||||
|
select * from tT;
|
||||||
|
a b
|
||||||
|
1 abc
|
||||||
|
drop table tT;
|
||||||
|
@ -10,7 +10,7 @@ show variables like "lower_case_table_names";
|
|||||||
enable_query_log;
|
enable_query_log;
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3;
|
DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3,tT;
|
||||||
DROP DATABASE IF EXISTS `TEST_$1`;
|
DROP DATABASE IF EXISTS `TEST_$1`;
|
||||||
DROP DATABASE IF EXISTS `test_$1`;
|
DROP DATABASE IF EXISTS `test_$1`;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
@ -100,3 +100,14 @@ show tables like 'T1%';
|
|||||||
alter table t1 add index (A);
|
alter table t1 add index (A);
|
||||||
show tables like 't1%';
|
show tables like 't1%';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #7261: Alter table loses temp table
|
||||||
|
#
|
||||||
|
|
||||||
|
create temporary table tT(a int(11), b varchar(8));
|
||||||
|
insert into tT values (1, 'abc');
|
||||||
|
select * from tT;
|
||||||
|
alter table tT add index (a);
|
||||||
|
select * from tT;
|
||||||
|
drop table tT;
|
||||||
|
@ -3375,7 +3375,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
|||||||
}
|
}
|
||||||
/* Remove link to old table and rename the new one */
|
/* Remove link to old table and rename the new one */
|
||||||
close_temporary_table(thd, table->s->db, table_name);
|
close_temporary_table(thd, table->s->db, table_name);
|
||||||
if (rename_temporary_table(thd, new_table, new_db, new_alias))
|
/* Should pass the 'new_name' as we store table name in the cache */
|
||||||
|
if (rename_temporary_table(thd, new_table, new_db, new_name))
|
||||||
{ // Fatal error
|
{ // Fatal error
|
||||||
close_temporary_table(thd,new_db,tmp_name);
|
close_temporary_table(thd,new_db,tmp_name);
|
||||||
my_free((gptr) new_table,MYF(0));
|
my_free((gptr) new_table,MYF(0));
|
||||||
|
Reference in New Issue
Block a user