| 1 |
#ifndef UNITTEST_GUNIT_MYSYS_UTIL_H_ |
| 2 |
#define UNITTEST_GUNIT_MYSYS_UTIL_H_ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#include "my_inttypes.h" |
| 32 |
#include "mysql_time.h" |
| 33 |
|
| 34 |
|
| 35 |
struct MysqlTime : public MYSQL_TIME { |
| 36 |
MysqlTime() : MysqlTime(0, 0, 0) {} |
| 37 |
|
| 38 |
MysqlTime(uint year_arg, uint month_arg, uint day_arg) |
| 39 |
: MysqlTime(year_arg, month_arg, day_arg, 0, 0, 0, 0) {} |
| 40 |
|
| 41 |
MysqlTime(uint year_arg, uint month_arg, uint day_arg, uint hour_arg, |
| 42 |
uint minute_arg, uint second_arg, ulong microsecond_arg) |
| 43 |
: MysqlTime(year_arg, month_arg, day_arg, hour_arg, minute_arg, |
| 44 |
second_arg, microsecond_arg, false, MYSQL_TIMESTAMP_DATE) {} |
| 45 |
|
| 46 |
MysqlTime(uint year_arg, uint month_arg, uint day_arg, uint hour_arg, |
| 47 |
uint minute_arg, uint second_arg, ulong microsecond_arg, |
| 48 |
int time_zone_displacement_arg) |
| 49 |
: MYSQL_TIME{year_arg, |
| 50 |
month_arg, |
| 51 |
day_arg, |
| 52 |
hour_arg, |
| 53 |
minute_arg, |
| 54 |
second_arg, |
| 55 |
microsecond_arg, |
| 56 |
false, |
| 57 |
MYSQL_TIMESTAMP_DATETIME_TZ, |
| 58 |
time_zone_displacement_arg} {} |
| 59 |
|
| 60 |
MysqlTime(uint year_arg, uint month_arg, uint day_arg, uint hour_arg, |
| 61 |
uint minute_arg, uint second_arg, ulong microsecond_arg, |
| 62 |
bool isNegative, enum_mysql_timestamp_type type) |
| 63 |
: MYSQL_TIME{year_arg, |
| 64 |
month_arg, |
| 65 |
day_arg, |
| 66 |
hour_arg, |
| 67 |
minute_arg, |
| 68 |
second_arg, |
| 69 |
microsecond_arg , |
| 70 |
isNegative , |
| 71 |
type , |
| 72 |
0 } {} |
| 73 |
}; |
| 74 |
|
| 75 |
#endif |