Commit 8a860fda authored by Olivier Bertrand's avatar Olivier Bertrand

Remove commented lines.

  modified:   storage/connect/value.cpp
Avoid warning on redefined XSTR
  modified:   storage/connect/tabxml.cpp
parent 1d239d8c
......@@ -60,7 +60,7 @@ extern "C" char version[];
#endif // !__WIN__
#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. */
......@@ -226,30 +226,30 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
more:
if (vp->atp) {
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))) {
case RC_INFO:
PushWarning(g, txmp);
case RC_OK:
strncat(fmt, "@", XSTR(fmt));
strncat(fmt, "@", XLEN(fmt));
break;
default:
goto err;
} // enswitch rc
if (j)
strncat(fmt, colname, XSTR(fmt));
strncat(fmt, colname, XLEN(fmt));
} else {
if (tdp->Usedom && node->GetType() != 1)
continue;
strncpy(colname, node->GetName(g), sizeof(colname));
strncat(xcol->Name, colname, XSTR(xcol->Name));
strncat(xcol->Name, colname, XLEN(xcol->Name));
if (j)
strncat(fmt, colname, XSTR(fmt));
strncat(fmt, colname, XLEN(fmt));
if (j < lvl && ok) {
vp = lvlp[j+1];
......@@ -267,9 +267,9 @@ PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info)
if (!vp->atp)
node = vp->nl->GetItem(g, vp->k++, node);
strncat(fmt, colname, XSTR(fmt));
strncat(fmt, "/", XSTR(fmt));
strncat(xcol->Name, "_", XSTR(xcol->Name));
strncat(fmt, colname, XLEN(fmt));
strncat(fmt, "/", XLEN(fmt));
strncat(xcol->Name, "_", XLEN(xcol->Name));
j++;
vp->n = (int)strlen(xcol->Name);
vp->m = (int)strlen(fmt);
......
......@@ -2440,7 +2440,6 @@ void DTVAL::SetTimeShift(void)
} // end of SetTimeShift
//#if defined(connect_EXPORTS)
// Added by Alexander Barkov
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, &ltime);
return tm;
} // 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 */
......@@ -2493,7 +2489,6 @@ struct tm *DTVAL::GetGmTime(struct tm *tm_buffer)
return datm;
} // end of GetGmTime
//#if defined(connect_EXPORTS)
// Added by Alexander Barkov
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, &ltime, &error_code);
return error_code ? (time_t) -1 : t;
}
//#else
//#define mktime_mysql mktime
//#endif
/***********************************************************************/
/* MakeTime: calculates a date value from a tm structures using the */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment