mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix gcc compiler warnings reported by Sergei
modified: storage/connect/array.cpp modified: storage/connect/array.h modified: storage/connect/blkfil.cpp modified: storage/connect/blkfil.h modified: storage/connect/block.h modified: storage/connect/colblk.cpp modified: storage/connect/colblk.h modified: storage/connect/csort.h modified: storage/connect/filamvct.cpp modified: storage/connect/filter.cpp modified: storage/connect/filter.h modified: storage/connect/global.h modified: storage/connect/json.h modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/tabcol.cpp modified: storage/connect/tabcol.h modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabjson.cpp modified: storage/connect/table.cpp modified: storage/connect/tabodbc.cpp modified: storage/connect/tabodbc.h modified: storage/connect/tabsys.h modified: storage/connect/tabxml.h modified: storage/connect/value.cpp modified: storage/connect/value.h modified: storage/connect/xindex.cpp modified: storage/connect/xindex.h modified: storage/connect/xobject.cpp modified: storage/connect/xobject.h modified: storage/connect/xtable.h Set values as nullable when retrieving catalog info modified: storage/connect/jdbconn.cpp modified: storage/connect/mysql-test/connect/r/odbc_oracle.result modified: storage/connect/odbconn.cpp Change format of Jpath modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/mysql-test/connect/r/json.result modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/r/json_udf_bin.result modified: storage/connect/mysql-test/connect/r/zip.result modified: storage/connect/mysql-test/connect/t/json.test modified: storage/connect/mysql-test/connect/t/json_udf.test modified: storage/connect/mysql-test/connect/t/json_udf_bin.test modified: storage/connect/mysql-test/connect/t/zip.test modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/tabmgo.cpp Change null representation from ??? to <null> modified: storage/connect/json.cpp Change the name of UDF that are equal to a native JSON function name modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/t/json_udf2.inc Fix bug in making JSON project info modified: storage/connect/mongofam.cpp Fix COMPUTE when one argument is null modified: storage/connect/value.cpp Value is null only when nullable modified: storage/connect/value.h
This commit is contained in:
@@ -42,7 +42,8 @@ int MYSQLtoPLG(char *typname, char *var)
|
||||
type = TYPE_INT;
|
||||
else if (!stricmp(typname, "smallint"))
|
||||
type = TYPE_SHORT;
|
||||
else if (!stricmp(typname, "char") || !stricmp(typname, "varchar"))
|
||||
else if (!stricmp(typname, "char") || !stricmp(typname, "varchar") ||
|
||||
!stricmp(typname, "enum") || !stricmp(typname, "set"))
|
||||
type = TYPE_STRING;
|
||||
else if (!stricmp(typname, "double") || !stricmp(typname, "float") ||
|
||||
!stricmp(typname, "real"))
|
||||
@@ -87,10 +88,12 @@ int MYSQLtoPLG(char *typname, char *var)
|
||||
else if (!stricmp(typname, "year"))
|
||||
*var = 'Y';
|
||||
|
||||
} else if (type == TYPE_STRING && !stricmp(typname, "varchar"))
|
||||
// This is to make the difference between CHAR and VARCHAR
|
||||
*var = 'V';
|
||||
else if (type == TYPE_ERROR && xconv == TPC_SKIP)
|
||||
} else if (type == TYPE_STRING) {
|
||||
if (!stricmp(typname, "varchar"))
|
||||
// This is to make the difference between CHAR and VARCHAR
|
||||
*var = 'V';
|
||||
|
||||
} else if (type == TYPE_ERROR && xconv == TPC_SKIP)
|
||||
*var = 'K';
|
||||
else
|
||||
*var = 0;
|
||||
@@ -266,9 +269,9 @@ int MYSQLtoPLG(int mytype, char *var)
|
||||
/************************************************************************/
|
||||
/* Returns the format corresponding to a MySQL date type number. */
|
||||
/************************************************************************/
|
||||
char *MyDateFmt(int mytype)
|
||||
PCSZ MyDateFmt(int mytype)
|
||||
{
|
||||
char *fmt;
|
||||
PCSZ fmt;
|
||||
|
||||
switch (mytype) {
|
||||
case MYSQL_TYPE_TIMESTAMP:
|
||||
@@ -294,9 +297,9 @@ char *MyDateFmt(int mytype)
|
||||
/************************************************************************/
|
||||
/* Returns the format corresponding to a MySQL date type name. */
|
||||
/************************************************************************/
|
||||
char *MyDateFmt(char *typname)
|
||||
PCSZ MyDateFmt(char *typname)
|
||||
{
|
||||
char *fmt;
|
||||
PCSZ fmt;
|
||||
|
||||
if (!stricmp(typname, "datetime") || !stricmp(typname, "timestamp"))
|
||||
fmt = "YYYY-MM-DD hh:mm:ss";
|
||||
|
Reference in New Issue
Block a user