summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-03-08 14:29:29 +0100
committerunknown <msvensson@pilot.blaudden>2007-03-08 14:29:29 +0100
commit10ddaa78536cadbebaa20c7afd0d0a95ef1208a1 (patch)
treeed3ed56ba2a4d52d02f92e0fce49a5c2ae360368 /sql
parent90f02ac8616484ca3fe2d78ab95fbb58cae6666a (diff)
downloadmariadb-git-10ddaa78536cadbebaa20c7afd0d0a95ef1208a1.tar.gz
Fix 6 warnings from win64, where one is a potential bug.
sql/event_data_objects.cc: Passing time as time_t to function my_time_t requires cast to my_time_t since my_time_t are only required to be 32bits. sql/log.cc: Using time_t instead of my_time_t when calculating current_time. This is a potential bugfix for problem with mysql_system_db reporting slow log as crashed. sql/sql_show.cc: Passing time as time_t to function my_time_t requires cast to my_time_t since my_time_t are only required to be 32bits.
Diffstat (limited to 'sql')
-rw-r--r--sql/event_data_objects.cc4
-rw-r--r--sql/log.cc2
-rw-r--r--sql/sql_show.cc7
3 files changed, 7 insertions, 6 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index dad8aeb2e20..9999424ad60 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -535,7 +535,7 @@ Event_parse_data::init_ends(THD *thd)
Check whether ENDS is not in the past.
*/
DBUG_PRINT("info", ("ENDS after NOW?"));
- my_tz_UTC->gmt_sec_to_TIME(&ltime_now, thd->query_start());
+ my_tz_UTC->gmt_sec_to_TIME(&ltime_now, (my_time_t)thd->query_start());
if (my_time_compare(&ltime_now, &ltime) == 1)
goto error_bad_params;
@@ -1266,7 +1266,7 @@ Event_queue_element::compute_next_execution_time()
goto ret;
}
- my_tz_UTC->gmt_sec_to_TIME(&time_now, current_thd->query_start());
+ my_tz_UTC->gmt_sec_to_TIME(&time_now, (my_time_t)current_thd->query_start());
DBUG_PRINT("info",("NOW: [%lu]",
(ulong) TIME_to_ulonglong_datetime(&time_now)));
diff --git a/sql/log.cc b/sql/log.cc
index 3bb8d9576ba..deb77890f35 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -899,7 +899,7 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length,
bool is_command= FALSE;
char user_host_buff[MAX_USER_HOST_SIZE];
- my_time_t current_time;
+ time_t current_time;
Security_context *sctx= thd->security_ctx;
uint user_host_len= 0;
longlong query_time= 0, lock_time= 0;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 881cf7dc6c4..a91eb28b191 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3981,20 +3981,21 @@ static void store_schema_partitions_record(THD *thd, TABLE *schema_table,
if (stat_info.create_time)
{
thd->variables.time_zone->gmt_sec_to_TIME(&time,
- stat_info.create_time);
+ (my_time_t)stat_info.create_time);
table->field[18]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[18]->set_notnull();
}
if (stat_info.update_time)
{
thd->variables.time_zone->gmt_sec_to_TIME(&time,
- stat_info.update_time);
+ (my_time_t)stat_info.update_time);
table->field[19]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[19]->set_notnull();
}
if (stat_info.check_time)
{
- thd->variables.time_zone->gmt_sec_to_TIME(&time, stat_info.check_time);
+ thd->variables.time_zone->gmt_sec_to_TIME(&time,
+ (my_time_t)stat_info.check_time);
table->field[20]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[20]->set_notnull();
}