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
e005a690
Commit
e005a690
authored
Apr 25, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge jonas@perch:src/51-work/
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
parents
3d8c5261
834d349f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
23 deletions
+98
-23
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
+1
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
+12
-2
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+3
-8
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+4
-5
storage/ndb/src/kernel/blocks/restore.cpp
storage/ndb/src/kernel/blocks/restore.cpp
+25
-4
storage/ndb/src/kernel/blocks/restore.hpp
storage/ndb/src/kernel/blocks/restore.hpp
+1
-0
storage/ndb/test/ndbapi/testBasic.cpp
storage/ndb/test/ndbapi/testBasic.cpp
+45
-0
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+7
-3
No files found.
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
View file @
e005a690
...
...
@@ -171,7 +171,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
c_defaults
.
m_logBufferSize
=
szLogBuf
;
c_defaults
.
m_dataBufferSize
=
szDataBuf
;
c_defaults
.
m_minWriteSize
=
szWrite
;
c_defaults
.
m_maxWriteSize
=
szWrite
;
c_defaults
.
m_maxWriteSize
=
256
*
1024
;
c_defaults
.
m_lcp_buffer_size
=
szDataBuf
;
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
View file @
e005a690
...
...
@@ -119,6 +119,7 @@ void Dbtup::execTUP_ABORTREQ(Signal* signal)
Tuple_header
*
tuple_ptr
=
(
Tuple_header
*
)
get_ptr
(
&
page
,
&
regOperPtr
.
p
->
m_tuple_location
,
regTabPtr
.
p
);
Uint32
bits
=
tuple_ptr
->
m_header_bits
;
if
(
regOperPtr
.
p
->
op_struct
.
op_type
!=
ZDELETE
)
{
Tuple_header
*
copy
=
(
Tuple_header
*
)
...
...
@@ -132,7 +133,7 @@ void Dbtup::execTUP_ABORTREQ(Signal* signal)
disk_page_abort_prealloc
(
signal
,
regFragPtr
.
p
,
&
key
,
key
.
m_page_idx
);
}
Uint32
bits
=
tuple_ptr
->
m_header_bits
;
Uint32
copy_bits
=
copy
->
m_header_bits
;
if
(
!
(
bits
&
Tuple_header
::
ALLOC
))
{
...
...
@@ -174,6 +175,15 @@ void Dbtup::execTUP_ABORTREQ(Signal* signal)
tuple_ptr
->
m_header_bits
|=
Tuple_header
::
FREED
;
}
}
else
if
(
regOperPtr
.
p
->
is_first_operation
()
&&
regOperPtr
.
p
->
is_last_operation
())
{
if
(
bits
&
Tuple_header
::
ALLOC
)
{
tuple_ptr
->
m_header_bits
&=
~
(
Uint32
)
Tuple_header
::
ALLOC
;
tuple_ptr
->
m_header_bits
|=
Tuple_header
::
FREED
;
}
}
if
(
regOperPtr
.
p
->
is_first_operation
()
&&
regOperPtr
.
p
->
is_last_operation
())
{
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
View file @
e005a690
...
...
@@ -1053,7 +1053,6 @@ Dbtup::disk_page_abort_prealloc_callback(Signal* signal,
Ptr
<
Fragrecord
>
fragPtr
;
getFragmentrec
(
fragPtr
,
pagePtr
.
p
->
m_fragment_id
,
tabPtr
.
p
);
disk_page_set_dirty
(
pagePtr
);
disk_page_abort_prealloc_callback_1
(
signal
,
fragPtr
.
p
,
pagePtr
,
sz
);
}
...
...
@@ -1063,6 +1062,9 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal,
PagePtr
pagePtr
,
Uint32
sz
)
{
jam
();
disk_page_set_dirty
(
pagePtr
);
Disk_alloc_info
&
alloc
=
fragPtrP
->
m_disk_alloc_info
;
Uint32
page_idx
=
pagePtr
.
p
->
list_index
;
Uint32
used
=
pagePtr
.
p
->
uncommitted_used_space
;
...
...
@@ -1075,13 +1077,6 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal,
ddassert
(
alloc
.
calc_page_free_bits
(
free
-
used
)
==
old_idx
);
Uint32
new_idx
=
alloc
.
calc_page_free_bits
(
free
-
used
+
sz
);
#ifdef VM_TRACE
Local_key
key
;
key
.
m_page_no
=
pagePtr
.
p
->
m_page_no
;
key
.
m_file_no
=
pagePtr
.
p
->
m_file_no
;
ndbout
<<
"disk_page_abort_prealloc_callback_1"
<<
key
<<
endl
;
#endif
Ptr
<
Extent_info
>
extentPtr
;
c_extent_pool
.
getPtr
(
extentPtr
,
ext
);
if
(
old_idx
!=
new_idx
)
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
View file @
e005a690
...
...
@@ -1408,8 +1408,6 @@ int Dbtup::handleInsertReq(Signal* signal,
}
req_struct
->
m_use_rowid
=
false
;
base
->
m_header_bits
&=
~
(
Uint32
)
Tuple_header
::
FREE
;
base
->
m_header_bits
|=
Tuple_header
::
ALLOC
&
(
regOperPtr
.
p
->
is_first_operation
()
?
~
0
:
1
);
}
else
{
...
...
@@ -1418,8 +1416,6 @@ int Dbtup::handleInsertReq(Signal* signal,
{
ndbout_c
(
"no mem insert but rowid (same)"
);
base
->
m_header_bits
&=
~
(
Uint32
)
Tuple_header
::
FREE
;
base
->
m_header_bits
|=
Tuple_header
::
ALLOC
&
(
regOperPtr
.
p
->
is_first_operation
()
?
~
0
:
1
);
}
else
{
...
...
@@ -1428,6 +1424,9 @@ int Dbtup::handleInsertReq(Signal* signal,
}
}
base
->
m_header_bits
|=
Tuple_header
::
ALLOC
&
(
regOperPtr
.
p
->
is_first_operation
()
?
~
0
:
1
);
if
(
disk_insert
)
{
Local_key
tmp
;
...
...
@@ -2888,7 +2887,7 @@ Dbtup::handle_size_change_after_update(KeyReqStruct* req_struct,
if
(
needed
<=
alloc
)
{
ndbassert
(
!
regOperPtr
->
is_first_operation
());
//
ndbassert(!regOperPtr->is_first_operation());
ndbout_c
(
" no grow"
);
return
0
;
}
...
...
storage/ndb/src/kernel/blocks/restore.cpp
View file @
e005a690
...
...
@@ -547,9 +547,10 @@ Restore::restore_next(Signal* signal, FilePtr file_ptr)
parse_gcp_entry
(
signal
,
file_ptr
,
data
,
len
);
break
;
case
0x4e444242
:
// 'NDBB'
if
(
ntohl
(
*
(
data
+
2
))
!=
NDB_VERSION
)
parse_error
(
signal
,
file_ptr
,
__LINE__
,
ntohl
(
*
(
data
+
2
)));
if
(
check_file_version
(
signal
,
ntohl
(
*
(
data
+
2
)))
==
0
)
{
break
;
}
default:
parse_error
(
signal
,
file_ptr
,
__LINE__
,
ntohl
(
*
data
));
}
...
...
@@ -719,7 +720,7 @@ Restore::parse_file_header(Signal* signal,
return
;
}
if
(
ntohl
(
fh
->
NdbVersion
)
!=
NDB_VERSION
)
if
(
check_file_version
(
signal
,
ntohl
(
fh
->
NdbVersion
))
)
{
parse_error
(
signal
,
file_ptr
,
__LINE__
,
ntohl
(
fh
->
NdbVersion
));
return
;
...
...
@@ -1227,3 +1228,23 @@ operator << (NdbOut& ndbout, const Restore::Column& col)
return
ndbout
;
}
int
Restore
::
check_file_version
(
Signal
*
signal
,
Uint32
file_version
)
{
if
(
file_version
<
MAKE_VERSION
(
5
,
1
,
6
))
{
char
buf
[
255
];
char
verbuf
[
255
];
getVersionString
(
file_version
,
0
,
verbuf
,
sizeof
(
verbuf
));
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"Unsupported version of LCP files found on disk, "
" found: %s"
,
verbuf
);
progError
(
__LINE__
,
NDBD_EXIT_SR_RESTARTCONFLICT
,
buf
);
return
-
1
;
}
return
0
;
}
storage/ndb/src/kernel/blocks/restore.hpp
View file @
e005a690
...
...
@@ -140,6 +140,7 @@ private:
Uint32
calulate_hash
(
Uint32
tableId
,
const
Uint32
*
src
);
void
parse_error
(
Signal
*
,
FilePtr
,
Uint32
line
,
Uint32
extra
);
int
check_file_version
(
Signal
*
,
Uint32
file_version
);
public:
private:
...
...
storage/ndb/test/ndbapi/testBasic.cpp
View file @
e005a690
...
...
@@ -1041,6 +1041,38 @@ runMassiveRollback3(NDBT_Context* ctx, NDBT_Step* step){
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
Ndb
*
pNdb
=
GETNDB
(
step
);
const
Uint32
BATCH
=
10
;
const
Uint32
OPS_TOTAL
=
50
;
const
Uint32
LOOPS
=
100
;
for
(
Uint32
loop
=
0
;
loop
<
LOOPS
;
loop
++
)
{
CHECK
(
hugoOps
.
startTransaction
(
pNdb
)
==
0
);
bool
ok
=
true
;
for
(
Uint32
i
=
0
;
i
<
OPS_TOTAL
;
i
+=
BATCH
)
{
CHECK
(
hugoOps
.
pkInsertRecord
(
pNdb
,
i
,
BATCH
,
0
)
==
0
);
if
(
hugoOps
.
execute_NoCommit
(
pNdb
)
!=
0
)
{
ok
=
false
;
break
;
}
}
hugoOps
.
execute_Rollback
(
pNdb
);
CHECK
(
hugoOps
.
closeTransaction
(
pNdb
)
==
0
);
}
hugoOps
.
closeTransaction
(
pNdb
);
return
result
;
}
int
runMassiveRollback4
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
HugoOperations
hugoOps
(
*
ctx
->
getTab
());
Ndb
*
pNdb
=
GETNDB
(
step
);
const
Uint32
BATCH
=
10
;
const
Uint32
OPS_TOTAL
=
20
;
const
Uint32
LOOPS
=
100
;
...
...
@@ -1052,6 +1084,12 @@ runMassiveRollback3(NDBT_Context* ctx, NDBT_Step* step){
for
(
Uint32
i
=
0
;
i
<
OPS_TOTAL
;
i
+=
BATCH
)
{
CHECK
(
hugoOps
.
pkInsertRecord
(
pNdb
,
i
,
BATCH
,
0
)
==
0
);
CHECK
(
hugoOps
.
pkDeleteRecord
(
pNdb
,
i
,
BATCH
)
==
0
);
if
(
hugoOps
.
execute_NoCommit
(
pNdb
)
!=
0
)
{
ok
=
false
;
break
;
}
if
(
hugoOps
.
execute_NoCommit
(
pNdb
)
!=
0
)
{
ok
=
false
;
...
...
@@ -1399,6 +1437,13 @@ TESTCASE("MassiveRollback3",
STEP
(
runMassiveRollback3
);
FINALIZER
(
runClearTable2
);
}
TESTCASE
(
"MassiveRollback4"
,
"Test rollback of 4096 operations"
){
INITIALIZER
(
runClearTable2
);
STEP
(
runMassiveRollback4
);
STEP
(
runMassiveRollback4
);
FINALIZER
(
runClearTable2
);
}
TESTCASE
(
"MassiveTransaction"
,
"Test very large insert transaction"
){
INITIALIZER
(
runLoadTable2
);
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
e005a690
...
...
@@ -201,15 +201,19 @@ args: -n PkDeleteAsynch
max-time: 500
cmd: testBasic
args: -n MassiveRollback T1 T
6 T13
D1 D2
args: -n MassiveRollback T1 T
7
D1 D2
max-time: 500
cmd: testBasic
args: -n MassiveRollback2 T1 T
6 T13
D1 D2
args: -n MassiveRollback2 T1 T
7
D1 D2
max-time: 500
cmd: testBasic
args: -n MassiveRollback3 T1 D1
args: -n MassiveRollback3 T1 T7 D1 D2
max-time: 500
cmd: testBasic
args: -n MassiveRollback4 T1 T7 D1 D2
max-time: 500
cmd: testBasic
...
...
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