into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
SCCS merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug23159
mysql-test/r/ps.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
SCCS merged
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';. Documentation should be
updated.
mysql-test/r/ps.result:
Update result for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
mysql-test/t/ps.test:
Update test case for bug#16365: Prepared Statements: DoS with too many
open statements, according to bug#23159: prepared_stmt_count should be
status variable.
sql/mysqld.cc:
Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
Remove prepared_stmt_count as system variable.
into bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
into bodhi.local:/opt/local/work/mysql-4.1-runtime
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/mysqld.cc:
Manual merge
storage/myisam/sort.c:
Manual merge
It's not possible to flush the global status variables in 5.0
Update test case so it works by recording the value of handle_rollback
before and compare it to the value after
mysql-test/r/innodb_mysql.result:
Update result file
mysql-test/t/innodb_mysql.test:
It's not possible to reset the global status variables in 5.0 so intead its value
is recorded and compared to the after value.
It should not have changed.
sql/mysqld.cc:
Improve comments
sql/set_var.cc:
Improve comments
sql/sql_class.cc:
Improve comments
sql/sql_class.h:
Improve comments
Note: bug#21726 does not directly apply to 4.1, as it doesn't have stored
procedures. However, 4.1 had some bugs that were fixed in 5.0 by the
patch for bug#21726, and this patch is a backport of those fixes.
Namely, in 4.1 it fixes:
- LAST_INSERT_ID(expr) didn't return value of expr (4.1 specific).
- LAST_INSERT_ID() could return the value generated by current
statement if the call happens after the generation, like in
CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY, j INT);
INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID());
- Redundant binary log LAST_INSERT_ID_EVENTs could be generated.
mysql-test/r/rpl_insert_id.result:
Add result for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
mysql-test/t/rpl_insert_id.test:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
sql/item_func.cc:
Add implementation of Item_func_last_insert_id::fix_fields(), where we
set THD::last_insert_id_used when statement calls LAST_INSERT_ID().
In Item_func_last_insert_id::val_int(), return THD::current_insert_id
if called like LAST_INSERT_ID(), otherwise return value of argument if
called like LAST_INSERT_ID(expr).
sql/item_func.h:
Add declaration of Item_func_last_insert_id::fix_fields().
sql/log_event.cc:
Do not set THD::last_insert_id_used on LAST_INSERT_ID_EVENT. Though we
know the statement will call LAST_INSERT_ID(), it wasn't called yet.
sql/set_var.cc:
In sys_var_last_insert_id::value_ptr(), set THD::last_insert_id_used,
and return THD::current_insert_id for @@LAST_INSERT_ID.
sql/sql_class.h:
Update comments.
Remove THD::insert_id(), as it has lost its purpose now.
sql/sql_insert.cc:
Now it is OK to read THD::last_insert_id directly.
sql/sql_load.cc:
Now it is OK to read THD::last_insert_id directly.
sql/sql_parse.cc:
In mysql_execute_command(), remember THD::last_insert_id (first
generated value of the previous statement) in THD::current_insert_id,
which then will be returned for LAST_INSERT_ID() and @@LAST_INSERT_ID.
sql/sql_select.cc:
If "IS NULL" is replaced with "= <LAST_INSERT_ID>", use right value,
which is THD::current_insert_id, and also set THD::last_insert_id_used
to issue binary log LAST_INSERT_ID_EVENT.
sql/sql_update.cc:
Now it is OK to read THD::last_insert_id directly.
tests/mysql_client_test.c:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
into rolltop.ignatz42.dyndns.org:/mnt/storeage/bug19024/my51-bug19024
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/user_var.test:
Auto merged
sql/set_var.cc:
Auto merged
The server variable warning_count should include the number of warnings, errors and notes according to the manual
mysql-test/r/user_var.result:
Added warning_count results.
mysql-test/t/user_var.test:
Added test case for warning_count.
sql/set_var.cc:
Added number errors to warning_count.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
invocations of LAST_INSERT_ID.
Reding of LAST_INSERT_ID inside stored function wasn't noted by caller,
and no LAST_INSERT_ID_EVENT was issued for binary log.
The solution is to add THD::last_insert_id_used_bin_log, which is much
like THD::last_insert_id_used, but is reset only for upper-level
statements. This new variable is used to issue LAST_INSERT_ID_EVENT.
mysql-test/r/rpl_insert_id.result:
For bug#21726, add result for statement-based replication of function
calls.
mysql-test/t/rpl_insert_id.test:
For bug#21726, add test case for statement-based replication of function
calls.
sql/item_func.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
sql/log.cc:
Issue LAST_INSERT_ID_EVENT if THD::last_insert_id_used_bin_log is set.
sql/set_var.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
sql/sql_class.cc:
Initialize THD::last_insert_id_used_bin_log.
Fix typo, add whitespace.
sql/sql_class.h:
Add THD::last_insert_id_used_bin_log.
sql/sql_parse.cc:
Reset THD::last_insert_id_used_bin_log for upper-level statements.
sql/sql_select.cc:
Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
sql/item_func.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.h:
Auto merged
Non-upper-level INSERTs (the ones in the body of stored procedure,
stored function, or trigger) into a table that have AUTO_INCREMENT
column didn't affected the result of LAST_INSERT_ID() on this level.
The problem was introduced with the fix of bug 6880, which in turn was
introduced with the fix of bug 3117, where current insert_id value was
remembered on the first call to LAST_INSERT_ID() (bug 3117) and was
returned from that function until it was reset before the next
_upper-level_ statement (bug 6880).
The fix for bug#21726 brings back the behaviour of version 4.0, and
implements the following: remember insert_id value at the beginning
of the statement or expression (which at that point equals to
the first insert_id value generated by the previous statement), and
return that remembered value from LAST_INSERT_ID() or @@LAST_INSERT_ID.
Thus, the value returned by LAST_INSERT_ID() is not affected by values
generated by current statement, nor by LAST_INSERT_ID(expr) calls in
this statement.
Version 5.1 does not have this bug (it was fixed by WL 3146).
mysql-test/r/rpl_insert_id.result:
Add results for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
does not replicate statement-based.
mysql-test/t/rpl_insert_id.test:
Add test cases for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID, and bug#20339: stored procedure using LAST_INSERT_ID()
does not replicate statement-based.
sql/item_func.cc:
Add implementation of Item_func_last_insert_id::fix_fields(), where we
remember in THD::current_insert_id the first value generated during
execution of the previous statement, which is returned then from
Item_func_last_insert_id::val_int().
sql/item_func.h:
Add declaration of Item_func_last_insert_id::fix_fields().
sql/log_event.cc:
Do not set THD::last_insert_id_used on LAST_INSERT_ID_EVENT. Though we
know the statement will call LAST_INSERT_ID(), it wasn't called yet.
sql/set_var.cc:
In sys_var_last_insert_id::value_ptr() remember in
THD::current_insert_id the first value generated during execution of the
previous statement, and return this value for @@LAST_INSERT_ID.
sql/sql_class.cc:
Reset THD::last_insert_id_used after each statement execution.
sql/sql_class.h:
Rather then remember current insert_id value on first invocation of
THD::insert_id(), remember it in Item_func_last_insert_id::fix_fields(),
sys_var_last_insert_id::value_ptr(), or mysql_execute_command().
Remove THD::insert_id(), as it lost its value now.
sql/sql_insert.cc:
THD::insert_id() is removed, use THD::last_insert_id directly.
sql/sql_load.cc:
THD::insert_id() is removed, using THD::last_insert_id directly is OK.
sql/sql_parse.cc:
Remember in THD::current_insert_id first generated insert id value of
the previous statement in mysql_execute_command().
No need to reset THD::last_insert_id_used in
mysql_reset_thd_for_next_command(), it will be reset after each
statement.
sql/sql_select.cc:
If "IS NULL" is replaced with "= <LAST_INSERT_ID>", use right value,
which is THD::current_insert_id, and also set THD::last_insert_id_used
to issue binary log LAST_INSERT_ID_EVENT.
sql/sql_update.cc:
THD::insert_id() is removed, use THD::last_insert_id directly.
tests/mysql_client_test.c:
Add test case for bug#21726: Incorrect result with multiple invocations
of LAST_INSERT_ID.
into rama.(none):/home/jimw/my/mysql-5.1-clean
include/m_ctype.h:
Auto merged
include/m_string.h:
Auto merged
include/my_global.h:
Auto merged
include/my_sys.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Resolve conflict
sql/set_var.cc:
Resolve conflict
sql/slave.h:
Resolve conflict
sql/sql_class.h:
Resolve conflict
into rama.(none):/home/jimw/my/mysql-4.1-clean
include/my_global.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/mysqld.cc:
Resolve conflict
into rama.(none):/home/jimw/my/mysql-5.0-clean
include/m_ctype.h:
Auto merged
include/m_string.h:
Auto merged
include/my_global.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_class.h:
Auto merged
include/my_sys.h:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/mysqld.cc:
Resolve conflict
sql/opt_range.cc:
Resolve conflict
sql/sql_acl.cc:
Resolve conflict
into zim.(none):/home/brian/mysql/merge-5.1
sql/ha_ndbcluster.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.cc:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
include/mysql/plugin.h:
Optional to pass parameter now to init and deinit functions
sql/ha_ndbcluster.cc:
Cleanup, handlerton is now a pointer.
sql/ha_ndbcluster_binlog.cc:
Cleanup (handlerton is now a pointer)
sql/ha_ndbcluster_binlog.h:
Cleanup (handlerton is now a pointer)
sql/ha_partition.cc:
Cleaned up handlerton change
sql/handler.cc:
Cheanup of handlerton change
sql/item_sum.cc:
Cleanedup of handlerton change
sql/log.cc:
Cleanup of handlerton change
sql/mysql_priv.h:
Reverted patch for variables (what would have happen previously if a have_ would have been called that was dynamically loaded? boom!)
sql/mysqld.cc:
Cleanup of handlerton changes and reverted have variable patch
sql/partition_info.cc:
Cleanup of handlerton (we need to clean this up a bit more).
sql/set_var.cc:
Cleanup related to handlerton changes
sql/sql_cache.cc:
Handlerton changes cleanup
sql/sql_insert.cc:
Handlerton changes cleanup.
sql/sql_partition.cc:
Handlerton cleanup changes
sql/sql_plugin.cc:
Handlerton changes.
init() can now be controlled by a plugin specific startup.
There was also an issue with how we deinited the status variables. It should have been occuring before we shut down the engines.
sql/sql_select.cc:
Handlerton cleanup changes
sql/sql_show.cc:
Handlerton cleanup changes
sql/sql_table.cc:
Handlerton cleanup changes
sql/table.cc:
Cleanup
storage/archive/ha_archive.cc:
Cleanup
storage/archive/ha_archive.h:
Cleanup
storage/blackhole/ha_blackhole.cc:
Cleanup
storage/csv/ha_tina.cc:
Cleanup
storage/example/ha_example.cc:
Cleanup
storage/federated/ha_federated.cc:
Cleanup
storage/heap/ha_heap.cc:
Cleanup
storage/innobase/handler/ha_innodb.cc:
Cleanup
storage/myisam/ha_myisam.cc:
Cleanup
storage/myisammrg/ha_myisammrg.cc:
Cleanup
into bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/r/not_embedded_server.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
This is a post-review patch.
Fixes the typelib implementation, available only in 5.1.11.
--event-scheduler cmdline : DISABLED | ON | OFF | 0 | 1
DISABLED - makes the scheduler unavailable during the server run
(ON|1)- When the server is started the scheduler will be started. It can
be stopped and restarted by setting appropriate values to
GLOBAL event_scheduler
(OFF|0)- When the server is started, the scheduler won't be started. It
can be started and again stopped by setting appropriate values to
GLOBAL event_scheduler. _DEFAULT_ value
The GLOBAL variable event_scheduler can have the following values:
OFF | ON | 0 | 1
DISABLED is not possible and every attempt will end with an error that
it's not a valid value for the variable.
OFF | 0 - This is the pre-5.1.11 behavior - The scheduler stops, if not
already stopped, and can be started again by setting
the value of the variable to ON|1.
ON | 1 - This is the pre-5.1.11 behavior - The scheduler starts, if not
already started, and can be stopped again by setting the value
of the variable to OFF|0.
mysql-test/r/events.result:
update result
mysql-test/r/events_bugs.result:
update result
mysql-test/r/events_logs_tests.result:
update result
mysql-test/r/events_restart_phase1.result:
update result
mysql-test/r/events_restart_phase3.result:
update result
mysql-test/r/events_scheduling.result:
update result
mysql-test/r/events_stress.result:
update result
mysql-test/t/events.test:
update test:
2 -> off
1 -> on
mysql-test/t/events_bugs.test:
update test:
2 -> off
1 -> on
mysql-test/t/events_logs_tests.test:
update test:
2 -> off
1 -> on
mysql-test/t/events_restart_phase1.test:
update test:
2 -> off
1 -> on
mysql-test/t/events_restart_phase2-master.opt:
update master file : 1 => on
mysql-test/t/events_scheduling.test:
update test:
2 -> off
1 -> on
add tests for event_scheduler global variable representation from
SHOW VARIABLES.
mysql-test/t/events_stress.test:
update test:
2 -> off
1 -> on
sql/events.cc:
Implement two different TYPELIBs for --event-scheduler cmd line
option and for GLOBAL variable event_scheduler
--event-scheduler cmdline : DISABLED | ON | OFF | 0 | 1
DISABLED - makes the scheduler unavailable during the server run
(ON|1)- When the server is started the scheduler will be started. It can
be stopped and restarted by setting appropriate values to
GLOBAL event_scheduler
(OFF|0)- When the server is started, the scheduler won't be started. It
can be started and again stopped by setting appropriate values to
GLOBAL event_scheduler. _DEFAULT_ value
The GLOBAL variable event_scheduler can have the following values:
OFF | ON | 0 | 1
DISABLED is not possible and every attempt will end with an error that
it's not a valid value for the variable.
OFF | 0 - This is the pre-5.1.11 behavior - The scheduler stops, if not
already stopped, and can be started again by setting
the value of the variable to ON|1.
ON | 1 - This is the pre-5.1.11 behavior - The scheduler starts, if not
already started, and can be stopped again by setting the value
of the variable to OFF|0.
sql/events.h:
additional TYPELIB for GLOBAL event_scheduler
sql/mysqld.cc:
--event-scheduler should be checked against a TYPELIB and
therefore should be GET_STR, as well as we make the parameter optional.
When not provided OFF|0 is used.
sql/set_var.cc:
Implement typelib for event_scheduler variable.
If allows both INT_RESULT -> 0 | 1
and STRING_RESULT -> OFF | ON
The variable is shown as DISABLED | ON | OFF
sql/set_var.h:
Implement typelib, which expects both STRING and INT,
for event_scheduler.
into maint2.mysql.com:/data/localhome/tsmith/bk/50
mysql-test/r/heap_btree.result:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/t/heap_btree.test:
Manual merge.
into moonbone.local:/work/tmp_merge-5.1-opt-mysql
BUILD/check-cpu:
Auto merged
include/config-netware.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/ndb_condition_pushdown.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
storage/innobase/btr/btr0btr.c:
Auto merged
storage/innobase/buf/buf0buf.c:
Auto merged
storage/innobase/dict/dict0dict.c:
Auto merged
storage/innobase/fil/fil0fil.c:
Auto merged
storage/innobase/fsp/fsp0fsp.c:
Auto merged
storage/innobase/include/buf0buf.ic:
Auto merged
storage/innobase/log/log0log.c:
Auto merged
storage/innobase/log/log0recv.c:
Auto merged
storage/innobase/os/os0file.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/innobase/srv/srv0start.c:
Auto merged
storage/innobase/ut/ut0dbg.c:
Auto merged
tests/mysql_client_test.c:
Auto merged
client/mysqltest.c:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
mysql-test/t/join_outer.test:
Manual merge
sql/item_cmpfunc.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/opt_range.cc:
Manual merge
sql/sql_base.cc:
Manual merge
storage/innobase/include/btr0cur.ic:
Manual merge
storage/innobase/row/row0mysql.c:
Manual merge
used.
Sorting by RAND() uses a temporary table in order to get a correct results.
User defined variable was set during filling the temporary table and later
on it is substituted for its value from the temporary table. Due to this
it contains the last value stored in the temporary table.
Now if the result_field is set for the Item_func_set_user_var object it
updates variable from the result_field value when being sent to a client.
The Item_func_set_user_var::check() now accepts a use_result_field
parameter. Depending on its value the result_field or the args[0] is used
to get current value.
mysql-test/r/user_var.result:
Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
mysql-test/t/user_var.test:
Added a test case for bug#16861: User defined variable can have a wrong value if a tmp table was used.
sql/item_func.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Now if the result_field is set for the Item_func_set_user_var object it
updates variable from the result_field value when being sent to a client.
The Item_func_set_user_var::check() now accepts a use_result_field
parameter. Depending on its value the result_field or the args[0] is used
to get current value.
sql/item_func.h:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Added a new SUSERVAR_FUNC function type.
Updated the Item_func_set_user_var::check() function declaration.
Added the Item_func_set_user_var::send() member function.
sql/set_var.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Modified to use updated Item_func_set_user_var::check() function.
sql/sql_class.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Modified to use updated Item_func_set_user_var::check() function.
sql/sql_select.cc:
Fixed bug#16861: User defined variable can have a wrong value if a tmp table was used.
Now an Item_func_set_user_var object isn't substituted for an Item_field object after filling a temporary table.
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
__attribute__((format(...))) safely, make more use of the format attribute,
and fix some of the warnings that this turns up (plus a bonus unrelated one).
include/m_ctype.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
is available from different versions of gcc and g++.
include/my_sys.h:
Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
Fix various format specifiers
Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
Cast pointers to correct type for %lx
sql/set_var.cc:
Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
Fix format specifier
sql/slave.h:
Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
Fix number of arguments passed for formatting, and fix acl_host_or_ip being
passed instead of just the hostname.
sql/sql_class.h:
Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
Post-review fixes. Mostly whitespace, int-to-bool return value, fixed comments
sql/Makefile.am:
compile all submodules of Events before compiling the facade
sql/event_data_objects.cc:
- Use initialization list
- Clean whitespaces
- Shorten comments
- Fix comments
sql/event_data_objects.h:
- Fix whitespace
sql/event_db_repository.cc:
- Change return type from int to bool where only one error code is
returned.
- Don't use macros but get the maximal number of characters in a column
from the column
- Fix comments
- Make functions which has return value but it's not used - void.
sql/event_db_repository.h:
- Methods with only one error code int -> bool return value
- Remove declaration of fill_schema_events, a function that does not exist
sql/event_queue.cc:
- Use initialization lists
- Let find_n_remove_event delete the object thus making the code more robust.
The caller could forget to destruct the object. In addition, find_n_remove_element()
does not return a value.
- Move check_system_tables() to class Events
- Fix comments
sql/event_queue.h:
- Whitespace changes
- init_queue() should allow passing of THD
- check_system_tables moved to class Events
- find_n_remove_event() is now void
sql/event_scheduler.cc:
- Initialize res before use
- Remove end stop from message
sql/event_scheduler.h:
Add uninitialized state. The scheduler is in it before init_scheduler()
is called. The rationale is that otherwise state has no value before
the call. If the system tables were damaged the scheduler won't be initialized
but in Events::deinit() Event_scheduler::stop() will be called and this will
touch state, generating valgrind warning at minimum.
sql/events.cc:
- Whitespace changes
- Fix comments
- Make methods which have only one error code be bool instead of int
- Create temporarily a THD to be used for the initialization of Event_queue
- Event_queue::check_system_tables() moved to Events::check_system_tables
- is_started() is renamed to is_execution_of_events_started()
sql/events.h:
- Whitespace changes
- When a method returns only one error code it should be bool, not int
- is_started() renamed to is_execution_of_events_started()
sql/set_var.cc:
is_started() is renamed to is_execution_of_events_started()
sql/sql_db.cc:
The return code is not used, thus don't return anything and drop_schema_events()
is now void.
sql/sql_yacc.yy:
- Fix comments
- Remove unneeded initialization which is performed in lex_init()
sql/share/errmsg.txt:
New error message
sql/table.cc:
- Fix comments
- make table_check_intact() accespt const *table_def
sql/table.h:
Make table_check_intact() accespt const *table_def
into zim.(none):/home/brian/mysql/remove-bdb-5.1
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/backup.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/field.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/federated_transactions.test:
Merge
into zim.(none):/home/brian/mysql/dep-5.1
client/mysql.cc:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/repair.test:
Auto merged
scripts/fill_func_tables.sh:
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/set_var.cc:
Auto merged
sql/sql_update.cc:
Auto merged
storage/heap/hp_delete.c:
Auto merged
storage/myisam/mi_update.c:
Auto merged
storage/myisam/sort.c:
Auto merged
mysql-test/r/mysqldump.result:
Fixing Result
mysql-test/r/repair.result:
Fixing result
mysql-test/t/mysqldump.test:
Merging change
storage/archive/ha_archive.cc:
Merging in change
into example.com:/work/mysql-5.1-runtime-wl3337
BitKeeper/etc/ignore:
auto-union
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp_notembedded.result:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/share/errmsg.txt:
C
mysql-test/r/events_bugs.result:
update result
manual merge
mysql-test/r/ps_1general.result:
update result
manual merge
sql/sql_yacc.yy:
manual merge
sql/ha_innodb.cc:
Remove innobase_flush_log_at_trx_commit
(set srv_flush_log_at_trx_commit directly).
sql/ha_innodb.h:
Remove innobase_flush_log_at_trx_commit.
Declare srv_flush_log_at_trx_commit.
sql/mysqld.cc:
Bypass the innobase_flush_log_at_trx_commit variable.
storage/innobase/include/srv0srv.h:
Change the type of srv_flush_log_at_trx_commit.
storage/innobase/srv/srv0srv.c:
Change the type of srv_flush_log_at_trx_commit.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-libmysqld.dsp~78dc6a589e5a4149:
Auto merged
BitKeeper/deleted/.del-libmysqld.vcproj~a75d5b9a5967dea0:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/init_connect.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_create.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/r/federated.result:
Use local.
mysql-test/r/myisam.result:
Manual merge.
mysql-test/t/federated.test:
Manual merge.
mysql-test/t/myisam.test:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/set_var.cc:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_update.cc:
Manual merge.
storage/myisam/mi_create.c:
Manual merge.
BitKeeper/etc/ignore:
auto-union
mysql-test/r/events_logs_tests.result:
Auto merged
mysql-test/t/events_logs_tests.test:
Auto merged
mysql-test/t/events_stress.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/event_data_objects.cc:
manual merge
sql/events.cc:
manual merge
into gbichot3.local:/home/mysql_src/mysql-5.1
sql/ha_federated.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/handler.cc:
will fix by hand
mysql-test/extra/rpl_tests/rpl_insert_id.test:
merge
mysql-test/r/rpl_insert_id.result:
merge
sql/sql_insert.cc:
merge