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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
94114726
Commit
94114726
authored
Sep 13, 2006
by
mskold/marty@mysql.com/linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/windows/Linux_space/MySQL/mysql-4.1
parents
f8fdc3bc
41398499
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
5 deletions
+74
-5
mysql-test/r/ndb_multi.result
mysql-test/r/ndb_multi.result
+32
-0
mysql-test/t/ndb_multi.test
mysql-test/t/ndb_multi.test
+22
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+20
-5
No files found.
mysql-test/r/ndb_multi.result
View file @
94114726
...
...
@@ -69,3 +69,35 @@ t3
t4
drop table t1, t2, t3, t4;
drop table t1, t3, t4;
create table t1(c1 int key)ENGINE=MyISAM;
insert into t1 values(1),(3),(5);
select * from t1 order by c1;
c1
1
3
5
create table t1(c1 int key)ENGINE=MyISAM;
insert into t1 values(100),(344),(533);
select * from t1 order by c1;
c1
100
344
533
alter table t1 engine=ndb;
show tables;
Tables_in_test
t1
Warnings:
Warning 1050 Local table test.t1 shadows ndb table
select * from t1 order by c1;
c1
100
344
533
drop table t1;
select * from t1 order by c1;
c1
1
3
5
drop table t1;
mysql-test/t/ndb_multi.test
View file @
94114726
...
...
@@ -69,4 +69,26 @@ drop table t1, t2, t3, t4;
connection
server2
;
drop
table
t1
,
t3
,
t4
;
# bug#21378
connection
server1
;
create
table
t1
(
c1
int
key
)
ENGINE
=
MyISAM
;
insert
into
t1
values
(
1
),(
3
),(
5
);
select
*
from
t1
order
by
c1
;
connection
server2
;
create
table
t1
(
c1
int
key
)
ENGINE
=
MyISAM
;
insert
into
t1
values
(
100
),(
344
),(
533
);
select
*
from
t1
order
by
c1
;
connection
server1
;
alter
table
t1
engine
=
ndb
;
connection
server2
;
show
tables
;
select
*
from
t1
order
by
c1
;
drop
table
t1
;
connection
server1
;
select
*
from
t1
order
by
c1
;
drop
table
t1
;
# End of 4.1 tests
sql/ha_ndbcluster.cc
View file @
94114726
...
...
@@ -4715,16 +4715,15 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
List
<
char
>
delete_list
;
while
((
file_name
=
it
++
))
{
bool
file_on_disk
=
false
;
DBUG_PRINT
(
"info"
,
(
"%s"
,
file_name
));
if
(
hash_search
(
&
ndb_tables
,
file_name
,
strlen
(
file_name
)))
{
DBUG_PRINT
(
"info"
,
(
"%s existed in NDB _and_ on disk "
,
file_name
));
// File existed in NDB and as frm file, put in ok_tables list
my_hash_insert
(
&
ok_tables
,
(
byte
*
)
file_name
);
continue
;
file_on_disk
=
true
;
}
//
File is not in NDB, c
heck for .ndb file with this name
//
C
heck for .ndb file with this name
(
void
)
strxnmov
(
name
,
FN_REFLEN
,
mysql_data_home
,
"/"
,
db
,
"/"
,
file_name
,
ha_ndb_ext
,
NullS
);
DBUG_PRINT
(
"info"
,
(
"Check access for %s"
,
name
));
...
...
@@ -4732,9 +4731,25 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
{
DBUG_PRINT
(
"info"
,
(
"%s did not exist on disk"
,
name
));
// .ndb file did not exist on disk, another table type
if
(
file_on_disk
)
{
// Ignore this ndb table
gptr
record
=
hash_search
(
&
ndb_tables
,
file_name
,
strlen
(
file_name
));
DBUG_ASSERT
(
record
);
hash_delete
(
&
ndb_tables
,
record
);
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
ER_TABLE_EXISTS_ERROR
,
"Local table %s.%s shadows ndb table"
,
db
,
file_name
);
}
continue
;
}
if
(
file_on_disk
)
{
// File existed in NDB and as frm file, put in ok_tables list
my_hash_insert
(
&
ok_tables
,
(
byte
*
)
file_name
);
continue
;
}
DBUG_PRINT
(
"info"
,
(
"%s existed on disk"
,
name
));
// The .ndb file exists on disk, but it's not in list of tables in ndb
// Verify that handler agrees table is gone.
...
...
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