Merge remote-tracking branch 'origin/develop' into MXS-472a

This commit is contained in:
counterpoint
2015-11-24 10:19:18 +00:00
5 changed files with 28 additions and 54 deletions

View File

@ -9,7 +9,7 @@ macro(set_maxscale_version)
# MaxScale version number
set(MAXSCALE_VERSION_MAJOR "1")
set(MAXSCALE_VERSION_MINOR "2")
set(MAXSCALE_VERSION_MINOR "3")
set(MAXSCALE_VERSION_PATCH "0")
set(MAXSCALE_VERSION_NUMERIC "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")
set(MAXSCALE_VERSION "${MAXSCALE_VERSION_MAJOR}.${MAXSCALE_VERSION_MINOR}.${MAXSCALE_VERSION_PATCH}")

View File

@ -90,9 +90,6 @@ extern __thread log_info_t tls_log_info;
(log_ses_count[id] > 0 && \
tls_log_info.li_enabled_logs & id)) ? true : false)
#define LOG_MAY_BE_ENABLED(id) (((lm_enabled_logfiles_bitmask & id) || \
log_ses_count[id] > 0) ? true : false)
// TODO: Add this at a later stage.
#define MXS_LOG_PRIORITY_IS_ENABLED(priority) false

View File

@ -618,12 +618,9 @@ dcb_process_victim_queue(DCB *listofdcb)
}
}
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
dcb->state = DCB_STATE_DISCONNECTED;
nextdcb = dcb->memdata.next;
@ -632,10 +629,7 @@ dcb_process_victim_queue(DCB *listofdcb)
dcb = nextdcb;
}
/** Reset threads session data */
if (LOG_IS_ENABLED(LOGFILE_TRACE))
{
tls_log_info.li_sesid = 0;
}
tls_log_info.li_sesid = 0;
}
/**

View File

@ -540,6 +540,7 @@ static bool file_write_header(
return true;
#endif
t = time(NULL);
localtime_r(&t, &tm);
header_buf1 = "\n\nMariaDB Corporation MaxScale " MAXSCALE_VERSION "\t";

View File

@ -858,12 +858,9 @@ unsigned long qtime;
if (eno == 0) {
atomic_add(&pollStats.n_write, 1);
/** Read session id to thread's local storage */
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "write_ready"))
{
@ -891,12 +888,9 @@ unsigned long qtime;
dcb->fd);
atomic_add(
&pollStats.n_accept, 1);
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "accept"))
{
@ -912,12 +906,9 @@ unsigned long qtime;
dcb->fd);
atomic_add(&pollStats.n_read, 1);
/** Read session id to thread's local storage */
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "read"))
{
@ -951,12 +942,10 @@ unsigned long qtime;
}
atomic_add(&pollStats.n_error, 1);
/** Read session id to thread's local storage */
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "error"))
{
dcb->func.error(dcb);
@ -983,12 +972,10 @@ unsigned long qtime;
dcb->flags |= DCBF_HUNG;
spinlock_release(&dcb->dcb_initlock);
/** Read session id to thread's local storage */
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "hangup EPOLLHUP"))
{
dcb->func.hangup(dcb);
@ -1019,12 +1006,10 @@ unsigned long qtime;
dcb->flags |= DCBF_HUNG;
spinlock_release(&dcb->dcb_initlock);
/** Read session id to thread's local storage */
if (LOG_MAY_BE_ENABLED(LOGFILE_TRACE))
{
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
}
dcb_get_ses_log_info(dcb,
&tls_log_info.li_sesid,
&tls_log_info.li_enabled_logs);
if (poll_dcb_session_check(dcb, "hangup EPOLLRDHUP"))
{
dcb->func.hangup(dcb);
@ -1090,10 +1075,7 @@ unsigned long qtime;
}
dcb->evq.processing = 0;
/** Reset session id from thread's local storage */
if (LOG_IS_ENABLED(LOGFILE_TRACE))
{
tls_log_info.li_sesid = 0;
}
tls_log_info.li_sesid = 0;
spinlock_release(&pollqlock);
return 1;