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
3fcf882b
Commit
3fcf882b
authored
Nov 18, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
parents
27b4c2a5
b18b07e6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
7 deletions
+41
-7
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+1
-2
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+2
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+38
-5
No files found.
mysql-test/r/ndb_alter_table.result
View file @
3fcf882b
...
...
@@ -179,8 +179,7 @@ a b c
2 two two
alter table t1 drop index c;
select * from t1 where b = 'two';
a b c
2 two two
ERROR HY000: Table definition has changed, please retry transaction
select * from t1 where b = 'two';
a b c
2 two two
...
...
mysql-test/t/ndb_alter_table.test
View file @
3fcf882b
...
...
@@ -151,6 +151,8 @@ select * from t1 where b = 'two';
connection
server1
;
alter
table
t1
drop
index
c
;
connection
server2
;
# This should fail since index information is not automatically refreshed
--
error
1412
select
*
from
t1
where
b
=
'two'
;
select
*
from
t1
where
b
=
'two'
;
connection
server1
;
...
...
sql/ha_ndbcluster.cc
View file @
3fcf882b
...
...
@@ -78,6 +78,8 @@ handlerton ndbcluster_hton = {
#define NDB_FAILED_AUTO_INCREMENT ~(Uint64)0
#define NDB_AUTO_INCREMENT_RETRIES 10
#define NDB_INVALID_SCHEMA_OBJECT 241
#define ERR_PRINT(err) \
DBUG_PRINT("error", ("%d message: %s", err.code, err.message))
...
...
@@ -296,7 +298,21 @@ Thd_ndb::Thd_ndb()
Thd_ndb
::~
Thd_ndb
()
{
if
(
ndb
)
{
#ifndef DBUG_OFF
Ndb
::
Free_list_usage
tmp
;
tmp
.
m_name
=
0
;
while
(
ndb
->
get_free_list_usage
(
&
tmp
))
{
uint
leaked
=
(
uint
)
tmp
.
m_created
-
tmp
.
m_free
;
if
(
leaked
)
fprintf
(
stderr
,
"NDB: Found %u %s%s that %s not been released
\n
"
,
leaked
,
tmp
.
m_name
,
(
leaked
==
1
)
?
""
:
"'s"
,
(
leaked
==
1
)
?
"has"
:
"have"
);
}
#endif
delete
ndb
;
}
ndb
=
NULL
;
changed_tables
.
empty
();
}
...
...
@@ -3316,15 +3332,18 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
DBUG_PRINT
(
"info"
,
(
"Table schema version: %d"
,
tab
->
getObjectVersion
()));
}
if
(
m_table
!=
(
void
*
)
tab
||
m_table_version
<
tab
->
getObjectVersion
()
)
if
(
m_table
!=
(
void
*
)
tab
)
{
/*
The table has been altered, refresh the index list
*/
build_index_list
(
ndb
,
table
,
ILBP_OPEN
);
m_table
=
(
void
*
)
tab
;
m_table_version
=
tab
->
getObjectVersion
();
}
else
if
(
m_table_version
<
tab
->
getObjectVersion
())
{
/*
The table has been altered, caller has to retry
*/
DBUG_RETURN
(
my_errno
=
HA_ERR_TABLE_DEF_CHANGED
);
}
m_table_info
=
tab_info
;
}
no_uncommitted_rows_init
(
thd
);
...
...
@@ -4862,7 +4881,21 @@ bool ndbcluster_end()
(
void
)
pthread_mutex_unlock
(
&
LOCK_ndb_util_thread
);
if
(
g_ndb
)
{
#ifndef DBUG_OFF
Ndb
::
Free_list_usage
tmp
;
tmp
.
m_name
=
0
;
while
(
g_ndb
->
get_free_list_usage
(
&
tmp
))
{
uint
leaked
=
(
uint
)
tmp
.
m_created
-
tmp
.
m_free
;
if
(
leaked
)
fprintf
(
stderr
,
"NDB: Found %u %s%s that %s not been released
\n
"
,
leaked
,
tmp
.
m_name
,
(
leaked
==
1
)
?
""
:
"'s"
,
(
leaked
==
1
)
?
"has"
:
"have"
);
}
#endif
delete
g_ndb
;
}
g_ndb
=
NULL
;
if
(
g_ndb_cluster_connection
)
delete
g_ndb_cluster_connection
;
...
...
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