mariadb/tests
Alexander Nozdrin 5af51e4a3c Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME
structure buffer).

This is a follow-up for WL#4435. The bug actually existed not only
MYSQL_TYPE_DATETIME type. The problem was that Item_param::set_value()
was written in an assumption that it's working with expressions, i.e.
with basic data types.

There are two different quick fixes here:
  a) Change Item_param::make_field() -- remove setting of
     Send_field::length, Send_field::charsetnr, Send_field::flags and
     Send_field::type.

     That would lead to marshalling all data using basic types to the client
     (MYSQL_TYPE_LONGLONG, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_STRING and
     MYSQL_TYPE_NEWDECIMAL). In particular, that means, DATETIME would be
     sent as MYSQL_TYPE_STRING, TINYINT -- as MYSQL_TYPE_LONGLONG, etc.

     That could be Ok for the client, because the client library does
     reverse conversion automatically (the client program would see DATETIME
     as MYSQL_TIME object). However, there is a problem with metadata --
     the metadata would be wrong (misleading): it would say that DATETIME is
     marshaled as MYSQL_TYPE_DATETIME, not as MYSQL_TYPE_STRING.

  b) Set Item_param::param_type properly to actual underlying field type.
     That would lead to double conversion inside the server: for example,
     MYSQL_TIME-object would be converted into STRING-object
     (in Item_param::set_value()), and then converted back to MYSQL_TIME-object
     (in Item_param::send()).

     The data however would be marshalled more properly, and also metadata would
     be correct.

This patch implements b).

There is also a possibility to avoid double conversion either by clonning
the data field, or by storing a reference to it and using it on Item::send()
time. That requires more work and might be done later.
2010-11-13 18:05:02 +03:00
..
auto_increment.res
auto_increment.tst
big_record.pl A follow-up on WL#5154 and WL#5182: remove forgotten options. 2010-03-03 22:22:02 +03:00
bug25714.c Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
CMakeLists.txt Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect). 2010-08-12 19:19:57 +04:00
connect_test.c Many files: 2006-12-23 20:17:15 +01:00
deadlock_test.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
drop_test.pl
export.pl
fork2_test.pl
fork_big.pl This patch removes the remaining TYPE= code from MySQL. It cleans up a number of tests where it was being called still (and failing). Also I cleaned up all of the extra scripts so that they now work. 2006-02-12 13:26:30 -08:00
fork_big2.pl This patch removes the remaining TYPE= code from MySQL. It cleans up a number of tests where it was being called still (and failing). Also I cleaned up all of the extra scripts so that they now work. 2006-02-12 13:26:30 -08:00
function.res
function.tst
grant.pl Bug#44647 - fix file permissions. 2009-07-03 13:48:08 +02:00
grant.res
index_corrupt.pl
insert_and_repair.pl
insert_test.c Many files: 2006-12-23 20:17:15 +01:00
list_test.c Many files: 2006-12-23 20:17:15 +01:00
lock_test.pl
lock_test.res
mail_to_db.pl This patch removes the remaining TYPE= code from MySQL. It cleans up a number of tests where it was being called still (and failing). Also I cleaned up all of the extra scripts so that they now work. 2006-02-12 13:26:30 -08:00
Makefile.am Another incarnation of the patch for Bug#30708 2010-05-19 17:00:23 +04:00
myisam-big-rows.tst A follow-up on WL#5154 and WL#5182: remove forgotten options. 2010-03-03 22:22:02 +03:00
mysql_client_test.c Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME 2010-11-13 18:05:02 +03:00
pmail.pl
rename_test.pl
restore-lock.smack
select_test.c Many files: 2006-12-23 20:17:15 +01:00
showdb_test.c Many files: 2006-12-23 20:17:15 +01:00
ssl_test.c Bug #15327: configure: --with-tcp-port option being partially ignored 2007-09-13 16:19:46 +02:00
table_types.pl
test_delayed_insert.pl
thread_test.c Bug#42733: Type-punning warnings when compiling MySQL 2010-07-24 09:24:44 -03:00
truncate.pl