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
b1f9980d
Commit
b1f9980d
authored
Apr 10, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
e2c5b045
e82605bc
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
21 deletions
+68
-21
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+5
-4
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
+5
-4
storage/ndb/include/kernel/signaldata/DropFilegroup.hpp
storage/ndb/include/kernel/signaldata/DropFilegroup.hpp
+5
-3
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
+2
-2
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
+3
-4
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+17
-1
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+1
-0
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+29
-3
storage/ndb/src/ndbapi/ndberror.c
storage/ndb/src/ndbapi/ndberror.c
+1
-0
No files found.
sql/ha_ndbcluster.cc
View file @
b1f9980d
...
...
@@ -5789,7 +5789,6 @@ int ndbcluster_find_all_files(THD *thd)
DBUG_ENTER
(
"ndbcluster_find_all_files"
);
Ndb
*
ndb
;
char
key
[
FN_REFLEN
];
NdbDictionary
::
Dictionary
::
List
list
;
if
(
!
(
ndb
=
check_ndb_in_thd
(
thd
)))
DBUG_RETURN
(
HA_ERR_NO_CONNECTION
);
...
...
@@ -5799,6 +5798,7 @@ int ndbcluster_find_all_files(THD *thd)
int
unhandled
,
retries
=
5
,
skipped
;
do
{
NdbDictionary
::
Dictionary
::
List
list
;
if
(
dict
->
listObjects
(
list
,
NdbDictionary
::
Object
::
UserTable
)
!=
0
)
ERR_RETURN
(
dict
->
getNdbError
());
unhandled
=
0
;
...
...
@@ -10082,14 +10082,15 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
}
}
dict
->
listObjects
(
dflist
,
NdbDictionary
::
Object
::
Undofile
);
NdbDictionary
::
Dictionary
::
List
uflist
;
dict
->
listObjects
(
uflist
,
NdbDictionary
::
Object
::
Undofile
);
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
NdbError
::
NoError
)
ERR_RETURN
(
ndberr
);
for
(
i
=
0
;
i
<
d
flist
.
count
;
i
++
)
for
(
i
=
0
;
i
<
u
flist
.
count
;
i
++
)
{
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
d
flist
.
elements
[
i
];
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
u
flist
.
elements
[
i
];
Ndb_cluster_connection_node_iter
iter
;
unsigned
id
;
...
...
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
View file @
b1f9980d
...
...
@@ -586,7 +586,8 @@ public:
enum
Unimplemented
{
ScanOptimised
=
15
,
//Default updateOptimised
AttributeGroup
=
1012
//Default 0
AttributeGroup
=
1012
,
//Default 0
FileNo
=
102
};
};
...
...
@@ -618,13 +619,13 @@ struct DictFilegroupInfo {
*/
FileName
=
100
,
FileType
=
101
,
FileId
=
102
,
FileNo
=
103
,
// Per Filegroup
FileId
=
103
,
FileFGroupId
=
104
,
FileFGroupVersion
=
105
,
FileSizeHi
=
106
,
FileSizeLo
=
107
,
FileFreeExtents
=
108
,
FileVersion
=
109
,
FileEnd
=
199
,
//
/**
...
...
@@ -696,8 +697,8 @@ struct DictFilegroupInfo {
struct
File
{
char
FileName
[
PATH_MAX
];
Uint32
FileType
;
Uint32
FileNo
;
Uint32
FileId
;
Uint32
FileVersion
;
Uint32
FilegroupId
;
Uint32
FilegroupVersion
;
Uint32
FileSizeHi
;
...
...
storage/ndb/include/kernel/signaldata/DropFilegroup.hpp
View file @
b1f9980d
...
...
@@ -66,9 +66,10 @@ struct DropFilegroupRef {
Busy
=
701
,
NotMaster
=
702
,
NoSuchFilegroup
=
767
,
FilegroupInUse
=
768
FilegroupInUse
=
768
,
InvalidSchemaObjectVersion
=
774
};
Uint32
senderData
;
Uint32
senderRef
;
Uint32
masterNodeId
;
...
...
@@ -150,7 +151,8 @@ struct DropFileRef {
NoError
=
0
,
Busy
=
701
,
NoSuchFile
=
766
,
DropUndoFileNotSupported
=
769
DropUndoFileNotSupported
=
769
,
InvalidSchemaObjectVersion
=
774
};
Uint32
senderData
;
...
...
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
View file @
b1f9980d
...
...
@@ -216,8 +216,8 @@ SimpleProperties::SP2StructMapping
DictFilegroupInfo
::
FileMapping
[]
=
{
DFGIMAPS
(
File
,
FileName
,
FileName
,
0
,
PATH_MAX
),
DFGIMAP2
(
File
,
FileType
,
FileType
,
0
,
1
),
DFGIMAP
(
File
,
FileNo
,
FileNo
),
DFGIMAP
(
File
,
FileId
,
FileId
),
DFGIMAP
(
File
,
FileVersion
,
FileVersion
),
DFGIMAP
(
File
,
FileFGroupId
,
FilegroupId
),
DFGIMAP
(
File
,
FileFGroupVersion
,
FilegroupVersion
),
DFGIMAP
(
File
,
FileSizeHi
,
FileSizeHi
),
...
...
@@ -254,8 +254,8 @@ void
DictFilegroupInfo
::
File
::
init
(){
memset
(
FileName
,
sizeof
(
FileName
),
0
);
FileType
=
~
0
;
FileNo
=
~
0
;
FileId
=
~
0
;
FileVersion
=
~
0
;
FilegroupId
=
~
0
;
FilegroupVersion
=
~
0
;
FileSizeHi
=
0
;
...
...
storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
View file @
b1f9980d
...
...
@@ -143,12 +143,13 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
m_ctx
.
m_config
.
getOwnConfigIterator
();
ndbrequire
(
p
!=
0
);
Uint32
noBackups
=
0
,
noTables
=
0
,
noAttribs
=
0
;
Uint32
noBackups
=
0
,
noTables
=
0
,
noAttribs
=
0
,
noFrags
=
0
;
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_DISCLESS
,
&
m_diskless
));
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_PARALLEL_BACKUPS
,
&
noBackups
);
// ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables));
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_DICT_TABLE
,
&
noTables
));
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_ATTRIBUTES
,
&
noAttribs
));
ndbrequire
(
!
ndb_mgm_get_int_parameter
(
p
,
CFG_DIH_FRAG_CONNECT
,
&
noFrags
));
noAttribs
++
;
//RT 527 bug fix
...
...
@@ -158,9 +159,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
c_tablePool
.
setSize
(
noBackups
*
noTables
+
1
);
c_attributePool
.
setSize
(
noBackups
*
noAttribs
+
MAX_ATTRIBUTES_IN_TABLE
);
c_triggerPool
.
setSize
(
noBackups
*
3
*
noTables
);
// 2 = no of replicas
c_fragmentPool
.
setSize
(
noBackups
*
NO_OF_FRAG_PER_NODE
*
noTables
+
1
);
c_fragmentPool
.
setSize
(
noBackups
*
noFrags
+
1
);
Uint32
szDataBuf
=
(
2
*
1024
*
1024
);
Uint32
szLogBuf
=
(
2
*
1024
*
1024
);
...
...
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
b1f9980d
...
...
@@ -631,7 +631,8 @@ Dbdict::packFileIntoPages(SimpleProperties::Writer & w,
f
.
FileSizeHi
=
(
f_ptr
.
p
->
m_file_size
>>
32
);
f
.
FileSizeLo
=
(
f_ptr
.
p
->
m_file_size
&
0xFFFFFFFF
);
f
.
FileFreeExtents
=
free_extents
;
f
.
FileNo
=
f_ptr
.
p
->
key
;
f
.
FileId
=
f_ptr
.
p
->
key
;
f
.
FileVersion
=
f_ptr
.
p
->
m_version
;
FilegroupPtr
lfg_ptr
;
ndbrequire
(
c_filegroup_hash
.
find
(
lfg_ptr
,
f
.
FilegroupId
));
...
...
@@ -13588,6 +13589,13 @@ Dbdict::execDROP_FILE_REQ(Signal* signal)
break
;
}
if
(
file_ptr
.
p
->
m_version
!=
version
)
{
ref
->
errorCode
=
DropFileRef
::
InvalidSchemaObjectVersion
;
ref
->
errorLine
=
__LINE__
;
break
;
}
Ptr
<
SchemaTransaction
>
trans_ptr
;
if
(
!
c_Trans
.
seize
(
trans_ptr
))
{
...
...
@@ -13662,6 +13670,13 @@ Dbdict::execDROP_FILEGROUP_REQ(Signal* signal)
ref
->
errorLine
=
__LINE__
;
break
;
}
if
(
filegroup_ptr
.
p
->
m_version
!=
version
)
{
ref
->
errorCode
=
DropFilegroupRef
::
InvalidSchemaObjectVersion
;
ref
->
errorLine
=
__LINE__
;
break
;
}
Ptr
<
SchemaTransaction
>
trans_ptr
;
if
(
!
c_Trans
.
seize
(
trans_ptr
))
...
...
@@ -15095,6 +15110,7 @@ Dbdict::create_file_prepare_start(Signal* signal, SchemaOp* op){
filePtr
.
p
->
m_obj_ptr_i
=
obj_ptr
.
i
;
filePtr
.
p
->
m_filegroup_id
=
f
.
FilegroupId
;
filePtr
.
p
->
m_type
=
f
.
FileType
;
filePtr
.
p
->
m_version
=
op
->
m_obj_version
;
obj_ptr
.
p
->
m_id
=
op
->
m_obj_id
;
obj_ptr
.
p
->
m_type
=
f
.
FileType
;
...
...
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
View file @
b1f9980d
...
...
@@ -535,6 +535,7 @@ public:
Uint32
key
;
Uint32
m_magic
;
Uint32
m_version
;
Uint32
m_obj_ptr_i
;
Uint32
m_filegroup_id
;
Uint32
m_type
;
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
b1f9980d
...
...
@@ -4624,13 +4624,27 @@ NdbDictInterface::get_filegroup(NdbFilegroupImpl & dst,
LinearSectionPtr
ptr
[
1
];
ptr
[
0
].
p
=
(
Uint32
*
)
name
;
ptr
[
0
].
sz
=
(
strLen
+
3
)
/
4
;
#ifndef IGNORE_VALGRIND_WARNINGS
if
(
strLen
&
3
)
{
Uint32
pad
=
0
;
m_buffer
.
clear
();
m_buffer
.
append
(
name
,
strLen
);
m_buffer
.
append
(
&
pad
,
4
);
ptr
[
0
].
p
=
(
Uint32
*
)
m_buffer
.
get_data
();
}
#endif
int
r
=
dictSignal
(
&
tSignal
,
ptr
,
1
,
-
1
,
// any node
WAIT_GET_TAB_INFO_REQ
,
DICT_WAITFOR_TIMEOUT
,
100
);
if
(
r
)
{
dst
.
m_id
=
-
1
;
dst
.
m_version
=
~
0
;
DBUG_PRINT
(
"info"
,
(
"get_filegroup failed dictSignal"
));
DBUG_RETURN
(
-
1
);
}
...
...
@@ -4766,7 +4780,18 @@ NdbDictInterface::get_file(NdbFileImpl & dst,
LinearSectionPtr
ptr
[
1
];
ptr
[
0
].
p
=
(
Uint32
*
)
name
;
ptr
[
0
].
sz
=
(
strLen
+
3
)
/
4
;
#ifndef IGNORE_VALGRIND_WARNINGS
if
(
strLen
&
3
)
{
Uint32
pad
=
0
;
m_buffer
.
clear
();
m_buffer
.
append
(
name
,
strLen
);
m_buffer
.
append
(
&
pad
,
4
);
ptr
[
0
].
p
=
(
Uint32
*
)
m_buffer
.
get_data
();
}
#endif
int
r
=
dictSignal
(
&
tSignal
,
ptr
,
1
,
node
,
WAIT_GET_TAB_INFO_REQ
,
...
...
@@ -4834,7 +4859,8 @@ NdbDictInterface::parseFileInfo(NdbFileImpl &dst,
}
dst
.
m_type
=
(
NdbDictionary
::
Object
::
Type
)
f
.
FileType
;
dst
.
m_id
=
f
.
FileNo
;
dst
.
m_id
=
f
.
FileId
;
dst
.
m_version
=
f
.
FileVersion
;
dst
.
m_size
=
((
Uint64
)
f
.
FileSizeHi
<<
32
)
|
(
f
.
FileSizeLo
);
dst
.
m_path
.
assign
(
f
.
FileName
);
...
...
storage/ndb/src/ndbapi/ndberror.c
View file @
b1f9980d
...
...
@@ -386,6 +386,7 @@ ErrorBundle ErrorCodes[] = {
{
768
,
DMEC
,
SE
,
"Cant drop filegroup, filegroup is used"
},
{
769
,
DMEC
,
SE
,
"Drop undofile not supported, drop logfile group instead"
},
{
770
,
DMEC
,
SE
,
"Cant drop file, file is used"
},
{
774
,
DMEC
,
SE
,
"Invalid schema object for drop"
},
{
241
,
HA_ERR_TABLE_DEF_CHANGED
,
SE
,
"Invalid schema object version"
},
{
283
,
HA_ERR_NO_SUCH_TABLE
,
SE
,
"Table is being dropped"
},
{
284
,
HA_ERR_TABLE_DEF_CHANGED
,
SE
,
"Table not defined in transaction coordinator"
},
...
...
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