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
9c4b35ed
Commit
9c4b35ed
authored
Aug 24, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into trift2.:/MySQL/M51/push-5.1
parents
82e0bd23
b824ff95
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
23 deletions
+68
-23
mysql-test/suite/ndb/r/ndb_dd_ddl.result
mysql-test/suite/ndb/r/ndb_dd_ddl.result
+2
-4
mysql-test/suite/ndb/t/ndb_dd_ddl.test
mysql-test/suite/ndb/t/ndb_dd_ddl.test
+12
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+37
-13
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+13
-0
storage/ndb/tools/restore/Restore.cpp
storage/ndb/tools/restore/Restore.cpp
+4
-1
No files found.
mysql-test/suite/ndb/r/ndb_dd_ddl.result
View file @
9c4b35ed
...
@@ -222,19 +222,17 @@ ENGINE NDB;
...
@@ -222,19 +222,17 @@ ENGINE NDB;
DROP LOGFILE GROUP lg1
DROP LOGFILE GROUP lg1
ENGINE NDB;
ENGINE NDB;
**** End = And No = ****
**** End = And No = ****
create table t1 (a int primary key) engine = myisam;
create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/tmp/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
create logfile group lg1 add undofile 'MYSQLTEST_VARDIR/master-data/test/t1.frm' initial_size 1M undo_buffer_size = 1M engine=ndb;;
ERROR HY000: Failed to create UNDOFILE
ERROR HY000: Failed to create UNDOFILE
create logfile group lg1
create logfile group lg1
add undofile 'undofile.dat'
add undofile 'undofile.dat'
initial_size 1M
initial_size 1M
undo_buffer_size = 1M
undo_buffer_size = 1M
engine=ndb;
engine=ndb;
create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/
master-data/test
/t1.frm' use logfile group lg1 initial_size 1M engine ndb;;
create tablespace ts1 add datafile 'MYSQLTEST_VARDIR/
tmp
/t1.frm' use logfile group lg1 initial_size 1M engine ndb;;
ERROR HY000: Failed to create DATAFILE
ERROR HY000: Failed to create DATAFILE
drop tablespace ts1
drop tablespace ts1
engine ndb;
engine ndb;
ERROR HY000: Failed to drop TABLESPACE
ERROR HY000: Failed to drop TABLESPACE
drop logfile group lg1
drop logfile group lg1
engine ndb;
engine ndb;
drop table t1;
mysql-test/suite/ndb/t/ndb_dd_ddl.test
View file @
9c4b35ed
...
@@ -333,11 +333,18 @@ ENGINE NDB;
...
@@ -333,11 +333,18 @@ ENGINE NDB;
###
###
#
#
# bug#16341
# bug#16341
create
table
t1
(
a
int
primary
key
)
engine
=
myisam
;
#create table t1 (a int primary key) engine = myisam;
# 2007-08-22 Jeb
# Removed the use of create table and manually
# created the file to cause failure due to
# inconsistant results on other OS
# see #bug30559
--
exec
touch
$MYSQLTEST_VARDIR
/
tmp
/
t1
.
frm
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
error
ER_CREATE_FILEGROUP_FAILED
--
error
ER_CREATE_FILEGROUP_FAILED
--
eval
create
logfile
group
lg1
add
undofile
'$MYSQLTEST_VARDIR/
master-data/test
/t1.frm'
initial_size
1
M
undo_buffer_size
=
1
M
engine
=
ndb
;
--
eval
create
logfile
group
lg1
add
undofile
'$MYSQLTEST_VARDIR/
tmp
/t1.frm'
initial_size
1
M
undo_buffer_size
=
1
M
engine
=
ndb
;
create
logfile
group
lg1
create
logfile
group
lg1
add
undofile
'undofile.dat'
add
undofile
'undofile.dat'
...
@@ -347,7 +354,7 @@ engine=ndb;
...
@@ -347,7 +354,7 @@ engine=ndb;
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
error
ER_CREATE_FILEGROUP_FAILED
--
error
ER_CREATE_FILEGROUP_FAILED
--
eval
create
tablespace
ts1
add
datafile
'$MYSQLTEST_VARDIR/
master-data/test
/t1.frm'
use
logfile
group lg1 initial_size 1M engine ndb
;
--
eval
create
tablespace
ts1
add
datafile
'$MYSQLTEST_VARDIR/
tmp
/t1.frm'
use
logfile
group lg1 initial_size 1M engine ndb
;
--
error
ER_DROP_FILEGROUP_FAILED
--
error
ER_DROP_FILEGROUP_FAILED
drop
tablespace
ts1
drop
tablespace
ts1
...
@@ -356,8 +363,8 @@ engine ndb;
...
@@ -356,8 +363,8 @@ engine ndb;
drop
logfile
group
lg1
drop
logfile
group
lg1
engine
ndb
;
engine
ndb
;
drop
table
t1
;
#
drop table t1;
--
exec
rm
$MYSQLTEST_VARDIR
/
tmp
/
t1
.
frm
# End 5.1 test
# End 5.1 test
sql/ha_ndbcluster.cc
View file @
9c4b35ed
...
@@ -2812,11 +2812,17 @@ int ha_ndbcluster::write_row(uchar *record)
...
@@ -2812,11 +2812,17 @@ int ha_ndbcluster::write_row(uchar *record)
if
(
unlikely
(
m_slow_path
))
if
(
unlikely
(
m_slow_path
))
{
{
/*
ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
log-slave-updates option. This is instead handled in the
injector thread, by looking explicitly at the
opt_log_slave_updates flag.
*/
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
else
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
thd
->
server_id
);
op
->
setAnyValue
(
thd
->
server_id
);
else
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
}
}
m_rows_changed
++
;
m_rows_changed
++
;
...
@@ -3102,11 +3108,17 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
...
@@ -3102,11 +3108,17 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
if
(
unlikely
(
m_slow_path
))
if
(
unlikely
(
m_slow_path
))
{
{
/*
ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
log-slave-updates option. This is instead handled in the
injector thread, by looking explicitly at the
opt_log_slave_updates flag.
*/
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
else
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
thd
->
server_id
);
op
->
setAnyValue
(
thd
->
server_id
);
else
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
}
}
/*
/*
Execute update operation if we are not doing a scan for update
Execute update operation if we are not doing a scan for update
...
@@ -3170,13 +3182,19 @@ int ha_ndbcluster::delete_row(const uchar *record)
...
@@ -3170,13 +3182,19 @@ int ha_ndbcluster::delete_row(const uchar *record)
if
(
unlikely
(
m_slow_path
))
if
(
unlikely
(
m_slow_path
))
{
{
/*
ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
log-slave-updates option. This is instead handled in the
injector thread, by looking explicitly at the
opt_log_slave_updates flag.
*/
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
if
(
thd
->
slave_thread
)
((
NdbOperation
*
)
trans
->
getLastDefinedOperation
())
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
else
if
(
thd
->
slave_thread
)
((
NdbOperation
*
)
trans
->
getLastDefinedOperation
())
->
((
NdbOperation
*
)
trans
->
getLastDefinedOperation
())
->
setAnyValue
(
thd
->
server_id
);
setAnyValue
(
thd
->
server_id
);
else
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
((
NdbOperation
*
)
trans
->
getLastDefinedOperation
())
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
}
}
if
(
!
(
m_primary_key_update
||
m_delete_cannot_batch
))
if
(
!
(
m_primary_key_update
||
m_delete_cannot_batch
))
// If deleting from cursor, NoCommit will be handled in next_result
// If deleting from cursor, NoCommit will be handled in next_result
...
@@ -3210,11 +3228,17 @@ int ha_ndbcluster::delete_row(const uchar *record)
...
@@ -3210,11 +3228,17 @@ int ha_ndbcluster::delete_row(const uchar *record)
if
(
unlikely
(
m_slow_path
))
if
(
unlikely
(
m_slow_path
))
{
{
/*
ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
log-slave-updates option. This is instead handled in the
injector thread, by looking explicitly at the
opt_log_slave_updates flag.
*/
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
Thd_ndb
*
thd_ndb
=
get_thd_ndb
(
thd
);
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
else
if
(
thd
->
slave_thread
)
op
->
setAnyValue
(
thd
->
server_id
);
op
->
setAnyValue
(
thd
->
server_id
);
else
if
(
thd_ndb
->
trans_options
&
TNTO_NO_LOGGING
)
op
->
setAnyValue
(
NDB_ANYVALUE_FOR_NOLOGGING
);
}
}
}
}
...
...
sql/ha_ndbcluster_binlog.cc
View file @
9c4b35ed
...
@@ -114,6 +114,9 @@ NDB_SHARE *ndb_apply_status_share= 0;
...
@@ -114,6 +114,9 @@ NDB_SHARE *ndb_apply_status_share= 0;
NDB_SHARE
*
ndb_schema_share
=
0
;
NDB_SHARE
*
ndb_schema_share
=
0
;
pthread_mutex_t
ndb_schema_share_mutex
;
pthread_mutex_t
ndb_schema_share_mutex
;
extern
my_bool
opt_log_slave_updates
;
static
my_bool
g_ndb_log_slave_updates
;
/* Schema object distribution handling */
/* Schema object distribution handling */
HASH
ndb_schema_objects
;
HASH
ndb_schema_objects
;
typedef
struct
st_ndb_schema_object
{
typedef
struct
st_ndb_schema_object
{
...
@@ -3296,6 +3299,14 @@ ndb_binlog_thread_handle_data_event(Ndb *ndb, NdbEventOperation *pOp,
...
@@ -3296,6 +3299,14 @@ ndb_binlog_thread_handle_data_event(Ndb *ndb, NdbEventOperation *pOp,
originating_server_id
);
originating_server_id
);
return
0
;
return
0
;
}
}
else
if
(
!
g_ndb_log_slave_updates
)
{
/*
This event comes from a slave applier since it has an originating
server id set. Since option to log slave updates is not set, skip it.
*/
return
0
;
}
TABLE
*
table
=
share
->
table
;
TABLE
*
table
=
share
->
table
;
DBUG_ASSERT
(
trans
.
good
());
DBUG_ASSERT
(
trans
.
good
());
...
@@ -3942,6 +3953,8 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
...
@@ -3942,6 +3953,8 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
!
IS_NDB_BLOB_PREFIX
(
pOp
->
getEvent
()
->
getTable
()
->
getName
()));
!
IS_NDB_BLOB_PREFIX
(
pOp
->
getEvent
()
->
getTable
()
->
getName
()));
DBUG_ASSERT
(
gci
<=
ndb_latest_received_binlog_epoch
);
DBUG_ASSERT
(
gci
<=
ndb_latest_received_binlog_epoch
);
/* initialize some variables for this epoch */
g_ndb_log_slave_updates
=
opt_log_slave_updates
;
i_ndb
->
i_ndb
->
setReportThreshEventGCISlip
(
ndb_report_thresh_binlog_epoch_slip
);
setReportThreshEventGCISlip
(
ndb_report_thresh_binlog_epoch_slip
);
i_ndb
->
setReportThreshEventFreeMem
(
ndb_report_thresh_binlog_mem_usage
);
i_ndb
->
setReportThreshEventFreeMem
(
ndb_report_thresh_binlog_mem_usage
);
...
...
storage/ndb/tools/restore/Restore.cpp
View file @
9c4b35ed
...
@@ -607,7 +607,10 @@ RestoreDataIterator::getNextTuple(int & res)
...
@@ -607,7 +607,10 @@ RestoreDataIterator::getNextTuple(int & res)
attr_data
->
size
=
4
*
sz
;
attr_data
->
size
=
4
*
sz
;
//if (m_currentTable->getTableId() >= 2) { ndbout << "fix i=" << i << " off=" << ptr-buf_ptr << " attrId=" << attrId << endl; }
//if (m_currentTable->getTableId() >= 2) { ndbout << "fix i=" << i << " off=" << ptr-buf_ptr << " attrId=" << attrId << endl; }
if
(
!
m_hostByteOrder
&&
attr_desc
->
m_column
->
getType
()
==
NdbDictionary
::
Column
::
Timestamp
)
attr_data
->
u_int32_value
[
0
]
=
Twiddle32
(
attr_data
->
u_int32_value
[
0
]);
if
(
!
Twiddle
(
attr_desc
,
attr_data
))
if
(
!
Twiddle
(
attr_desc
,
attr_data
))
{
{
res
=
-
1
;
res
=
-
1
;
...
...
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