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
b485ce3d
Commit
b485ce3d
authored
Apr 17, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - use words not pages in schemafile table entry (5.1 compatible)
parent
9ac03944
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+0
-1
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+10
-9
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
+1
-1
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
+4
-1
No files found.
ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
View file @
b485ce3d
...
...
@@ -227,7 +227,6 @@ Dbacc::Dbacc(const class Configuration & conf):
&
mlpqOperPtr
,
&
queOperPtr
,
&
readWriteOpPtr
,
&
tgnptMainOpPtr
,
&
iopOverflowRecPtr
,
&
tfoOverflowRecPtr
,
&
porOverflowRecPtr
,
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
b485ce3d
...
...
@@ -1132,20 +1132,23 @@ Dbdict::convertSchemaFileTo_5_0_5(XSchemaFile * xsf)
Uint32
noOfPages
=
1
;
Uint32
n
,
i
,
j
;
for
(
n
=
0
;
n
<
xsf
->
noOfPages
;
n
++
)
{
jam
();
for
(
i
=
0
;
i
<
NDB_SF_PAGE_ENTRIES
;
i
++
)
{
j
=
n
*
NDB_SF_PAGE_ENTRIES
+
i
;
if
(
j
>=
sf_old
->
NoOfTableEntries
)
continue
;
const
SchemaFile
::
TableEntry_old
&
te_old
=
sf_old
->
TableEntries_old
[
j
];
if
(
te_old
.
m_tableState
==
SchemaFile
::
INIT
||
te_old
.
m_tableState
==
SchemaFile
::
DROP_TABLE_COMMITTED
)
te_old
.
m_tableState
==
SchemaFile
::
DROP_TABLE_COMMITTED
||
te_old
.
m_noOfPages
==
0
)
continue
;
SchemaFile
*
sf
=
&
xsf
->
schemaPage
[
n
];
SchemaFile
::
TableEntry
&
te
=
sf
->
TableEntries
[
i
];
te
.
m_tableState
=
te_old
.
m_tableState
;
te
.
m_tableVersion
=
te_old
.
m_tableVersion
;
te
.
m_tableType
=
te_old
.
m_tableType
;
te
.
m_noOfPages
=
te_old
.
m_noOfPages
;
te
.
m_info_words
=
te_old
.
m_noOfPages
*
ZSIZE_OF_PAGES_IN_WORDS
-
ZPAGE_HEADER_SIZE
;
te
.
m_gcp
=
te_old
.
m_gcp
;
if
(
noOfPages
<
n
)
noOfPages
=
n
;
...
...
@@ -2503,7 +2506,8 @@ Dbdict::restartCreateTab(Signal* signal, Uint32 tableId,
if
(
file
&&
!
ERROR_INSERTED
(
6002
)){
jam
();
c_readTableRecord
.
noOfPages
=
te
->
m_noOfPages
;
c_readTableRecord
.
noOfPages
=
DIV
(
te
->
m_info_words
+
ZPAGE_HEADER_SIZE
,
ZSIZE_OF_PAGES_IN_WORDS
);
c_readTableRecord
.
pageId
=
0
;
c_readTableRecord
.
m_callback
.
m_callbackData
=
createTabPtr
.
p
->
key
;
c_readTableRecord
.
m_callback
.
m_callbackFunction
=
...
...
@@ -3291,8 +3295,7 @@ Dbdict::execALTER_TAB_REQ(Signal * signal)
tabEntry
.
m_tableType
=
tablePtr
.
p
->
tableType
;
tabEntry
.
m_tableState
=
SchemaFile
::
ALTER_TABLE_COMMITTED
;
tabEntry
.
m_gcp
=
gci
;
tabEntry
.
m_noOfPages
=
DIV
(
tabInfoPtr
.
sz
+
ZPAGE_HEADER_SIZE
,
ZSIZE_OF_PAGES_IN_WORDS
);
tabEntry
.
m_info_words
=
tabInfoPtr
.
sz
;
memset
(
tabEntry
.
m_unused
,
0
,
sizeof
(
tabEntry
.
m_unused
));
Callback
callback
;
...
...
@@ -4114,8 +4117,7 @@ Dbdict::createTab_prepare(Signal* signal, CreateTabReq * req){
tabEntry
.
m_tableType
=
tabPtr
.
p
->
tableType
;
tabEntry
.
m_tableState
=
SchemaFile
::
ADD_STARTED
;
tabEntry
.
m_gcp
=
gci
;
tabEntry
.
m_noOfPages
=
DIV
(
tabInfoPtr
.
sz
+
ZPAGE_HEADER_SIZE
,
ZSIZE_OF_PAGES_IN_WORDS
);
tabEntry
.
m_info_words
=
tabInfoPtr
.
sz
;
memset
(
tabEntry
.
m_unused
,
0
,
sizeof
(
tabEntry
.
m_unused
));
Callback
callback
;
...
...
@@ -4571,8 +4573,7 @@ Dbdict::createTab_commit(Signal * signal, CreateTabReq * req){
tabEntry
.
m_tableType
=
tabPtr
.
p
->
tableType
;
tabEntry
.
m_tableState
=
SchemaFile
::
TABLE_ADD_COMMITTED
;
tabEntry
.
m_gcp
=
tabPtr
.
p
->
gciTableCreated
;
tabEntry
.
m_noOfPages
=
DIV
(
tabPtr
.
p
->
packedSize
+
ZPAGE_HEADER_SIZE
,
ZSIZE_OF_PAGES_IN_WORDS
);
tabEntry
.
m_info_words
=
tabPtr
.
p
->
packedSize
;
memset
(
tabEntry
.
m_unused
,
0
,
sizeof
(
tabEntry
.
m_unused
));
Callback
callback
;
...
...
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
View file @
b485ce3d
...
...
@@ -62,7 +62,7 @@ struct SchemaFile {
Uint32
m_tableState
;
Uint32
m_tableVersion
;
Uint32
m_tableType
;
Uint32
m_
noOfPage
s
;
Uint32
m_
info_word
s
;
Uint32
m_gcp
;
Uint32
m_unused
[
3
];
...
...
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
View file @
b485ce3d
...
...
@@ -2,6 +2,9 @@
make -f Makefile -f - printSchemaFile <<'_eof_'
printSchemaFile: printSchemaFile.cpp SchemaFile.hpp
$(CXXCOMPILE) -o $@ $@.cpp -L../../../common/util/.libs -lgeneral
ifneq ($(MYSQL_HOME),)
ln -sf `pwd`/$@ $(MYSQL_HOME)/bin/$@
endif
_eof_
exit $?
#endif
...
...
@@ -134,7 +137,7 @@ print(const char * filename, const SchemaFile * xsf, Uint32 sz)
<<
" State = "
<<
te
.
m_tableState
<<
" version = "
<<
te
.
m_tableVersion
<<
" type = "
<<
te
.
m_tableType
<<
" noOf
Pages = "
<<
te
.
m_noOfPage
s
<<
" noOf
Words = "
<<
te
.
m_info_word
s
<<
" gcp: "
<<
te
.
m_gcp
<<
endl
;
}
if
(
te
.
m_unused
[
0
]
!=
0
||
te
.
m_unused
[
1
]
!=
0
||
te
.
m_unused
[
2
]
!=
0
)
{
...
...
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