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
2310bf1c
Commit
2310bf1c
authored
Nov 13, 2007
by
lzhou/zhl@dev3-63.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb-bj
into dev3-63.(none):/home/zhl/mysql/mysql-5.1/bug29186
parents
92ba2bdd
04799ddb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
217 additions
and
1 deletion
+217
-1
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
...age/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
+2
-1
storage/ndb/src/kernel/blocks/ERROR_codes.txt
storage/ndb/src/kernel/blocks/ERROR_codes.txt
+10
-0
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+6
-0
storage/ndb/src/kernel/blocks/lgman.cpp
storage/ndb/src/kernel/blocks/lgman.cpp
+16
-0
storage/ndb/src/kernel/blocks/tsman.cpp
storage/ndb/src/kernel/blocks/tsman.cpp
+16
-0
storage/ndb/src/ndbapi/ndberror.c
storage/ndb/src/ndbapi/ndberror.c
+1
-0
storage/ndb/test/ndbapi/testDict.cpp
storage/ndb/test/ndbapi/testDict.cpp
+166
-0
No files found.
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp
View file @
2310bf1c
...
...
@@ -163,7 +163,8 @@ struct CreateFileImplRef {
InvalidFileMetadata
=
1510
,
OutOfMemory
=
1511
,
FileReadError
=
1512
,
FilegroupNotOnline
=
1513
FilegroupNotOnline
=
1513
,
FileSizeTooLarge
=
1515
};
Uint32
senderData
;
...
...
storage/ndb/src/kernel/blocks/ERROR_codes.txt
View file @
2310bf1c
...
...
@@ -12,6 +12,8 @@ Next BACKUP 10038
Next DBUTIL 11002
Next DBTUX 12008
Next SUMA 13001
Next LGMAN 15001
Next TSMAN 16001
TESTING NODE FAILURE, ARBITRATION
---------------------------------
...
...
@@ -535,3 +537,11 @@ NDBCNTR:
1000: Crash insertion on SystemError::CopyFragRef
1001: Delay sending NODE_FAILREP (to own node), until error is cleared
LGMAN:
-----
15000: Fail to create log file
TSMAN:
-----
16000: Fail to create data file
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
2310bf1c
...
...
@@ -8286,6 +8286,12 @@ void Dbdih::execDIHNDBTAMPER(Signal* signal)
}
else
if
(
tuserpointer
<
15000
)
{
jam
();
tuserblockref
=
DBDICT_REF
;
}
else
if
(
tuserpointer
<
16000
)
{
jam
();
tuserblockref
=
LGMAN_REF
;
}
else
if
(
tuserpointer
<
17000
)
{
jam
();
tuserblockref
=
TSMAN_REF
;
}
else
if
(
tuserpointer
<
30000
)
{
/*--------------------------------------------------------------------*/
// Ignore errors in the 20000-range.
...
...
storage/ndb/src/kernel/blocks/lgman.cpp
View file @
2310bf1c
...
...
@@ -547,6 +547,22 @@ Lgman::execCREATE_FILE_REQ(Signal* signal)
break
;
}
if
(
ERROR_INSERTED
(
15000
)
||
(
sizeof
(
void
*
)
==
4
&&
req
->
file_size_hi
&
0xFFFFFFFF
))
{
jam
();
if
(
signal
->
getNoOfSections
())
releaseSections
(
signal
);
CreateFileImplRef
*
ref
=
(
CreateFileImplRef
*
)
signal
->
getDataPtr
();
ref
->
senderData
=
senderData
;
ref
->
senderRef
=
reference
();
ref
->
errorCode
=
CreateFileImplRef
::
FileSizeTooLarge
;
sendSignal
(
senderRef
,
GSN_CREATE_FILE_REF
,
signal
,
CreateFileImplRef
::
SignalLength
,
JBB
);
return
;
}
new
(
file_ptr
.
p
)
Undofile
(
req
,
ptr
.
i
);
Local_undofile_list
tmp
(
m_file_pool
,
ptr
.
p
->
m_meta_files
);
...
...
storage/ndb/src/kernel/blocks/tsman.cpp
View file @
2310bf1c
...
...
@@ -523,6 +523,22 @@ Tsman::execCREATE_FILE_REQ(Signal* signal){
break
;
}
if
(
ERROR_INSERTED
(
16000
)
||
(
sizeof
(
void
*
)
==
4
&&
req
->
file_size_hi
&
0xFFFFFFFF
))
{
jam
();
if
(
signal
->
getNoOfSections
())
releaseSections
(
signal
);
CreateFileImplRef
*
ref
=
(
CreateFileImplRef
*
)
signal
->
getDataPtr
();
ref
->
senderData
=
senderData
;
ref
->
senderRef
=
reference
();
ref
->
errorCode
=
CreateFileImplRef
::
FileSizeTooLarge
;
sendSignal
(
senderRef
,
GSN_CREATE_FILE_REF
,
signal
,
CreateFileImplRef
::
SignalLength
,
JBB
);
return
;
}
new
(
file_ptr
.
p
)
Datafile
(
req
);
Local_datafile_list
tmp
(
m_file_pool
,
ptr
.
p
->
m_meta_files
);
tmp
.
add
(
file_ptr
);
...
...
storage/ndb/src/ndbapi/ndberror.c
View file @
2310bf1c
...
...
@@ -426,6 +426,7 @@ ErrorBundle ErrorCodes[] = {
{
1512
,
DMEC
,
SE
,
"File read error"
},
{
1513
,
DMEC
,
IE
,
"Filegroup not online"
},
{
1514
,
DMEC
,
SE
,
"Currently there is a limit of one logfile group"
},
{
1515
,
DMEC
,
SE
,
"Currently there is a 4G limit of one undo/data-file in 32-bit host"
},
{
773
,
DMEC
,
SE
,
"Out of string memory, please modify StringMemory config parameter"
},
{
775
,
DMEC
,
SE
,
"Create file is not supported when Diskless=1"
},
...
...
storage/ndb/test/ndbapi/testDict.cpp
View file @
2310bf1c
...
...
@@ -2357,6 +2357,168 @@ runBug24631(NDBT_Context* ctx, NDBT_Step* step)
return
NDBT_OK
;
}
int
runBug29186
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
lgError
=
15000
;
int
tsError
=
16000
;
int
res
;
char
lgname
[
256
];
char
ufname
[
256
];
char
tsname
[
256
];
char
dfname
[
256
];
NdbRestarter
restarter
;
if
(
restarter
.
getNumDbNodes
()
<
2
){
ctx
->
stopTest
();
return
NDBT_OK
;
}
Ndb
*
pNdb
=
GETNDB
(
step
);
NdbDictionary
::
Dictionary
*
pDict
=
pNdb
->
getDictionary
();
NdbDictionary
::
Dictionary
::
List
list
;
if
(
pDict
->
listObjects
(
list
)
==
-
1
)
return
NDBT_FAILED
;
// 1.create logfile group
const
char
*
lgfound
=
0
;
for
(
Uint32
i
=
0
;
i
<
list
.
count
;
i
++
)
{
switch
(
list
.
elements
[
i
].
type
){
case
NdbDictionary
:
:
Object
::
LogfileGroup
:
lgfound
=
list
.
elements
[
i
].
name
;
break
;
default:
break
;
}
if
(
lgfound
)
break
;
}
if
(
lgfound
==
0
)
{
BaseString
::
snprintf
(
lgname
,
sizeof
(
lgname
),
"LG-%u"
,
rand
());
NdbDictionary
::
LogfileGroup
lg
;
lg
.
setName
(
lgname
);
lg
.
setUndoBufferSize
(
8
*
1024
*
1024
);
if
(
pDict
->
createLogfileGroup
(
lg
)
!=
0
)
{
g_err
<<
"Failed to create logfilegroup:"
<<
endl
<<
pDict
->
getNdbError
()
<<
endl
;
return
NDBT_FAILED
;
}
}
else
{
BaseString
::
snprintf
(
lgname
,
sizeof
(
lgname
),
"%s"
,
lgfound
);
}
if
(
restarter
.
waitClusterStarted
(
60
)){
g_err
<<
"waitClusterStarted failed"
<<
endl
;
return
NDBT_FAILED
;
}
if
(
restarter
.
insertErrorInAllNodes
(
lgError
)
!=
0
){
g_err
<<
"failed to set error insert"
<<
endl
;
return
NDBT_FAILED
;
}
g_info
<<
"error inserted"
<<
endl
;
g_info
<<
"waiting some before add log file"
<<
endl
;
g_info
<<
"starting create log file group"
<<
endl
;
NdbDictionary
::
Undofile
uf
;
BaseString
::
snprintf
(
ufname
,
sizeof
(
ufname
),
"%s-%u"
,
lgname
,
rand
());
uf
.
setPath
(
ufname
);
uf
.
setSize
(
2
*
1024
*
1024
);
uf
.
setLogfileGroup
(
lgname
);
if
(
pDict
->
createUndofile
(
uf
)
==
0
)
{
g_err
<<
"Create log file group should fail on error_insertion "
<<
lgError
<<
endl
;
return
NDBT_FAILED
;
}
//clear lg error
if
(
restarter
.
insertErrorInAllNodes
(
15099
)
!=
0
){
g_err
<<
"failed to set error insert"
<<
endl
;
return
NDBT_FAILED
;
}
NdbSleep_SecSleep
(
5
);
//lg error has been cleared, so we can add undo file
if
(
pDict
->
createUndofile
(
uf
)
!=
0
)
{
g_err
<<
"Failed to create undofile:"
<<
endl
<<
pDict
->
getNdbError
()
<<
endl
;
return
NDBT_FAILED
;
}
if
(
restarter
.
waitClusterStarted
(
60
)){
g_err
<<
"waitClusterStarted failed"
<<
endl
;
return
NDBT_FAILED
;
}
if
(
restarter
.
insertErrorInAllNodes
(
tsError
)
!=
0
){
g_err
<<
"failed to set error insert"
<<
endl
;
return
NDBT_FAILED
;
}
g_info
<<
"error inserted"
<<
endl
;
g_info
<<
"waiting some before create table space"
<<
endl
;
g_info
<<
"starting create table space"
<<
endl
;
//r = runCreateTablespace(ctx, step);
BaseString
::
snprintf
(
tsname
,
sizeof
(
tsname
),
"TS-%u"
,
rand
());
BaseString
::
snprintf
(
dfname
,
sizeof
(
dfname
),
"%s-%u-1.dat"
,
tsname
,
rand
());
NdbDictionary
::
Tablespace
ts
;
ts
.
setName
(
tsname
);
ts
.
setExtentSize
(
1024
*
1024
);
ts
.
setDefaultLogfileGroup
(
lgname
);
if
(
pDict
->
createTablespace
(
ts
)
!=
0
)
{
g_err
<<
"Failed to create tablespace:"
<<
endl
<<
pDict
->
getNdbError
()
<<
endl
;
return
NDBT_FAILED
;
}
NdbDictionary
::
Datafile
df
;
df
.
setPath
(
dfname
);
df
.
setSize
(
1
*
1024
*
1024
);
df
.
setTablespace
(
tsname
);
if
(
pDict
->
createDatafile
(
df
)
==
0
)
{
g_err
<<
"Create table space should fail on error_insertion "
<<
tsError
<<
endl
;
return
NDBT_FAILED
;
}
//Clear the inserted error
if
(
restarter
.
insertErrorInAllNodes
(
16099
)
!=
0
){
g_err
<<
"failed to set error insert"
<<
endl
;
return
NDBT_FAILED
;
}
NdbSleep_SecSleep
(
5
);
if
(
pDict
->
dropTablespace
(
pDict
->
getTablespace
(
tsname
))
!=
0
)
{
g_err
<<
"Failed to drop tablespace: "
<<
pDict
->
getNdbError
()
<<
endl
;
return
NDBT_FAILED
;
}
if
(
lgfound
==
0
)
{
if
(
pDict
->
dropLogfileGroup
(
pDict
->
getLogfileGroup
(
lgname
))
!=
0
)
return
NDBT_FAILED
;
}
return
NDBT_OK
;
}
struct
RandSchemaOp
{
struct
Obj
...
...
@@ -2864,6 +3026,10 @@ TESTCASE("Bug24631",
""
){
INITIALIZER
(
runBug24631
);
}
TESTCASE
(
"Bug29186"
,
""
){
INITIALIZER
(
runBug29186
);
}
NDBT_TESTSUITE_END
(
testDict
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
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