into rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20836/my51-bug20836
mysql-test/r/distinct.result:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
- Post-merge cleanup.
- Disabled this bug's test for 5.x until 16861 is resolved.
mysql-test/r/distinct.result:
Bug#20836 Selecting into variables results in wrong results being returned
- Remove results for this bug. When bug number 16861 is resolved, the result
should match the 4.1 result.
mysql-test/t/distinct.test:
Bug#20836 Selecting into variables results in wrong results being returned
- Disable the test for 20836. This test should remain disabled until bug 16861
is fixed. The results for the test should be the same as in 4.1.
sql/sql_class.cc:
Bug#20836 Selecting into variables results in wrong results being returned
- Post-merge cleanup.
This error is displayed anytime the SELECT statement needs a temp table to
return correct results because the object (select_dumpvar) that represents
variables named in the INTO clause stored the results before the temp
table was considered. The problem was fixed by creating the necessary
Item_func_set_user_var objects once the correct data is ready.
mysql-test/r/distinct.result:
Bug#20836 Selecting into variables results in wrong results being returned
- Added results
mysql-test/t/distinct.test:
Bug#20836 Selecting into variables results in wrong results being returned
- Added various Selects that use the INTO statement and a temp table.
- Added Select Into Outfile variant tests also.
sql/sql_class.cc:
Bug#20836 Selecting into variables results in wrong results being returned
- The select_dumpvar variable created a Item_func_set_user_var too early
and once set, it was not possible to change. The Item_func_set_user_var
is now created once the final results are available.
sql/sql_class.h:
Bug#20836 Selecting into variables results in wrong results being returned
- Removed unnecessary object members.
into mysql.com:/home/my/mysql-5.1
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-my_lread.c:
Auto merged
BitKeeper/deleted/.del-my_lwrite.c:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqldump.c:
Auto merged
cmd-line-utils/readline/complete.c:
Auto merged
extra/yassl/src/ssl.cpp:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/csv.test:
Auto merged
mysql-test/t/ctype_cp1250_ch.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/join.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/sp-prelocking.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/default.c:
Auto merged
mysys/mf_iocache.c:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_alloc.c:
Auto merged
mysys/my_dup.c:
Auto merged
mysys/my_getwd.c:
Auto merged
mysys/my_handler.c:
Auto merged
mysys/my_lib.c:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_pread.c:
Auto merged
mysys/my_seek.c:
Auto merged
mysys/safemalloc.c:
Auto merged
sql/Makefile.am:
Auto merged
sql/filesort.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/sql_acl.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_repl.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/strfunc.cc:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/heap/_check.c:
Auto merged
storage/heap/hp_delete.c:
Auto merged
storage/heap/hp_hash.c:
Auto merged
storage/heap/hp_open.c:
Auto merged
storage/heap/hp_rkey.c:
Auto merged
storage/heap/hp_rrnd.c:
Auto merged
storage/heap/hp_write.c:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/mi_close.c:
Auto merged
storage/myisam/mi_delete.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_keycache.c:
Auto merged
storage/myisam/mi_page.c:
Auto merged
storage/myisam/mi_statrec.c:
Auto merged
storage/myisam/mi_test2.c:
Auto merged
storage/myisam/mi_write.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/myisammrg/ha_myisammrg.cc:
Auto merged
storage/myisammrg/myrg_extra.c:
Auto merged
storage/ndb/include/logger/LogHandler.hpp:
Auto merged
storage/ndb/include/util/OutputStream.hpp:
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
Auto merged
storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
Auto merged
storage/ndb/src/common/transporter/Transporter.cpp:
Auto merged
storage/ndb/src/cw/cpcd/CPCD.hpp:
Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/src/kernel/error/ErrorReporter.cpp:
Auto merged
storage/ndb/src/kernel/error/ErrorReporter.hpp:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
Auto merged
storage/ndb/src/ndbapi/ClusterMgr.cpp:
Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
Auto merged
storage/ndb/src/ndbapi/Ndb.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
storage/ndb/src/ndbapi/Ndbif.cpp:
Auto merged
storage/ndb/tools/drop_index.cpp:
Auto merged
storage/ndb/tools/drop_tab.cpp:
Auto merged
storage/ndb/tools/ndb_condig.cpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
vio/viossl.c:
Auto merged
vio/viosslfactories.c:
Auto merged
BUILD/SETUP.sh:
Use local version
client/client_priv.h:
Manual merge
mysql-test/mysql-test-run.pl:
Manual merge
mysql-test/r/ctype_cp1250_ch.result:
Manual merge
mysql-test/t/disabled.def:
Manual merge
mysys/hash.c:
Manual merge
mysys/thr_lock.c:
Manual merge
server-tools/instance-manager/mysql_connection.cc:
Manual merge
sql/ha_ndbcluster.cc:
Manual merge
sql/handler.cc:
Manual merge
sql/item_timefunc.cc:
Manual merge
sql/mysqld.cc:
Manual merge
sql/opt_range.cc:
Manual merge
sql/slave.cc:
Manual merge
sql/sql_parse.cc:
Manual merge
sql/sql_prepare.cc:
Manual merge
sql/sql_view.cc:
Manual merge
sql/table.cc:
Manual merge
storage/archive/ha_archive.cc:
Manual merge
storage/federated/ha_federated.cc:
Manual merge
storage/federated/ha_federated.h:
Manual merge
storage/innobase/handler/ha_innodb.cc:
Manual merge
storage/ndb/include/ndb_global.h.in:
Manual merge
storage/ndb/include/util/InputStream.hpp:
Manual merge
storage/ndb/include/util/SimpleProperties.hpp:
Manual merge
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
Manual merge
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
Manual merge
storage/ndb/src/ndbapi/NdbOperationSearch.cpp:
Manual merge
storage/ndb/src/ndbapi/Ndbinit.cpp:
Manual merge
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
Manual merge
strings/decimal.c:
Manual merge
vio/viosocket.c:
Manual merge
into mysql.com:/home/my/mysql-5.1
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/r/connect.result:
Auto merged
mysql-test/r/drop.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/rpl_ndb_dd_advance.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/rpl_ndb_dd_advance.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
client/mysql_upgrade.c:
Manual merge
client/mysqltest.c:
Manual merge
mysql-test/mysql-test-run.pl:
Manual merge
storage/innobase/handler/ha_innodb.cc:
Manual merge
Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
client/client_priv.h:
Added OPT_DEBUG_INFO and OPT_COLUMN_TYPES
client/mysql.cc:
Split --debug-info into --debug-info and --column-type-info
client/mysql_upgrade.c:
Give only error info at end if using --debug-info
client/mysqladmin.cc:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlbinlog.cc:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlcheck.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlimport.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqlshow.c:
Added --debug-info to detect memory leaks in mysqltest
client/mysqltest.c:
Added --debug-info to detect memory leaks in mysqltest
Added option --logdir to force .progress files in a specific directory
libmysql/libmysql.c:
Fixed memory leak
mysql-test/include/ndb_setup_slave.inc:
Moved cluster tables under 'mysql'
mysql-test/include/query_cache.inc:
Added more tests for query cache
mysql-test/lib/init_db.sql:
Move cluster.binlog_index -> mysql.binlog_index
mysql-test/lib/mtr_report.pl:
Find memory leaks
mysql-test/mysql-test-run-shell.sh:
Added --debug-info to programs to detect memory leaks
mysql-test/mysql-test-run.pl:
Added --debug-info to programs to detect memory leaks
Force log files to var/log
cluster tables moved under 'mysql'
mysql-test/r/cache_innodb.result:
New query cache test with innodb
mysql-test/r/connect.result:
binlog_index is now in mysql
mysql-test/r/drop.result:
Removed 'cluster' database
mysql-test/r/information_schema.result:
Removed 'cluster' database
mysql-test/r/mysqlcheck.result:
cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_basic.result:
cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_ddl_multi.result:
cluster -> mysql
mysql-test/r/ndb_binlog_discover.result:
cluster -> mysql
mysql-test/r/ndb_binlog_multi.result:
cluster -> mysql
mysql-test/r/ndb_restore_compat.result:
cluster -> mysql
mysql-test/r/ps_1general.result:
Removed cluster database
mysql-test/r/rpl_create_database.result:
Removed cluster database
mysql-test/r/rpl_load_from_master.result:
Removed cluster database
mysql-test/r/rpl_loaddata_m.result:
Removed cluster database
mysql-test/r/rpl_ndb_bank.result:
cluster -> mysql
mysql-test/r/rpl_ndb_dd_advance.result:
cluster -> mysql
mysql-test/r/rpl_ndb_dd_basic.result:
cluster -> mysql
mysql-test/r/rpl_ndb_idempotent.result:
cluster -> mysql
mysql-test/r/rpl_ndb_log.result:
cluster -> mysql
mysql-test/r/rpl_ndb_multi.result:
cluster -> mysql
mysql-test/r/rpl_ndb_sync.result:
cluster -> mysql
mysql-test/r/rpl_row_basic_11bugs.result:
Removed cluster database
mysql-test/r/rpl_truncate_7ndb.result:
Position have changed
mysql-test/r/rpl_truncate_7ndb_2.result:
cluster -> mysql
mysql-test/r/schema.result:
Removed cluster database
mysql-test/r/show_check.result:
Removed cluster database
mysql-test/r/system_mysql_db.result:
binlog_index moved under mysql
mysql-test/r/upgrade.result:
More tests
mysql-test/t/information_schema.test:
cluster -> mysql
mysql-test/t/mysqldump.test:
More test to detect memory leaks
mysql-test/t/ndb_binlog_basic.test:
cluster -> mysql
mysql-test/t/ndb_binlog_multi.test:
cluster -> mysql
mysql-test/t/ndb_restore_compat.test:
cluster -> mysql
mysql-test/t/rpl_ndb_bank.test:
cluster -> mysql
mysql-test/t/rpl_ndb_dd_advance.test:
cluster -> mysql
mysql-test/t/rpl_ndb_idempotent.test:
cluster -> mysql
mysql-test/t/rpl_ndb_multi.test:
cluster -> mysql
mysql-test/t/rpl_ndb_sync.test:
cluster -> mysql
mysql-test/t/system_mysql_db_fix.test:
Drop also binlog_index
mysql-test/t/upgrade.test:
Check that tables created with 3.23 works
mysys/my_error.c:
Remove all registered errors (to avoid memory leaks)
mysys/my_init.c:
call my_error_unregister_all() to avoid some possible memory leaks
mysys/mysys_priv.h:
Added prototype
scripts/mysql_create_system_tables.sh:
cluster -> mysql
scripts/mysql_fix_privilege_tables.sql:
Changed -- to #
Create binlog_index table if it dosesn't exist
sql/field.cc:
Made offset() inline
sql/field.h:
Changed prototype of offset() to not make it depending on TABLE structure
sql/field_conv.cc:
Removed some usage of current_thd
sql/ha_ndbcluster_tables.h:
cluster -> mysql
sql/item_sum.cc:
Usage of new 'offset' parameters
sql/key.cc:
Changed 'find_ref_key' to not be dependent on field->table
(This fixed a crash when using a table created in MySQL 3.23)
sql/mysql_priv.h:
Changed find_ref_key() to not use field->table
sql/mysqld.cc:
Fix that plugin_init() works properly on bootstrap
(Previously we got warnings from plugin_init)
sql/sql_class.cc:
new 'field->offset()'
sql/sql_select.cc:
New field->offset()
sql/table.cc:
We don't need field->table to be set in find_ref_key() or find_field() anymore.
storage/archive/ha_archive.cc:
New field->offset()
storage/federated/ha_federated.cc:
New field->offset()
storage/innobase/handler/ha_innodb.cc:
Fixed compiler warnings
storage/myisam/ha_myisam.cc:
Fixed compiler warnings (Wrong paramter to sprintf())
New field->offset()
storage/myisam/ha_myisam.h:
Fixed wrong type of table_flags
storage/ndb/tools/restore/Restore.cpp:
Fixed compiler warning
mysql-test/r/1st.result:
New BitKeeper file ``mysql-test/r/1st.result''
mysql-test/std_data/old_table-323.frm:
New BitKeeper file ``mysql-test/std_data/old_table-323.frm''
mysql-test/t/1st.test:
New BitKeeper file ``mysql-test/t/1st.test''
Removing DBUG_DUMP printouts for valgrind builds since they trigger warnings.
Removing valgrind memory checks completely.
Removing bzero() of record when opening table that was added earlier.
sql/log_event.cc:
Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
warnings.
Removing valgrind checks completely, since they can trigger false valgrind warnings.
sql/sql_class.cc:
Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
warnings.
sql/table.cc:
Removing extreneous bzero() that were added previously.
Adding class to handle temporary allocate of memory during write of rows.
Eliminating cut'n-paste error between THD::binlog_{write,update,delete}_row().
sql/sql_class.cc:
Adding class to handle temporary allocate of memory during write of rows.
Eliminating cut'n-paste error between THD::binlog_{write,update,delete}_row().
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
BitKeeper/etc/collapsed:
auto-union
include/m_ctype.h:
Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/log.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
unittest/mytap/tap.c:
Auto merged
sql/log_event.cc:
manual merge
sql/sql_class.cc:
manual merge
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
BitKeeper/deleted/.del-CMakeLists.txt~1:
Auto merged
BitKeeper/deleted/.del-make_win_bin_dist:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
include/mysql.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/log_tables.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
netware/BUILD/mwenv:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
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/sp.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.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
include/my_time.h:
manual merge.
mysql-test/mysql-test-run.pl:
manual merge.
mysql-test/r/ps.result:
manual merge.
mysql-test/t/disabled.def:
manual merge.
mysql-test/t/ps.test:
manual merge.
sql/log_event.cc:
The changes are so that the code will compile on Windows. Typecasts are needed on the DBUG_DUMP statements to cast a byte * to a char *.
sql/sql_class.cc:
The changes are necessary to get the code to compile on Windows. The DBUG_DUMP statements need a typecast.
Not replicating the mysql database *at all* any more. All changes to
mysql tables are replicated by replicating the statements that do
the changes.
mysql-test/r/rpl_do_grant.result:
Result change
mysql-test/t/rpl_do_grant.test:
Deleting grants on both master and server since the mysql
database is not replicated any more.
sql/handler.cc:
Removing code that selectively checks what tables in the mysql
database to ignore. The entire mysql database is not replicated
any more.
sql/log_event.cc:
Disabling code to reload grants and access when certain tables are
touched.
sql/rpl_rli.h:
Removing unused code.
sql/slave.cc:
Removing unused code.
sql/sql_class.cc:
Mysql queries (i.e., queries that affects tables in the mysql database)
are now replicated by statement instead of replicating the tables in
the mysql database.
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
- As a sideeffect of the patch to generate lex_hash.h only once
on the machine where the source dist was produced, a problem
was found when compiling a mysqld without partition support - it
would crash when looking up the lex symbols due to mismatch between
lex.h and the generated lex_hash.h
- Remove the ifdef for partition in lex.h
- Fix minor problem with"EXPLAIN PARTITION" when not compiled with
partition(existed also without the above patch)
- Add test case that will be run when we don't have partition
support compiled into mysqld
- Return error ER_FEATURE_DISABLED if user tries to use PARTITION
when there is no support for it.
sql/lex.h:
There should be no ifdefs of features in lex.h
sql/sql_class.cc:
In line with the comment in sql_yacc.yy that we want the same output
from "EXPLAIN PARTITIONS.." regardless of wheter we have compiled in
support for partition or not, remove the ifdef so the extra field
is added to output if the DESCRIBE_PARTITIONS bit it set. Without
this patch we get a crash as the code in select_describe believes the
field is there.
sql/sql_select.cc:
Use "const" for the variable as it's a ssigned once and never changes
sql/sql_yacc.yy:
Don't allow PARTITION syntax oif there is no suport for partitioning
mysql-test/r/not_partition.require:
New BitKeeper file ``mysql-test/r/not_partition.require''
mysql-test/r/not_partition.result:
New BitKeeper file ``mysql-test/r/not_partition.result''
mysql-test/t/not_partition.test:
New BitKeeper file ``mysql-test/t/not_partition.test''
The value taken to be shown in SHOW PROCESSLIST is not
initialized when THD is created and will be random for
unauthenticated connections.
To the documentor: Random value, instead of NULL, was shown,
in SHOW PROCESSLIST for still non-authenticated connections.
sql/sql_class.cc:
Initialize time_after_lock.
It is used from SHOW PROCESSLIST's code. If not initialized
random value is shown for connected but still unauthenticated
clients in the column Time.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
client/mysqldump.c:
Auto merged
mysql-test/include/have_lowercase0.inc:
Auto merged
mysql-test/t/lowercase_table3.test:
Auto merged
mysql-test/t/mysql_protocols.test:
Auto merged
mysql-test/t/rpl_change_master.test:
Auto merged
mysql-test/t/rpl_drop_db.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysql-test/t/rpl_loaddata.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
mysql-test/t/rpl_max_relay_size.test:
Auto merged
mysql-test/t/rpl_replicate_do.test:
Auto merged
mysys/my_read.c:
Auto merged
sql/sql_class.cc:
Auto merged
mysql-test/r/rpl000015.result:
C
mysql-test/r/rpl_log.result:
ul
mysql-test/r/rpl_max_relay_size.result:
ul
mysql-test/r/rpl_replicate_do.result:
ul
mysql-test/t/rpl000015.test:
ul
The value taken to be shown in SHOW PROCESSLIST is not
initialized when THD is created and will be random for
unauthenticated connections.
To the documentor: Random value, instead of NULL, was shown,
in SHOW PROCESSLIST for still non-authenticated connections.
sql/sql_class.cc:
Initialize time_after_lock.
It is used from SHOW PROCESSLIST's code. If not initialized
random value is shown for connected but still unauthenticated
clients in the column Time.
VisualStudio needs cast from (byte*) to (const char*), 3rd arg to _db_dump_()
sql/sql_class.cc:
VisualStudio needs cast from (byte*) to (const char*), 3rd arg to _db_dump_()
sql/log_event.cc:
VisualStudio needs cast from (byte*) to (const char*), 3rd arg to _db_dump_()
mysql-test/extra/rpl_tests/rpl_insert_id.test:
Enhance test for bug#21726 to cover statement-based replication of
function calls.
sql/sql_class.cc:
Fix typo and whitespace.
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 moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-real-bug21726
mysql-test/t/rpl_insert_id.test:
Use local.
sql/item_func.cc:
Use local.
sql/item_func.h:
Use local.
sql/log_event.cc:
SCCS merged
sql/set_var.cc:
Use local.
sql/sql_class.h:
Use local.
sql/sql_insert.cc:
Use local.
sql/sql_load.cc:
Use local.
sql/sql_parse.cc:
Use local.
sql/sql_select.cc:
Use local.
sql/sql_update.cc:
Use local.
mysql-test/r/rpl_insert_id.result:
Use local.
sql/sql_class.cc:
Manual merge. Add comment for THD::cleanup_after_query().
tests/mysql_client_test.c:
Manual merge. Add test case for bug#21726: Incorrect result with
multiple invocations of LAST_INSERT_ID.
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.
Using move_field_offset() to move field pointer to other record before
calling pack()/unpack().
sql/log_event.cc:
Using move_field_offset() to move the field pointer. It is necessary
for unpack() and pack() of BIT fields to operate correctly.
Adding debug printouts.
sql/sql_class.cc:
Using move_field_offset() to move the field pointer. It is necessary
for unpack() and pack() of BIT fields to operate correctly.
Adding debug printouts to packing of update rows event.
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
mysql-test/r/mysqldump.result:
Restoring rpl tree mysqldump test file to main tree test files
mysql-test/r/status.result:
Manual merge
mysql-test/t/mysqldump.test:
Restoring rpl tree mysqldump test file to main tree test files
(as part of the auto_increment cleanup of WL#3146; let's not be
sad, that monster push still removed serious bugs):
one problem with INSERT DELAYED (unexpected interval releases),
one with stored functions (wrong auto_inc binlogging).
These bugs were not released.
mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
more tests of binlogging of INSERT DELAYED: with multi-row INSERTs.
I identified why sleeps are needed to get a repeatable row-based
binlogged: because without sleeps rows sometimes get groupped
and so generate different row based events.
mysql-test/extra/rpl_tests/rpl_foreign_key.test:
don't forget to drop tables on slave too, otherwise it leaves
an orphan innodb table leading to rpl_insert_id failing sometimes
(like in pushbuild "sapsrv2 -max").
mysql-test/extra/rpl_tests/rpl_insert_id.test:
testing that if some statement does not update any row, it does
not pollute the auto_inc binlog variables of the next statement;
the test has to use stored procedures because with plain statements,
mysql_reset_thd_for_next_command() does the resetting (and thus
there is no problem); mysql_reset_thd_for_next_command() is not
called inside routines.
mysql-test/r/binlog_row_binlog.result:
result additions
mysql-test/r/binlog_statement_insert_delayed.result:
result additions
mysql-test/r/binlog_stm_binlog.result:
result additions
mysql-test/r/rpl_insert_id.result:
result additions
mysql-test/r/rpl_loaddata.result:
With the change to log.cc reverted, the result changes and is better:
the change to log.cc had caused some INSERT_ID events to disappear
though they were necessary (but testsuite could not catch that because
it's single-threaded).
mysql-test/r/rpl_ndb_insert_ignore.result:
NDB is now like other engines regarding INSERT IGNORE: autoincrement
values which caused a duplicate key are re-used for next row, not lost.
rpl_ndb_insert_ignore.result is now identical to rpl_insert_ignore.result.
sql/log.cc:
LOAD DATA INFILE is binlogged as several events, and the last of them must
have the auto_inc id. So it's wrong to reset the auto_inc id after every
binlog write (because then it's lost after the first event of LOAD
DATA INFILE and so missing for the last one)/
Another problem: MYSQL_LOG::write() is not always called (for example
if no row was updated), so we were missing reset in some cases.
sql/sp_head.cc:
SELECT func1(),func2() generates two binlog events, so needs to
clear auto_increment binlog variables after each binlog event
(it would be more natural to clear them in the log write code,
but LOAD DATA INFILE would suffer from this see the cset comment
for log.cc). Without the clearing, the problem is:
> exec func1()
>> call cleanup_after_query() (which does not clear our vars here)
>> binlog SELECT func1()
<
> exec func2()
and so SELECT func2() is binlogged with the auto_inc of SELECT func1().
sql/sql_class.cc:
after every statement we should clear auto_inc variables used for
binlogging, except if this was a function/trigger (in which case
it may be "INSERT SELECT func()", where the cleanup_after_query()
executed in func() should not reset the auto_inc binlog variables
as they'll be necessary when binlogging the INSERT SELECT later).
sql/sql_insert.cc:
- as INSERT DELAYED uses the same TABLE object as the delayed_insert
system thread, we should not call ha_release_auto_increment()
from INSERT DELAYED (and btw it's logical as we reserve nothing
as we don't perform the insert). Calling the function caused us to
release values being used by the delayed_insert thread.
So I do the call only if this is a non-DELAYED INSERT.
- Assuming two INSERT DELAYED which get grouped by the delayed_insert
thread, the second may use values reserved by the first, which is ok
per se, but is a problem in statement-based binlogging:
the 2nd INSERT gets binlogged with the "interval start" value
of the first INSERT (=> duplicate error in slave).
- no reason to ha_release_auto_increment() after every inserted row
in INSERT SELECT; more efficient to do it only when the statement ends
sql/sql_parse.cc:
a comment
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
BitKeeper/deleted/.del-rpl_heap.test:
Auto merged
Makefile.am:
Auto merged
mysql-test/extra/binlog_tests/binlog.test:
Auto merged
mysql-test/r/binlog_stm_binlog.result:
Auto merged
mysql-test/r/rpl_switch_stm_row_mixed.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
unittest/README.txt:
Auto merged
unittest/unit.pl:
Auto merged
mysql-test/t/disabled.def:
Merge (main -> rpl 5.1)
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
into moonbone.local:/work/tmp_merge-5.1-mysql
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/view.result:
SCCS merged
mysql-test/t/view.test:
SCCS merged
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/deleted/.del-im_check_os.inc:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_varchar.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/type_varchar.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/mysql-test-run.pl:
Use local. Alik will merge his changes manually.
mysql-test/lib/mtr_process.pl:
Use local.
mysql-test/r/grant.result:
Use local.
mysql-test/r/sp.result:
Use local.
mysql-test/r/ps.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/field.cc:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/share/errmsg.txt:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sp_head.h:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_view.cc:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.0-14897
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/errmsg.txt:
Auto merged
mysql-test/r/grant.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/view.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.
There were two problems: RESET QUERY CACHE took a long time to complete
and other threads were blocked during this time.
The patch does three things:
1 fixes a bug with improper use of test-lock-test_again technique.
AKA Double-Checked Locking is applicable here only in few places.
2 Somewhat improves performance of RESET QUERY CACHE.
Do my_hash_reset() instead of deleting elements one by one. Note
however that the slowdown also happens when inserting into sorted
list of free blocks, should be rewritten using balanced tree.
3 Makes RESET QUERY CACHE non-blocking.
The patch adjusts the locking protocol of the query cache in the
following way: it introduces a flag flush_in_progress, which is
set when Query_cache::flush_cache() is in progress. This call
sets the flag on enter, and then releases the lock. Every other
call is able to acquire the lock, but does nothing if
flush_in_progress is set (as if the query cache is disabled).
The only exception is the concurrent calls to
Query_cache::flush_cache(), that are blocked until the flush is
over. When leaving Query_cache::flush_cache(), the lock is
acquired and the flag is reset, and one thread waiting on
Query_cache::flush_cache() (if any) is notified that it may
proceed.
include/mysql_com.h:
Add comment for NET::query_cache_query.
sql/net_serv.cc:
Use query_cache_init_query() for initialization of
NET::query_cache_query if query cache is used.
Do not access net->query_cache_query without a lock.
sql/sql_cache.cc:
Fix bug with accessing query_cache_size, Query_cache_query::wri and
thd->net.query_cache_query before acquiring the lock---leave
double-check locking only in safe places.
Wherever we check that cache is usable (query_cache_size > 0) we now
also check that flush_in_progress is false, i.e. we are not in the
middle of cache flush.
Add Query_cache::not_in_flush_or_wait() method and use it in
Query_cache::flush_cache(), so that threads doing cache flush will
wait it to finish, while other threads will bypass the cache as if
it is disabled.
Extract Query_cache::free_query_internal() from Query_cache::free_query(),
which does not removes elements from the hash, and use it together with
my_hash_reset() in Query_cache::flush_cache().
sql/sql_cache.h:
Add declarations for new members and methods.
Make is_cacheable() a static method.
Add query_cache_init_query() function.
sql/sql_class.cc:
Use query_cache_init_query() for initialization of
NET::query_cache_query.
sql/log.cc:
Auto merged
sql/sql_class.cc:
Auto merged
mysql-test/r/rpl_switch_stm_row_mixed.result:
Merge with mysql-5.1-new-rpl
mysql-test/t/rpl_switch_stm_row_mixed.test:
Merge with mysql-5.1-new-rpl