Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
01c29fc9
Commit
01c29fc9
authored
Oct 08, 2004
by
magnus@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#5973 ndb table belonging to different database shows up in SHOW TABLES
parent
05c01360
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
2 deletions
+59
-2
mysql-test/r/ndb_autodiscover.result
mysql-test/r/ndb_autodiscover.result
+28
-0
mysql-test/t/ndb_autodiscover.test
mysql-test/t/ndb_autodiscover.test
+25
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+6
-2
No files found.
mysql-test/r/ndb_autodiscover.result
View file @
01c29fc9
...
...
@@ -330,6 +330,34 @@ show status like 'handler_discover%';
Variable_name Value
Handler_discover 0
drop table t6;
show tables;
Tables_in_test
create table t1 (a int) engine=ndb;
show tables;
Tables_in_test
t1
create database test2;
use test2;
show tables;
Tables_in_test2
select * from t1;
ERROR 42S02: Table 'test2.t1' doesn't exist
create table t2 (b int) engine=ndb;
use test;
select * from t1;
a
show tables;
Tables_in_test
t1
drop table t1;
use test2;
drop table t2;
drop database test2;
show databases;
Database
mysql
test
use test;
CREATE TABLE t9 (
a int NOT NULL PRIMARY KEY,
b int
...
...
mysql-test/t/ndb_autodiscover.test
View file @
01c29fc9
...
...
@@ -427,6 +427,31 @@ show status like 'handler_discover%';
drop
table
t6
;
#####################################################
# Test that only tables in the current database shows
# up in SHOW TABLES
#
show
tables
;
create
table
t1
(
a
int
)
engine
=
ndb
;
show
tables
;
create
database
test2
;
use
test2
;
show
tables
;
--
error
1146
select
*
from
t1
;
create
table
t2
(
b
int
)
engine
=
ndb
;
use
test
;
select
*
from
t1
;
show
tables
;
drop
table
t1
;
use
test2
;
drop
table
t2
;
drop
database
test2
;
show
databases
;
use
test
;
######################################################
# Note! This should always be the last step in this
# file, the table t9 will be used and dropped
...
...
sql/ha_ndbcluster.cc
View file @
01c29fc9
...
...
@@ -3844,6 +3844,10 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
NdbDictionary
::
Dictionary
::
List
::
Element
&
t
=
list
.
elements
[
i
];
DBUG_PRINT
(
"info"
,
(
"Found %s/%s in NDB"
,
t
.
database
,
t
.
name
));
// Add only tables that belongs to db
if
(
my_strcasecmp
(
system_charset_info
,
t
.
database
,
db
))
continue
;
// Apply wildcard to list of tables in NDB
if
(
wild
)
{
...
...
@@ -3938,7 +3942,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
while
((
file_name
=
it2
++
))
{
DBUG_PRINT
(
"info"
,
(
"Table %s need discovery"
,
name
));
ha_create_table_from_engine
(
thd
,
db
,
file_name
,
true
);
if
(
ha_create_table_from_engine
(
thd
,
db
,
file_name
,
true
)
==
0
)
files
->
push_back
(
thd
->
strdup
(
file_name
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment