mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/bug10365 sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Auto merged
This commit is contained in:
@ -93,7 +93,7 @@ name char(20), a int, b float, c char(24)
|
||||
ERROR 42S01: Table 't3' already exists
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 1
|
||||
Handler_discover 0
|
||||
create table IF NOT EXISTS t3(
|
||||
id int not null primary key,
|
||||
id2 int not null,
|
||||
@ -101,7 +101,7 @@ name char(20)
|
||||
) engine=ndb;
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 2
|
||||
Handler_discover 0
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
@ -114,7 +114,7 @@ id name
|
||||
1 Explorer
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 2
|
||||
Handler_discover 1
|
||||
drop table t3;
|
||||
flush status;
|
||||
create table t7(
|
||||
@ -358,6 +358,20 @@ Database
|
||||
mysql
|
||||
test
|
||||
use test;
|
||||
CREATE TABLE sys.SYSTAB_0 (a int);
|
||||
ERROR 42S01: Table 'SYSTAB_0' already exists
|
||||
select * from sys.SYSTAB_0;
|
||||
ERROR HY000: Failed to open 'SYSTAB_0', error while unpacking from engine
|
||||
CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
select * from sys.SYSTAB_0;
|
||||
ERROR HY000: Failed to open 'SYSTAB_0', error while unpacking from engine
|
||||
drop table sys.SYSTAB_0;
|
||||
ERROR 42S02: Unknown table 'SYSTAB_0'
|
||||
drop table IF EXISTS sys.SYSTAB_0;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'SYSTAB_0'
|
||||
CREATE TABLE t9 (
|
||||
a int NOT NULL PRIMARY KEY,
|
||||
b int
|
||||
|
@ -453,6 +453,27 @@ drop database test2;
|
||||
show databases;
|
||||
use test;
|
||||
|
||||
#####################################################
|
||||
# Test that it's not possible to create tables
|
||||
# with same name as NDB internal tables
|
||||
# This will also test that it's not possible to create
|
||||
# a table with tha same name as a table that can't be
|
||||
# discovered( for example a table created via NDBAPI)
|
||||
|
||||
--error 1050
|
||||
CREATE TABLE sys.SYSTAB_0 (a int);
|
||||
--error 1105
|
||||
select * from sys.SYSTAB_0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sys.SYSTAB_0 (a int);
|
||||
show warnings;
|
||||
--error 1105
|
||||
select * from sys.SYSTAB_0;
|
||||
|
||||
--error 1051
|
||||
drop table sys.SYSTAB_0;
|
||||
drop table IF EXISTS sys.SYSTAB_0;
|
||||
|
||||
######################################################
|
||||
# Note! This should always be the last step in this
|
||||
# file, the table t9 will be used and dropped
|
||||
|
Reference in New Issue
Block a user