diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-17 18:15:13 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-17 18:15:13 +0200 |
commit | fabdad6857c07c3a7ada00183ff64fda3a588bb1 (patch) | |
tree | 3c70312c702115cbf4f57134a1ec0312331b76cf /sql/structs.h | |
parent | 83a55670a68a772c52aeb7b6b9ecfc6b417255e3 (diff) | |
parent | bbf0b55c177a4c4eafe1bd1948df651eaee56827 (diff) | |
download | mariadb-git-fabdad6857c07c3a7ada00183ff64fda3a588bb1.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/structs.h')
-rw-r--r-- | sql/structs.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/structs.h b/sql/structs.h index 27acb9e200e..76129f2abf7 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -874,7 +874,13 @@ public: Timeval(my_time_t sec, ulong usec) { tv_sec= sec; - tv_usec= usec; + /* + Since tv_usec is not always of type ulong, cast usec parameter + explicitly to uint to avoid compiler warnings about losing + integer precision. + */ + DBUG_ASSERT(usec < 1000000); + tv_usec= (uint)usec; } explicit Timeval(const timeval &tv) :timeval(tv) |