In server we assume that datetime values stored in MYSQL_TIME struct
are normalized (and year is not greater than 9999), so we should
perform range checks in all places then we convert something to
MYSQL_TIME.
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
of client equals to character set of connection, possibly required
conversion to character set of column is not performed
(prepared statements, data is supplied using placeholders).
Added protocol::flush() for easier embedded-server code
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
Added option --silent to client_test
positive numbers when no resultset is available": when sending
result set metadata we need to use virtual select_result::send_fields,
and not address protocol directly, because select_result descendents may
intercept result set (it's the case for example for SELECT INTO OUTFILE).
Simple optimzations and cleanups
Removed compiler warnings and fixed portability issues
Added client functions 'mysql_embedded()' to allow client to check if we are using embedded server
Fixes for purify
server".
Altough mysql_create_db()/mysql_drop_db() API calls are deprecated
since 4.0, they should not crash server and should not stall connection
in case of errors.
statements and negative time/date values".
The bug was in wrong sprintf format used in the client library.
The fix moves TIME -> string conversion functions to sql-common and
utilized them in the client library.
crashes mysqld": implementation for a generic item tree modifications
registry. Every item tree modification which should be rolled back for
subsequent execution of a prepared statement or stored procedure should
be saved in the registry. All such modifications are rolled back at once
during cleanup stage of PS.
Actual fix for the bug just adds a call to register modifications to
convert_constant_item.
Post review fixes implemented.
Run client_test as a testcase
new file
mysql-test-run.sh:
More clearly report failure if --force, also exit 1
client_test.c:
Use MAXPATHLEN in test_frm_bug()
Renable test cases disabled for running from mysql-test-run
mysqltest.c:
Don't check errno from popen, may not be set
Return exit(1) instead of exit(0) on failure.
Allow longer path names using MAXPATHLEN.
Added option --testcase that skips some failing tests.
Replaced 'return' with exit(1) in test_frm_bug().
mysqltest.c:
Let --exec fail if command fails
Statements":
- fix a couple of net->buff overruns in libmysql,
- check in the server that statement parameter count is less than
65535 (maximum value supported by prepared statements protocol).
work (prepared statements)" and after-review fixes:
- str_to_TIME renamed to str_to_datetime to pair with str_to_time
- functions str_to_time and str_to_TIME moved to sql-common
- send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE,
MYSQL_TIME_DATETIME types of user input buffers.
- few more comments in the client library
- a test case added.