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
3131434d
Commit
3131434d
authored
May 15, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - wl-2451 update schemafile format change to 5.0.6
parent
143ad508
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+8
-8
ndb/src/kernel/blocks/dbdict/Dbdict.hpp
ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+1
-1
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
+2
-2
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
+1
-1
No files found.
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
3131434d
...
@@ -1013,7 +1013,7 @@ void Dbdict::readSchemaConf(Signal* signal,
...
@@ -1013,7 +1013,7 @@ void Dbdict::readSchemaConf(Signal* signal,
ndbrequire
(
rr
.
firstPage
==
0
);
ndbrequire
(
rr
.
firstPage
==
0
);
SchemaFile
*
sf
=
&
xsf
->
schemaPage
[
0
];
SchemaFile
*
sf
=
&
xsf
->
schemaPage
[
0
];
Uint32
noOfPages
;
Uint32
noOfPages
;
if
(
sf
->
NdbVersion
<
NDB_SF_VERSION_5_0_
5
)
{
if
(
sf
->
NdbVersion
<
NDB_SF_VERSION_5_0_
6
)
{
jam
();
jam
();
const
Uint32
pageSize_old
=
32
*
1024
;
const
Uint32
pageSize_old
=
32
*
1024
;
noOfPages
=
pageSize_old
/
NDB_SF_PAGE_SIZE
-
1
;
noOfPages
=
pageSize_old
/
NDB_SF_PAGE_SIZE
-
1
;
...
@@ -1032,8 +1032,8 @@ void Dbdict::readSchemaConf(Signal* signal,
...
@@ -1032,8 +1032,8 @@ void Dbdict::readSchemaConf(Signal* signal,
SchemaFile
*
sf0
=
&
xsf
->
schemaPage
[
0
];
SchemaFile
*
sf0
=
&
xsf
->
schemaPage
[
0
];
xsf
->
noOfPages
=
sf0
->
FileSize
/
NDB_SF_PAGE_SIZE
;
xsf
->
noOfPages
=
sf0
->
FileSize
/
NDB_SF_PAGE_SIZE
;
if
(
sf0
->
NdbVersion
<
NDB_SF_VERSION_5_0_
5
&&
if
(
sf0
->
NdbVersion
<
NDB_SF_VERSION_5_0_
6
&&
!
convertSchemaFileTo_5_0_
5
(
xsf
))
{
!
convertSchemaFileTo_5_0_
6
(
xsf
))
{
jam
();
jam
();
ndbrequire
(
!
crashInd
);
ndbrequire
(
!
crashInd
);
ndbrequire
(
fsPtr
.
p
->
fsState
==
FsConnectRecord
::
READ_SCHEMA1
);
ndbrequire
(
fsPtr
.
p
->
fsState
==
FsConnectRecord
::
READ_SCHEMA1
);
...
@@ -1113,7 +1113,7 @@ void Dbdict::closeReadSchemaConf(Signal* signal,
...
@@ -1113,7 +1113,7 @@ void Dbdict::closeReadSchemaConf(Signal* signal,
}
//Dbdict::closeReadSchemaConf()
}
//Dbdict::closeReadSchemaConf()
bool
bool
Dbdict
::
convertSchemaFileTo_5_0_
5
(
XSchemaFile
*
xsf
)
Dbdict
::
convertSchemaFileTo_5_0_
6
(
XSchemaFile
*
xsf
)
{
{
const
Uint32
pageSize_old
=
32
*
1024
;
const
Uint32
pageSize_old
=
32
*
1024
;
Uint32
page_old
[
pageSize_old
>>
2
];
Uint32
page_old
[
pageSize_old
>>
2
];
...
@@ -2175,8 +2175,8 @@ void Dbdict::execSCHEMA_INFO(Signal* signal)
...
@@ -2175,8 +2175,8 @@ void Dbdict::execSCHEMA_INFO(Signal* signal)
releaseSections
(
signal
);
releaseSections
(
signal
);
SchemaFile
*
sf0
=
&
xsf
->
schemaPage
[
0
];
SchemaFile
*
sf0
=
&
xsf
->
schemaPage
[
0
];
if
(
sf0
->
NdbVersion
<
NDB_SF_VERSION_5_0_
5
)
{
if
(
sf0
->
NdbVersion
<
NDB_SF_VERSION_5_0_
6
)
{
bool
ok
=
convertSchemaFileTo_5_0_
5
(
xsf
);
bool
ok
=
convertSchemaFileTo_5_0_
6
(
xsf
);
ndbrequire
(
ok
);
ndbrequire
(
ok
);
}
}
...
@@ -11922,8 +11922,8 @@ Dbdict::initSchemaFile(XSchemaFile * xsf, Uint32 firstPage, Uint32 lastPage,
...
@@ -11922,8 +11922,8 @@ Dbdict::initSchemaFile(XSchemaFile * xsf, Uint32 firstPage, Uint32 lastPage,
memset
(
sf
,
0
,
NDB_SF_PAGE_SIZE
);
memset
(
sf
,
0
,
NDB_SF_PAGE_SIZE
);
Uint32
ndb_version
=
NDB_VERSION
;
Uint32
ndb_version
=
NDB_VERSION
;
if
(
ndb_version
<
NDB_SF_VERSION_5_0_
5
)
if
(
ndb_version
<
NDB_SF_VERSION_5_0_
6
)
ndb_version
=
NDB_SF_VERSION_5_0_
5
;
ndb_version
=
NDB_SF_VERSION_5_0_
6
;
memcpy
(
sf
->
Magic
,
NDB_SF_MAGIC
,
sizeof
(
sf
->
Magic
));
memcpy
(
sf
->
Magic
,
NDB_SF_MAGIC
,
sizeof
(
sf
->
Magic
));
sf
->
ByteOrder
=
0x12345678
;
sf
->
ByteOrder
=
0x12345678
;
...
...
ndb/src/kernel/blocks/dbdict/Dbdict.hpp
View file @
3131434d
...
@@ -1703,7 +1703,7 @@ private:
...
@@ -1703,7 +1703,7 @@ private:
void
readSchemaRef
(
Signal
*
signal
,
FsConnectRecordPtr
fsPtr
);
void
readSchemaRef
(
Signal
*
signal
,
FsConnectRecordPtr
fsPtr
);
void
closeReadSchemaConf
(
Signal
*
signal
,
void
closeReadSchemaConf
(
Signal
*
signal
,
FsConnectRecordPtr
fsPtr
);
FsConnectRecordPtr
fsPtr
);
bool
convertSchemaFileTo_5_0_
5
(
XSchemaFile
*
);
bool
convertSchemaFileTo_5_0_
6
(
XSchemaFile
*
);
/* ------------------------------------------------------------ */
/* ------------------------------------------------------------ */
// Get table definitions
// Get table definitions
...
...
ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
View file @
3131434d
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
#define NDB_SF_MAX_PAGES 160
#define NDB_SF_MAX_PAGES 160
// versions where format changed
// versions where format changed
#define NDB_SF_VERSION_5_0_
5 MAKE_VERSION(5, 0, 5
)
#define NDB_SF_VERSION_5_0_
6 MAKE_VERSION(5, 0, 6
)
// One page in schema file.
// One page in schema file.
struct
SchemaFile
{
struct
SchemaFile
{
...
@@ -71,7 +71,7 @@ struct SchemaFile {
...
@@ -71,7 +71,7 @@ struct SchemaFile {
}
}
};
};
// pre-5.0.
5
// pre-5.0.
6
struct
TableEntry_old
{
struct
TableEntry_old
{
Uint32
m_tableState
;
Uint32
m_tableState
;
Uint32
m_tableVersion
;
Uint32
m_tableVersion
;
...
...
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
View file @
3131434d
...
@@ -195,7 +195,7 @@ NDB_COMMAND(printSchemafile,
...
@@ -195,7 +195,7 @@ NDB_COMMAND(printSchemafile,
}
}
SchemaFile
*
sf
=
(
SchemaFile
*
)
&
buf
[
0
];
SchemaFile
*
sf
=
(
SchemaFile
*
)
&
buf
[
0
];
if
(
sf
->
NdbVersion
<
NDB_SF_VERSION_5_0_
5
)
if
(
sf
->
NdbVersion
<
NDB_SF_VERSION_5_0_
6
)
print_old
(
filename
,
sf
);
print_old
(
filename
,
sf
);
else
else
print
(
filename
,
sf
,
sz
);
print
(
filename
,
sf
,
sz
);
...
...
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