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
7d649638
Commit
7d649638
authored
May 06, 2004
by
tomas@mc05.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many files:
included full my_global.h and resolved some resulting name conflicts
parent
b2e241ff
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
41 deletions
+46
-41
ndb/include/logger/FileLogHandler.hpp
ndb/include/logger/FileLogHandler.hpp
+2
-2
ndb/include/ndb_global.h
ndb/include/ndb_global.h
+2
-2
ndb/include/util/File.hpp
ndb/include/util/File.hpp
+7
-7
ndb/src/common/logger/FileLogHandler.cpp
ndb/src/common/logger/FileLogHandler.cpp
+6
-6
ndb/src/common/util/File.cpp
ndb/src/common/util/File.cpp
+22
-22
ndb/src/common/util/strlcat.c
ndb/src/common/util/strlcat.c
+1
-0
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+3
-0
ndb/src/rep/RepComponents.hpp
ndb/src/rep/RepComponents.hpp
+0
-1
ndb/src/rep/rep_version.hpp
ndb/src/rep/rep_version.hpp
+1
-1
ndb/src/rep/storage/GCIContainer.hpp
ndb/src/rep/storage/GCIContainer.hpp
+2
-0
No files found.
ndb/include/logger/FileLogHandler.hpp
View file @
7d649638
...
...
@@ -19,7 +19,7 @@
#include "LogHandler.hpp"
class
File
;
class
File
_class
;
/**
* Logs messages to a file. The log file will be archived depending on
...
...
@@ -104,7 +104,7 @@ private:
int
m_maxNoFiles
;
long
m_maxFileSize
;
unsigned
int
m_maxLogEntries
;
File
*
m_pLogFile
;
File
_class
*
m_pLogFile
;
};
#endif
ndb/include/ndb_global.h
View file @
7d649638
/*#include <my_global.h>*/
#include <my_config.h>
#include <my_global.h>
/*#include <my_config.h>*/
ndb/include/util/File.hpp
View file @
7d649638
...
...
@@ -26,7 +26,7 @@
*
* @version #@ $Id: File.hpp,v 1.5 2002/04/26 13:15:38 ejonore Exp $
*/
class
File
class
File
_class
{
public:
/**
...
...
@@ -65,7 +65,7 @@ public:
/**
* Default constructor.
*/
File
();
File
_class
();
/**
* Creates a new File with the specified filename and file mode.
...
...
@@ -76,12 +76,12 @@ public:
* @param aFileName a filename.
* @param mode the mode which the file should be opened/created with, default "r".
*/
File
(
const
char
*
aFileName
,
const
char
*
mode
=
"r"
);
File
_class
(
const
char
*
aFileName
,
const
char
*
mode
=
"r"
);
/**
* Destructor.
*/
~
File
();
~
File
_class
();
/**
* Opens/creates the file. If open() fails then 'errno' and perror()
...
...
@@ -198,9 +198,9 @@ private:
char
m_fileName
[
MAX_FILE_NAME_SIZE
];
const
char
*
m_fileMode
;
/* Prohibit */
File
(
const
File
&
aCopy
);
File
operator
=
(
const
File
&
);
bool
operator
==
(
const
File
&
);
File
_class
(
const
File_class
&
aCopy
);
File
_class
operator
=
(
const
File_class
&
);
bool
operator
==
(
const
File
_class
&
);
};
#endif
ndb/src/common/logger/FileLogHandler.cpp
View file @
7d649638
...
...
@@ -14,7 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include
"FileLogHandler.hpp"
#include
<FileLogHandler.hpp>
#include <File.hpp>
...
...
@@ -35,7 +35,7 @@ FileLogHandler::FileLogHandler() :
m_maxLogEntries
(
MAX_LOG_ENTRIES
)
{
m_pLogFile
=
new
File
(
"logger.log"
,
"a+"
);
m_pLogFile
=
new
File
_class
(
"logger.log"
,
"a+"
);
}
FileLogHandler
::
FileLogHandler
(
const
char
*
aFileName
,
...
...
@@ -47,7 +47,7 @@ FileLogHandler::FileLogHandler(const char* aFileName,
m_maxFileSize
(
maxFileSize
),
m_maxLogEntries
(
maxLogEntries
)
{
m_pLogFile
=
new
File
(
aFileName
,
"a+"
);
m_pLogFile
=
new
File
_class
(
aFileName
,
"a+"
);
}
FileLogHandler
::~
FileLogHandler
()
...
...
@@ -166,10 +166,10 @@ FileLogHandler::createNewFile()
::
snprintf
(
newName
,
sizeof
(
newName
),
"%s.%d"
,
m_pLogFile
->
getName
(),
fileNo
++
);
}
while
(
File
::
exists
(
newName
));
}
while
(
File
_class
::
exists
(
newName
));
m_pLogFile
->
close
();
if
(
!
File
::
rename
(
m_pLogFile
->
getName
(),
newName
))
if
(
!
File
_class
::
rename
(
m_pLogFile
->
getName
(),
newName
))
{
setErrorCode
(
errno
);
rc
=
false
;
...
...
@@ -201,7 +201,7 @@ FileLogHandler::setFilename(const BaseString &filename) {
close
();
if
(
m_pLogFile
)
delete
m_pLogFile
;
m_pLogFile
=
new
File
(
filename
.
c_str
(),
"a+"
);
m_pLogFile
=
new
File
_class
(
filename
.
c_str
(),
"a+"
);
open
();
return
true
;
};
...
...
ndb/src/common/util/File.cpp
View file @
7d649638
...
...
@@ -31,7 +31,7 @@
//
bool
File
::
exists
(
const
char
*
aFileName
)
File
_class
::
exists
(
const
char
*
aFileName
)
{
bool
rc
=
true
;
...
...
@@ -56,7 +56,7 @@ File::exists(const char* aFileName)
}
long
File
::
size
(
FILE
*
f
)
File
_class
::
size
(
FILE
*
f
)
{
long
cur_pos
=
0
,
length
=
0
;
...
...
@@ -69,23 +69,23 @@ File::size(FILE* f)
}
bool
File
::
rename
(
const
char
*
currFileName
,
const
char
*
newFileName
)
File
_class
::
rename
(
const
char
*
currFileName
,
const
char
*
newFileName
)
{
return
::
rename
(
currFileName
,
newFileName
)
==
0
?
true
:
false
;
}
bool
File
::
remove
(
const
char
*
aFileName
)
File
_class
::
remove
(
const
char
*
aFileName
)
{
return
::
remove
(
aFileName
)
==
0
?
true
:
false
;
}
File
::
File
()
:
File
_class
::
File_class
()
:
m_file
(
NULL
),
m_fileMode
(
"r"
)
{
}
File
::
File
(
const
char
*
aFileName
,
const
char
*
mode
)
:
File
_class
::
File_class
(
const
char
*
aFileName
,
const
char
*
mode
)
:
m_file
(
NULL
),
m_fileMode
(
mode
)
{
...
...
@@ -93,13 +93,13 @@ File::File(const char* aFileName, const char* mode) :
}
bool
File
::
open
()
File
_class
::
open
()
{
return
open
(
m_fileName
,
m_fileMode
);
}
bool
File
::
open
(
const
char
*
aFileName
,
const
char
*
mode
)
File
_class
::
open
(
const
char
*
aFileName
,
const
char
*
mode
)
{
if
(
m_fileName
!=
aFileName
){
/**
...
...
@@ -116,21 +116,21 @@ File::open(const char* aFileName, const char* mode)
return
rc
;
}
File
::~
File
()
File
_class
::~
File_class
()
{
close
();
}
bool
File
::
remove
()
File
_class
::
remove
()
{
// Close the file first!
close
();
return
File
::
remove
(
m_fileName
);
return
File
_class
::
remove
(
m_fileName
);
}
bool
File
::
close
()
File
_class
::
close
()
{
bool
rc
=
true
;
if
(
m_file
!=
NULL
)
...
...
@@ -144,55 +144,55 @@ File::close()
}
int
File
::
read
(
void
*
buf
,
size_t
itemSize
,
size_t
nitems
)
const
File
_class
::
read
(
void
*
buf
,
size_t
itemSize
,
size_t
nitems
)
const
{
return
::
fread
(
buf
,
itemSize
,
nitems
,
m_file
);
}
int
File
::
readChar
(
char
*
buf
,
long
start
,
long
length
)
const
File
_class
::
readChar
(
char
*
buf
,
long
start
,
long
length
)
const
{
return
::
fread
((
void
*
)
&
buf
[
start
],
1
,
length
,
m_file
);
}
int
File
::
readChar
(
char
*
buf
)
File
_class
::
readChar
(
char
*
buf
)
{
return
readChar
(
buf
,
0
,
strlen
(
buf
));
}
int
File
::
write
(
const
void
*
buf
,
size_t
size
,
size_t
nitems
)
File
_class
::
write
(
const
void
*
buf
,
size_t
size
,
size_t
nitems
)
{
return
::
fwrite
(
buf
,
size
,
nitems
,
m_file
);
}
int
File
::
writeChar
(
const
char
*
buf
,
long
start
,
long
length
)
File
_class
::
writeChar
(
const
char
*
buf
,
long
start
,
long
length
)
{
return
::
fwrite
((
const
void
*
)
&
buf
[
start
],
sizeof
(
char
),
length
,
m_file
);
}
int
File
::
writeChar
(
const
char
*
buf
)
File
_class
::
writeChar
(
const
char
*
buf
)
{
return
writeChar
(
buf
,
0
,
::
strlen
(
buf
));
}
long
File
::
size
()
const
File
_class
::
size
()
const
{
return
File
::
size
(
m_file
);
return
File
_class
::
size
(
m_file
);
}
const
char
*
File
::
getName
()
const
File
_class
::
getName
()
const
{
return
m_fileName
;
}
int
File
::
flush
()
const
File
_class
::
flush
()
const
{
#if defined NDB_OSE || defined NDB_SOFTOSE
::
fflush
(
m_file
);
...
...
ndb/src/common/util/strlcat.c
View file @
7d649638
...
...
@@ -39,6 +39,7 @@
//#include <NdbString.h>
#ifndef HAVE_STRLCAT
size_t
strlcat
(
char
*
dst
,
const
char
*
src
,
size_t
dst_sz
)
{
...
...
ndb/src/kernel/blocks/dbtux/Dbtux.hpp
View file @
7d649638
...
...
@@ -83,6 +83,9 @@
#define jamEntry() jamEntryLine(90000 + __LINE__)
#endif
#undef max
#undef min
class
Configuration
;
class
Dbtux
:
public
SimulatedBlock
{
...
...
ndb/src/rep/RepComponents.hpp
View file @
7d649638
...
...
@@ -26,7 +26,6 @@
#include <rep/rep_version.hpp>
/**
* Connection data
*/
...
...
ndb/src/rep/rep_version.hpp
View file @
7d649638
...
...
@@ -29,7 +29,7 @@
extern
"C"
void
DBUG_PRINT
(
const
char
*
fmt
,
...);
DBUG_PRINT
__
(
const
char
*
fmt
,
...);
extern
"C"
void
...
...
ndb/src/rep/storage/GCIContainer.hpp
View file @
7d649638
...
...
@@ -17,6 +17,8 @@
#ifndef GCI_CONTAINER_HPP
#define GCI_CONTAINER_HPP
#undef swap
#include <Vector.hpp>
#include "LogRecord.hpp"
...
...
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