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
40398f36
Commit
40398f36
authored
Feb 07, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some of the compilation warnings.
parent
8cfa84ca
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
44 additions
and
37 deletions
+44
-37
storage/connect/CMakeLists.txt
storage/connect/CMakeLists.txt
+1
-1
storage/connect/filamap.cpp
storage/connect/filamap.cpp
+0
-2
storage/connect/filamdbf.cpp
storage/connect/filamdbf.cpp
+0
-1
storage/connect/filamfix.cpp
storage/connect/filamfix.cpp
+0
-1
storage/connect/filamtxt.cpp
storage/connect/filamtxt.cpp
+0
-2
storage/connect/filamvct.cpp
storage/connect/filamvct.cpp
+0
-1
storage/connect/filamzip.cpp
storage/connect/filamzip.cpp
+0
-1
storage/connect/ha_connect.cc
storage/connect/ha_connect.cc
+15
-12
storage/connect/ha_connect.h
storage/connect/ha_connect.h
+2
-2
storage/connect/mycat.cc
storage/connect/mycat.cc
+2
-2
storage/connect/mycat.h
storage/connect/mycat.h
+3
-1
storage/connect/myconn.cpp
storage/connect/myconn.cpp
+8
-5
storage/connect/myconn.h
storage/connect/myconn.h
+3
-2
storage/connect/plgdbsem.h
storage/connect/plgdbsem.h
+2
-0
storage/connect/tabmysql.cpp
storage/connect/tabmysql.cpp
+4
-2
storage/connect/tabmysql.h
storage/connect/tabmysql.h
+4
-0
storage/connect/tabxml.cpp
storage/connect/tabxml.cpp
+0
-2
No files found.
storage/connect/CMakeLists.txt
View file @
40398f36
...
...
@@ -39,7 +39,7 @@ add_definitions( -DHUGE_SUPPORT -DZIP_SUPPORT )
#
IF
(
UNIX
)
if
(
WITH_WARNINGS
)
add_definitions
(
-Wall -Wfatal-errors -Wextra
)
add_definitions
(
-Wall -Wfatal-errors -Wextra
-Wmissing-declarations
)
message
(
STATUS
"CONNECT: GCC: All warnings enabled"
)
else
()
add_definitions
(
--no-warnings
)
...
...
storage/connect/filamap.cpp
View file @
40398f36
...
...
@@ -46,8 +46,6 @@
#include "filamap.h"
#include "tabdos.h"
bool
PushWarning
(
PGLOBAL
,
PTDBASE
);
/* --------------------------- Class MAPFAM -------------------------- */
/***********************************************************************/
...
...
storage/connect/filamdbf.cpp
View file @
40398f36
...
...
@@ -70,7 +70,6 @@
/****************************************************************************/
PQRYRES
PlgAllocResult
(
PGLOBAL
,
int
,
int
,
int
,
int
*
,
int
*
,
unsigned
int
*
,
bool
blank
=
true
,
bool
nonull
=
false
);
bool
PushWarning
(
PGLOBAL
,
PTDBASE
);
extern
"C"
int
trace
;
// The general trace value
...
...
storage/connect/filamfix.cpp
View file @
40398f36
...
...
@@ -52,7 +52,6 @@
#endif
extern
int
num_read
,
num_there
,
num_eq
[
2
];
// Statistics
bool
PushWarning
(
PGLOBAL
g
,
PTDBASE
tdbp
);
/* --------------------------- Class FIXFAM -------------------------- */
...
...
storage/connect/filamtxt.cpp
View file @
40398f36
...
...
@@ -58,8 +58,6 @@
extern
int
num_read
,
num_there
,
num_eq
[
2
];
// Statistics
extern
"C"
int
trace
;
bool
PushWarning
(
PGLOBAL
g
,
PTDBASE
tdbp
);
/* --------------------------- Class TXTFAM -------------------------- */
/***********************************************************************/
...
...
storage/connect/filamvct.cpp
View file @
40398f36
...
...
@@ -92,7 +92,6 @@ typedef struct _vecheader {
/***********************************************************************/
PVBLK
AllocValBlock
(
PGLOBAL
,
void
*
,
int
,
int
,
int
,
int
,
bool
check
=
true
,
bool
blank
=
true
);
bool
PushWarning
(
PGLOBAL
,
PTDBASE
);
/* -------------------------- Class VCTFAM --------------------------- */
...
...
storage/connect/filamzip.cpp
View file @
40398f36
...
...
@@ -62,7 +62,6 @@
/* DB static variables. */
/***********************************************************************/
extern
int
num_read
,
num_there
,
num_eq
[];
// Statistics
bool
PushWarning
(
PGLOBAL
g
,
PTDBASE
tdbp
);
/* ------------------------------------------------------------------- */
...
...
storage/connect/ha_connect.cc
View file @
40398f36
...
...
@@ -160,14 +160,13 @@ PQRYRES CSVColumns(PGLOBAL g, char *fn, char sep, char q, int hdr, int mxr);
PQRYRES
MyODBCCols
(
PGLOBAL
g
,
char
*
tab
,
char
*
dsn
);
#endif // ODBC_SUPPORT
#if defined(MYSQL_SUPPORT)
PQRYRES
MyColumns
(
PGLOBAL
g
,
char
*
host
,
char
*
db
,
char
*
user
,
char
*
pwd
,
char
*
table
,
char
*
colpat
,
int
port
,
bool
key
);
#include "tabmysql.h"
#endif // MYSQL_SUPPORT
enum
enum_field_types
PLGtoMYSQL
(
int
type
,
bool
gdf
);
#if defined(WIN32)
PQRYRES
WMIColumns
(
PGLOBAL
g
,
char
*
nsp
,
char
*
classname
,
PWMIUT
wp
=
NULL
);
#endif // WIN32
char
GetTypeID
(
char
*
type
);
bool
check_string_char_length
(
LEX_STRING
*
str
,
const
char
*
err_msg
,
uint
max_char_length
,
CHARSET_INFO
*
cs
,
bool
no_error
);
...
...
@@ -630,7 +629,9 @@ PGLOBAL ha_connect::GetPlug(THD *thd)
/****************************************************************************/
/* Return the value of an option specified in the option list. */
/****************************************************************************/
char
*
ha_connect
::
GetListOption
(
char
*
opname
,
const
char
*
oplist
,
char
*
def
)
char
*
ha_connect
::
GetListOption
(
const
char
*
opname
,
const
char
*
oplist
,
const
char
*
def
)
{
char
key
[
16
],
val
[
256
];
char
*
pk
,
*
pv
,
*
pn
;
...
...
@@ -1382,7 +1383,7 @@ int ha_connect::MakeRecord(char *buf)
if
(
xtrace
>
1
)
#if defined(MARIADB)
printf
(
"Maps: read=%
p write=%p vcol=%p defr=%p defw=%p
\n
"
,
printf
(
"Maps: read=%
08X write=%08X vcol=%08X defr=%08X defw=%08X
\n
"
,
*
table
->
read_set
->
bitmap
,
*
table
->
write_set
->
bitmap
,
*
table
->
vcol_set
->
bitmap
,
*
table
->
def_read_set
.
bitmap
,
*
table
->
def_write_set
.
bitmap
);
...
...
@@ -1577,9 +1578,9 @@ int ha_connect::CheckRecord(PGLOBAL g, const uchar *oldbuf, uchar *newbuf)
/***********************************************************************/
/* Return the string representing an operator. */
/***********************************************************************/
char
*
ha_connect
::
GetValStr
(
OPVAL
vop
,
bool
neg
)
c
onst
c
har
*
ha_connect
::
GetValStr
(
OPVAL
vop
,
bool
neg
)
{
char
*
val
;
c
onst
c
har
*
val
;
switch
(
vop
)
{
case
OP_EQ
:
...
...
@@ -3171,7 +3172,6 @@ bool ha_connect::add_fields(THD *thd, void *alt_info,
engine_option_value
*
create_options
)
{
register
Create_field
*
new_field
;
LEX
*
lex
=
thd
->
lex
;
Alter_info
*
alter_info
=
(
Alter_info
*
)
alt_info
;
Virtual_column_info
*
vcol_info
=
(
Virtual_column_info
*
)
vcolinfo
;
...
...
@@ -3271,14 +3271,16 @@ bool ha_connect::add_fields(THD *thd, void *alt_info,
*/
bool
ha_connect
::
pre_create
(
THD
*
thd
,
void
*
crt_info
,
void
*
alt_info
)
{
char
ttp
=
'?'
,
spc
=
','
,
qch
=
0
,
*
typn
=
"DOS"
;
char
*
fn
,
*
dsn
,
*
tab
,
*
db
,
*
host
,
*
user
,
*
pwd
,
*
prt
,
*
sep
,
*
inf
;
char
ttp
=
'?'
,
spc
=
','
,
qch
=
0
;
const
char
*
typn
=
"DOS"
;
const
char
*
user
;
char
*
host
,
*
db
,
*
pwd
,
*
tab
,
*
dsn
;
char
*
fn
,
*
prt
,
*
sep
,
*
inf
;
#if defined(WIN32)
char
*
nsp
=
NULL
,
*
cls
=
NULL
;
#endif // WIN32
int
port
=
MYSQL_PORT
,
hdr
=
0
,
mxr
=
0
;
bool
b
=
false
,
ok
=
false
,
info
=
false
;
LEX
*
lex
=
thd
->
lex
;
LEX_STRING
*
comment
,
*
name
;
HA_CREATE_INFO
*
create_info
=
(
HA_CREATE_INFO
*
)
crt_info
;
engine_option_value
*
pov
;
...
...
@@ -3286,7 +3288,8 @@ bool ha_connect::pre_create(THD *thd, void *crt_info, void *alt_info)
PCOLRES
crp
;
PGLOBAL
g
=
GetPlug
(
thd
);
fn
=
dsn
=
tab
=
db
=
host
=
user
=
pwd
=
prt
=
sep
=
inf
=
NULL
;
fn
=
dsn
=
tab
=
db
=
host
=
pwd
=
prt
=
sep
=
inf
=
NULL
;
user
=
NULL
;
if
(
g
)
{
// Set default values
...
...
storage/connect/ha_connect.h
View file @
40398f36
...
...
@@ -241,7 +241,7 @@ class ha_connect: public handler
*/
virtual
const
COND
*
cond_push
(
const
COND
*
cond
);
PFIL
CheckCond
(
PGLOBAL
g
,
PFIL
filp
,
AMT
tty
,
Item
*
cond
);
char
*
GetValStr
(
OPVAL
vop
,
bool
neg
);
c
onst
c
har
*
GetValStr
(
OPVAL
vop
,
bool
neg
);
/**
Number of rows in table. It will only be called if
...
...
@@ -346,7 +346,7 @@ char *GetValStr(OPVAL vop, bool neg);
int
optimize
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
protected:
char
*
GetListOption
(
c
har
*
opname
,
const
char
*
oplist
,
char
*
def
=
NULL
);
char
*
GetListOption
(
c
onst
char
*
opname
,
const
char
*
oplist
,
const
char
*
def
=
NULL
);
char
*
encode
(
PGLOBAL
g
,
char
*
cnm
);
bool
add_fields
(
THD
*
thd
,
void
*
alter_info
,
LEX_STRING
*
field_name
,
...
...
storage/connect/mycat.cc
View file @
40398f36
...
...
@@ -182,7 +182,7 @@ PQRYRES PlgAllocResult(PGLOBAL g, int ncol, int maxres, int ids,
/* Get a unique char identifier for types. The letter used are: */
/* ABCDEF..I.KLM.O..R.T.VWXY.. */
/***********************************************************************/
char
GetTypeID
(
char
*
type
)
char
GetTypeID
(
c
onst
c
har
*
type
)
{
return
(
!
type
)
?
'D'
// DOS (default)
:
(
!
stricmp
(
type
,
"FMT"
))
?
'T'
// CSV
...
...
@@ -569,7 +569,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am)
/* Get a unique char identifier for types. The letter used are: */
/* ABCDEF..IJKLM.OPQRSTUVWXYZ and Allocate table definition class */
/*********************************************************************/
tc
=
GetTypeID
(
(
char
*
)
am
);
tc
=
GetTypeID
(
am
);
switch
(
tc
)
{
case
'F'
:
...
...
storage/connect/mycat.h
View file @
40398f36
...
...
@@ -24,6 +24,8 @@
#include "block.h"
#include "catalog.h"
char
GetTypeID
(
const
char
*
type
);
/***********************************************************************/
/* MYCAT: class for managing the CONNECT plugin DB items. */
/***********************************************************************/
...
...
@@ -61,4 +63,4 @@ class MYCAT : public CATALOG {
ha_connect
*
Hc
;
// The Connect handler
};
// end of class MYCAT
#endif
__MYCAT__H
#endif
/* __MYCAT__H */
storage/connect/myconn.cpp
View file @
40398f36
...
...
@@ -94,7 +94,9 @@ int MYSQLC::GetResultSize(PGLOBAL g, PSZ sql)
/***********************************************************************/
/* Open a MySQL (remote) connection. */
/***********************************************************************/
int
MYSQLC
::
Open
(
PGLOBAL
g
,
PSZ
host
,
PSZ
db
,
PSZ
user
,
PSZ
pwd
,
int
pt
)
int
MYSQLC
::
Open
(
PGLOBAL
g
,
const
char
*
host
,
const
char
*
db
,
const
char
*
user
,
const
char
*
pwd
,
int
pt
)
{
m_DB
=
mysql_init
(
NULL
);
...
...
@@ -182,7 +184,7 @@ int MYSQLC::KillQuery(ulong id)
{
char
kill
[
20
];
sprintf
(
kill
,
"KILL QUERY %u"
,
id
);
sprintf
(
kill
,
"KILL QUERY %u"
,
(
unsigned
int
)
id
);
return
(
m_DB
)
?
mysql_query
(
m_DB
,
kill
)
:
1
;
}
// end of KillQuery
...
...
@@ -477,7 +479,7 @@ PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb)
}
// endif m_Row
for
(
crp
=
qrp
->
Colresp
;
crp
;
crp
=
crp
->
Next
)
{
if
(
row
=
m_Row
+
(
crp
->
Ncol
-
1
))
if
(
(
row
=
m_Row
+
(
crp
->
Ncol
-
1
)))
{
if
(
*
row
)
crp
->
Kdata
->
SetValue
((
PSZ
)
*
row
,
n
);
else
{
...
...
@@ -486,10 +488,11 @@ PQRYRES MYSQLC::GetResult(PGLOBAL g, bool pdb)
crp
->
Kdata
->
Reset
(
n
);
}
// endelse *row
}
}
// endfor crp
}
// endfor crp
}
// endfor n
}
// endfor n
qrp
->
Nblin
=
n
;
return
qrp
;
...
...
storage/connect/myconn.h
View file @
40398f36
...
...
@@ -59,8 +59,9 @@ class DllItem MYSQLC {
// int GetCurPos(void) {return (m_Res) ? N : 0;}
// int GetProgCur(void) {return N;}
int
GetResultSize
(
PGLOBAL
g
,
PSZ
sql
);
int
Open
(
PGLOBAL
g
,
PSZ
host
,
PSZ
db
,
PSZ
user
=
"root"
,
PSZ
pwd
=
"*"
,
int
pt
=
0
);
int
Open
(
PGLOBAL
g
,
const
char
*
host
,
const
char
*
db
,
const
char
*
user
=
"root"
,
const
char
*
pwd
=
"*"
,
int
pt
=
0
);
ulong
GetThreadID
(
void
);
ulong
ServerVersion
(
void
);
const
char
*
ServerInfo
(
void
);
...
...
storage/connect/plgdbsem.h
View file @
40398f36
...
...
@@ -521,3 +521,5 @@ DllExport void NewPointer(PTABS, void *, void *);
FILE
*
global_fopen
(
GLOBAL
*
g
,
int
msgid
,
const
char
*
path
,
const
char
*
mode
);
int
global_open
(
GLOBAL
*
g
,
int
msgid
,
const
char
*
filename
,
int
flags
);
int
global_open
(
GLOBAL
*
g
,
int
msgid
,
const
char
*
filename
,
int
flags
,
int
mode
);
bool
PushWarning
(
PGLOBAL
,
PTDBASE
);
storage/connect/tabmysql.cpp
View file @
40398f36
...
...
@@ -78,8 +78,10 @@ PQRYRES PlgAllocResult(PGLOBAL g, int ncol, int maxres, int ids,
/* of a MySQL table that will be retrieved by GetData commands. */
/* key = TRUE when called from Create Table to get key informations. */
/************************************************************************/
PQRYRES
MyColumns
(
PGLOBAL
g
,
char
*
host
,
char
*
db
,
char
*
user
,
char
*
pwd
,
char
*
table
,
char
*
colpat
,
int
port
,
bool
key
)
PQRYRES
MyColumns
(
PGLOBAL
g
,
const
char
*
host
,
const
char
*
db
,
const
char
*
user
,
const
char
*
pwd
,
const
char
*
table
,
const
char
*
colpat
,
int
port
,
bool
key
)
{
static
int
dbtype
[]
=
{
DB_CHAR
,
DB_SHORT
,
DB_CHAR
,
DB_INT
,
DB_INT
,
DB_SHORT
,
DB_CHAR
,
DB_CHAR
};
...
...
storage/connect/tabmysql.h
View file @
40398f36
...
...
@@ -137,3 +137,7 @@ class MYSQLCOL : public COLBLK {
int
Rank
;
// Rank (position) number in the query
};
// end of class MYSQLCOL
PQRYRES
MyColumns
(
PGLOBAL
g
,
const
char
*
host
,
const
char
*
db
,
const
char
*
user
,
const
char
*
pwd
,
const
char
*
table
,
const
char
*
colpat
,
int
port
,
bool
key
);
storage/connect/tabxml.cpp
View file @
40398f36
...
...
@@ -59,8 +59,6 @@ extern int trace;
#define XMLSUP "libxml2"
#endif // !WIN32
bool
PushWarning
(
PGLOBAL
g
,
PTDBASE
tdbp
);
/* -------------- Implementation of the XMLDEF class ---------------- */
/***********************************************************************/
...
...
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