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
1305016b
Commit
1305016b
authored
May 14, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#28348
remove LCP files when dropping table
parent
de307026
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
1 deletion
+103
-1
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
+2
-0
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+10
-1
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+4
-0
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
+87
-0
No files found.
storage/ndb/include/kernel/signaldata/FsOpenReq.hpp
View file @
1305016b
...
...
@@ -44,6 +44,8 @@ class FsOpenReq {
friend
class
Restore
;
friend
class
Dblqh
;
friend
class
Dbtup
;
/**
* For printing
*/
...
...
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
View file @
1305016b
...
...
@@ -972,6 +972,8 @@ ArrayPool<TupTriggerData> c_triggerPool;
struct
{
Uint32
tabUserPtr
;
Uint32
tabUserRef
;
Uint32
m_lcpno
;
Uint32
m_fragPtrI
;
}
m_dropTable
;
State
tableStatus
;
}
;
...
...
@@ -1533,6 +1535,11 @@ private:
void
execACCKEYREF
(
Signal
*
signal
);
void
execACC_ABORTCONF
(
Signal
*
signal
);
// Drop table
void
execFSREMOVEREF
(
Signal
*
);
void
execFSREMOVECONF
(
Signal
*
);
//------------------------------------------------------------------
//------------------------------------------------------------------
// Methods to handle execution of TUPKEYREQ + ATTRINFO.
...
...
@@ -2423,6 +2430,8 @@ private:
void
drop_fragment_free_extent_log_buffer_callback
(
Signal
*
,
Uint32
,
Uint32
);
void
drop_fragment_unmap_pages
(
Signal
*
,
TablerecPtr
,
FragrecordPtr
,
Uint32
);
void
drop_fragment_unmap_page_callback
(
Signal
*
signal
,
Uint32
,
Uint32
);
void
drop_fragment_fsremove
(
Signal
*
,
TablerecPtr
,
FragrecordPtr
);
void
drop_fragment_fsremove_done
(
Signal
*
,
TablerecPtr
,
FragrecordPtr
);
// Initialisation
void
initData
();
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
View file @
1305016b
...
...
@@ -102,6 +102,10 @@ Dbtup::Dbtup(Block_context& ctx, Pgman* pgman)
addRecSignal
(
GSN_ACCKEYREF
,
&
Dbtup
::
execACCKEYREF
);
addRecSignal
(
GSN_ACC_ABORTCONF
,
&
Dbtup
::
execACC_ABORTCONF
);
// Drop table
addRecSignal
(
GSN_FSREMOVEREF
,
&
Dbtup
::
execFSREMOVEREF
,
true
);
addRecSignal
(
GSN_FSREMOVECONF
,
&
Dbtup
::
execFSREMOVECONF
,
true
);
attrbufrec
=
0
;
fragoperrec
=
0
;
fragrecord
=
0
;
...
...
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
View file @
1305016b
...
...
@@ -20,6 +20,7 @@
#include <ndb_limits.h>
#include <pc.hpp>
#include <signaldata/TupFrag.hpp>
#include <signaldata/FsRef.hpp>
#include <signaldata/FsConf.hpp>
#include <signaldata/FsRemoveReq.hpp>
#include <signaldata/DropTab.hpp>
...
...
@@ -1282,6 +1283,24 @@ Dbtup::drop_fragment_free_var_pages(Signal* signal)
sendSignal
(
cownref
,
GSN_CONTINUEB
,
signal
,
3
,
JBB
);
return
;
}
/**
* Remove LCP's for fragment
*/
tabPtr
.
p
->
m_dropTable
.
m_lcpno
=
0
;
tabPtr
.
p
->
m_dropTable
.
m_fragPtrI
=
fragPtr
.
i
;
drop_fragment_fsremove
(
signal
,
tabPtr
,
fragPtr
);
}
void
Dbtup
::
drop_fragment_fsremove_done
(
Signal
*
signal
,
TablerecPtr
tabPtr
,
FragrecordPtr
fragPtr
)
{
/**
* LCP's removed...
* now continue with "next"
*/
Uint32
logfile_group_id
=
fragPtr
.
p
->
m_logfile_group_id
;
releaseFragPages
(
fragPtr
.
p
);
Uint32
i
;
...
...
@@ -1301,6 +1320,74 @@ Dbtup::drop_fragment_free_var_pages(Signal* signal)
return
;
}
// Remove LCP
void
Dbtup
::
drop_fragment_fsremove
(
Signal
*
signal
,
TablerecPtr
tabPtr
,
FragrecordPtr
fragPtr
)
{
FsRemoveReq
*
req
=
(
FsRemoveReq
*
)
signal
->
getDataPtrSend
();
req
->
userReference
=
reference
();
req
->
userPointer
=
tabPtr
.
i
;
req
->
directory
=
0
;
req
->
ownDirectory
=
0
;
Uint32
lcpno
=
tabPtr
.
p
->
m_dropTable
.
m_lcpno
;
Uint32
fragId
=
fragPtr
.
p
->
fragmentId
;
Uint32
tableId
=
fragPtr
.
p
->
fragTableId
;
FsOpenReq
::
setVersion
(
req
->
fileNumber
,
5
);
FsOpenReq
::
setSuffix
(
req
->
fileNumber
,
FsOpenReq
::
S_DATA
);
FsOpenReq
::
v5_setLcpNo
(
req
->
fileNumber
,
lcpno
);
FsOpenReq
::
v5_setTableId
(
req
->
fileNumber
,
tableId
);
FsOpenReq
::
v5_setFragmentId
(
req
->
fileNumber
,
fragId
);
sendSignal
(
NDBFS_REF
,
GSN_FSREMOVEREQ
,
signal
,
FsRemoveReq
::
SignalLength
,
JBB
);
}
void
Dbtup
::
execFSREMOVEREF
(
Signal
*
signal
)
{
jamEntry
();
FsRef
*
ref
=
(
FsRef
*
)
signal
->
getDataPtr
();
Uint32
userPointer
=
ref
->
userPointer
;
FsConf
*
conf
=
(
FsConf
*
)
signal
->
getDataPtrSend
();
conf
->
userPointer
=
userPointer
;
execFSREMOVECONF
(
signal
);
}
void
Dbtup
::
execFSREMOVECONF
(
Signal
*
signal
)
{
jamEntry
();
FsConf
*
conf
=
(
FsConf
*
)
signal
->
getDataPtrSend
();
TablerecPtr
tabPtr
;
FragrecordPtr
fragPtr
;
tabPtr
.
i
=
conf
->
userPointer
;
ptrCheckGuard
(
tabPtr
,
cnoOfTablerec
,
tablerec
);
ndbrequire
(
tabPtr
.
p
->
tableStatus
==
DROPPING
);
fragPtr
.
i
=
tabPtr
.
p
->
m_dropTable
.
m_fragPtrI
;
ptrCheckGuard
(
fragPtr
,
cnoOfFragrec
,
fragrecord
);
tabPtr
.
p
->
m_dropTable
.
m_lcpno
++
;
if
(
tabPtr
.
p
->
m_dropTable
.
m_lcpno
<
3
)
{
jam
();
drop_fragment_fsremove
(
signal
,
tabPtr
,
fragPtr
);
}
else
{
jam
();
drop_fragment_fsremove_done
(
signal
,
tabPtr
,
fragPtr
);
}
}
// End remove LCP
void
Dbtup
::
start_restore_lcp
(
Uint32
tableId
,
Uint32
fragId
)
{
...
...
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