Loading include/my_time.h +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ void init_time(void); my_time_t my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap); void set_zero_time(MYSQL_TIME *tm); C_MODE_END #endif /* _my_time_h_ */ innobase/srv/srv0start.c +4 −3 Original line number Diff line number Diff line Loading @@ -1587,9 +1587,10 @@ NetWare. */ fprintf(stderr, "InnoDB: You have now successfully upgraded to the multiple tablespaces\n" "InnoDB: format. You should NOT DOWNGRADE again to an earlier version of\n" "InnoDB: InnoDB! But if you absolutely need to downgrade, see section 4.6 of\n" "InnoDB: http://www.innodb.com/ibman.php for instructions.\n"); "InnoDB: format. You should NOT DOWNGRADE to an earlier version of\n" "InnoDB: InnoDB! But if you absolutely need to downgrade, see\n" "InnoDB: http://dev.mysql.com/doc/mysql/en/Multiple_tablespaces.html\n" "InnoDB: for instructions.\n"); } if (srv_force_recovery == 0) { Loading libmysql/libmysql.c +0 −7 Original line number Diff line number Diff line Loading @@ -3167,13 +3167,6 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, Fetch and conversion of result set rows (binary protocol). *********************************************************************/ static void set_zero_time(MYSQL_TIME *tm) { bzero((void *)tm, sizeof(*tm)); tm->time_type= MYSQL_TIMESTAMP_NONE; } /* Read date, (time, datetime) value from network buffer and store it in MYSQL_TIME structure. Loading sql-common/my_time.c +10 −0 Original line number Diff line number Diff line Loading @@ -716,3 +716,13 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap) return (my_time_t) tmp; } /* my_system_gmt_sec */ /* Set MYSQL_TIME structure to 0000-00-00 00:00:00.000000 */ void set_zero_time(MYSQL_TIME *tm) { bzero((void*) tm, sizeof(*tm)); tm->time_type= MYSQL_TIMESTAMP_NONE; } sql/sql_prepare.cc +30 −20 Original line number Diff line number Diff line Loading @@ -329,15 +329,22 @@ static void set_param_double(Item_param *param, uchar **pos, ulong len) } #ifndef EMBEDDED_LIBRARY /* Read date/time/datetime parameter values from network (binary protocol). See writing counterparts of these functions in libmysql.c (store_param_{time,date,datetime}). */ static void set_param_time(Item_param *param, uchar **pos, ulong len) { ulong length; uint day; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 8) if (length >= 8) { uchar *to= *pos; TIME tm; uint day; tm.neg= (bool) to[0]; day= (uint) sint4korr(to+1); Loading @@ -359,21 +366,22 @@ static void set_param_time(Item_param *param, uchar **pos, ulong len) tm.second= 59; } tm.day= tm.year= tm.month= 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_TIME, MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } static void set_param_datetime(Item_param *param, uchar **pos, ulong len) { uint length; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 4) if (length >= 4) { uchar *to= *pos; TIME tm; tm.neg= 0; tm.year= (uint) sint2korr(to); Loading @@ -394,21 +402,22 @@ static void set_param_datetime(Item_param *param, uchar **pos, ulong len) tm.hour= tm.minute= tm.second= 0; tm.second_part= (length > 7) ? (ulong) sint4korr(to+7) : 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_DATETIME, MAX_DATETIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } static void set_param_date(Item_param *param, uchar **pos, ulong len) { ulong length; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 4) if (length >= 4) { uchar *to= *pos; TIME tm; /* Note, that though ranges of hour, minute and second are not checked here we rely on them being < 256: otherwise Loading @@ -421,10 +430,11 @@ static void set_param_date(Item_param *param, uchar **pos, ulong len) tm.hour= tm.minute= tm.second= 0; tm.second_part= 0; tm.neg= 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_DATE, MAX_DATE_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } Loading Loading
include/my_time.h +2 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ void init_time(void); my_time_t my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap); void set_zero_time(MYSQL_TIME *tm); C_MODE_END #endif /* _my_time_h_ */
innobase/srv/srv0start.c +4 −3 Original line number Diff line number Diff line Loading @@ -1587,9 +1587,10 @@ NetWare. */ fprintf(stderr, "InnoDB: You have now successfully upgraded to the multiple tablespaces\n" "InnoDB: format. You should NOT DOWNGRADE again to an earlier version of\n" "InnoDB: InnoDB! But if you absolutely need to downgrade, see section 4.6 of\n" "InnoDB: http://www.innodb.com/ibman.php for instructions.\n"); "InnoDB: format. You should NOT DOWNGRADE to an earlier version of\n" "InnoDB: InnoDB! But if you absolutely need to downgrade, see\n" "InnoDB: http://dev.mysql.com/doc/mysql/en/Multiple_tablespaces.html\n" "InnoDB: for instructions.\n"); } if (srv_force_recovery == 0) { Loading
libmysql/libmysql.c +0 −7 Original line number Diff line number Diff line Loading @@ -3167,13 +3167,6 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, Fetch and conversion of result set rows (binary protocol). *********************************************************************/ static void set_zero_time(MYSQL_TIME *tm) { bzero((void *)tm, sizeof(*tm)); tm->time_type= MYSQL_TIMESTAMP_NONE; } /* Read date, (time, datetime) value from network buffer and store it in MYSQL_TIME structure. Loading
sql-common/my_time.c +10 −0 Original line number Diff line number Diff line Loading @@ -716,3 +716,13 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap) return (my_time_t) tmp; } /* my_system_gmt_sec */ /* Set MYSQL_TIME structure to 0000-00-00 00:00:00.000000 */ void set_zero_time(MYSQL_TIME *tm) { bzero((void*) tm, sizeof(*tm)); tm->time_type= MYSQL_TIMESTAMP_NONE; }
sql/sql_prepare.cc +30 −20 Original line number Diff line number Diff line Loading @@ -329,15 +329,22 @@ static void set_param_double(Item_param *param, uchar **pos, ulong len) } #ifndef EMBEDDED_LIBRARY /* Read date/time/datetime parameter values from network (binary protocol). See writing counterparts of these functions in libmysql.c (store_param_{time,date,datetime}). */ static void set_param_time(Item_param *param, uchar **pos, ulong len) { ulong length; uint day; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 8) if (length >= 8) { uchar *to= *pos; TIME tm; uint day; tm.neg= (bool) to[0]; day= (uint) sint4korr(to+1); Loading @@ -359,21 +366,22 @@ static void set_param_time(Item_param *param, uchar **pos, ulong len) tm.second= 59; } tm.day= tm.year= tm.month= 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_TIME, MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } static void set_param_datetime(Item_param *param, uchar **pos, ulong len) { uint length; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 4) if (length >= 4) { uchar *to= *pos; TIME tm; tm.neg= 0; tm.year= (uint) sint2korr(to); Loading @@ -394,21 +402,22 @@ static void set_param_datetime(Item_param *param, uchar **pos, ulong len) tm.hour= tm.minute= tm.second= 0; tm.second_part= (length > 7) ? (ulong) sint4korr(to+7) : 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_DATETIME, MAX_DATETIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } static void set_param_date(Item_param *param, uchar **pos, ulong len) { ulong length; MYSQL_TIME tm; ulong length= get_param_length(pos, len); if ((length= get_param_length(pos, len)) >= 4) if (length >= 4) { uchar *to= *pos; TIME tm; /* Note, that though ranges of hour, minute and second are not checked here we rely on them being < 256: otherwise Loading @@ -421,10 +430,11 @@ static void set_param_date(Item_param *param, uchar **pos, ulong len) tm.hour= tm.minute= tm.second= 0; tm.second_part= 0; tm.neg= 0; } else set_zero_time(&tm); param->set_time(&tm, MYSQL_TIMESTAMP_DATE, MAX_DATE_WIDTH * MY_CHARSET_BIN_MB_MAXLEN); } *pos+= length; } Loading