mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Remove commented lines.
modified: storage/connect/value.cpp Avoid warning on redefined XSTR modified: storage/connect/tabxml.cpp
This commit is contained in:
@@ -60,7 +60,7 @@ extern "C" char version[];
|
|||||||
#endif // !__WIN__
|
#endif // !__WIN__
|
||||||
|
|
||||||
#define TYPE_UNKNOWN 12 /* Must be greater than other types */
|
#define TYPE_UNKNOWN 12 /* Must be greater than other types */
|
||||||
#define XSTR(M) sizeof(M) - strlen(M) - 1 /* To avoid overflow*/
|
#define XLEN(M) sizeof(M) - strlen(M) - 1 /* To avoid overflow*/
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* Class and structure used by XMLColumns. */
|
/* Class and structure used by XMLColumns. */
|
||||||
@@ -226,30 +226,30 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
|
|||||||
more:
|
more:
|
||||||
if (vp->atp) {
|
if (vp->atp) {
|
||||||
strncpy(colname, vp->atp->GetName(g), sizeof(colname));
|
strncpy(colname, vp->atp->GetName(g), sizeof(colname));
|
||||||
strncat(xcol->Name, colname, XSTR(xcol->Name));
|
strncat(xcol->Name, colname, XLEN(xcol->Name));
|
||||||
|
|
||||||
switch (vp->atp->GetText(g, buf, sizeof(buf))) {
|
switch (vp->atp->GetText(g, buf, sizeof(buf))) {
|
||||||
case RC_INFO:
|
case RC_INFO:
|
||||||
PushWarning(g, txmp);
|
PushWarning(g, txmp);
|
||||||
case RC_OK:
|
case RC_OK:
|
||||||
strncat(fmt, "@", XSTR(fmt));
|
strncat(fmt, "@", XLEN(fmt));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto err;
|
goto err;
|
||||||
} // enswitch rc
|
} // enswitch rc
|
||||||
|
|
||||||
if (j)
|
if (j)
|
||||||
strncat(fmt, colname, XSTR(fmt));
|
strncat(fmt, colname, XLEN(fmt));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (tdp->Usedom && node->GetType() != 1)
|
if (tdp->Usedom && node->GetType() != 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
strncpy(colname, node->GetName(g), sizeof(colname));
|
strncpy(colname, node->GetName(g), sizeof(colname));
|
||||||
strncat(xcol->Name, colname, XSTR(xcol->Name));
|
strncat(xcol->Name, colname, XLEN(xcol->Name));
|
||||||
|
|
||||||
if (j)
|
if (j)
|
||||||
strncat(fmt, colname, XSTR(fmt));
|
strncat(fmt, colname, XLEN(fmt));
|
||||||
|
|
||||||
if (j < lvl && ok) {
|
if (j < lvl && ok) {
|
||||||
vp = lvlp[j+1];
|
vp = lvlp[j+1];
|
||||||
@@ -267,9 +267,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
|
|||||||
if (!vp->atp)
|
if (!vp->atp)
|
||||||
node = vp->nl->GetItem(g, vp->k++, node);
|
node = vp->nl->GetItem(g, vp->k++, node);
|
||||||
|
|
||||||
strncat(fmt, colname, XSTR(fmt));
|
strncat(fmt, colname, XLEN(fmt));
|
||||||
strncat(fmt, "/", XSTR(fmt));
|
strncat(fmt, "/", XLEN(fmt));
|
||||||
strncat(xcol->Name, "_", XSTR(xcol->Name));
|
strncat(xcol->Name, "_", XLEN(xcol->Name));
|
||||||
j++;
|
j++;
|
||||||
vp->n = (int)strlen(xcol->Name);
|
vp->n = (int)strlen(xcol->Name);
|
||||||
vp->m = (int)strlen(fmt);
|
vp->m = (int)strlen(fmt);
|
||||||
|
@@ -2440,7 +2440,6 @@ void DTVAL::SetTimeShift(void)
|
|||||||
|
|
||||||
} // end of SetTimeShift
|
} // end of SetTimeShift
|
||||||
|
|
||||||
//#if defined(connect_EXPORTS)
|
|
||||||
// Added by Alexander Barkov
|
// Added by Alexander Barkov
|
||||||
static void TIME_to_localtime(struct tm *tm, const MYSQL_TIME *ltime)
|
static void TIME_to_localtime(struct tm *tm, const MYSQL_TIME *ltime)
|
||||||
{
|
{
|
||||||
@@ -2462,9 +2461,6 @@ static struct tm *gmtime_mysql(const time_t *timep, struct tm *tm)
|
|||||||
TIME_to_localtime(tm, <ime);
|
TIME_to_localtime(tm, <ime);
|
||||||
return tm;
|
return tm;
|
||||||
} // end of gmtime_mysql
|
} // end of gmtime_mysql
|
||||||
//#else
|
|
||||||
//#define gmtime_mysql(T,B) gmtime((const time_t *)T)
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* GetGmTime: returns a pointer to a static tm structure obtained */
|
/* GetGmTime: returns a pointer to a static tm structure obtained */
|
||||||
@@ -2493,7 +2489,6 @@ struct tm *DTVAL::GetGmTime(struct tm *tm_buffer)
|
|||||||
return datm;
|
return datm;
|
||||||
} // end of GetGmTime
|
} // end of GetGmTime
|
||||||
|
|
||||||
//#if defined(connect_EXPORTS)
|
|
||||||
// Added by Alexander Barkov
|
// Added by Alexander Barkov
|
||||||
static time_t mktime_mysql(struct tm *ptm)
|
static time_t mktime_mysql(struct tm *ptm)
|
||||||
{
|
{
|
||||||
@@ -2504,9 +2499,6 @@ static time_t mktime_mysql(struct tm *ptm)
|
|||||||
time_t t= TIME_to_timestamp(current_thd, <ime, &error_code);
|
time_t t= TIME_to_timestamp(current_thd, <ime, &error_code);
|
||||||
return error_code ? (time_t) -1 : t;
|
return error_code ? (time_t) -1 : t;
|
||||||
}
|
}
|
||||||
//#else
|
|
||||||
//#define mktime_mysql mktime
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* MakeTime: calculates a date value from a tm structures using the */
|
/* MakeTime: calculates a date value from a tm structures using the */
|
||||||
|
Reference in New Issue
Block a user