mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-11044
This commit is contained in:
@ -36,3 +36,10 @@ lock table t1 write, t2 write;
|
|||||||
drop table t2;
|
drop table t2;
|
||||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1(a int);
|
||||||
|
lock tables t1 write;
|
||||||
|
show columns from t1;
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
a int(11) YES NULL
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
@ -48,3 +48,9 @@ Test 'go' command g
|
|||||||
a
|
a
|
||||||
1
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1(a int);
|
||||||
|
lock tables t1 write;
|
||||||
|
database()
|
||||||
|
test
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
||||||
drop database if exists mysqldump_test_db;
|
drop database if exists mysqldump_test_db;
|
||||||
drop view if exists v1;
|
drop database if exists db1;
|
||||||
|
drop view if exists v1, v2;
|
||||||
CREATE TABLE t1(a int);
|
CREATE TABLE t1(a int);
|
||||||
INSERT INTO t1 VALUES (1), (2);
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
@ -1422,3 +1423,51 @@ UNLOCK TABLES;
|
|||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
create database db1;
|
||||||
|
use db1;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
a varchar(30) default NULL,
|
||||||
|
KEY a (a(5))
|
||||||
|
);
|
||||||
|
INSERT INTO t2 VALUES ('alfred');
|
||||||
|
INSERT INTO t2 VALUES ('angie');
|
||||||
|
INSERT INTO t2 VALUES ('bingo');
|
||||||
|
INSERT INTO t2 VALUES ('waffle');
|
||||||
|
INSERT INTO t2 VALUES ('lemon');
|
||||||
|
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
DROP TABLE IF EXISTS `t2`;
|
||||||
|
CREATE TABLE `t2` (
|
||||||
|
`a` varchar(30) default NULL,
|
||||||
|
KEY `a` (`a`(5))
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
|
||||||
|
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
|
||||||
|
LOCK TABLES `t2` WRITE;
|
||||||
|
INSERT INTO `t2` VALUES ('alfred'),('angie'),('bingo'),('waffle'),('lemon');
|
||||||
|
UNLOCK TABLES;
|
||||||
|
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
|
||||||
|
DROP TABLE IF EXISTS `v2`;
|
||||||
|
DROP VIEW IF EXISTS `v2`;
|
||||||
|
CREATE ALGORITHM=UNDEFINED VIEW `db1`.`v2` AS select `db1`.`t2`.`a` AS `a` from `db1`.`t2` where (`db1`.`t2`.`a` like _latin1'a%') WITH CASCADED CHECK OPTION;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
|
drop table t2;
|
||||||
|
drop view v2;
|
||||||
|
drop database db1;
|
||||||
|
@ -94,3 +94,15 @@ connection reader;
|
|||||||
reap;
|
reap;
|
||||||
connection locker;
|
connection locker;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#9998 - MySQL client hangs on USE "database"
|
||||||
|
|
||||||
|
create table t1(a int);
|
||||||
|
lock tables t1 write;
|
||||||
|
connection reader;
|
||||||
|
show columns from t1;
|
||||||
|
connection locker;
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
@ -30,5 +30,14 @@ select "Test 'go' command(vertical output) \G" as " ";
|
|||||||
select "Test 'go' command \g" as " ";
|
select "Test 'go' command \g" as " ";
|
||||||
--exec $MYSQL test -e 'select * from t1\g'
|
--exec $MYSQL test -e 'select * from t1\g'
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG9998 - MySQL client hangs on USE "database"
|
||||||
|
#
|
||||||
|
create table t1(a int);
|
||||||
|
lock tables t1 write;
|
||||||
|
--exec $MYSQL -e 'use test; select database();'
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa;
|
||||||
drop database if exists mysqldump_test_db;
|
drop database if exists mysqldump_test_db;
|
||||||
drop view if exists v1;
|
drop database if exists db1;
|
||||||
|
drop view if exists v1, v2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
# XML output
|
# XML output
|
||||||
@ -563,3 +564,27 @@ CREATE TABLE t1 (a int);
|
|||||||
INSERT INTO t1 VALUES (1),(2),(3);
|
INSERT INTO t1 VALUES (1),(2),(3);
|
||||||
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
|
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
|
||||||
|
#
|
||||||
|
|
||||||
|
create database db1;
|
||||||
|
use db1;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
a varchar(30) default NULL,
|
||||||
|
KEY a (a(5))
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO t2 VALUES ('alfred');
|
||||||
|
INSERT INTO t2 VALUES ('angie');
|
||||||
|
INSERT INTO t2 VALUES ('bingo');
|
||||||
|
INSERT INTO t2 VALUES ('waffle');
|
||||||
|
INSERT INTO t2 VALUES ('lemon');
|
||||||
|
create view v2 as select * from t2 where a like 'a%' with check option;
|
||||||
|
--exec $MYSQL_DUMP --skip-comments db1
|
||||||
|
drop table t2;
|
||||||
|
drop view v2;
|
||||||
|
drop database db1;
|
||||||
|
@ -348,7 +348,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
|
|||||||
table_list->table_name));
|
table_list->table_name));
|
||||||
|
|
||||||
/* Only one table for now, but VIEW can involve several tables */
|
/* Only one table for now, but VIEW can involve several tables */
|
||||||
if (open_and_lock_tables(thd, table_list))
|
if (open_normal_and_derived_tables(thd, table_list))
|
||||||
{
|
{
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
@ -540,8 +540,7 @@ mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild)
|
|||||||
DBUG_ENTER("mysqld_list_fields");
|
DBUG_ENTER("mysqld_list_fields");
|
||||||
DBUG_PRINT("enter",("table: %s",table_list->table_name));
|
DBUG_PRINT("enter",("table: %s",table_list->table_name));
|
||||||
|
|
||||||
table_list->lock_type= TL_UNLOCK;
|
if (open_normal_and_derived_tables(thd, table_list))
|
||||||
if (open_and_lock_tables(thd, table_list))
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
table= table_list->table;
|
table= table_list->table;
|
||||||
|
|
||||||
@ -1945,7 +1944,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
bool res;
|
bool res;
|
||||||
|
|
||||||
lex->all_selects_list= lsel;
|
lex->all_selects_list= lsel;
|
||||||
res= open_and_lock_tables(thd, show_table_list);
|
res= open_normal_and_derived_tables(thd, show_table_list);
|
||||||
if (schema_table->process_table(thd, show_table_list,
|
if (schema_table->process_table(thd, show_table_list,
|
||||||
table, res, show_table_list->db,
|
table, res, show_table_list->db,
|
||||||
show_table_list->alias))
|
show_table_list->alias))
|
||||||
@ -2050,7 +2049,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||||||
show_table_list->lock_type= lock_type;
|
show_table_list->lock_type= lock_type;
|
||||||
lex->all_selects_list= &sel;
|
lex->all_selects_list= &sel;
|
||||||
lex->derived_tables= 0;
|
lex->derived_tables= 0;
|
||||||
res= open_and_lock_tables(thd, show_table_list);
|
res= open_normal_and_derived_tables(thd, show_table_list);
|
||||||
if (schema_table->process_table(thd, show_table_list, table,
|
if (schema_table->process_table(thd, show_table_list, table,
|
||||||
res, base_name,
|
res, base_name,
|
||||||
show_table_list->alias))
|
show_table_list->alias))
|
||||||
|
Reference in New Issue
Block a user