diff options
author | unknown <konstantin@mysql.com> | 2004-08-05 02:43:18 -0700 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2004-08-05 02:43:18 -0700 |
commit | f47a0b9f29787d7bf22dbb69d42335a5865a6b3f (patch) | |
tree | 666bf5af148352d23d4f336e61970b9b9c5b3461 /tests | |
parent | 61528cf2d8ecb68e6c10f50e06678043db668565 (diff) | |
download | mariadb-git-f47a0b9f29787d7bf22dbb69d42335a5865a6b3f.tar.gz |
Cleanup in libmysql.
libmysql/libmysql.c:
Cleanup of conversion part of libmysql (prepared statements protocol):
- now we have basic support for any conversion sequence:
when we don't implement direct conversion of given value to requested
buffer type (i.e. time -> double, or the other way around) we
first convert i.e. time -> string and then call string -> double
conversion.
param->offset is now handled only in one place.
- conversion functions renamed from send_data_{string, long, double}
to fetch_{string,long,double}_with_conversion. Don't be confused
with strange diff for send_data_long: I had to move send_data_string
before all other sends as it's used inside thesm. (Shall we have
a forward declaration instead?-)
- a little cleanup in read_binary_{date,time,datetime} - now type of
date value is set inside these functions, so we can be sure
that we always return fully filled MYSQL_TIME structure to the user
- float -> string conversion is fixed to honor param->precision.
This is a step forward in fixing bug#4172
tests/client_test.c:
test fix: now libmysql always sets MYSQL_TIME::time_type field.
We need to set these fields in the test as later _in values are compared
with canonical by plain memcmp.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client_test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/client_test.c b/tests/client_test.c index 3652c0f7c8e..de77d4517dd 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -9862,11 +9862,17 @@ static void test_bug4026() time_in.minute= 59; time_in.second= 59; time_in.second_part= 123456; + /* + This is not necessary, just to make assert below work: this field + is filled in when time is received from server + */ + time_in.time_type= MYSQL_TIMESTAMP_TIME; datetime_in= time_in; datetime_in.year= 2003; datetime_in.month= 12; datetime_in.day= 31; + datetime_in.time_type= MYSQL_TIMESTAMP_DATETIME; mysql_stmt_bind_param(stmt, bind); |