Additional edits to the 5.0 ChangeSet|1.2519 that are necessary for the fix to work with the new code structure in 5.1.
sql/item_create.cc:
Added line to prevent a query that contains a UDF from being cached. In 5.0 this was handled in sql_yacc.cc but now the the individual Create_func builders will be responsible for clearing the flag.
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-rpl
mysql-test/extra/rpl_tests/rpl_log.test:
Auto merged
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Auto merged
mysql-test/t/rpl_ndb_bank.test:
Auto merged
mysql-test/t/rpl_ndb_basic.test:
Auto merged
mysql-test/t/rpl_ndb_do_table.test:
Auto merged
mysql-test/t/rpl_ndb_idempotent.test:
Auto merged
mysql-test/t/rpl_ndb_stm_innodb.test:
Auto merged
mysql-test/t/rpl_ndb_sync.test:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
mysql-test/include/have_multi_ndb.inc:
manual merge
mysql-test/include/have_ndb.inc:
manual merge
mysql-test/t/rpl_ndb_commit_afterflush.test:
manual merge
mysql-test/t/rpl_ndb_ddl.test:
manual merge
mysql-test/t/rpl_ndb_innodb_trans.test:
manual merge
Fixed runtime to no longer allow the caching of queries with UDF calls.
mysql-test/r/udf.result:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
mysql-test/t/udf.test:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
sql/sql_yacc.yy:
Fixed code to set safe_to_cache_query=0 regardless if the function call is a UDF or SP. Where it was placed previously -- at the very end of the else testing for UDFs -- it only executed the statement if the function call was a stored procedure call.
sql/handler.cc:
Polishing to have the consistent code.
sql/sp_head.cc:
Polishing to have the consistent code.
sql/sql_error.cc:
Polishing to have the consistent code.
sql/sql_trigger.cc:
Polishing to have the consistent code.
Changed code to enforce that SQL_CACHE only in the first SELECT is used to turn on caching(as documented), but any SQL_NO_CACHE will turn off caching (not documented, but a useful behaviour, especially for machine generated queries). Added test cases to explicitly test the documented caching behaviour and test cases for the reported bug.
mysql-test/r/query_cache.result:
Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query.
Also added a bug specific test case to validate that the buggy behavior as reported has been fixed.
mysql-test/t/query_cache.test:
Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query.
Also added a bug specific test case to validate that the buggy behavior as reported has been fixed.
sql/sql_yacc.yy:
Added an explicit check to make sure "SELECT SQL_CACHE" only works on the first select in a query.
The parser will always hit the outermost SELECT first, and if the SQL_CACHE option is found it sets the safe_to_query flag in the lex. Then, if there are subseqent "uncachable" subqueries or functions, as it parses those elements it sets the safe_to_query to 0. However, this cause problems if nested SELECTs also used the SQL_CACHE option, because then it would set back safe_to_query to 1, even though there are uncacheable expressions previously parsed.
By adding the check to ensure only the first SELECT can turn caching on, it means a subsequent SQL_CACHE option can't turn caching back on after a uncacheable subsequery was already encountered.
FLUSH LOGS should ignore SET GLOBAL READ_ONLY.
sql/lock.cc:
Sdditional fix-up for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- ignore SET GLOBAL READ_ONLY if MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY is set.
sql/mysql_priv.h:
Sdditional fix-up for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY added.
sql/sql_base.cc:
Sdditional fix-up for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- ignore SET GLOBAL READ_ONLY as well if called form a logger.
When all table blocks were removed from the query cache the client session
hung in a tight loop waiting on an impossible condition while consuming a lot
of CPU.
This patch also corrects an error which caused valid tables to sometimes be
removed from the query cache.
mysql-test/r/query_cache.result:
Added test case to make sure server doesn't hang in a tight loop if last
table block is removed from the cache.
mysql-test/t/query_cache.test:
Added test case to make sure server doesn't hang in a tight loop if last
table block is removed from the cache.
sql/sql_cache.cc:
- Refactored loop over table blocks. The invalidate_table() function effects
the elements over which we iterate. The previous stop condition was broken
due to a compiler optimization error probably caused by the goto-statement
pointing out of the loop. The effect being that tables_blocks was never
checked for null values and thus the loop never terminated.
- The new implementation uses two while loops instead of a goto-statement.
The tables_blocks is a circular list which becomes null if the last table
block is removed from the list.
The method select_insert::send_error does two things, it rolls back a statement
being executed and outputs an error message. But when a
nonexistent column is referenced, an error message has been published already and
there is no need to publish another.
Fixed by moving all functionality beyond publishing an error message into
select_insert::abort() and calling only that function.
mysql-test/r/errors.result:
Bug#28677: test result
mysql-test/t/errors.test:
Bug#28677: test case
sql/sql_class.h:
Bug#28677: overriding abort()
sql/sql_insert.cc:
Bug#28677:
- moved everything beyond producing an error message out of select_insert::send_error
and into new override select_insert::abort()
- made corresponding move of code from select_create::send_error to select_create::abort
sql/sql_select.cc:
Bug#28677: No need to pusblish an error here
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/ndb_basic.test:
Auto merged
mysql-test/t/ndb_insert.test:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisammrg/ha_myisammrg.h:
Auto merged
sql/share/errmsg.txt:
SCCS merged
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/ndb_basic.test:
Auto merged
mysql-test/t/ndb_charset.test:
Auto merged
mysql-test/t/ndb_index_unique.test:
Auto merged
mysql-test/t/ndb_insert.test:
Auto merged
mysql-test/t/ndb_replace.test:
Auto merged
mysql-test/t/ndb_update.test:
Auto merged
mysql-test/t/rpl_000015.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
mysql-test/t/rpl_row_inexist_tbl.test:
Auto merged
sql/Makefile.am:
Auto merged
BitKeeper/deleted/.del-ndb_binlog_basic2.test:
Auto merged
sql/field.cc:
Auto merged
sql/handler.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_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
sql/item_create.cc:
Manual merge
represented by an expression of the type UNSIGNED INT and this
expression was evaluated to 0 then the function erroneously returned
the value of the first argument instead of an empty string.
This problem was introduced by the patch for bug 10963.
The problem has been resolved by a proper modification of the code of
Item_func_substr::val_str.
mysql-test/r/func_str.result:
Added a test case for bug #27130.
mysql-test/t/func_str.test:
Added a test case for bug #27130.
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-engines
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
- do not print 701 dictionary busy error
sql/ha_ndbcluster.cc:
save the ndb error such that it can be traced
sql/ha_ndbcluster.h:
save the ndb error such that it can be traced
sql/ha_ndbcluster_binlog.cc:
use the traced ndb error to determine if it is an error that should be printed
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-engines
extra/perror.c:
Auto merged
mysql-test/t/ndb_basic.test:
Auto merged
mysql-test/t/ndb_insert.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysqld.cc:
Auto merged
storage/ndb/src/common/transporter/Packer.cpp:
Auto merged
storage/ndb/src/common/transporter/TCP_Transporter.hpp:
Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
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/mgmclient/main.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
Auto merged
storage/ndb/test/ndbapi/testNdbApi.cpp:
Auto merged
storage/ndb/test/run-test/daily-basic-tests.txt:
Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
Auto merged
mysql-test/t/disabled.def:
manual merge
The log tables are by nature PERFORMANCE_SCHEMA tables,
which should not be affected by SET GLOBAL READ_ONLY or FLUSH TABLES
WITH READ LOCK.
The implementation of FLUSH TABLES WITH READ LOCK already ignored log tables.
Now with this patch, the implementation of LOCK TABLE also ignore a
global read lock for log tables, which was the missing symmetry.
mysql-test/r/flush.result:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- test result.
mysql-test/t/flush.test:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- test case.
sql/lock.cc:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- logger.is_privileged_thread() used.
sql/log.h:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- LOGGER::is_privileged_thread() introduced that returns TRUE if a given thread
is either a general_log or a slow_log or a privileged thread.
sql/sql_base.cc:
Fix for bug #26380: LOCK TABLES + FLUSH LOGS causes deadlock
- pass MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK to the mysql_lock_tables() in case of
call from a logger in order not to honor the GLOBAL READ LOCK
and to avoid possible deadlocks.
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/r/bigint.result:
Merge with 5.0-opt.
mysql-test/t/bigint.test:
Merge with 5.0-opt.
sql/item_func.cc:
Merge with 5.0-opt.
into chilla.local:/home/mydev/mysql-5.1-axmrg
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
sql/mysqld.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
DECIMAL column was used instead of BIGINT for the minimal possible
BIGINT (-9223372036854775808).
The Item_func_neg::fix_length_and_dec has been adjusted to
to inherit the type of the argument in the case when it's an
Item_int object whose value is equal to LONGLONG_MIN.
sql/item_func.cc:
Fixed bug #28625.
The Item_func_neg::fix_length_and_dec has been adjusted to
to inherit the type of the argument in the case when it's an
Item_int object whose value is equal to LONGLONG_MIN.
mysql-test/t/bigint.test:
Added test result for bug #28625.
mysql-test/r/bigint.result:
Added test case for bug #28625.
- Add build configuration parameter EMBEDDED_ONLY which will configure
the VS solution to produce only mysql embedded binary.
- Make necessary updates to successfully compile solution.
CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Remove leading space from various definitions.
- Remove optimizations from RelWithDebInfo configuration for debugging.
- Conditionally add the necessary build directories based on
EMBEDDED_ONLY flag.
BitKeeper/etc/ignore:
Embedded Server doesn't build on Windows.
- Ignore CMake's default configuration output directories.
- Ignore autogenerated cmake_dummy.c file.
libmysql/client_settings.h:
Embedded Server doesn't build on Windows.
- Build fixup
libmysqld/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Update for recent changes.
libmysqld/libmysqld.def:
Embedded Server doesn't build on Windows.
- Export necessary methods.
libmysqld/examples/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Updated include directories.
- test_libmysqld fixup.
- Added mysqltest_embedded and mysql_client_test_embedded exes needed for
testing.
sql/mysqld.cc:
Embedded Server doesn't build on Windows.
- Build fixup.
sql/sql_binlog.cc:
Embedded Server doesn't build on Windows.
- Build fixup.
sql-common/client.c:
Embedded Server doesn't build on Windows.
- Build fixup.
storage/federated/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
storage/heap/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
storage/innobase/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
storage/myisam/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
storage/myisam/ha_myisam.cc:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
storage/myisammrg/CMakeLists.txt:
Embedded Server doesn't build on Windows.
- Define USE_TLS for embedded only builds.
win/configure.js:
Embedded Server doesn't build on Windows.
- Add EMBEDDED_ONLY build configuration.
into chilla.local:/home/mydev/mysql-5.1-axmrg
mysql-test/r/view.result:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/mysql_priv.h:
SCCS merged
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into maint1.mysql.com:/data/localhome/tsmith/bk/maint/51
mysql-test/mysql-test-run.pl:
Auto merged
BitKeeper/deleted/.del-ctype_cp932_notembedded.test~3047e508460cef42:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/drop_temp_table.test:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/r/have_log_bin.require:
Auto merged
mysql-test/t/flush_block_commit_notembedded.test:
Auto merged
mysql-test/t/mysqlbinlog-cp932.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
mysql-test/t/user_var-binlog.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/extra/binlog_tests/insert_select-binlog.test:
SCCS merged
mysql-test/r/binlog_stm_binlog.result:
SCCS merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
SCCS merged
configure.in:
manual merge
mysql-test/extra/binlog_tests/binlog.test:
manual merge
mysql-test/t/mysqlbinlog2.test:
manual merge
sql/mysqld.cc:
manual merge
Correcting the logic for deciding when to use delete_all_rows() so that
the behavior of TRUNCATE to not be dependent on binary logging
format in effect.
A TRUNCATE statement is always logged as a statement, so in this case,
delete_all_rows() can always be used provided the other logic is correct.
If a DELETE FROM without a WHERE clause is used, and row-based binlogging
is used, the rows has to be deleted from the table on a per-row basis.
sql/sql_delete.cc:
The logic for deciding when to use delete_all_rows() was altered so that
the format used for binary logging does not affect how TRUNCATE is
handled.
(event_bugs.test)
sql/event_data_objects.cc:
SHOW PROCESSLIST tries to read thd->query without a mutex.
If we do not reset it, it points to free()d contents of stack variable
sp_sql.
Problem: Temporary buffer which is used for quoting and escaping
was initialized to character set utf8, and thus didn't allow
to store data in other character sets.
Fix: changing character set of the buffer to be able to
store any arbitrary sequence of bytes.
mysql-test/r/csv.result:
Adding test case
mysql-test/t/csv.test:
Adding test case
sql/examples/ha_tina.cc:
Changing character set of the buffer to "binary".
of its arguments was evaluated to NULL, while the predicate
LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE.
This happened because the Item_func_locate::fix_length_and_dec
method by mistake set the value of the maybe_null flag for
the function item to 0. In consequence of this the function
was considered as the one that could not ever return NULL.
mysql-test/r/func_str.result:
Added a test case for bug #27932.
mysql-test/t/func_str.test:
Added a test case for bug #27932.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/51
configure.in:
Auto merged
BitKeeper/deleted/.del-ctype_cp932_notembedded.test~3047e508460cef42:
Auto merged
mysql-test/extra/binlog_tests/binlog.test:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Auto merged
mysql-test/extra/binlog_tests/drop_temp_table.test:
Auto merged
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/binlog_stm_binlog.result:
Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
mysql-test/r/have_log_bin.require:
Auto merged
mysql-test/t/flush_block_commit_notembedded.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/mysqlbinlog-cp932.test:
Auto merged
mysql-test/t/mysqlbinlog2.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/date_formats.result:
Use local
mysql-test/r/partition.result:
SCCS merged
mysql-test/t/date_formats.test:
Use local
mysql-test/t/ndb_basic.test:
manual merge
mysql-test/t/partition.test:
manual merge
mysql-test/t/user_var-binlog.test:
use local
into ppcg5.local:/Users/antony/Work/p2-bug25800.6.merge
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysys/mf_keycache.c:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun14/50
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/binlog.result:
Auto merged
mysql-test/r/have_log_bin.require:
Auto merged
BitKeeper/deleted/.del-ctype_cp932_notembedded.test:
Auto merged
mysql-test/t/binlog.test:
Auto merged
mysql-test/t/ctype_cp932_binlog.test:
Auto merged
mysql-test/t/ctype_ucs_binlog.test:
Auto merged
mysql-test/t/flush_block_commit_notembedded.test:
Auto merged
mysql-test/t/insert_select-binlog.test:
Auto merged
mysql-test/t/mysqlbinlog-cp932.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/mix_innodb_myisam_binlog.result:
Use local
mysql-test/t/blackhole.test:
manual merge
mysql-test/t/drop_temp_table.test:
manual merge
mysql-test/t/mix_innodb_myisam_binlog.test:
Use local
mysql-test/t/mysqlbinlog.test:
Use local
In many cases, binaries can no longer dump core after calling setuid().
Where the PR_SET_DUMPABLE macro is set, use the prctl() system call
to tell the kernel that it's allowed to dump the core of the server.
configure.in:
Test system for "sys/prctl.h", to get access to prctl().
sql/mysqld.cc:
Add a process-control operation that tells the Linux kernel that it
is allowed to dump core after setuid().
private and provide a setter for it. The setter will be used to
construct UTF-query in the following patches.
sql/sp_head.cc:
Make sp_head::m_body_begin pointer private.
sql/sp_head.h:
Make sp_head::m_body_begin pointer private.
sql/sql_yacc.yy:
Make sp_head::m_body_begin pointer private.
The patch contains the following changes:
- Introduce auxilary functions to convenient work with character sets:
- resolve_charset();
- resolve_collation();
- get_default_db_collation();
- Introduce lex_string_set();
- Refactor Table_trigger_list::process_triggers() &
sp_head::execute_trigger() to be consistent with other code;
- Move reusable code from add_table_for_trigger() into
build_trn_path(), check_trn_exists() and load_table_name_for_trigger()
to be used in the following patch.
- Rename triggers_file_ext and trigname_file_ext into TRN_EXT and
TRG_EXT respectively.
include/my_sys.h:
Introduced auxilary functions (to be used in the following patch).
mysys/charset.c:
Introduced auxilary functions (to be used in the following patch).
sql/handler.cc:
Rename triggers_file_ext -> TRG_EXT;
Rename trigname_file_ext -> TRN_EXT.
sql/mysql_priv.h:
1. Fix typo;
2. Introduce auxilary functions (set_lex_string() will be used
in the following patch);
3. Rename triggers_file_ext -> TRG_EXT;
Rename trigname_file_ext -> TRN_EXT.
sql/sp_head.cc:
Make sp_head::execute_trigger() consistent with
sp_head::execute_function() and sp_head::execute_procedure().
sql/sp_head.h:
Make sp_head::execute_trigger() consistent with
sp_head::execute_function() and sp_head::execute_procedure().
sql/sql_db.cc:
1. Introduce auxilary function.
2. Polishing.
sql/sql_trigger.cc:
1. Move common code from add_table_for_trigger() into
- build_trn_path();
- check_trn_exists();
- load_table_name_for_trigger();
2. Polishing.
sql/sql_trigger.h:
1. Move common code from add_table_for_trigger() into
- build_trn_path();
- check_trn_exists();
- load_table_name_for_trigger();
2. Polishing.
remove redundant "body" from Event_parse_data (use sp_head::m_body).
sql/event_data_objects.cc:
Use sp_head::m_body to store SQL-statement.
Polishing.
sql/event_data_objects.h:
Use sp_head::m_body to store SQL-statement.
Polishing.
sql/event_db_repository.cc:
Use sp_head::m_body to store SQL-statement.
sql/sql_yacc.yy:
Use sp_head::m_body to store SQL-statement.
1. Introduce parse_sql() as a high-level replacement for MYSQLparse().
parse_sql() is responsible to switch and restore "parser context"
(THD::m_lip for now).
2. Fix typo in sp.cc: THD::spcont should be reset *before* calling
the parser.
sql/event_data_objects.cc:
Use parse_sql() instead of MYSQLparse().
sql/mysql_priv.h:
Introduce parse_sql() instead of auto-generated MYSQLparse.
sql/sp.cc:
1. Use parse_sql() instead of MYSQLparse().
2. THD::spcont should be reset before calling the parser.
sql/sql_class.cc:
Reset THD::m_lip.
sql/sql_parse.cc:
1. Introduce parse_sql() instead of auto-generated MYSQLparse().
2. Backup, switch and restore THD::m_lip inside parse_sql().
3. Use parse_sql() instead of MYSQLparse().
sql/sql_partition.cc:
Use parse_sql() instead of MYSQLparse().
sql/sql_prepare.cc:
Use parse_sql() instead of MYSQLparse().
sql/sql_trigger.cc:
Use parse_sql() instead of MYSQLparse().
sql/sql_view.cc:
Use parse_sql() instead of MYSQLparse().
into mysql.com:/d2/hf/mrg/mysql-5.1-opt
client/mysqltest.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/include/mix1.inc:
merging
mysql-test/r/innodb_mysql.result:
merging
sql/sql_select.cc:
merging
into mysql.com:/d2/hf/mrg/mysql-5.0-opt
client/mysqltest.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/innodb_mysql.result:
merging
mysql-test/t/innodb_mysql.test:
merging
sql/sql_select.cc:
merging
Problem: crash on attempt to open a table
having "#mysql50#" prefix in db or table name.
Fix: This prefix is reserved for "mysql_upgrade"
to access 5.0 tables whose file names are not encoded
according to "5.1 tablename to filename encoded".
Don't try open tables whose db name or table name
has this prefix.
mysql-test/r/show_check.result:
Adding test case.
mysql-test/t/show_check.test:
Adding test case.
sql/mysql_priv.h:
Moving 5.0 prefix declarations into mysql_priv.h
sql/sql_table.cc:
Moving 5.0 prefix declarations into mysql_priv.h
sql/table.cc:
Don't try to do "normal" open of tables having '#mysql50#' prefix in
db or table name. This prefix is reserved to access to unencoded
table names when upgrading from 5.0 to 5.1.
SHOW CREATE TABLE fails
Addition to the fix: report db name + table name instead of table path.
This solves embedded merge test failure.
mysql-test/r/merge.result:
BUG#26976 - Missing table in merge not noted in related error msg +
SHOW CREATE TABLE fails
Addition to the fix: report db name + table name instead of table path.
sql/ha_myisammrg.cc:
BUG#26976 - Missing table in merge not noted in related error msg +
SHOW CREATE TABLE fails
Addition to the fix: report db name + table name instead of table path.
numbers)
Before this patch, the code in the class Log_to_csv_event_handler, which is
used by the global LOGGER object to write to the tables mysql.slow_log and
mysql_general_log, was supporting only records of the format defined for
these tables in the database creation scripts.
Also before this patch, the server would allow, with certain limitations,
to perform ALTER TABLE on the LOG TABLES.
As implemented, the behavior of the server, with regards to LOG TABLES,
is inconsistent:
- either ALTER TABLES on LOG TABLES should be prohibited,
and the code writing to these tables can make assumptions on the record
format,
- or ALTER TABLE on LOG TABLES is permitted, in which case the code
writing a record to these tables should be more flexible and honor
new fields.
In particular, adding an AUTO_INCREMENT column to the logs,
does not work as expected (per the bug report).
Given that the ALTER TABLE on log tables statement has been explicitly
implemented to check that the log should be off to perform the operation,
and that current test cases already cover this, the user expectation is
already set that this is a "feature" and should be supported.
With this patch, the server will:
- populate AUTO INCREMENT columns if present,
- populate any additional column with it's default value
when writing a record to the LOG TABLES.
Tests are provided, that detail the precise sequence of statements
a SUPER user might want to perform to add more columns to the log tables.
mysql-test/r/log_tables.result:
Test case for bug#27857
mysql-test/t/log_tables.test:
Test case for bug#27857
sql/log.cc:
Set extra fields in log tables with default values.
Removed the ability to cache queries with UUID() and UUID_SHORT().
sql/item_create.cc:
Removed the ability to cache queries with UUID() and UUID_SHORT().
Fixed where the slave code would try to update the Lex->sphead which is NULL on an "alter table" commands.
mysql-test/r/rpl_events.result:
test that "alter event" replicates without crashing the slave
mysql-test/t/rpl_events.test:
test that "alter event" replicates without crashing the slave
sql/sql_parse.cc:
Added a check for lex->spd, which isn't set on an "alter event" command
Removed the ability to cache queries containing "UUID()".
mysql-test/r/query_cache.result:
Added test to ensure "select UUID(), a from t1" is different each time.
mysql-test/t/query_cache.test:
Added test to ensure "select UUID(), a from t1" is different each time.
sql/item_create.cc:
Removed the ability to cache queries with UUID().
was erroneously converted to double, while the result of
ROUND(<decimal expr>, <int literal>) was preserved as decimal.
As a result of such a conversion the value of ROUND(D,A) could
differ from the value of ROUND(D,val(A)) if D was a decimal expression.
Now the result of the ROUND function is never converted to
double if the first argument is decimal.
mysql-test/r/type_decimal.result:
Added a test case for bug #28980.
mysql-test/t/type_decimal.test:
Added a test case for bug #28980.
mysql-test/r/rpl_loaddata_fatal.result:
Result change
mysql-test/r/rpl_slave_skip.result:
Result change
mysql-test/t/rpl_loaddata_fatal.test:
Test only valid for debug build
Adding shutdown sequence.
mysql-test/t/rpl_slave_skip.test:
Masking out new columns.
sql/log_event.cc:
Freeing memory to keep valgrind silent.
Improved check for thread identity in the "embedded" case,
provided by Monty.
This finishes the fixes for bug#27078.
sql/item_func.cc:
Improved check for thread identity in the "embedded" case,
provided by Monty.
This finishes the fixes for bug#27078.
"Embedded server requires mysql.plugin"
Embedded builds should not print any error when the mysql.plugin
table does not exist. This is achieved by checking for the existance
of the mysql.plugin table before attempting to open it and proceed
silently if it does not exist.
sql/sql_plugin.cc:
bug25800
Embedded builds should not print any error when the mysql.plugin
table does not exist. This is achieved by checking for the existance
of the mysql.plugin table before attempting to open it and proceed
silently if it does not exist.
Bug 28127 (Some valid identifiers names are not parsed correctly)
Bug 26302 (MySQL server cuts off trailing "*/" from comments in SP/func)
This patch is the second part of a major cleanup, required to fix
Bug 25411 (trigger code truncated).
The root cause of the issue stems from the function skip_rear_comments,
which was a work around to remove "extra" "*/" characters from the query
text, when parsing a query and reusing the text fragments to represent a
view, trigger, function or stored procedure.
The reason for this work around is that "special comments",
like /*!50002 XXX */, were not parsed properly, so that a query like:
AAA /*!50002 BBB */ CCC
would be seen by the parser as "AAA BBB */ CCC" when the current version
is greater or equal to 5.0.2
The root cause of this stems from how special comments are parsed.
Special comments are really out-of-bound text that appear inside a query,
that affects how the parser behave.
In nature, /*!50002 XXX */ in MySQL is similar to the C concept
of preprocessing :
#if VERSION >= 50002
XXX
#endif
Depending on the current VERSION of the server, either the special comment
should be expanded or it should be ignored, but in all cases the "text" of
the query should be re-written to strip the "/*!50002" and "*/" markers,
which does not belong to the SQL language itself.
Prior to this fix, these markers would leak into :
- the storage format for VIEW,
- the storage format for FUNCTION,
- the storage format for FUNCTION parameters, in mysql.proc (param_list),
- the storage format for PROCEDURE,
- the storage format for PROCEDURE parameters, in mysql.proc (param_list),
- the storage format for TRIGGER,
- the binary log used for replication.
In all cases, not only this cause format corruption, but also provide a vector
for dormant security issues, by allowing to tunnel code that will be activated
after an upgrade.
The proper solution is to deal with special comments strictly during parsing,
when accepting a query from the outside world.
Once a query is parsed and an object is created with a persistant
representation, this object should not arbitrarily mutate after an upgrade.
In short, special comments are a useful but limited feature for MYSQLdump,
when used at an *interface* level to facilitate import/export,
but bloating the server *internal* storage format is *not* the proper way
to deal with configuration management of the user logic.
With this fix:
- the Lex_input_stream class now acts as a comment pre-processor,
and either expands or ignore special comments on the fly.
- MYSQLlex and sql_yacc.yy have been cleaned up to strictly use the
public interface of Lex_input_stream. In particular, how the input stream
accepts or rejects a character is private to Lex_input_stream, and the
internal buffer pointers of that class are strictly private, and should not
be tempered with during parsing.
This caused many changes mostly in sql_lex.cc.
During the code cleanup in case MY_LEX_NUMBER_IDENT,
Bug 28127 (Some valid identifiers names are not parsed correctly)
was found and fixed.
By parsing special comments properly, and removing the function
'skip_rear_comments' [sic],
Bug 26302 (MySQL server cuts off trailing "*/" from comments in SP/func)
has been fixed as well.
sql/event_data_objects.cc:
Cleanup of the code that extracts the query text
sql/sp.cc:
Cleanup of the code that extracts the query text
sql/sp_head.cc:
Cleanup of the code that extracts the query text
sql/sql_trigger.cc:
Cleanup of the code that extracts the query text
sql/sql_view.cc:
Cleanup of the code that extracts the query text
mysql-test/r/comments.result:
Bug#25411 (trigger code truncated)
mysql-test/r/sp.result:
Bug#25411 (trigger code truncated)
Bug 26302 (MySQL server cuts off trailing "*/" from comments in SP/func)
mysql-test/r/trigger.result:
Bug#25411 (trigger code truncated)
mysql-test/r/varbinary.result:
Bug 28127 (Some valid identifiers names are not parsed correctly)
mysql-test/t/comments.test:
Bug#25411 (trigger code truncated)
mysql-test/t/sp.test:
Bug#25411 (trigger code truncated)
Bug 26302 (MySQL server cuts off trailing "*/" from comments in SP/func)
mysql-test/t/trigger.test:
Bug#25411 (trigger code truncated)
mysql-test/t/varbinary.test:
Bug 28127 (Some valid identifiers names are not parsed correctly)
sql/sql_lex.cc:
Implemented comment pre-processing in Lex_input_stream,
major cleanup of the lex/yacc code to not use Lex_input_stream private members.
sql/sql_lex.h:
Implemented comment pre-processing in Lex_input_stream,
major cleanup of the lex/yacc code to not use Lex_input_stream private members.
sql/sql_yacc.yy:
post merge fix : view_check_options must be parsed before signaling the end of the query
into kindahl-laptop.dnsalias.net:/home/bk/b23051-mysql-5.1-rpl
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/archive/ha_archive.h:
Auto merged
storage/blackhole/ha_blackhole.h:
Auto merged
storage/csv/ha_tina.h:
Auto merged
storage/example/ha_example.h:
Auto merged
storage/federated/ha_federated.h:
Auto merged
storage/heap/ha_heap.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisammrg/ha_myisammrg.h:
Auto merged
sql/share/errmsg.txt:
SCCS merged
into kindahl-laptop.dnsalias.net:/home/bk/b23051-mysql-5.1-rpl
BitKeeper/deleted/.del-binlog_row_blackhole.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
storage/blackhole/ha_blackhole.h:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/innobase/handler/ha_innodb.h:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
mysql-test/t/partition_hash.test:
Manual merge
sql/handler.h:
Manual merge
sql/set_var.cc:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_insert.cc:
Manual merge
sql/sql_parse.cc:
Manual merge
replication):
Patch to add binlog format capabilities to the InnoDB storage engine.
The engine will not allow statement format logging when in READ COMMITTED
or READ UNCOMMITTED transaction isolation level.
In addition, an error is generated when trying to use READ COMMITTED
or READ UNCOMMITTED transaction isolation level in STATEMENT binlog
mode.
sql/handler.h:
Adding declaration of already global arrays.
sql/share/errmsg.txt:
Adding error messages for invalid changes of transaction isolation level
and binlog mode switch. Removing messages that are not needed any more
(this cset it pushed together with the cset that introduced these
messages, so it is safe to remove the messages).
sql/sql_base.cc:
Some changes to error reporting code to get more informative messages.
storage/innobase/handler/ha_innodb.cc:
Adding capabilities to storage engine.
Ha_innobase:table_flags() now compute flags on a per-statement basis
and the statement capabilities flag is just set if the transaction
isolation level is below READ COMMITTED.
An informative message is printed in the event that the transaction
isolation level is below READ COMMITTED and the binlog mode is STATEMENT.
storage/innobase/handler/ha_innodb.h:
Accomodating to changes in the server code that switched from ulong
to Table_flags as type for the table flags.
mysql-test/r/binlog_innodb.result:
New BitKeeper file ``mysql-test/r/binlog_innodb.result''
mysql-test/t/binlog_innodb.test:
New BitKeeper file ``mysql-test/t/binlog_innodb.test''
into magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/insert_update.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/item_func.cc:
merge of 5.0-opt -> 5.1-opt
sql/sql_insert.cc:
merge of 5.0-opt -> 5.1-opt
sql/structs.h:
merge of 5.0-opt -> 5.1-opt
tests/mysql_client_test.c:
merge of 5.0-opt -> 5.1-opt
protocol
Fixed duplicated code, same as last commit.
One could send a malformed packet that caused the server to SEGV. In
recent versions of the password protocol, the client tells the server
what length the ciphertext is (almost always 20). If that length was
large enough to overflow a signed char, then the number would jump to
very large after being casted to unsigned int.
Instead, cast the *passwd char to uchar.
sql/sql_parse.cc:
Additional location of signed-char casted to uint.
- fixed wrong test case for bug 20903
- closed the dangling connections in trigger.test
- GET_LOCK() and RELEASE_LOCK() now produce more detailed log
- fixed an omission in GET_LOCK() : assign the thread_id when
acquiring the lock.
mysql-test/r/trigger.result:
Bug #28992: test case updated
mysql-test/t/trigger.test:
Bug #28992: test case updated. dangling connections closed.
sql/item_func.cc:
Bug #28992:
- GET_LOCK() and RELEASE_LOCK() now produce more detailed log
- fixed an omission in GET_LOCK() : assign the thread_id when
acquiring the lock.
Sometimes a parameter slot may not get a value because of the protocol
data being plain wrong.
Such cases should be detected and handled by returning an error.
Fixed by checking data stream constraints where possible (like maximum
length) and reacting to the case where a value cannot be constructed.
sql/sql_prepare.cc:
Bug #28934:
- check for a parameter slot not being set because
of wrong data
- check if the length read from the stream is not
greater than the maximum length of the field
tests/mysql_client_test.c:
Bug #28934: test case
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
When the INSERT .. ON DUPLICATE KEY UPDATE has to update a matched row but
the new data is the same as in the record then it returns as if
no rows were inserted or updated. Nevertheless the row is silently
updated. This leads to a situation when zero updated rows are reported
in the case when data has actually been changed.
Now the write_record function updates a row only if new data differs from
that in the record.
sql/sql_insert.cc:
Bug#28904: INSERT .. ON DUPLICATE was silently updating rows when it shouldn't.
Now the write_record function updates a row only if new data differs from
that in the record.
mysql-test/r/insert_update.result:
Added a test case for the bug#28904: INSERT .. ON DUPLICATE was silently
updating rows when it shouldn't.
mysql-test/t/insert_update.test:
Added a test case for the bug#28904: INSERT .. ON DUPLICATE was silently
updating rows when it shouldn't.
into kindahl-laptop.dnsalias.net:/home/bk/b24954-mysql-5.1-new-rpl
mysql-test/r/rpl_rotate_logs.result:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
been reached):
Post-merge patch to handle all the changes to the tree since the tree
was cloned.
mysql-test/extra/rpl_tests/rpl_log.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/extra/rpl_tests/rpl_reset_slave.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/include/show_slave_status.inc:
Column change.
mysql-test/r/rpl_000015.result:
Result file change.
mysql-test/r/rpl_change_master.result:
Result file change.
mysql-test/r/rpl_empty_master_crash.result:
Result file change.
mysql-test/r/rpl_extraCol_innodb.result:
Result file change.
mysql-test/r/rpl_extraCol_myisam.result:
Result file change.
mysql-test/r/rpl_flushlog_loop.result:
Result file change.
mysql-test/r/rpl_incident.result:
Result file change.
mysql-test/r/rpl_known_bugs_detection.result:
Result file change.
mysql-test/r/rpl_loaddata.result:
Result file change.
mysql-test/r/rpl_loaddata_fatal.result:
Result file change.
mysql-test/r/rpl_log_pos.result:
Result file change.
mysql-test/r/rpl_ndb_basic.result:
Result file change.
mysql-test/r/rpl_ndb_circular.result:
Result file change.
mysql-test/r/rpl_ndb_extraCol.result:
Result file change.
mysql-test/r/rpl_ndb_idempotent.result:
Result file change.
mysql-test/r/rpl_ndb_log.result:
Result file change.
mysql-test/r/rpl_ndb_sync.result:
Result file change.
mysql-test/r/rpl_rbr_to_sbr.result:
Result file change.
mysql-test/r/rpl_redirect.result:
Result file change.
mysql-test/r/rpl_replicate_do.result:
Result file change.
mysql-test/r/rpl_rotate_logs.result:
Result file change.
mysql-test/r/rpl_row_inexist_tbl.result:
Result file change.
mysql-test/r/rpl_row_log.result:
Result file change.
mysql-test/r/rpl_row_log_innodb.result:
Result file change.
mysql-test/r/rpl_row_max_relay_size.result:
Result file change.
mysql-test/r/rpl_row_reset_slave.result:
Result file change.
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Result file change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Result file change.
mysql-test/r/rpl_row_until.result:
Result file change.
mysql-test/r/rpl_server_id1.result:
Result file change.
mysql-test/r/rpl_server_id2.result:
Result file change.
mysql-test/r/rpl_slave_skip.result:
Result file change.
mysql-test/r/rpl_ssl.result:
Result file change.
mysql-test/r/rpl_ssl1.result:
Result file change.
mysql-test/r/rpl_stm_log.result:
Result file change.
mysql-test/r/rpl_stm_max_relay_size.result:
Result file change.
mysql-test/r/rpl_stm_reset_slave.result:
Result file change.
mysql-test/r/rpl_stm_until.result:
Result file change.
mysql-test/t/rpl_000015.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_change_master.test:
Column position change.
Making result of SHOW SLAVE STATUS vertical.
mysql-test/t/rpl_empty_master_crash.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_log_pos.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_ndb_basic.test:
Column position change.
mysql-test/t/rpl_ndb_idempotent.test:
Column position change.
mysql-test/t/rpl_ndb_sync.test:
Column position change.
Making result of SHOW SLAVE STATUS vertical.
mysql-test/t/rpl_redirect.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_replicate_do.test:
Column position change.
Making result of SHOW SLAVE STATUS vertical.
mysql-test/t/rpl_rotate_logs.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_row_inexist_tbl.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_row_until.test:
Replacing SHOW SLAVE STATUS with include file.
mysql-test/t/rpl_server_id1.test:
Column position change.
Making result of SHOW SLAVE STATUS vertical.
mysql-test/t/rpl_server_id2.test:
Column position change.
Making result of SHOW SLAVE STATUS vertical.
mysql-test/t/rpl_slave_status.test:
Column position change.
mysql-test/t/rpl_ssl.test:
Column position change.
mysql-test/t/rpl_ssl1.test:
Column position change.
mysql-test/t/rpl_stm_until.test:
Replacing SHOW SLAVE STATUS with include file.
sql/log_event.cc:
Using member function last_error() instead of member variable.
Replacing use of 'table' with 'm_table'.
Suppressing warnings in debug printout.
Setting thd->net.last_error on error return from unpack_row() to get
a non-zero error message. The error codes for are being harmonized
in another worklog.
Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
sql/rpl_mi.h:
Moving order of include files since they are dependent (!).
sql/rpl_record.cc:
Adding missing include file.
Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
sql/rpl_record_old.cc:
Adding missing include file.
Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
sql/rpl_reporting.cc:
Adding const modifier to member function.
Using renamed member variable m_last_error.
sql/rpl_reporting.h:
Adding missing constant MAX_SLAVE_ERRMSG.
Adding const modifier to Slave_reporting_capability::report().
Hiding and renaming member variable last_error and incorporating
member function for access in order to make it mutable.
sql/rpl_rli.h:
Moving constant MAX_SLAVE_ERRMSG.
sql/rpl_utility.cc:
Adding missing include file rpl_rli.h.
sql/slave.cc:
Replacing use of member variable last_error with call to member function
last_error().
Replacing use of slave_print_msg() with RELAY_LOG_INFO::report().
protocol
Update for function moved to new file in 5.1.
One could send a malformed packet that caused the server to SEGV. In
recent versions of the password protocol, the client tells the server
what length the ciphertext is (almost always 20). If that length was
large enough to overflow a signed char, then the number would jump to
very large after being casted to unsigned int.
Instead, cast the *passwd char to uchar.
sql/sql_connect.cc:
Update for function moved to new file in 5.1.
In create_tmp_table() don't set full table path as a table name. Other code assumes table names to not exceed NAME_LEN bytes.
sql/sql_select.cc:
In create_tmp_table() don't set full table path as a table name. Other code assumes table names to not exceed NAME_LEN bytes.
mysql-test/r/long_tmpdir.result:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir-master.opt:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir-master.sh:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
mysql-test/t/long_tmpdir.test:
Added testcase for bug #29015 "Stack overflow in processing temporary table name when tmpdir path is long"
specific
- adding TRN::first_undo_lsn, needed to know when a log can be deleted;
this variable must be set under log's mutex and that leads to setting
TRN::rec_lsn, TRN::undo_lsn and TRN::first_undo_lsn in a
inwrite_rec_hook; adding implementation of one hook for REDOs and one
for UNDOs. Thus translog_write_record() always uses TRN and so does
not need a short_id argument, can find it from TRN.
- Monty's patch for the last Valgrind error in the tree.
- Log handler's unit tests fail but Sanja says it's known
include/Makefile.am:
pagecache.h moved and renamed
include/maria.h:
pagecache.h moved and renamed
sql/handler.h:
pagecache.h moved and renamed
storage/maria/Makefile.am:
pagecache.h moved and renamed
storage/maria/ha_maria.cc:
adding an assertion which sounds logical
storage/maria/ma_blockrec.c:
trn->rec_lsn and trn->undo_lsn are now set via hooks inside the log
record's writing; this allows to also set trn->first_undo_lsn
needed to compute the log's low-water mark.
The PAGERANGE_STORE_SIZE -> PAGE_STORE_SIZE is Monty's fix to a
Valgrind error.
storage/maria/ma_loghandler.c:
"tcb" renamed to "trn". Log handler now knows what is a transaction,
and finds short_id from trn. trn's rec_lsn, undo_lsn, first_undo_lsn
are now set by some inwrite_rec_hookS (one for REDOs, one for UNDOs).
The HAVE_purify blocks are Monty's fix to a Valgrind error.
storage/maria/ma_loghandler.h:
Log handler functions use TRN, that needs a forward declaration
storage/maria/ma_pagecache.c:
pagecache.h was moved and renamed
storage/maria/ma_pagecache.h:
pagecache.h was moved and renamed
storage/maria/ma_pagecaches.c:
pagecache.h was moved and renamed
storage/maria/trnman.c:
initializing some members of TRN.
storage/maria/trnman.h:
TRN::first_undo_lsn needed for log's low-water mark calculation
(which will serve to know which logs can be deleted)
storage/maria/unittest/ma_test_loghandler-t.c:
translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
translog_write_record() now needs a valid TRN
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
translog_write_record() now needs a valid TRN
storage/maria/unittest/test_file.h:
pagecache.h was moved and renamed
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
mysql-test/r/view.result:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
mysql-test/r/grant2.result:
SCCS merged
mysql-test/r/information_schema.result:
SCCS merged
mysql-test/t/information_schema.test:
SCCS merged
sql/sql_table.cc:
SCCS merged
Post merge fix.
mysql-test/t/error_simulation.test:
Post merge fix.
mysql-test/r/subselect.result:
Post merge fix.
mysql-test/r/error_simulation.result:
Post merge fix.
sql/item.cc:
Post merge fix.
Post merge fix.
sql/sql_yacc.yy:
Post merge fix.
sql/sql_insert.cc:
Post merge fix.
sql/sql_class.h:
Post merge fix.
sql/item_cmpfunc.cc:
Post merge fix.
sql/field.cc:
Post merge fix.
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
sql/field.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/lib/mtr_report.pl:
Manual merge
changed bytes_received, bytes_sent status variables to longlong
sql/mysqld.cc:
changed bytes_received, bytes_sent status variables to longlong
sql/sql_class.h:
changed bytes_received, bytes_sent status variables to longlong
sql/sql_show.cc:
changed bytes_received, bytes_sent status variables to longlong
sql/structs.h:
changed bytes_received, bytes_sent status variables to longlong
IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
the algorithm is not 'temporary'.
mysql-test/r/information_schema.result:
test result
mysql-test/r/view.result:
test result
mysql-test/t/information_schema.test:
test case
mysql-test/t/view.test:
test case
sql/sql_show.cc:
IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
the algorithm is not 'temporary'.
Fixed bug in ma_dbug.c that gave valgrind warning (only relevant when using --debug)
Fixed bug in blob logging (Fixes valgrind warning)
maria_getint() -> maria_data_on_page()
mysys/safemalloc.c:
Added debug function to print out where a piece of memory was allocated
sql/opt_range.cc:
Remove DBUG_PRINT of unitailized memory
storage/maria/ma_blockrec.c:
Fixed bug in blob logging
storage/maria/ma_check.c:
Fixed compiler warning
storage/maria/ma_dbug.c:
Added missed end++; Caused usage of unitialized memory for nullable keys that was not NULL
storage/maria/ma_delete.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_init.c:
Added header file to get rid of warning
storage/maria/ma_key.c:
More debugging
storage/maria/ma_loghandler.c:
Removed some wrong ';' to get rid of compiler errors when compiling without debugging
Indentation fixes
Removed not needed 'break's
Fixed some compiler warnings
Added code to detect logging of unitialized memory
storage/maria/ma_page.c:
maria_getint() -> maria_data_on_page()
Clear rest of index page before writing when used with valgrind
(Fixes warning of writing pages with unitialized data)
storage/maria/ma_range.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_rt_index.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_rt_index.h:
maria_getint() -> maria_data_on_page()
storage/maria/ma_rt_key.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_rt_split.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_search.c:
maria_getint() -> maria_data_on_page()
storage/maria/ma_test1.c:
Fixed compiler warning
storage/maria/ma_write.c:
maria_getint() -> maria_data_on_page()
storage/maria/maria_chk.c:
maria_getint() -> maria_data_on_page()
storage/maria/maria_def.h:
maria_getint() -> maria_data_on_page()
storage/maria/unittest/ma_pagecache_consist.c:
Fixed compiler warning
storage/maria/unittest/ma_pagecache_single.c:
Fixed compiler warning
storage/maria/unittest/ma_test_loghandler-t.c:
Fixed compiler warning
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
Fixed compiler warning
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
Fixed compiler warning
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
Fixed compiler warning
storage/myisam/mi_dbug.c:
Added missed end++; Caused usage of unitialized memory for nullable keys that was not NULL
mysql-test/include/have_archive.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_blackhole.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_csv.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_exampledb.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_federated_db.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_innodb.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_multi_ndb.inc:
test fix(according to new 'support' column values)
mysql-test/include/have_ndb.inc:
test fix(according to new 'support' column values)
mysql-test/r/information_schema.result:
result fix
Adding new fields Last_{IO,SQL}_Errno and Last_{IO,SQL}_Error to output
of SHOW SLAVE STATUS to hold errors from I/O and SQL thread respectively.
Old fields Last_Error and Last_Errno are aliases for Last_SQL_Error and
Last_SQL_Errno respectively.
Fields are added last to output of SHOW SLAVE STATUS to allow old applications
to use the same positional arguments into the row, while allowing new
application to benefit from the added information.
In addition, some new error codes are added (especially for the I/O
thread) to be able to provide sensible error message.
mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Result change
mysql-test/r/rpl_000015.result:
Result change
mysql-test/r/rpl_change_master.result:
Result change
mysql-test/r/rpl_deadlock_innodb.result:
Result change
mysql-test/r/rpl_empty_master_crash.result:
Result change
mysql-test/r/rpl_extraCol_innodb.result:
Result change
---
Result change.
mysql-test/r/rpl_extraCol_myisam.result:
Result change
---
Result change.
mysql-test/r/rpl_flushlog_loop.result:
Result change
mysql-test/r/rpl_loaddata.result:
Result change
mysql-test/r/rpl_log_pos.result:
Result change
mysql-test/r/rpl_ndb_basic.result:
Result change
mysql-test/r/rpl_ndb_extraCol.result:
Result change
---
Result change.
mysql-test/r/rpl_ndb_idempotent.result:
Result change
mysql-test/r/rpl_ndb_log.result:
Result change
mysql-test/r/rpl_openssl.result:
Result change
mysql-test/r/rpl_rbr_to_sbr.result:
Result change
mysql-test/r/rpl_redirect.result:
Result change
mysql-test/r/rpl_replicate_do.result:
Result change
mysql-test/r/rpl_rotate_logs.result:
Result change
mysql-test/r/rpl_row_inexist_tbl.result:
Result change
mysql-test/r/rpl_row_log.result:
Result change
mysql-test/r/rpl_row_log_innodb.result:
Result change
mysql-test/r/rpl_row_max_relay_size.result:
Result change
mysql-test/r/rpl_row_reset_slave.result:
Result change
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Result change
---
Result change.
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Result change
---
Result change.
mysql-test/r/rpl_row_until.result:
Result change
mysql-test/r/rpl_server_id1.result:
Result change
mysql-test/r/rpl_server_id2.result:
Result change
mysql-test/r/rpl_slave_status.result:
Result change
mysql-test/r/rpl_stm_log.result:
Result change
mysql-test/r/rpl_stm_max_relay_size.result:
Result change
---
Result change.
mysql-test/r/rpl_stm_reset_slave.result:
Result change
mysql-test/r/rpl_stm_until.result:
Result change
mysql-test/t/binlog_row_mix_innodb_myisam.test:
Test fixed.
mysql-test/t/rpl_000015.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_change_master.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_empty_master_crash.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_flushlog_loop.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_log_pos.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_bank.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_basic.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_idempotent.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_ndb_sync.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_openssl.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_rbr_to_sbr.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_redirect.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_replicate_do.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_rotate_logs.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_row_inexist_tbl.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_row_until.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_server_id1.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_server_id2.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_slave_status.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
mysql-test/t/rpl_stm_until.test:
Commenting out irrelevant fields Last_IO_Error and Last_IO_Errno
sql/Makefile.am:
Adding new files
sql/log_event.cc:
Changes to use Slave_reporting_capability for reporting errors.
Adding debug variable to stop slave with an out-of-memory error or with
a fatal error. The checks are put both in the new Execute_load_query_
log_event and in the old Load_log_event which is used for Execute_load_
log_event.
Adding code to generate fatal error message.
Eliminating redundant arguments when printing ER_NO_DEFAULT_FOR_FIELD
message.
sql/rpl_mi.cc:
Using Slave_reporting_capability for error reporting.
sql/rpl_mi.h:
Using Slave_reporting_capability to handle I/O thread errors and other messages.
sql/rpl_rli.cc:
Using Slave_reporting_capability to handle SQL thread errors and other messages.
sql/rpl_rli.h:
Changes to use Slave_reporting_capability for reporting SQL thread error and other messages.
sql/rpl_utility.cc:
Changes to use Slave_reporting_capability for reporting errors.
sql/slave.cc:
Changes to use Slave_reporting_capability for reporting errors.
sql/slave.h:
Removing slave_print_msg()
sql/share/errmsg.txt:
New error messages.
Making message for ER_NO_DEFAULT_FOR_FIELD consistent over languages
(actually restoring old message).
Adding argument to ER_SLAVE_FATAL_ERROR message.
sql/sql_repl.cc:
Using new names for thread masks.
mysql-test/t/rpl_loaddata_fatal-slave.opt:
New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal-slave.opt''
sql/rpl_reporting.cc:
New BitKeeper file ``sql/rpl_reporting.cc''
sql/rpl_reporting.h:
New BitKeeper file ``sql/rpl_reporting.h''
mysql-test/include/show_slave_status.inc:
New BitKeeper file ``mysql-test/include/show_slave_status.inc''
mysql-test/r/rpl_loaddata_fatal.result:
New BitKeeper file ``mysql-test/r/rpl_loaddata_fatal.result''
mysql-test/t/rpl_loaddata_fatal.test:
New BitKeeper file ``mysql-test/t/rpl_loaddata_fatal.test''
protocol
One could send a malformed packet that caused the server to SEGV. In
recent versions of the password protocol, the client tells the server
what length the ciphertext is (almost always 20). If that length was
large enough to overflow a signed char, then the number would jump to
very large after being casted to unsigned int.
Instead, cast the *passwd char to uchar.
sql/sql_parse.cc:
Cast *passwd to get rid of the sign, so that sign extension doesn't
cause the sequence 125, 126, 127, 4294967169, 4294967170.
when logging is enabled.
Currently the partition engine doesn't allow log tables to
be partitioned. But this was not checked and the server crashed.
Fixed by adding a check in ALTER TABLE to disable partitioning the
log tables.
While working on the cause of the problem improved the way the log
thread structures are initialized before opening the log tables.
mysql-test/r/partition.result:
Bug #27816: test case
mysql-test/t/partition.test:
Bug #27816: test case
sql/log.cc:
Bug #27816: optional
Improved initialization of the log threads before opening
the log table.
Remedies problems that arise from open_table() et. al.
depending on a correctly initialized thd.
Prerequisite for handling partitioned log tables :
they call the parser while reading the .frm file.
sql/sql_table.cc:
Bug #27816: throw an error when paritioning the log tables :
not supported by the partition engine.
Changed SHOW ENGINES to work in the same way as I_S.ENGINES.
For this: removed the functions mysqld_show_storage_engines and show_handlerton, and
made SHOW ENGINES work via the common function iter_schema_engines.
There in no test case because an engine (except of MyISAM) may be not compiled or disabled
which may affect the test result.
sql/sql_parse.cc:
Changed SHOW ENGINES to work in the same way as I_S.ENGINES.
sql/sql_show.cc:
Changed SHOW ENGINES to work in the same way as I_S.ENGINES.
For this: removed the functions mysqld_show_storage_engines and show_handlerton, and
made SHOW ENGINES work via the common function iter_schema_engines.
When constructing the path to the original .frm file ALTER .. RENAME
was unnecessary (and incorrectly) lowercasing the whole path when not
on a case-insensitive filesystem.
This path should not be modified because of lower_case_table_names
as it is already in the correct case according to that setting.
Fixed by removing the lowercasing.
Unfortunately testing this would require running the tests on a case
sensitive filesystem in a directory that has uppercase letters.
This cannot be guaranteed in all setups so no test case added.
sql/sql_table.cc:
Bug #28754: don't downcase the .frm path
In case of database level grant the database name may be a pattern,
in case of table|column level grant the database name can not be a pattern.
We use 'dont_check_global_grants' as a flag to determine
if it's database level grant command
(see SQLCOM_GRANT case, mysql_execute_command() function) and
set db_is_pattern according to 'dont_check_global_grants' value.
mysql-test/r/grant2.result:
test result
mysql-test/t/grant2.test:
test case
sql/sql_parse.cc:
In case of database level grant the database name may be a pattern,
in case of table|column level grant the database name can not be a pattern.
We use 'dont_check_global_grants' as a flag to determine
if it's database level grant command
(see SQLCOM_GRANT case, mysql_execute_command() function) and
set db_is_pattern according to 'dont_check_global_grants' value.
SHOW CREATE TABLE fails
After merge fixes.
mysql-test/r/backup.result:
Fixed test result.
mysql-test/r/sp.result:
Fixed test result.
sql/sql_table.cc:
Fixed wrongly merged line. Moved "deprecated" warnings from sql_yacc.yy
to mysql_backup_tables/mysql_restore_table.
sql/sql_yacc.yy:
Moved "deprecated" warnings from sql_yacc.yy to
mysql_backup_tables/mysql_restore_table.
storage/myisam/ha_myisam.cc:
Do not report the same error twice.
storage/myisammrg/ha_myisammrg.cc:
Removed wrongly merged line.
ORDER BY and LIMIT 1.
The bug was introduced by the patch for bug 21727. The patch
erroneously skipped initialization of the array of headers
for sorted records for non-first evaluations of the subquery.
To fix the problem a new parameter has been added to the
function make_char_array that performs the initialization.
Now this function is called for any invocation of the
filesort procedure. Yet it allocates the buffer for sorted
records only if this parameter is NULL.
mysql-test/r/subselect.result:
Added a test case for bug #28811.
mysql-test/t/subselect.test:
Added a test case for bug #28811.
into rama.(none):/home/jimw/my/mysql-5.1-clean
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
This bug was introduced by the fix for the bug#27300. In this fix a section
of code was added to the Item::tmp_table_field_from_field_type method.
This section intended to create Field_geom fields for the Item_geometry_func
class and its descendants. In order to get the geometry type of the current
item it casted "this" to the Item_geometry_func* type. But the
Item::tmp_table_field_from_field_type method is also used for creation of
fields for UNION and in this case this method is called for an object of the
Item_type_holder class and the cast to the Item_geometry_func* type causes
a server crash.
Now the Item::tmp_table_field_from_field_type method correctly works when it's
called for both the Item_type_holder and the Item_geometry_func classes.
The new geometry_type variable is added to the Item_type_holder class.
The new method called get_geometry_type is added to the Item_field
and the Field classes. It returns geometry type from the field for the
Item_field and the Field_geom classes and fails an assert for other Field
descendants.
sql/field.h:
Bug#28763: Selecting geometry fields in UNION caused server crash.
The new method called get_geometry_type is added to the Field class.
It returns geometry type of the field for the Field_geom class
and fails an assert for other Field descendants.
sql/item.cc:
Bug#28763: Selecting geometry fields in UNION caused server crash.
Now the Item::tmp_table_field_from_field_type method correctly works when it's
called for both the Item_type_holder and the Item_geometry_func classes.
mysql-test/r/gis.result:
Added a test case for the bug#28763: Selecting geometry fields in UNION caused server crash.
mysql-test/t/gis.test:
Added a test case for the bug#28763: Selecting geometry fields in UNION caused server crash.
sql/item.h:
Bug#28763: Selecting geometry fields in UNION caused server crash.
The new method called get_geometry_type is added to the Item_field class.
It returns geometry type from the field.
The new geometry_type variable is added to the Item_type_holder class.
Problem: getting an autoincrement value for a partition table in the ::info() method we call
the get_auto_increment() for all partitions. That may cause a problem for at least MyISAM
tables that rely on some table state (in this particular case table->naxt_nuber_field is
set to 0 in the mysql_insert() and we get a crash).
Moreover, calling get_auto_increment() is superfluous there.
Fix: use ::info(HA_STATUS_AUTO) calls to get autoincrement values for partitions instead of
get_auto_increment() ones in the ha_partition::info().
mysql-test/r/partition.result:
Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
- test result.
mysql-test/t/partition.test:
Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
- test case.
sql/ha_partition.cc:
Fix for bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
- use info(HA_STATUS_AUTO) calls to get autoincrement values for partitions,
set the auto_increment_value as the biggest one.
using prepared statements.
sql/field.cc:
Using MAX_DATETIME_WIDTH or MAX_DATETIME_COMPRESSED_WIDTH
constants for the length of DATETIME fields.
Using MAX_DATE_STRING_REP_LENGTH for allocating buffers
for date/time/... string representation.
sql/item_timefunc.cc:
Using MAX_DATETIME_WIDTH or MAX_DATETIME_COMPRESSED_WIDTH
constants for the length of DATETIME fields.
Using MAX_DATE_STRING_REP_LENGTH for allocating buffers
for date/time/... string representation.
sql/unireg.h:
Introduce a constant for length of datetime compressed
format (YYYYMMDDHHMMSS).
If we have lower_case_table_names == 2 (usually on case insensitive file
systems) we sometimes make 'homedir' part of the path sent to the
handler into lowercase. So in this case HEAP engine couldn't properly
find and remove HP_SHARE, what caused the bug.
sql/handler.cc:
bug #28309 First insert violates UNIQUE constraint - was "memory" table empty?
we don't turn homedirectory part of the path into lowercase
sql/mysql_priv.h:
bug #28309 First insert violates UNIQUE constraint - was "memory" table empty?
mysql_data_home_len introduced
sql/mysqld.cc:
bug #28309 First insert violates UNIQUE constraint - was "memory" table empty?
mysql_data_home_len value is set with the mysql_data_home
into mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.1-engines
mysql-test/r/key_cache.result:
Auto merged
mysql-test/r/lock.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/preload.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/repair.result:
Auto merged
mysql-test/r/rpl_failed_optimize.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/merge.test:
Auto merged
storage/myisammrg/myrg_def.h:
Auto merged
storage/myisammrg/myrg_open.c:
Auto merged
mysql-test/r/backup.result:
Use local.
mysql-test/r/sp.result:
Use local.
sql/sql_error.cc:
Use local.
sql/sql_error.h:
Use local.
sql/share/errmsg.txt:
Manual merge.
sql/sql_table.cc:
Manual merge.
storage/myisam/ha_myisam.cc:
Manual merge.
storage/myisammrg/ha_myisammrg.cc:
Manual merge.
storage/myisammrg/ha_myisammrg.h:
Manual merge.
into mysql.com:/home/bar/mysql-work/mysql-5.1.b26711
sql/sql_class.cc:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-gbk.c:
Auto merged
strings/ctype-sjis.c:
Auto merged
Problem: "SELECT INTO OUTFILE" created incorrect dumps for BLOBs,
so "LOAD DATA" later incorrectly interpreted 0x5C as the second
byte of a multi-byte sequence, instead of escape character.
Fix: adding escaping of multi-byte heads.
mysql-test/r/ctype_big5.result:
Adding test case
mysql-test/t/ctype_big5.test:
Adding test case
sql/sql_class.cc:
Add escape characters before multi-byte heads.
strings/ctype-big5.c:
Flagging character set as dangerous for escaping.
strings/ctype-gbk.c:
Flagging character set as dangerous for escaping.
strings/ctype-sjis.c:
Flagging character set as dangerous for escaping.
a temporary table has grown out of heap memory reserved for it and
the remaining disk space is not big enough to store the table as
a MyISAM table.
The crash happens because the function create_myisam_from_heap
does not handle safely the mem_root structure associated
with the converted table in the case when an error has occurred.
sql/sql_select.cc:
Fixed bug #28449: a crash may happen at some rare conditions when
a temporary table has grown out of heap memory reserved for it and
the remaining disk space is not big enough to store the table as
a MyISAM table.
The crash happens because the function create_myisam_from_heap
does not handle safely the mem_root structure associated
with the converted table in the case when an error has occurred.
As it's hard to create a sitiation that would throw an error
a special code has been added that raises an error for a newly
created test called error_simulation.
mysql-test/r/error_simulation.result:
New BitKeeper file ``mysql-test/r/error_simulation.result''
Added a test case for bug #28449.
mysql-test/t/error_simulation-master.opt:
New BitKeeper file ``mysql-test/t/error_simulation-master.opt''
mysql-test/t/error_simulation.test:
New BitKeeper file ``mysql-test/t/error_simulation.test''
Added a test case for bug #28449.
wrong result for DML
When making key reference buffers over CHAR fields whitespace (0x20)
must be used to fill in the remaining space in the field's buffer.
This is what Field_string::store() does.
Fixed Field_string::get_key_image() to do the same.
mysql-test/r/innodb_mysql.result:
Bug#28878: test case
mysql-test/t/innodb_mysql.test:
Bug#28878: test case
sql/field.cc:
Bug#28878: Fill with space instead of binary zeros.
into mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.0-engines
mysql-test/r/ps.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
sql/sql_table.cc:
Auto merged
flag is set.
When the CLIENT_FOUND_ROWS flag is set then the server should return
found number of rows independently whether they were updated or not.
But this wasn't the case for the INSERT statement which always returned
number of rows that were actually changed thus providing wrong info to
the user.
Now the select_insert::send_eof method and the mysql_insert function
are sending the number of touched rows if the CLIENT_FOUND_ROWS flag is set.
tests/mysql_client_test.c:
Added a test case for the bug#28505: mysql_affected_rows() may return wrong result
if CLIENT_FOUND_ROWS flag is set.
sql/sql_insert.cc:
Bug#28505: mysql_affected_rows() may return wrong result if CLIENT_FOUND_ROWS
flag is set.
Now the select_insert::send_eof method and the mysql_insert function
are sending the number of touched rows if the CLIENT_FOUND_ROWS flag is set.
into xiphis.org:/home/antony/work2/mysql-5.1-engines.merge
mysql-test/mysql-test-run.pl:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
into trift2.:/MySQL/M50/push-5.0
CMakeLists.txt:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/ctype_cp932_binlog.test:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
into trift2.:/MySQL/M51/push-5.1
BitKeeper/deleted/.del-CMakeLists.txt~1:
Auto merged
CMakeLists.txt:
Auto merged
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/sql_parse.cc:
Auto merged
into mysql.com:/home/gluh/MySQL/Merge/5.0-opt
mysql-test/r/subselect.result:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/subselect.test:
manual merge
forbid the use of subselect in PURGE LOGS BEFORE command
mysql-test/r/subselect.result:
test result
mysql-test/t/subselect.test:
test case
sql/sql_yacc.yy:
forbid the use of subselect in PURGE LOGS BEFORE command
The value of the PARTITION_COMMENT column is an empty string if there is no partition comment.
mysql-test/r/information_schema_part.result:
result fix
mysql-test/r/ndb_dd_alter.result:
result fix
mysql-test/r/ndb_dd_backuprestore.result:
result fix
mysql-test/r/ndb_partition_range.result:
result fix
sql/sql_show.cc:
The value of the PARTITION_COMMENT column is an empty string if there is no partition comment.
removed duplicated variable declarations
mysql-test/r/variables.result:
test result
mysql-test/t/variables.test:
test case
sql/set_var.cc:
removed duplicated variable declarations
SHOW CREATE TABLE fails
Underlying table names, that merge engine fails to open were not
reported.
With this fix CHECK TABLE issued against merge table reports all
underlying table names that it fails to open. Other statements
are unaffected, that is underlying table names are not included
into error message.
This fix doesn't solve SHOW CREATE TABLE issue.
myisammrg/myrg_def.h:
Added myrg_print_wrong_table declaration.
myisammrg/myrg_open.c:
If HA_OPEN_FOR_REPAIR is passed to merge engine open function,
report names of tables that we fail to open.
mysql-test/r/backup.result:
Updated test result.
mysql-test/r/key_cache.result:
Updated test result - removed duplicate error.
mysql-test/r/lock.result:
Updated test result - added summary row.
mysql-test/r/merge.result:
A test case for BUG#26976.
mysql-test/r/preload.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/r/ps.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/r/repair.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/r/rpl_failed_optimize.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/r/sp.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/r/view.result:
Updated test result - removed duplicate error, added summary row.
mysql-test/t/merge.test:
A test case for BUG#26976.
sql/ha_myisam.cc:
Do not report same error twice.
sql/ha_myisammrg.cc:
If HA_OPEN_FOR_REPAIR is passed to merge engine open function,
report names of tables that we fail to open.
Added dummy ha_myisammrg::check to not confuse users with
"not implemented" error in case all underlying tables are
fine.
sql/ha_myisammrg.h:
Added ha_myisammrg::check declaration.
sql/share/errmsg.txt:
Added ER_ADMIN_WRONG_MRG_TABLE errno. It is used instead
of ER_WRONG_MRG_TABLE in case HA_OPEN_FOR_REPAIR is
passed to merge engine handler open function.
sql/sql_error.cc:
warning_level_* are now public. It is required by mysql_admin_table to
report message level.
sql/sql_error.h:
warning_level_* are now public. It is required by mysql_admin_table to
report message level.
sql/sql_table.cc:
Reorder mysql_admin_table arguments to meet it's definition.
Report errors that are pending in thd->warn_list as results of
admin function.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
integer constants.
This bug is introduced by the fix for bug#16377. Before the fix the
Item_func_between::fix_length_and_dec method converted the second and third
arguments to the type of the first argument if they were constant and the first
argument is of the DATE/DATETIME type. That approach worked well for integer
constants and sometimes produced bad result for string constants. The fix for
the bug#16377 wrongly removed that code at all and as a result of this the
comparison of a DATETIME field and an integer constant was carried out in a
wrong way and sometimes led to wrong result sets.
Now the Item_func_between::fix_length_and_dec method converts the second and
third arguments to the type of the first argument if they are constant, the
first argument is of the DATE/DATETIME type and the DATETIME comparator isn't
applicable.
sql/item_cmpfunc.cc:
Bug#28778: Wrong result of BETWEEN when comparing a DATETIME field with an
integer constants.
Now the Item_func_between::fix_length_and_dec method converts the second and
third arguments to the type of the first argument if they are constant, the
first argument is of the DATE/DATETIME type and the DATETIME comparator isn't
applicable.
mysql-test/r/type_datetime.result:
Added a test case for the bug#28778: Wrong result of BETWEEN when comparing a DATETIME
field with an integer constants.
mysql-test/t/type_datetime.test:
Added a test case for the bug#28778: Wrong result of BETWEEN when comparing a DATETIME
field with an integer constants.
In acl_getroot_no_password(), use a separate variable for traversing the acl_users list so that the last entry is not used when no matching entries are found.
mysql-test/r/view_grant.result:
Fixed the testcase for bug #14875 which relied on broken behavior. sctx->master_access and sctx->priv_user were being set to the last entry in the acl_users list. That does not happen after the patch for bug #28895, so we get a different warning message.
sql/sql_acl.cc:
In acl_getroot_no_password(), use a separate variable for traversing the acl_users list so that the last entry is not used when no matching entries are found.
into trift2.:/MySQL/M51/push-5.1
sql/my_decimal.h:
Auto merged
mysql-test/r/ps_2myisam.result:
Do not use the "result" file from the 5.1.19 tree, rather the main one.
mysql-test/r/ps_3innodb.result:
Do not use the "result" file from the 5.1.19 tree, rather the main one.
mysql-test/r/ps_4heap.result:
Do not use the "result" file from the 5.1.19 tree, rather the main one.
mysql-test/r/ps_5merge.result:
Do not use the "result" file from the 5.1.19 tree, rather the main one.
mysql-test/r/ps_7ndb.result:
Do not use the "result" file from the 5.1.19 tree, rather the main one.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
client/mysqldump.c:
Auto merged
include/m_string.h:
Auto merged
include/mysql_com.h:
Auto merged
include/violite.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysys/my_init.c:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_connect.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/ctype-mb.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
strings/strtod.c:
Auto merged
vio/vio_priv.h:
Auto merged
vio/viosocket.c:
Auto merged
client/mysqltest.c:
SCCS merged
include/my_global.h:
SCCS merged
sql/field.h:
SCCS merged
sql/sql_table.cc:
Manual merge
strings/ctype-bin.c:
Manual merge
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into magare.gmz:/home/kgeorge/mysql/autopush/B28488-5.1-opt
sql/mysql_priv.h:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_table.cc:
Auto merged
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
mysql-test/t/func_misc.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
strings/ctype-ujis.c:
Auto merged
While executing ALTER TABLE ... PARTITION the server uses
a temporary "shadow" table to create the updated table.
This shadow table then gets renamed as the original table.
The shadow table was not prefixed with the special prefix that
marks temporary tables so it was picked up by SHOW TABLE STATUS.
Fixed by isolating the code to create the shadow table name in a
separate function and prefixing the shadow table name with the
special prefix to exclude it from the list of user tables.
See bug 18775 and WL1324 for details.
mysql-test/r/partition.result:
Bug #28488: test case
mysql-test/t/partition.test:
Bug #28488: test case
sql/mysql_priv.h:
Bug #28488: prefix shadow file with the temp prefix
sql/sql_partition.cc:
Bug #28488: prefix shadow file with the temp prefix
sql/sql_table.cc:
Bug #28488: prefix shadow file with the temp prefix
manual merge with 5.0: automatic merge went incorrectly; fixing tests in rbr mode.
mysql-test/r/innodb.result:
results changed because of some more queries are added
mysql-test/r/multi_update.result:
results changed
mysql-test/r/rpl_row_basic_11bugs.result:
results changed
mysql-test/t/innodb.test:
error code is diff in 5.0
mysql-test/t/multi_update.test:
making explicit comments and forcing execution in mixed (stmt) mode.
mysql-test/t/rpl_row_basic_11bugs.test:
checking how binlogging works when a query on non-ta table completed partly.
sql/sql_update.cc:
manual merge after authomatic one failed (semantic drift)
into olga.mysql.com:/home/igor/mysql-5.1-opt-merge
include/thr_lock.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/udf_example.c:
Auto merged
mysql-test/r/subselect.result:
Manual merge.
mysql-test/t/subselect.test:
Manual merge.
sql/sql_view.cc:
Manual merge.