crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.
mysql-test/r/ps.result:
A test case for Bug#5985: test results fixed.
mysql-test/t/ps.test:
A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
server."
sql/item_func.cc:
Actual fix for Bug#5985: Item_func_rand rewritten to be
prepared statements aware.
sql/item_func.h:
Actual fix for Bug#5985: Item_func_rand rewritten to be
prepared statements aware.
sql/mysql_priv.h:
We need a separate call to reset THD state before every execute of
a prepared statement. Otherwise things like THD->user_var_events
are never cleaned up and bloat binary log (as the list of events
grows from execution to execution).
sql/sql_class.cc:
Statement::end_statement -> THD::end_statement()
(a leftover from some design change which is not to pushed now, but the
leftover is to be pushed).
sql/sql_class.h:
Statement::end_statement -> THD::end_statement()
(a leftover from some design change which is not to pushed now, but the
leftover is to be pushed).
sql/sql_lex.cc:
Move the part responsible for initializing LEX from mysql_init_query
to lex_start.
sql/sql_lex.h:
All lex-related initialization is now in lex_start.
Move thd->select_number to lex->select_number to be able to use it
easily in lex_start.
sql/sql_parse.cc:
Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
which is used in PS and conventional execution, and lex_start, used only
when we want to parse something.
Fix init_connect to use initialized THD.
sql/sql_prepare.cc:
Deploy mysql_reset_thd_for_next_query to reset THD state before
execution of a prepared statement.
Normally this should have been added to just one place, but
we have to reset thd before assigning placeholders from variables,
thus we can't do that in execute_stmt (yuck).
crashes server (prepared statements)": the bug was that all boolean
items always recovered its original arguments at statement cleanup
stage.
This collided with Item_subselect::select_transformer, which tries to
permanently change the item tree to use a transformed subselect instead of
original one.
So we had this call sequence for prepare:
mysql_stmt_prepare -> JOIN::prepare ->
Item_subselect::fix_fields -> the item tree gets transformed ->
Item_bool_rowready_func2::cleanup, item tree is recovered to original
state, while it shouldn't have been;
mysql_stmt_execute -> attempts to execute a broken tree -> crash.
Now instead of bluntly recovering all arguments of bool functions in
Item_bool_rowready_func2::cleanup, we recover only those
which were changed, and do it in one place.
There still would exist a possibility for a collision with subselect
tranformation, if permanent and temporary changes were performed at the
same stage.
But fortunately subselect transformation is always done first, so it
doesn't conflict with the optimization done by propogate_cond_constants.
Now we have:
mysql_stmt_prepare -> JOIN::prepare -> subselect transformation
permanently changes the tree -> cleanup doesn't recover anything,
because nothing was registered for recovery.
mysql_stmt_execute -> JOIN::prepare (the tree is already transformed,
so it doesn't change), JOIN::optimize ->
propogate_cond_constants -> temporary changes the item tree
with constants -> JOIN::execute -> cleanup ->
the changes done by propogate_cond_constants are recovered, as
they were registered for recovery.
mysql-test/r/ps.result:
Bug#5987: test results fixed.
mysql-test/t/ps.test:
A test for bug#5987 "subselect in bool function crashes server
(prepared statements)"
sql/item.cc:
resolve_const_item is now responsible to register all changes of the
item tree for recovery
sql/item.h:
resolve_const_item signagture changed
sql/item_cmpfunc.h:
Arguments of boolean functions are now recovered using the
centralized registry of THD.
sql/sql_class.cc:
It's crucial to add new items to the beginning of the recovery list,
so that the recovery is performed in LIFO mode: otherwise if we
change one node of a tree twice, it will be recovered to some intermediate
state.
sql/sql_select.cc:
change_cond_ref_to_const and propogate_cond_constants are now responsible
to register all changes of the item tree for recovery.
The recovery is done using the centralized THD registry of
changed tree items.
into mysql.com:/media/sda1/mysql/mysql-4.1-5748-anew
sql/item_cmpfunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
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.
mysql-test/r/ps.result:
A fix for bug#5748, test results fixed.
mysql-test/t/ps.test:
A test case for Bug#5748 "Prepared statement with BETWEEN and bigint
values crashes mysqld"
sql/item.cc:
Fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld":
First step in removing up item-specific cleanups: now all such
tree modifications should be done using the genericm mechanism implemented
in this changeset.
sql/item.h:
Fix for Bug#5748 "Prepared statement with BETWEEN and bigint values
crashes mysqld": no need for an item-specific change record any more.
sql/item_cmpfunc.cc:
A fix for Bug#5748 "Prepared statement with BETWEEN and bigint
values crashes mysqld": register item tree transformation performed by
convert_constant_item.
sql/sql_class.cc:
Implementation for item tree transformations registry.
sql/sql_class.h:
Declarations, necessary for the tree transformations registry.
sql/sql_parse.cc:
Assert that the item tree transformations registry is not used for
conventional execution.
sql/sql_prepare.cc:
Use of the item tree modifications registry in prepared statements:
rollback all modifications in the end of statement prepare and execute.
Also we now always set thd->current_arena to be able to determine that
this is an execution of prepared statement inside the registry code.
tests/client_test.c:
A typo fixed.
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-ctype-latin1_de.c~c5d8f9208bceb98e:
Auto merged
Build-tools/mysql-copyright-2:
Auto merged
acinclude.m4:
Auto merged
client/mysqladmin.c:
Auto merged
client/mysqldump.c:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/myisam.h:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/buf/buf0buf.c:
Auto merged
ltmain.sh:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/fsp/fsp0fsp.c:
Auto merged
innobase/include/dict0dict.h:
Auto merged
innobase/include/row0mysql.h:
Auto merged
innobase/log/log0log.c:
Auto merged
innobase/log/log0recv.c:
Auto merged
innobase/pars/pars0opt.c:
Auto merged
innobase/row/row0row.c:
Auto merged
innobase/sync/sync0arr.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
myisam/mi_check.c:
Auto merged
myisam/mi_close.c:
Auto merged
myisam/mi_create.c:
Auto merged
myisam/mi_locking.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysql-test/r/delete.result:
Auto merged
mysql-test/r/func_if.result:
Auto merged
Build-tools/mysql-copyright:
Merge with 4.0 (too most of the code from 4.0)
Makefile.am:
merge
client/mysql.cc:
Used 4.1 code
configure.in:
merge
innobase/os/os0file.c:
merge
innobase/row/row0mysql.c:
merge
mysql-test/r/ctype_latin1_de.result:
merge
mysql-test/r/flush_table.result:
merge
mysql-test/r/func_str.result:
merge
mysql-test/r/handler.result:
merge
mysql-test/r/multi_update.result:
merge
mysql-test/r/type_timestamp.result:
Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/r/update.result:
merge
mysql-test/t/delete.test:
merge
mysql-test/t/flush_table.test:
merge
mysql-test/t/func_str.test:
merge
mysql-test/t/handler.test:
merge
mysql-test/t/multi_update.test:
merge
mysql-test/t/type_timestamp.test:
Removed testing of 'new' mode, as this is only relevant for 4.0
mysql-test/t/update.test:
merge
mysys/errors.c:
merge
mysys/my_fstream.c:
merge
mysys/my_pread.c:
merge
mysys/my_write.c:
merge
mysys/mysys_priv.h:
merge
scripts/mysqlhotcopy.sh:
merge
sql/field.cc:
Keep code from 4.1
sql/field.h:
Keep code from 4.1
sql/ha_innodb.cc:
Don't merge lock code from 4.0; Heikki will look at this
sql/ha_myisam.cc:
merge
sql/handler.cc:
merge
sql/item_cmpfunc.cc:
merge
sql/item_cmpfunc.h:
merge
sql/item_strfunc.cc:
merge
sql/mysql_priv.h:
merge
sql/mysqld.cc:
merge
sql/protocol.cc:
merge
sql/records.cc:
merge
sql/repl_failsafe.cc:
merge
mysql-test/r/lock_multi.result:
merge
mysql-test/t/ctype_latin1_de.test:
merge
mysql-test/t/func_if.test:
merge
mysql-test/t/lock_multi.test:
merge
sql/repl_failsafe.h:
merge
Remove unnessessary header protection
sql/slave.h:
merge
sql/sql_acl.cc:
merge
sql/sql_base.cc:
merge
sql/sql_cache.cc:
auto merge
sql/sql_class.cc:
merge
sql/sql_class.h:
merge
sql/sql_delete.cc:
merge
sql/sql_handler.cc:
Get new HANDLER code into 4.1
sql/sql_parse.cc:
Keep old file
sql/sql_repl.cc:
merge
sql/sql_repl.h:
merge
sql/sql_show.cc:
merge
sql/sql_table.cc:
merge
sql/sql_union.cc:
Applied the examine_rows bug fix from 4.0 by hand
sql/sql_update.cc:
New multi-update-grant-check code from 4.0
sql/sql_yacc.yy:
New multi-update-grant-check code from 4.0
sql/stacktrace.c:
merge
sql/table.h:
merge
BUG#4335 - one name can be handler open'ed many times.
Reworked the HANDLER functions and interface.
Using a HASH to store information on open tables that
survives FLUSH TABLE.
HANDLER tables alias names must now be unique, though it
is allowed in 4.0 to qualify them with the database name
of the base table.
mysql-test/r/flush_table.result:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler test results to handler.result.
Added the new test results.
mysql-test/r/handler.result:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler test results from flush_table.result to here.
mysql-test/t/flush_table.test:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler tests to handler.test.
Added new tests.
mysql-test/t/handler.test:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Moved pure handler tests from flush_table.test to here.
sql/mysql_priv.h:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Reworked the handler interface.
sql/sql_base.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Replaced mysql_ha_close_list() by the better named
function mysql_ha_flush() with readable options.
sql/sql_class.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Added initialization for the handler tables hash.
Changed the handler tables clean-up code.
Unreleted to bug: Changed the order of THD initialization
to avoid warning messages on Linux with gcc.
sql/sql_class.h:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Added the handler tables HASH to THD.
sql/sql_handler.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Completely reworked the handler functions.
Added an introducing comment, describing the new functionality.
sql/sql_table.cc:
BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
replaced mysql_ha_close() by the better named
function mysql_ha_flush() with readable options.
with memory roots in THD/Statement/Item_arena.
Added assertions preventing memory allocation on bzero'ed MEM_ROOT since it is worked by
pure luck and was very ineffective.
include/my_sys.h:
Reimplementation of Monty's optimization of clear_alloc_root().
Now clear_alloc_root() can be used only for detaching memory associated with MEM_ROOT
(e.g. to avoid its freeing). It can not be used for MEM_ROOT initialization any longer
(it was bad idea anyway since memory allocation on such MEM_ROOT was very ineffective
and worked by pure luck).
Introduced ALLOC_ROOT_MIN_BLOCK_SIZE constant.
mysys/my_alloc.c:
Added description of init_alloc_root().
Added assertions to alloc_root() and reset_root_defaults() so now they can only be used
on previosly initialized MEM_ROOT. (It worked for bzeroed MEM_ROOT before but
by pure luck and very inefficiently). Calling free_root() on bzero'ed MEM_ROOT
is still ok (we can't remove this easily because of static MEM_ROOTs).
Also now using ALLOC_ROOT_MIN_BLOCK_SIZE constant inside these functions.
sql/opt_range.cc:
Fixed get_quick_select_for_ref() function to not use bzero'ed MEM_ROOT for allocation.
Also QUICK_RANGEs created in this function should be created in memory root of QUICK_SELECT.
sql/sql_class.cc:
Implementation of Monty's idea about clear_alloc_root() optimization and cleanup of work
with memory roots in THD/Statement/Item_arena.
Now we are always initing THD::transaction.mem_root and THD::mem_root in THD constructor
(without memory allocation and with minimal block size) and then later change their
parameters in THD::init_for_queries() (this is partially because we can't allocate anything
on bzero'ed memory roots anymore).
Item_arena() constructor is now trivial and is used only then Item_arena is created as backup
storage for other Item_arena (we use Item_arena(bool) now if it is part of Statement).
Both trivial Item_arena constructor and destructor are now inline.
Removed unneeded clear_alloc_root from Item_arena::restore_backup_item_arena().
sql/sql_class.h:
Both trivial Item_arena constructor and destructor are now inline.
Commented various Item_arena constructors.
prepared statements."
include/hash.h:
New declaration for hash_reset() function. The old version was not used.
libmysql/client_settings.h:
Declaration for mysql_detach_stmt_list().
libmysql/libmysql.c:
Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
add call to mysql_detach_stmt_list(prepared statements) to
mysql_change_user(): all statements are freed by server, so client
counterparts need to be marked as not usable.
mysys/hash.c:
Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
implementation of hash_reset(), which frees all hash elements
and prepares the hash for reuse.
sql-common/client.c:
Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
implementation of mysql_detach_stmt_list(): zero connection pointer
in given statement list, thus marking given statements as not usable.
sql/sql_class.cc:
Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
reset prepared statements map in THD::change_user().
sql/sql_class.h:
Fix for bug#5315 "mysql_change_user() doesn't free prepared statements":
implementation of Statement_map::reset().
A little cleanup of ~Statement_map(): first empty names_hash, as st_hash
has a free function, which will delete statements.
tests/client_test.c:
A test case for bug #5315 "mysql_change_user() doesn't free prepared
statements".
into build.mysql.com:/users/tulin/mysql-4.1-ndb-merge
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
server" (use my_charset_bin for stmt id hash).
sql/sql_class.cc:
Fix for bug#5399 "Wrong statement executed by MySQL server":
we hash stmt ids bytewise, need to use binary collation for it.
tests/client_test.c:
Test case for bug#5399 "Wrong statement executed by MySQL server":
create number of statements returning different results, execute them
one by one.
mysys/mf_format.c:
I think here i fixed a bug
sql/item_strfunc.cc:
mysql_real_data_home added
sql/sql_class.cc:
it's more closer to what manual says
sql/sql_load.cc:
code rewritten to be similar
sql/sql_table.cc:
mysql_real_data_home added to the path
added tests to alter table for "large" alter tables and truncates in ndbcluster
added debug printout in restart() in ndbcluster
added flag THD::transaction.on to enable/disable transaction
mysql-test/r/ndb_alter_table.result:
added tests to alter table for "large" alter tables and truncates
mysql-test/t/ndb_alter_table.test:
added tests to alter table for "large" alter tables and truncates
ndb/src/ndbapi/NdbConnection.cpp:
added debug printout in restart()
sql/ha_ndbcluster.cc:
added support for large alter table and truncate
sql/handler.cc:
renamed ha_recovery_logging to ha_enable_transaction
sql/handler.h:
renamed ha_recovery_logging to ha_enable_transaction
sql/sql_class.cc:
added flag THD::transaction.on to enable/disable transaction
sql/sql_class.h:
added flag THD::transaction.on to enable/disable transaction
sql/sql_delete.cc:
added disable transaction for mysql_truncate
sql/sql_table.cc:
renamed ha_recovery_logging to ha_enable_transaction
Add missing parameter to strxnmov() that caused some INTO OUTFILE commands to core dump
mysql-test/mysql-test-run.sh:
Ensure that clients used the supplied --socket argument
mysql-test/r/lowercase_table.result:
Remove tables used in other tests that may affect this one
mysql-test/r/rename.result:
Remove tables used in other tests that may affect this one
mysql-test/t/lowercase_table.test:
Remove tables used in other tests that may affect this one
mysql-test/t/rename.test:
Remove tables used in other tests that may affect this one
sql/item_cmpfunc.cc:
Remove not relevant comment
sql/sql_class.cc:
Add missing parameter to strxnmov() that caused some INTO OUTFILE commands to core dump
sql/sql_load.cc:
Remove extra '/' after mysql_real_data_home
sql/sql_table.cc:
Remove extra '/' after mysql_real_data_home
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_class.cc:
Manual resolve of the merge
In some places in mysqld behaviour depends on system working directory
It works badly in libmysqld because user can set it in the way he needs.
I think we should explicitly insert mysql_real_data_home value in
paths in these places
sql/sql_class.cc:
here we concat mysql_real_data_home and thd->db to be the prefix
sql/sql_load.cc:
it's better to build the prefix from mysql_real_data_home
also i think it's better always to call my_load_path to not to depend
of current system working directory
execute crashes server": we were deleting lex->result
after each execute, but prepared statements assumed that
it's left intact.
The fix adds cleanup() method to select_result hierarchy,
so that result objects can be reused.
Plus we now need to delete result objects more wisely.
mysql-test/r/ps.result:
Test results fixed: test case for bug#5034
mysql-test/t/ps.test:
A test case for bug#5034, few followups
sql/sql_class.cc:
- fix warning in THD::THD
- implementation of cleanup() for select_result hierarchy
- select_export::send_eof was identical to
select_dump::send_eof: moved to the base class select_to_file.
- Statement::end_statement() to end lex, free items, and
delete possible select_result
sql/sql_class.h:
- select_result::cleanup() declaration
-
sql/sql_insert.cc:
- implementation of select_insert::cleanup(): currently
we always create a new instance of select_insert/
select_create on each execute.
sql/sql_lex.cc:
- with more complicated logic of freeing lex->result it's
easier to have it non-zero only if it points to a valid
result.
sql/sql_lex.h:
Now st_lex::st_lex is not empty.
sql/sql_parse.cc:
mysql_execute_command():
- delete select_result *result only if it was created in
this function.
- use end_statement() to cleanup lex and thd in the end of
each statement.
- no need to save THD::lock if this is explain. This save
apparently left from times when derived tables were
materialized here, not in open_and_lock_tables.
sql/sql_prepare.cc:
- call result->cleanup() in reset_stmt_for_execute
- now Statement is responsible for freeing its lex->result.
sql/sql_select.cc:
handle_select():
- don't delete result, it might be needed
for next executions
- result is never null
include/config-win.h:
Undefine ERROR #defined by WINGDI
sql/sql_class.cc:
Fix to compile with msvc: converted static const int Item_arena::* to enum members
sql/sql_class.h:
Fix to compile with msvc: converted static const int Item_arena::* to enum members
sql/sql_prepare.cc:
Fix to compile with msvc: converted static const int Item_arena::* to enum members
a second time". The bug was caused by incompatibility of
negations elimination algorithm and PS: during first statement
execute a subtree with negation was replaced with equivalent
subtree without NOTs.
The problem was that although this transformation was permanent,
items of the new subtree were created in execute-local memory.
The patch adds means to check if it is the first execute of a
prepared statement, and if this is the case, to allocate items
in memory of the prepared statement.
The implementation:
- backports Item_arena from 5.0
- adds Item_arena::is_stmt_prepare(),
Item_arena::is_first_stmt_execute().
- deletes THD::allocate_temporary_pool_for_ps_preparing(),
THD::free_temporary_pool_for_ps_preparing(); they
were redundant.
and adds a few invariants:
- thd->free_list never contains junk (= freed items)
- thd->current_arena is never null. If there is no
prepared statement, it points at the thd.
The rest of the patch contains mainly mechanical changes and
cleanups.
mysql-test/r/ps.result:
Test results updated (test case for Bug#4912)
mysql-test/t/ps.test:
A test case for Bug#4912 "mysqld crashs in case a statement is
executed a second time"
sql/item_cmpfunc.cc:
current_statement -> current_arena
sql/item_subselect.cc:
Statement -> Item_arena, current_statement -> current_arena
sql/item_subselect.h:
Item_subselect does not need to save thd->current_statement.
sql/item_sum.cc:
Statement -> Item_arena
sql/item_sum.h:
Statement -> Item_arena
sql/mysql_priv.h:
Statement -> Item_arena
sql/sql_base.cc:
current_statement -> current_arena
sql/sql_class.cc:
- Item_arena
- convenient set_n_backup_statement, restore_backup_statement
(nice idea, Sanja)
sql/sql_class.h:
- Item_arena: backport from 5.0
- allocate_temporary_pool_for_ps_preparing,
free_temporary_pool_for_ps_preparing removed.
sql/sql_derived.cc:
current_statement -> current_arena
sql/sql_lex.cc:
current_statement -> current_arena
sql/sql_parse.cc:
Deploy invariant that thd->free_list never contains junk items
(backport from 5.0).
sql/sql_prepare.cc:
- backporting Item_arena
- no need to allocate_temporary_pool_for_ps_preparing().
sql/sql_select.cc:
Fix for bug#4912 "mysqld crashs in case a statement is
executed a second time": if this is the first execute of
a prepared statement, negation elimination is
done in memory of the prepared statement.
sql/sql_union.cc:
Backporting Item_arena from 5.0.
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
Auto merged
Build-tools/Bootstrap:
Auto merged
Build-tools/mysql-copyright:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
Auto merged
VC++Files/innobase/innobase.dsp:
Auto merged
client/mysql.cc:
Auto merged
include/my_global.h:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/include/mtr0log.h:
Auto merged
innobase/include/mtr0log.ic:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/include/ut0dbg.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
libmysql/Makefile.am:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/conf_to_src.c:
Auto merged
libmysql/dll.c:
Auto merged
libmysql/errmsg.c:
Auto merged
libmysql/manager.c:
Auto merged
libmysql_r/Makefile.am:
Auto merged
myisam/mi_key.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/having.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/t/having.test:
Auto merged
mysql-test/t/heap.test:
Auto merged
mysql-test/t/type_date.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_uint.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.h:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_analyse.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/french/errmsg.txt:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
happen on SMP machines, when a thread is going to wait on a condition and it is KILLed at the
same time.
Cleaning code a bit by adding a test in enter_cond() that we have the mutex (was already the case in all places
where it's called except one which is fixed here).
sql/log.cc:
safe_mutex_assert_owner() is now in THD::enter_cond()
sql/slave.cc:
lock mutex before waiting on condition.
sql/sql_class.cc:
THD::awake(): before locking the mutex, let's test it's not zero;
in theory indeed, the killer thread may see current_cond non-zero and current_mutex zero
(order of assignments is not guaranteed by POSIX).
A comment noting that there is still a small chance a KILL does not work and needs
being re-issued.
sql/sql_class.h:
Assert in enter_cond() that we have the mutex.
It is already the case in all places where we call enter_cond(), so better ensure it there.
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
Build-tools/Do-compile:
Auto merged
include/my_global.h:
Auto merged
innobase/row/row0ins.c:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
innobase/fil/fil0fil.c:
merge (Use heikki's code)
Return NULL if a time argument is given to date_add(). (Warning will be shown after Dimitri's timezone patch is pushed)
client/mysqltest.c:
Added MAX_VAR_NAME which was lost in merge
Added more debugging
Fixed bug in 'eval'
innobase/data/data0type.c:
After merge fix
innobase/fil/fil0fil.c:
After merge fix
innobase/log/log0recv.c:
After merge fix
myisam/mi_unique.c:
Better checksum handling
mysql-test/r/func_time.result:
Return NULL if a time argument is given to date_add()
mysql-test/r/rpl_free_items.result:
After merge fix
mysql-test/r/rpl_get_lock.result:
Test was depending on when server was restarted.
mysql-test/r/type_date.result:
After merge fix
mysql-test/r/type_decimal.result:
After merge fix
mysql-test/t/func_time.test:
Removed comment that is not needed anymore
(After Dimitri's timezone patch is pushed, we should get a warning for the date_add(time...) entry)
mysql-test/t/rpl_get_lock.test:
Test was depending on when server was restarted.
mysql-test/t/type_date.test:
Addded missing explanation for bug
netware/mysqld_safe.c:
Removed end \r
Run program through indent-ex to get MySQL indentation
sql-common/client.c:
After merge fix
sql/field.cc:
Fixed that get_date(time) gives a warning
sql/field.h:
After merge fix
sql/net_serv.cc:
More debugging (if DEBUG_DATA_PACKETS is set)
sql/sql_class.cc:
Removed compiler warning
sql/table.cc:
Better comment
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
WL#1266 "CONVERT_TZ() - basic time with time zone conversion
function".
Fixed problems described in Bug #2336 (Different number of warnings
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated
at Field object level not in conversion functions).
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.
include/my_global.h:
Added macro for reading of 32-bit ints stored in network order from
unaligned memory location.
include/mysqld_error.h:
Added error-code for invalid timestamp warning and error-code
for wrong or unknown time zone specification.
libmysqld/Makefile.am:
Added main per-thread time zone support file to libmysqld
libmysqld/lib_sql.cc:
Added initialization of time zones infrastructure to embedded server.
mysql-test/r/connect.result:
Updated test result since now mysql database contains more
system tables.
mysql-test/r/date_formats.result:
Now when truncation occurs during conversion to datetime value we are producing Warnings
instead of Notes. Also we are giving more clear warnings about this in some cases.
mysql-test/r/func_sapdb.result:
New warnings about truncation occured during conversion to datetime value added due
their better handling.
mysql-test/r/func_time.result:
New warnings about truncation occured during conversion to datetime value added due
their better handling.
mysql-test/r/select.result:
New warnings about truncation occured during conversion to datetime value added due
their better handling. Also tweaked test a bit to made it less ambigious for reader.
mysql-test/r/system_mysql_db.result:
Updated test result because new system tables holding time zone descriptions were
added.
mysql-test/r/timezone.result:
Updated timezone.test to use new system variable which shows system time zone.
Added test of warning which is produced if someone tries to store non-existing (due
falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/r/type_datetime.result:
Separated and extended test of values and warnings produced for bad values stored in
DATETTIME fields.
mysql-test/r/type_time.result:
Now we are producing more consistent warning when we are truncating datetime value while
storing it in TIME field.
mysql-test/r/type_timestamp.result:
Separated and extended test of values and warnings produced for bad
values stored in TIMESTAMP fields.
mysql-test/t/select.test:
Updated test to make it less ambigous for reader.
mysql-test/t/timezone.test:
Updated timezone.test to use new system variable which shows system time zone.
Added test of warning which is produced if someone tries to store non-existing (due
falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/t/type_datetime.test:
Separated and extended test of values and warnings produced for bad
values stored in DATETTIME fields.
mysql-test/t/type_timestamp.test:
Separated and extended test of values and warnings produced for bad
values stored in TIMESTAMP fields.
scripts/mysql_create_system_tables.sh:
Added creation of tables with time zone descriptions.
Also added descriptions of time zones used in tests.
scripts/mysql_fix_privilege_tables.sql:
Added mysql.time_zone* tables family.
sql/Makefile.am:
Added files implementing time zone support to server, also added
rules for building of mysql_tzinfo_to_sql converter and test_time
test.
sql/field.cc:
Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
any other Field to datetime conversion (now we are generating warnings no in lower
level functions like in str_to_TIME() but in Field methods. This allows generate
better and more consistent warnings and to reuse code of str_to_TIME() outside of
server).
Added 3rd parameter to set_warning() method to be able to not increment cut fields
but still produce a warning. Also added set_datetime_warning() family of auxiliary
methods which allow easier generate datetime related warnings.
Also replaced occurences of current_thd with table->in_use member, added
asserts for catching all places there we need to set table->in_use
accordingly. Renamed fix_datetime() function to number_to_TIME() and
moved it to sql/time.cc there it fits better.
sql/field.h:
Added comment about places where we can use table->in_use member
instead of current_thd.
Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
family of methods.
sql/field_conv.cc:
Field::set_warning() method with 2 arguments was replaced with more
generic set_warning() method with 3 arguments.
sql/ha_berkeley.cc:
Now we set table->in_use for temporary tables so we have to use
table->tmp_table for checking if table is temporary.
sql/item.cc:
Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
generating analogs.
sql/item_create.cc:
Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_create.h:
Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_timefunc.cc:
Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
UNIX_TIMESTAMP functions.
Added support for CONVERT_TZ function.
Removed call to str_to_timestamp function which caused non-optimal
behavior in certain cases. Replaced calls to str_to_time() function
with its warning generating analog.
sql/item_timefunc.h:
Added support of per-thread time zone to NOW-like and
FROM_UNIXTIME, UNIX_TIMESTAMP functions.
Added support of CONVERT_TZ function.
sql/lex.h:
Added support of CONVERT_TZ function.
sql/log.cc:
Added support for replication of statements depending on time zone.
sql/mysql_priv.h:
Now including headers with per-thread time zone support functions
and classes. Added portable replacement of time_t - my_time_t type.
Added time zone as one of query distinguishing parameters for
query cache.
Fixed declarations of str_to_TIME, str_to_time and
my_system_gmt_sec (former my_gmt_sec) since now they have one more
out parameter which informs about wrong datetime value or data
truncation during conversion.
Added warning generating version of str_to_TIME() and str_to_time()
functions.
Thrown away str_to_datetime/timestamp functions since they are not
needed any longer. Added number_to_TIME function.
sql/mysqld.cc:
Added per-thread time zone support initialization.
Added new startup parameter --default-time-zone.
sql/set_var.cc:
Added support for per-thread time_zone variable.
Renamed old timezone variable to system_time_zone.
sql/set_var.h:
Added support for per-thread time_zone variable.
sql/share/czech/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/danish/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/dutch/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/english/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/estonian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/french/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/german/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/greek/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/hungarian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/italian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/japanese/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/korean/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/norwegian-ny/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/norwegian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/polish/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/portuguese/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/romanian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/russian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/serbian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/slovak/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/spanish/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/swedish/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/share/ukrainian/errmsg.txt:
Added error message for barking when incorrect time zone name or
specifiaction is provided and for warning about invalid TIMESTAMP
values (e.g. falling into the spring time-gap).
sql/slave.cc:
In order to support replication of statements using time zones in 4.1 we should
ensure that both master and slave have same default time zone.
sql/sql_base.cc:
Now we are setting TABLE::in_use member for all tables (which assume
calls to Field::store or val_ methods).
sql/sql_cache.cc:
Added time zone as one more query distinguishing parameter
for query cache.
sql/sql_class.cc:
Added THD::time_zone_used variable indicating that this query
uses per thread time zone.
sql/sql_class.h:
Added per-thread time zone variable. Added THD::time_zone_used
variable indicating that this query uses per thread time zone
so if this is updating query the time zone should be logged to
binlog.
sql/sql_insert.cc:
We should set TABLE::in_use member pointing to thread which is called
INSERT DELAYED and not to worker thread.
sql/sql_load.cc:
Field::set_warning() now has one more argument now.
sql/sql_parse.cc:
Resetting THD::time_zone_used variable in the end of query
processing.
sql/sql_select.cc:
Now we are setting TABLE::in_use member for all tables (which assume
calls to Field::store or val_ methods).
sql/sql_show.cc:
Now using per thread time zone for extended show tables.
sql/time.cc:
Added support for per-thread time zones for TIMESTAMP type and
reworked generation of warnings for TIMESTAMP and DATETIME types.
(Introduced new TIME_to_timestamp() function. Removed hours
normalisation from former my_gmt_sec() since it was not working
and not used anywhere now, but breaks parameter constness, added
to this function generation of warning if we are falling in spring
time-gap. Removed str_to_timestamp and str_to_datetime functions
which are no longer used. Moved fix_datetime function from
sql/field.cc to this file as number_to_TIME() function. Added
out parameter for str_to_TIME and str_to_time functions which
indicates if value was truncated during conversion, removed direct
generation of warnings from this functions.)
sql/unireg.cc:
Now we are setting TABLE::in_use member for all tables (which assume
calls to Field::store or val_ methods).
BitKeeper/etc/ignore:
Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
mysql-test/r/ps.result:
Better error message
mysys/my_error.c:
Comments added
sql/item.cc:
Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
sql/item.h:
Moved a chunk of code from sql_prepare.cc to Item_param::set_from_user_var
sql/item_func.cc:
Code cleanup
sql/mysql_priv.h:
Code cleanup
sql/sql_class.cc:
Code cleanup
sql/sql_parse.cc:
use user_var_entry::val_str in PREPARE stmt FROM @var.
sql/sql_prepare.cc:
Post-review fixes and code cleanup.
sql/sql_yacc.yy:
Coding style fixes
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
sql/lex.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into mysql.com:/home/mysql_src/mysql-4.1
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
by binlogging some SET ONE_SHOT CHARACTER_SETetc,
which will be enough until we have it more compact and more complete in 5.0. With the present patch,
replication will work ok between 4.1.3 master and slaves, as long as:
- master and slave have the same GLOBAL.COLLATION_SERVER
- COLLATION_DATABASE and CHARACTER_SET_DATABASE are not used
- application does not use the fact that table is created with charset of the USEd db (BUG#2326).
all of which are not too hard to fulfill.
ONE_SHOT is reserved for internal use of mysqlbinlog|mysql and works only for charsets,
so we give error if used for non-charset vars.
Fix for BUG#3875 "mysqlbinlog produces wrong ouput if query uses
variables containing quotes" and BUG#3943 "Queries with non-ASCII literals are not replicated
properly after SET NAMES".
Detecting that master and slave have different global charsets or server ids.
mysql-test/r/rpl_server_id1.result:
it's normal to not run as I have added a test to compare server ids of master and slave
at startup and stop if equal (unless --replicate-same-server-id)
mysql-test/r/rpl_user_variables.result:
result update (as we now print charset of user var).
mysql-test/r/user_var.result:
result update
mysql-test/t/rpl_server_id1.test:
no need to select as slave is not running
mysql-test/t/user_var.test:
testing if the content of user vars is escaped when mysqlbinlog prints them,
and if the name is backquoted.
sql/lex.h:
new keyword ONE_SHOT
sql/log.cc:
when writing to the binlog, before writing the actual statement, write some SET ONE_SHOT CHARACTER_SET_CLIENT etc
for the slave to know the charset variables (which are important as they affect the inserted data).
sql/log_event.cc:
print charset and collation of user var in mysqlbinlog and SHOW BINLOG EVENTS.
escape the content of the var. Backquote its name.
Will ask Bar to check that using my_charset_bin for escaping is ok.
sql/set_var.cc:
understand SET CHARACTER_SET_CLIENT=10 (don't require a string, accept a number).
Refuse changing of GLOBAL CHARACTER_SET_SERVER/COLLATION_SERVER if binlog or slave,
as it will make the master or slave make wrong assumptions.
A function to catch SET ONE_SHOT on non-charset variables (which is forbidden)
sql/set_var.h:
no_support_one_shot to know if the var supports ONE_SHOT (only charset vars do, soon timezones).
Accept int arg in SET CHARACTER_SET_etc
sql/slave.cc:
when I/O slave thread starts, verify that master's and slave charsets match.
And by the way verify that server ids are different.
Don't fail if UNIX_TIMESTAMP() can't be done on master (very old master), that's
not fatal.
sql/sql_class.cc:
one_shot
sql/sql_class.h:
one_shot
sql/sql_lex.h:
one_shot
sql/sql_parse.cc:
when SET ONE_SHOT is used, verify that it's only used for charset/collation vars;
otherwise refuse.
sql/sql_yacc.yy:
ONE_SHOT keyword in SET
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
empty recordset where some records should be found)
sql/ha_myisam.cc:
Code simplified with vio_ok()
sql/mysqld.cc:
vio_ok used
sql/slave.cc:
vio_ok used
sql/sql_class.cc:
Here is the place of the error - we should not examine net.vio in
embedded library
sql/sql_class.h:
method added to always return TRUE in embedded library, and to
sheck thd.net.vio otherwise
sql/sql_show.cc:
code simplified with vio_ok()
after Monty's review.
- Item_param was rewritten.
- it turns out that we can't convert string data to character set of
connection on the fly, because they first should be written to the binary
log.
To support efficient conversion we need to rewrite prepared statements
binlogging code first.
include/my_global.h:
Macro swap(a, b, c) was renamed to resolve name conflict with
String::swap() method.
include/my_sys.h:
Added declaration of escape_string_for_mysql()
include/mysql_com.h:
Removed and moved back: a macro which is visible to libmysql user but
has sence only in prepared statement protocol implementation.
isam/_search.c:
swap -> swap_variables
isam/test2.c:
swap -> swap_variables
libmysql/libmysql.c:
- sub_escape_string moved to mysys/charset.c to be visible in sql/
- few cleanups
myisam/mi_test2.c:
swap -> swap_variables
mysys/charset.c:
sub_escape_string was moved from libmysql.c to be able to use it in sql/
code.
mysys/my_chsize.c:
rename: swap -> swap_variables
mysys/my_compress.c:
swap -> swap_variables
mysys/my_handler.c:
swap -> swap_variables
sql/field.cc:
Field::store_time refactored to use TIME_to_string function from time.cc
sql/item.cc:
New implementation of Item_param class:
added support for character sets conversion.
sql/item.h:
Item_param:
- 'state' member introduced instead of many boolean variables.
- put ltime, int_value and real_value into union to save space.
- remove unimplemented members
- set_value renamed to set_str
sql/item_timefunc.cc:
Refactored to use functions from time.cc
sql/lock.cc:
rename: swap -> swap_variables
sql/mysql_priv.h:
- added declarations for TIME_to_ulonglong_*, TIME_to_string functions
- const specifiers for make_date, make_time, make_datetime arguments
sql/opt_range.cc:
rename: swap -> swap_variables
sql/protocol.cc:
- added character set conversion support to binary protocol.
- Protocol::convert changed to point at shared buffer in THD.
This lets us use one convert buffer for binary and simple protocol.
The same buffer is used for client->server conversions in prepared
statements code.
- string conversion code refactored to Protocol::store_string_aux function.
- few more comments
sql/protocol.h:
- Protocol::convert now points at THD::convert_buffer: we want to share one
buffer between all protocol implementations.
sql/sql_class.cc:
- implementation of THD::convert_string using THD::convert_buffer
(conversion of strings allocated in the system heap).
sql/sql_class.h:
- THD::convert_buffer is shared between THD and network Protocols and
used for character set conversion of strings.
- new function to convert String object from one charset to another using
THD::convert_buffer
sql/sql_insert.cc:
A little fix in a comment.
sql/sql_parse.cc:
Shrink convert buffer in the end of each statement.
sql/sql_prepare.cc:
Many changes:
- static specifier for set_param_* family of functions.
- FIELD_TYPE -> MYSQL_TYPE
- added set_param_binary as handler for BLOB types.
- added character set support
- added support for param typecode in mysql_stmt_get_longdata
(mysql_stmt_send_long_data handler)
- changes in Item_param deployed
- few cleanups
sql/sql_select.cc:
rename: swap -> swap_variables
sql/sql_string.cc:
- String::append rewritten to support character set conversion for
single-byte encodings.
- added String::swap method to efficiently exchange two string objects.
sql/sql_string.h:
Declraration for String::swap().
sql/time.cc:
- function TIME_to_string to convert TIME to String in default MySQL format
- family of functions TIME_to_ulonglong_*
tests/client_test.c:
Test for support for character set conversions in prepared statements
(binary and text data).
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Prefer not automatic keys before automatic keys. If there is two conf
BitKeeper/etc/ignore:
added *.d
include/my_base.h:
Added flag for automaticly generated key
mysql-test/r/constraints.result:
Update tests after bug fix
mysql-test/r/create.result:
Update tests after bug fix
mysql-test/r/innodb.result:
Added test of automatic creation of foreign keys
mysql-test/t/innodb.test:
Added test of automatic creation of foreign keys
mysql-test/t/key_cache.test:
Portability fixes (64 BIT os)
sql/sql_acl.cc:
Indentation fixes
sql/sql_class.cc:
Fix key comparison to handle prefix and optionally key segments in different order.
sql/sql_class.h:
Added flag for automaticly generated keys
sql/sql_parse.cc:
Added flag for automaticly generated keys
sql/sql_table.cc:
Don't automaticly generate a new key for a foreign key constraint if there is already a usable key.
Prefer not automatic keys before automatic keys. If there is two conflicting automatic keys, prefer the longer one.
sql/sql_yacc.yy:
Added flag for automaticly generated keys
strings/strings-x86.s:
Portability fix.
mysql-test/r/ps.result:
Added check if multiple SQL statements inside a PS are disabled
mysql-test/t/ps.test:
Added check if multiple SQL statements inside a PS are disabled