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
3e01a165
Commit
3e01a165
authored
Jan 09, 2008
by
msvensson@pilot.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr-bug32275
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr
parents
8f8b396e
1fa7072b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
mysql-test/include/ndb_not_readonly.inc
mysql-test/include/ndb_not_readonly.inc
+2
-2
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+8
-2
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+7
-6
No files found.
mysql-test/include/ndb_not_readonly.inc
View file @
3e01a165
...
@@ -11,13 +11,13 @@ let $counter= 600;
...
@@ -11,13 +11,13 @@ let $counter= 600;
while
(
$mysql_errno
)
while
(
$mysql_errno
)
{
{
# Table is readonly until the mysqld has connected properly
# Table is readonly until the mysqld has connected properly
--
error
0
,
ER_NO_SUCH_TABLE
,
ER_OPEN_AS_READONLY
,
ER_GET_ERRMSG
--
error
0
,
ER_NO_SUCH_TABLE
,
ER_OPEN_AS_READONLY
replace
into
mysql
.
ndb_apply_status
values
(
0
,
0
,
""
,
0
,
0
);
replace
into
mysql
.
ndb_apply_status
values
(
0
,
0
,
""
,
0
,
0
);
if
(
$mysql_errno
)
if
(
$mysql_errno
)
{
{
if
(
!
$counter
)
if
(
!
$counter
)
{
{
die
(
"Failed while waiting for mysqld to come out of readonly mode"
)
;
die
Failed
while
waiting
for
mysqld
to
come
out
of
readonly
mode
;
}
}
dec
$counter
;
dec
$counter
;
--
sleep
0.1
--
sleep
0.1
...
...
sql/ha_ndbcluster.cc
View file @
3e01a165
...
@@ -5138,6 +5138,7 @@ int ha_ndbcluster::create(const char *name,
...
@@ -5138,6 +5138,7 @@ int ha_ndbcluster::create(const char *name,
strcmp
(
m_tabname
,
NDB_SCHEMA_TABLE
)
==
0
))
strcmp
(
m_tabname
,
NDB_SCHEMA_TABLE
)
==
0
))
{
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_ASSERT
(
ndb_schema_share
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
}
}
single_user_mode
=
NdbDictionary
::
Table
::
SingleUserModeReadWrite
;
single_user_mode
=
NdbDictionary
::
Table
::
SingleUserModeReadWrite
;
...
@@ -5963,6 +5964,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
...
@@ -5963,6 +5964,7 @@ ha_ndbcluster::delete_table(ha_ndbcluster *h, Ndb *ndb,
if
(
!
ndb_schema_share
)
if
(
!
ndb_schema_share
)
{
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_ASSERT
(
ndb_schema_share
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
}
}
/* ndb_share reference temporary */
/* ndb_share reference temporary */
...
@@ -6144,6 +6146,7 @@ int ha_ndbcluster::delete_table(const char *name)
...
@@ -6144,6 +6146,7 @@ int ha_ndbcluster::delete_table(const char *name)
if
(
!
ndb_schema_share
)
if
(
!
ndb_schema_share
)
{
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_ASSERT
(
ndb_schema_share
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
}
}
#endif
#endif
...
@@ -6424,8 +6427,11 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked)
...
@@ -6424,8 +6427,11 @@ int ha_ndbcluster::open(const char *name, int mode, uint test_if_locked)
DBUG_RETURN
(
res
);
DBUG_RETURN
(
res
);
}
}
#ifdef HAVE_NDB_BINLOG
#ifdef HAVE_NDB_BINLOG
if
(
!
ndb_binlog_tables_inited
&&
ndb_binlog_running
)
if
(
!
ndb_binlog_tables_inited
)
{
table
->
db_stat
|=
HA_READ_ONLY
;
table
->
db_stat
|=
HA_READ_ONLY
;
sql_print_information
(
"table '%s' opened read only"
,
name
);
}
#endif
#endif
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
@@ -6784,8 +6790,8 @@ static void ndbcluster_drop_database(handlerton *hton, char *path)
...
@@ -6784,8 +6790,8 @@ static void ndbcluster_drop_database(handlerton *hton, char *path)
if
(
!
ndb_schema_share
)
if
(
!
ndb_schema_share
)
{
{
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_PRINT
(
"info"
,
(
"Schema distribution table not setup"
));
DBUG_ASSERT
(
ndb_schema_share
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
//DBUG_RETURN(HA_ERR_NO_CONNECTION);
}
}
#endif
#endif
ndbcluster_drop_database_impl
(
path
);
ndbcluster_drop_database_impl
(
path
);
...
...
sql/ha_ndbcluster_binlog.cc
View file @
3e01a165
...
@@ -879,12 +879,9 @@ int ndbcluster_setup_binlog_table_shares(THD *thd)
...
@@ -879,12 +879,9 @@ int ndbcluster_setup_binlog_table_shares(THD *thd)
{
{
pthread_mutex_lock
(
&
LOCK_open
);
pthread_mutex_lock
(
&
LOCK_open
);
ndb_binlog_tables_inited
=
TRUE
;
ndb_binlog_tables_inited
=
TRUE
;
if
(
ndb_binlog_running
)
if
(
ndb_extra_logging
)
{
sql_print_information
(
"NDB Binlog: ndb tables writable"
);
if
(
ndb_extra_logging
)
close_cached_tables
((
THD
*
)
0
,
0
,
(
TABLE_LIST
*
)
0
,
TRUE
);
sql_print_information
(
"NDB Binlog: ndb tables writable"
);
close_cached_tables
((
THD
*
)
0
,
0
,
(
TABLE_LIST
*
)
0
,
TRUE
);
}
pthread_mutex_unlock
(
&
LOCK_open
);
pthread_mutex_unlock
(
&
LOCK_open
);
/* Signal injector thread that all is setup */
/* Signal injector thread that all is setup */
pthread_cond_signal
(
&
injector_cond
);
pthread_cond_signal
(
&
injector_cond
);
...
@@ -2029,6 +2026,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
...
@@ -2029,6 +2026,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
ndb_schema_share
->
use_count
));
ndb_schema_share
->
use_count
));
free_share
(
&
ndb_schema_share
);
free_share
(
&
ndb_schema_share
);
ndb_schema_share
=
0
;
ndb_schema_share
=
0
;
ndb_binlog_tables_inited
=
0
;
pthread_mutex_unlock
(
&
ndb_schema_share_mutex
);
pthread_mutex_unlock
(
&
ndb_schema_share_mutex
);
/* end protect ndb_schema_share */
/* end protect ndb_schema_share */
...
@@ -3226,6 +3224,7 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
...
@@ -3226,6 +3224,7 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
share
->
key
,
share
->
use_count
));
share
->
key
,
share
->
use_count
));
free_share
(
&
ndb_apply_status_share
);
free_share
(
&
ndb_apply_status_share
);
ndb_apply_status_share
=
0
;
ndb_apply_status_share
=
0
;
ndb_binlog_tables_inited
=
0
;
}
}
DBUG_PRINT
(
"error"
,
(
"CLUSTER FAILURE EVENT: "
DBUG_PRINT
(
"error"
,
(
"CLUSTER FAILURE EVENT: "
"%s received share: 0x%lx op: 0x%lx share op: 0x%lx "
"%s received share: 0x%lx op: 0x%lx share op: 0x%lx "
...
@@ -3245,6 +3244,7 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
...
@@ -3245,6 +3244,7 @@ ndb_binlog_thread_handle_non_data_event(THD *thd, Ndb *ndb,
share
->
key
,
share
->
use_count
));
share
->
key
,
share
->
use_count
));
free_share
(
&
ndb_apply_status_share
);
free_share
(
&
ndb_apply_status_share
);
ndb_apply_status_share
=
0
;
ndb_apply_status_share
=
0
;
ndb_binlog_tables_inited
=
0
;
}
}
/* ToDo: remove printout */
/* ToDo: remove printout */
if
(
ndb_extra_logging
)
if
(
ndb_extra_logging
)
...
@@ -4220,6 +4220,7 @@ err:
...
@@ -4220,6 +4220,7 @@ err:
ndb_schema_share
->
use_count
));
ndb_schema_share
->
use_count
));
free_share
(
&
ndb_schema_share
);
free_share
(
&
ndb_schema_share
);
ndb_schema_share
=
0
;
ndb_schema_share
=
0
;
ndb_binlog_tables_inited
=
0
;
pthread_mutex_unlock
(
&
ndb_schema_share_mutex
);
pthread_mutex_unlock
(
&
ndb_schema_share_mutex
);
/* end protect ndb_schema_share */
/* end protect ndb_schema_share */
}
}
...
...
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