comments)
Before this fix, the server would accept queries that contained comments,
even when the comments were not properly closed with a '*' '/' marker.
For example,
select 1 /* + 2 <EOF>
would be accepted as
select 1 /* + 2 */ <EOF>
and executed as
select 1
With this fix, the server now rejects queries with unclosed comments
as syntax errors.
Both regular comments ('/' '*') and special comments ('/' '*' '!') must be
closed with '*' '/' to be parsed correctly.
mysql-test/r/comments.result:
Unbalanced comments are a syntax error.
mysql-test/t/comments.test:
Unbalanced comments are a syntax error.
sql/sql_lex.cc:
Unbalanced comments are a syntax error.
Bug#21422 GRANT/REVOKE possible inside stored function, probably in a trigger
Bug#17244 GRANT gives strange error message when used in a stored function
GRANT/REVOKE statements are non-transactional (no explicit transaction
boundaries) in nature and hence are forbidden inside stored functions and
triggers, but they weren't being effectively forbidden. Furthermore, the
absence of implict commits makes changes made by GRANT/REVOKE statements to
not be rolled back.
The implemented fix is to issue a implicit commit with every GRANT/REVOKE
statement, effectively prohibiting these statements in stored functions
and triggers. The implicit commit also fixes the replication bug, and looks
like being in concert with the behavior of DDL and administrative statements.
Since this is a incompatible change, the following sentence should be
added to the Manual in the very end of the 3rd paragraph, subclause
13.4.3 "Statements That Cause an Implicit Commit": "Beginning with
MySQL 5.0.??, the GRANT and REVOKE statements cause an implicit commit."
Patch contributed by Vladimir Shebordaev
mysql-test/r/sp-error.result:
Test case result for Bug#17244
mysql-test/t/sp-error.test:
Test case for Bug#17244
sql/sp_head.cc:
Set that a procedure with GRANT/REVOKE command has a (implicit or explicit)
commit.
sql/sql_parse.cc:
End active transaction in SQLCOM_GRANT and SQLCOM_REVOKE, and thus effectively
prohibit these statements in stored functions and triggers. An implicit commit
also fixes a bug in replication, when GRANT or REVOKE would disappear from the
binary log in case of a subsequent ROLLBACK, since they were considered
transactional statements.
mysql-test/suite/rpl/r/rpl_binlog_grant.result:
Add test case result for Bug#21975
mysql-test/suite/rpl/t/rpl_binlog_grant.test:
Add test case for Bug#21975
ChangeSet@1.2509, 2007-08-28
http://lists.mysql.com/commits/33239
Fixes for the funcs_1 datadict test bugs
#30418 "datadict" tests (all engines) fail:
Dependency on the host name for ordering
#30420 "datadict" tests (all engines) fail:
Release build has help tables loaded
#30438 "{memory,myisam,ndb}__datadict" tests fail:
Use "InnoDB" without checking
#30440 "datadict" tests (all engines) fail:
Character sets depend on
configuration
mysql-test/suite/funcs_1/README.txt:
Improved README
mysql-test/suite/funcs_1/datadict/datadict_load.inc:
Additions for the NDB variant (currently not in use)
mysql-test/suite/funcs_1/datadict/datadict_master.inc:
Write a comment about Bug#30689 into the test protocols.
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
Fix for a not reported bug.
The missing revoke usage and drop user harmed the next test.
mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result:
Updated results
mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result:
Updated results
mysql-test/suite/funcs_1/r/innodb__datadict.result:
Updated results
mysql-test/suite/funcs_1/r/memory__datadict.result:
Updated results
mysql-test/suite/funcs_1/r/myisam__datadict.result:
Updated results
mysql-test/suite/funcs_1/r/ndb__datadict.result:
Updated results as far as they could be corrected.
Attention:
This test failed even before the current bug fixes.
The updated expected results are now better than before,
but they do not prevent that the test fails.
It looks like one script is "damaged" and treats
this NDB test different than expected within the
file with expected results.
The functions ROW_COUNT/FOUND_ROWS are indeed not safe to be used in
statement based replication.
Added code to declare them as such and switch the statement they're in
to row based logging for mixed mode.
sql/item_create.cc:
Bug #30244: row_count/found_rows does not replicate well
- add the functions to the set of "unsafe functions"
for statement based replication
mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result:
BitKeeper file /home/kgeorge/mysql/work/B30244-5.1-opt/mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result
mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test:
BitKeeper file /home/kgeorge/mysql/work/B30244-5.1-opt/mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test
and strategy (explain)
The fix for WL3527 adds tests that test if the index usage hints
combinations don't cause syntax errors.
The EXPLAIN for one of these tests can be affected by the size of the
rowid on the disk (affected by the presence of large file support).
Fixed to avoid the platform dependent test result by removing the
irrelevant columns from the EXPLAIN result.
mysql-test/r/group_by.result:
Bug #30393: ignore columns irrelevant to the test
mysql-test/t/group_by.test:
Bug #30393: ignore columns irrelevant to the test
seems to be converted as varbinary.
The bug has been already fixed. This CS just adds a test case for it.
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Test case for BUG#13675.
mysql-test/lib/mtr_misc.pl:
Add function 'mtr_rmtree' it will try 'rmtree' and if that fails (most likely
due to permission problems we will fun File::find to chmod all files and dirs
to 0777 and then delete.
mysql-test/mysql-test-run.pl:
Use 'mtr_rmtree' in favour of 'rmtree'
into linux-st28.site:/home/martin/mysql/src/bugx/my50-bugx
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
SCCS merged
into magare.gmz:/home/kgeorge/mysql/work/B30377-5.1-opt
mysql-test/t/status.test:
Auto merged
mysql-test/r/status.result:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_lex.h:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_select.cc:
merge 5.0->5.1 of the fix for bug 30377
ChangeSet@1.2509, 2007-08-28
http://lists.mysql.com/commits/33239
Fixes for the funcs_1 datadict test bugs
#30418 "datadict" tests (all engines) fail:
Dependency on the host name for ordering
#30420 "datadict" tests (all engines) fail:
Release build has help tables loaded
#30438 "{memory,myisam,ndb}__datadict" tests fail:
Use "InnoDB" without checking
#30440 "datadict" tests (all engines) fail:
Character sets depend on
configuration
There are more post merge fixes needed.
mysql-test/suite/funcs_1/r/innodb__datadict.result:
Post merge fix for
ChangeSet@1.2509, 2007-08-28
mysql-test/suite/funcs_1/r/memory__datadict.result:
Updated results
mysql-test/suite/funcs_1/r/myisam__datadict.result:
Updated results
mysql-test/suite/funcs_1/t/ndb__datadict.test:
Adjusted script
into four.local.lan:/WORK2/merge/mysql-5.1-build-datadict
It is to be expected that a post merge fix is needed.
mysql-test/suite/funcs_1/README.txt:
Auto merged
mysql-test/suite/funcs_1/t/innodb__datadict.test:
Auto merged
mysql-test/suite/funcs_1/t/memory__datadict.test:
Auto merged
mysql-test/suite/funcs_1/t/myisam__datadict.test:
Auto merged
mysql-test/suite/funcs_1/datadict/datadict_master.inc:
Manual merge
mysql-test/suite/funcs_1/r/innodb__datadict.result:
Manual merge
mysql-test/suite/funcs_1/r/memory__datadict.result:
Manual merge
mysql-test/suite/funcs_1/r/myisam__datadict.result:
Manual merge
This is a performance bug, affecting in particular the bison generated code
for the parser.
Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
bit_expr -> bit_term
bit_term -> bit_factor
bit_factor -> value_expr
value_expr -> term
term -> factor
etc
This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.
With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.
Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.
See the bug report for performance data.
mysql-test/r/parser_precedence.result:
Improved test coverage for operator precedence
mysql-test/t/parser_precedence.test:
Improved test coverage for operator precedence
sql/sql_yacc.yy:
Simplified the grammar to improve performances
Bug#30418 "datadict" tests (all engines) fail: Dependency on the host name
for ordering
Bug#30420 "datadict" tests (all engines) fail: Release build has help tables loaded
Bug#30438 "{memory,myisam,ndb}__datadict" tests fail: Use "InnoDB" without checking
Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration
Attention: Only the build team can check if Bug#30440 is really fixed.
mysql-test/suite/funcs_1/README.txt:
Update README
mysql-test/suite/funcs_1/datadict/datadict_master.inc:
1. Exclude the help tables from the INFORMATION_SCHEMA.TABLES
and the INFORMATION_SCHEMA.STATISTICS selects.
2. Replace error numbers with error names
3. Sort some results with mysqltest builtin function
4. Some other minor changes
mysql-test/suite/funcs_1/r/innodb__datadict.result:
Updated expected results
mysql-test/suite/funcs_1/r/memory__datadict.result:
Updated expected results
mysql-test/suite/funcs_1/r/myisam__datadict.result:
Updated expected results
mysql-test/suite/funcs_1/t/innodb__datadict.test:
Add $OTHER_ENGINE_TYPE variable which is used in data_dict_master.inc.
mysql-test/suite/funcs_1/t/memory__datadict.test:
Add $OTHER_ENGINE_TYPE variable which is used in data_dict_master.inc.
mysql-test/suite/funcs_1/t/myisam__datadict.test:
Add $OTHER_ENGINE_TYPE variable which is used in data_dict_master.inc.
mysql-test/suite/funcs_1/r/datadict_help_tables_build.result:
File with expected results
mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result:
File with expected results
mysql-test/suite/funcs_1/t/datadict_help_tables_build.test:
Additional test checking the information about the help tables within
INFORMATION_SCHEMA.TABLES/INFORMATION_SCHEMA.STATISTICS
as compensation for the removed checks within datadict_master.inc.
Variant for use during build tests (non empty help tables)
mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test:
Additional test checking the information about the help tables within
INFORMATION_SCHEMA.TABLES/INFORMATION_SCHEMA.STATISTICS
as compensation for the removed checks within datadict_master.inc.
Variant for use during development tests (empty help tables)
The optimization that uses a unique index to remove GROUP BY did not
ensure that the index was actually used, thus violating the ORDER BY
that is implied by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index over non-nullable field(s). In case GROUP BY ... ORDER BY
null is used, GROUP BY is simply removed.
mysql-test/include/mix1.inc:
Bug#30596: Test case for InnoDB
Here, as opposed to for MyISAM, row lookup is done using index
whenever the index covers the group list.
mysql-test/r/distinct.result:
Bug#30596: Changed test case.
Prior to Bug#16458, These queries use temp table and filesort. The
bug was that they used a temp table. However, that patch removed
filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
Bug#30596: Correct result
The test case for IGNORE INDEX FOR GROUP BY gets degraded performance
(unneccesary filesort). This is due to Bug#30665, which will be fixed separately.
mysql-test/r/innodb_mysql.result:
Bug#30596: Test result
mysql-test/t/group_by.test:
Bug#30596: Test case
sql/sql_select.cc:
Bug#30596: The fix:
- replace GROUP BY with ORDER BY unless ORDER BY [NULL|<constant>]
- make sure to use the keys for GROUP BY in this ORDER BY.
Currently the Last_query_cost session status variable shows
only the cost of a single flat subselect. For complex queries
(with subselects or unions etc) Last_query_cost is not valid
as it was showing the cost for the last optimized subselect.
Fixed by reseting to zero Last_query_cost when the complete
cost of the query cannot be determined.
Last_query_cost will be non-zero only for single flat queries.
mysql-test/r/status.result:
Bug #30377: test case
mysql-test/t/status.test:
Bug #30377: test case
sql/sql_lex.h:
Bug #30377: helper function
sql/sql_select.cc:
Bug #30377: don't assign cost if not on single level statement
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
mysql-test/suite/ndb/r/ndb_restore.result:
Auto merged
mysql-test/suite/ndb/t/ndb_restore.test:
Auto merged
sql/ha_ndbcluster.cc:
manual merge
- the listed file_names are not necessarily on disk, so we need to discover them if they aren't
mysql-test/t/ndb_restore.test:
Bug #30667 ndb table discovery does not work correcly with information schema
into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/loaddata.test:
Auto merged
to perform this analyzis)
client/mysqltest.c:
Add function 'show_query' and use it to output some debug queries when
"sync_with_master" has failed.
mysql-test/mysql-test-run.pl:
Move "analyze_testcase_failure" to mysqltest
into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
extra/yassl/include/openssl/crypto.h:
Auto merged
extra/yassl/include/openssl/ssl.h:
Auto merged
extra/yassl/include/yassl_int.hpp:
Auto merged
extra/yassl/src/ssl.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
vio/viossl.c:
Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
Merge 5.0->5.1
- Merge sslaccept and sslconnect.
- Atomically "reset" vio to VIO_TYPE_SSL when the SSL connection has
succeeded, this avoids having to revert anything and thus protects
against "close_active_vio" in the middle.
- Add some variance to the testcase
mysql-test/t/rpl_ssl.test:
Add some variance by running two selects before stopping the slave
Check that number of records in t1 are equal on master and slave
vio/viossl.c:
Rewrite sslconnect and sslaccept to automically "reset" the vio
to VIO_TYPE_SSL. Also use the fd from 'SSL_get_fd' to avoid
setting vio->sd to -1, that previously occured when "close_active_vio"
was called during connect/accept.
Merge the two function since they were exactly the same except for one line.
Update the DBUG printouts to be generic(i.e use peer instead of client/server).
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
sql/field.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/rpl_record.cc:
Auto merged
sql/rpl_utility.cc:
Auto merged
sql/rpl_utility.h:
Auto merged
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
configure.in:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/partition_pruning.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
Auto merged
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
Auto merged
mysql-test/suite/rpl/r/rpl_timezone.result:
Auto merged
mysql-test/suite/rpl/t/rpl_relayspace.test:
Auto merged
mysql-test/suite/rpl/t/rpl_timezone.test:
Auto merged
mysql-test/t/select.test:
Auto merged
netware/BUILD/compile-netware-END:
Auto merged
netware/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/time.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/innobase/log/log0recv.c:
Auto merged
storage/innobase/srv/srv0srv.c:
Auto merged
storage/innobase/trx/trx0trx.c:
Auto merged
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
manual merge (use remote)
mysql-test/suite/rpl/t/disabled.def:
Manual merge - both rpl_innodb_mixed_ddl and rpl_innodb_mixed_dml
are fixed, and should be run as part of the rpl suite.
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
client/mysql_upgrade.c:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/sql_show.cc:
Auto merged
Initialize thd->variables.pseudo_thread_id when a new embedded
thd is created.
libmysqld/lib_sql.cc:
Add comment regarding duplication of code in create_embedded_thd()
vs. create_new_thread() and prepare_new_connection_state(). This
was a cause for not properly initializing the pseudo_thread_id variable.
mysql-test/r/func_misc.result:
Add test case to ensure connection_id() returns a sane value
mysql-test/t/func_misc.test:
Add test case to ensure connection_id() returns a sane value
sql/mysqld.cc:
Add comment warning of the duplication of code between create_new_thread()
and create_embedded_thd()
sql/sql_connect.cc:
Add comment warning of the duplication of code between
prepare_new_connection_state() and create_embedded_thd()
Update some tests in the "parts" suite, so they're skipped if the
requisite plugins are not present in the mysqld.
mysql-test/suite/parts/t/partition_char_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/partition_datetime_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/partition_decimal_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/partition_float_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/partition_int_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/partition_special_innodb.test:
Skip if mysqld doesn't include InnoDB support
mysql-test/suite/parts/t/rpl_partition.test:
Skip if mysqld doesn't include partition support
Bug #30316: Some "parts" tests fail because the server uses "--secure-file-priv"
Bug #30341: Test suite "parts" needs to be adapted to the new rules disallowing many functio
Bug #30408: Suite "parts" needs bug numbers updated
Bug #30411: Suite "parts" needs bug numbers updated: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir
Bug #30581: partition_value tests use disallowed CAST() function
Included are some general fixes to allow the "parts" test suite to be run
successfully. This includes disabling a few tests or parts of tests,
cleaning up the test cases and their results, etc. Basically, these tests
have not been run for some time, and had suffered some bit rot.
The bugs were fixed as a single changeset, because in some ways they depend
on each other. I couldn't be sure I'd updated all the error codes (for
bugs 30408 and 30411) without also adapting to the new allowed functions
rules (bug 30341), and vice versa.
mysql-test/include/partition_layout.inc:
Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc:
Add ASCII(), ORD() and WEEKOFYEAR() as blocked functions (they depend
too much on character set, etc.).
Remove DATEDIFF() as a blocked function (it is implemented in terms
of TO_DAYS() and the minus operator).
mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc:
Remove ASCII(), ORD() and WEEKOFYEAR(), which are not allowed functions.
Remove uses of CAST() in partitioning functions - it is not allowed.
Disable testing of FLOOR() and CEILING on non-integer fields, due to
Bug 30577.
Test MOD() with an integer field instead of floating point (it has a
hybrid result type, like FLOOR() and CEILING(), but makes sense to use
with an integer field).
Add DATEDIFF() as an allowed function, because it is implemented in
terms of TO_DAYS() and the minus operator.
mysql-test/suite/parts/inc/partition_alter3.inc:
Remove use of disallowed CAST() function in partitioning
mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc:
The blocked functions are actually blocked now, so expect errors.
This is a result of the fix for bug 18198.
mysql-test/suite/parts/inc/partition_date.inc:
Remove uses of CAST() in partitioning functions - it is not allowed.
mysql-test/suite/parts/inc/partition_datetime.inc:
Remove uses of CAST() in partitioning functions - it is not allowed.
mysql-test/suite/parts/inc/partition_decimal.inc:
Remove uses of CAST() in partitioning functions - it is not allowed.
Disable testing of FLOOR() and CEILING(), due to Bug 30577.
mysql-test/suite/parts/inc/partition_directory.inc:
Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
mysql-test/suite/parts/inc/partition_double.inc:
Remove uses of CAST() in partitioning functions - it is not allowed.
Disable testing of FLOOR() and CEILING(), due to Bug 30577.
mysql-test/suite/parts/inc/partition_enum.inc:
Remove use of CAST(), which is disallowed.
Remove test which relies on CAST().
mysql-test/suite/parts/inc/partition_float.inc:
Remove uses of CAST() in partitioning functions - it is not allowed.
Disable testing of FLOOR() and CEILING(), due to Bug 30577.
mysql-test/suite/parts/inc/partition_layout_check1.inc:
Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
mysql-test/suite/parts/inc/partition_layout_check2.inc:
Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
mysql-test/suite/parts/inc/partition_methods1.inc:
Ensure that the contents of $MYSQLTEST_VARDIR are not in the result file
mysql-test/suite/parts/inc/partition_set.inc:
Remove test which relies on CAST(), which is disallowed.
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
Fix Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir
Move data files into std_data/parts/*, so they can be used with LOAD
DATA INFILE '../std_data_ln/parts/*' while --secure-file-priv is in
force.
mysql-test/suite/parts/inc/partition_syntax.inc:
Remove use of CAST(), which is disallowed.
mysql-test/suite/parts/inc/partition_time.inc:
Remove use of CAST(), which is disallowed.
mysql-test/suite/parts/inc/partition_timestamp.inc:
Remove use of CAST(), which is disallowed.
mysql-test/suite/parts/inc/partition_value.inc:
Disable this entire test file, because it relies on using CAST() as
a partitioning function, which is disallowed. See Bug 30581,
"partition_value tests use disallowed CAST() function".
mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result:
Update test case results
mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result:
Update test case results
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
Update test case results
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_alter3_innodb.result:
Update test case results
mysql-test/suite/parts/r/partition_alter3_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_basic_innodb.result:
Update test case results
mysql-test/suite/parts/r/partition_basic_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_datetime_innodb.result:
Update test case results
mysql-test/suite/parts/r/partition_datetime_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_decimal_innodb.result:
Update test case results
mysql-test/suite/parts/r/partition_decimal_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_float_myisam.result:
Update test case results
mysql-test/suite/parts/r/partition_syntax_innodb.result:
Update test case results
mysql-test/suite/parts/r/partition_syntax_myisam.result:
Update test case results
mysql-test/suite/parts/t/disabled.def:
Mark several more tests as disabled: partition_value_myisam,
partition_value_innodb, part_supported_sql_func_ndb,
rpl_ndb_dd_partitions, and partition_float_innodb
mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc:
Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc:
Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc:
Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc:
Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc
mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc:
Rename: mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc -> mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc
mysql-test/suite/parts/inc/partition_alter_1.inc:
Correct expected error codes, which changed due to bug 29245.
mysql-test/suite/parts/inc/partition_check.inc:
Correct expected error codes, which changed due to bug 29245.
mysql-test/suite/parts/inc/partition_syntax_1.inc:
Correct expected error codes, which changed due to bug 29245.
The optimization that uses a unique index to remove GROUP BY, did not
ensure that the index was actually used, thus violating the ORDER BY
that is impled by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
simply removed.
BitKeeper/etc/ignore:
Added support-files/mysqld_multi.server tests/bug25714 cscope.in.out cscope.out cscope.po.out to the ignore list
mysql-test/r/distinct.result:
Bug#30596: Changed test case.
Prior to Bug#16458, These queries use temp table and filesort. The
bug was that they used a temp table. However, that patch removed
filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
Bug#30596: Correct result
mysql-test/r/innodb_mysql.result:
Bug#30596: Test case for innodb. Here, as opposed to for MyISAM, row
lookup is done using index whenever the index covers the group list.
mysql-test/t/group_by.test:
Bug#30596: Test case
mysql-test/t/innodb_mysql.test:
Bug#30596: Test case
sql/sql_select.cc:
Bug#30596: The fix, replacing GROUP BY with ORDER BY unless
ORDER BY [NULL|<constant>]
sql/field.cc:
- always pack in little endian, irrespective of starage engine native format
- always unpack as if it is atored in little endian, and unpack it to storage engine native format
If, after the tables are locked, one of the conditions to read from a
HANDLER table is not met, the handler code wrongly jumps to a error path
that won't unlock the tables.
The user-visible effect is that after a error in a handler read command,
all subsequent handler operations on the same table will hang.
The fix is simply to correct the code to jump to the (same) error path that
unlocks the tables.
mysql-test/r/handler.result:
Bug#30632 test case result
mysql-test/t/handler.test:
Bug#30632 test case
sql/sql_handler.cc:
Always unlock the internal and external table level locks if any of the conditions
(including errors) to read from a HANDLER table are not met.
into moksha.local:/Users/davi/mysql/push/bugs/25164-5.1
sql/lock.cc:
Auto merged
mysql-test/include/deadlock.inc:
Auto merged
mysql-test/r/deadlock_innodb.result:
Auto merged
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.
The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.
Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.
Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.
Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.
mysql-test/r/innodb-deadlock.result:
Bug#25164 test case result
mysql-test/t/innodb-deadlock.test:
Bug#25164 test case. The CREATE TABLE may fail depending on the character set
of the system and filesystem, but it should never hang.
sql/lock.cc:
Unlock the storage engine "external" table level locks, if the MySQL thr_lock
locking subsystem detects a deadlock error.
MySQL replicates the time zone only when operations that involve
it are performed. This is controlled by a flag. But this flag
is set only on successful operation.
The flag must be set also when there is an error that involves
a timezone (so the master would replicate the error to the slaves).
mysql-test/suite/rpl/r/rpl_timezone.result:
repush of Bug 29536 for 5.1.22 tree: test case
mysql-test/suite/rpl/t/rpl_timezone.test:
repush of Bug 29536 for 5.1.22 tree: test case
sql/field.cc:
re-push of Bug 29536 for 5.1.22: move setting of the flag before the operation
(so it apples to errors as well).
sql/time.cc:
re-push of Bug 29536 for 5.1.22: move setting of the flag before the operation
(so it apples to errors as well).
- Update result file to include these "misleading errors", better to
run mysql_upgrade with them than not at all.
mysql-test/r/mysql_upgrade.result:
Update result file for mysql_upgrade after removing it's disabling
A test case was waiting for a fixed number of seconds for a specific
state of the slave IO thread to take place.
Fixed by waiting in a loop for that specific thread state instead
(or timeout).
mysql-test/suite/rpl/t/rpl_relayspace.test:
recommit of Bug 25228 for 5.1.22: fixed test case
into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
mysql-test/lib/mtr_misc.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
client/mysql_upgrade.c:
Manual merge 5.0->5.1
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-build
mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/rpl_record.cc:
Auto merged
sql/rpl_rli.h:
Auto merged
sql/rpl_utility.cc:
Auto merged
sql/rpl_utility.h:
Auto merged
using TPC-B):
Problem: A RBR event can contain incomplete row data (only key value and
fields which have been changed). In that case, when the row is unpacked
into record and written to a table, the missing fields get incorrect NULL
values leading to master-slave inconsistency.
Solution: Use values found in slave's table for columns which are not given
in the rows event. The code for writing a single row uses the following
algorithm:
1. unpack row_data into table->record[0],
2. try to insert record,
3. if duplicate record found, fetch it into table->record[0],
4. unpack row_data into table->record[0],
5. write table->record[0] into the table.
Where row_data is the row as stored in the data area of a rows event.
Thus:
a) unpacking of row_data happens at the time when row is written into
a table,
b) when unpacking (in step 4), only columns present in row_data are
overwritten - all other columns remain as they were found in the table.
Since all data needed for the above algorithm is stored inside
Rows_log_event class, functions which locate and write rows are turned
into methods of that class.
replace_record() -> Rows_log_event::write_row()
find_and_fetch_row() -> Rows_log_event::find_row()
Both methods take row data from event's data buffer - the row being
processed is pointed by m_curr_row. They unpack the data as needed into
table's record buffers record[0] or record[1]. When row is unpacked,
m_curr_row_end is set to point at next row in the data buffer.
Other changes introduced in this changeset:
- Change signature of unpack_row(): don't report errors and don't
setup table's rw_set here. Errors can happen only when setting default
values in prepare_record() function and are detected there.
- In Rows_log_event and derived classes, don't pass arguments to
the execution primitives (do_...() member functions) but use class
members instead.
- Move old row handling code into log_event_old.cc to be used by
*_rows_log_event_old classes.
Also, a new test rpl_ndb_2other is added which tests basic replication
from master using ndb tables to slave storing the same tables using
(possibly) different engine (myisam,innodb).
Test is based on existing tests rpl_ndb_2myisam and rpl_ndb_2innodb.
However, these tests doesn't work for various reasons and currently are
disabled (see BUG#19227).
The new test differs from the ones it is based on as follows:
1. Single test tests replication with different storage engines on slave
(myisam, innodb, ndb).
2. Include file extra/rpl_tests/rpl_ndb_2multi_eng.test containing
original tests is replaced by extra/rpl_tests/rpl_ndb_2multi_basic.test
which doesn't contain tests using partitioned tables as these don't work
currently. Instead, it tests replication to a slave which has more or
less columns than master.
3. Include file include/rpl_multi_engine3.inc is replaced with
include/rpl_multi_engine2.inc. The later differs by performing slightly
different operations (updating more than one row in the table) and
clearing table with "TRUNCATE TABLE" statement instead of "DELETE FROM"
as replication of "DELETE" doesn't work well in this setting.
4. Slave must use option --log-slave-updates=0 as otherwise execution of
replication events generated by ndb fails if table uses a different
storage engine on slave (see BUG#29569).
sql/log_event.cc:
- Initialization of new Rows_log_event members.
- Fixing some typos in documentation.
In Rows_log_event::do_apply_event:
- Set COMPLETE_ROWS_F flag (when master and slave have the same number of
columns and all colums are present in the row)
- Move initialization of tables write/read sets here, outside the rows
processing loop (and out of unpack_row() function).
- Remove calls to do_prepare_row() - no longer needed.
- Add code managing m_curr_row and m_curr_row_end pointers.
- Change signatures of row processing methods of Rows_log_event and it
descendants - now most arguments are taken from class members.
- Remove do_prepare_row() methods which are no longer used.
- The auto_afree_ptr template is moved to rpl_utility.h (so that it can
be used in log_event_old.cc).
- Removed copy_extra_fields() function - no longer used.
In Rows_log_event::write_row (former replace_record):
- The old code is moved to log_event_old.cc.
- Use prepare_record() and non-destructive unpack_current_row() to fill record
with data.
- In case a record being inserted already exists on slave and row data is
incomplete use the record found and non-destructive unpack_current_row() to
combine new column values with existing ones.
- More debug info added.
In Rows_log_event::find_row (former find_and_fetch_row function):
- The old code is moved to log_event_old.cc.
- Unpacking of the row is moved here.
- In case of search using PK, the key data is prepared here.
- More debug info added.
- Remove initialization of Rows_log_event::m_after_image buffer which is no
longer used.
- Use new row unpacking methods in Update_rows_log_event::do_exec_row() to
create before and after image.
Note: all existing code used by Rows_log_event::do_apply_event() has been moved
to log_event_old.cc to be used by *_rows_log_event_old classes.
sql/log_event.h:
- Add new COMPLETE_ROWS_F flag in Rows_log_event.
- Add Rows_log_event members describing the row being processed.
- Add a pointer to key buffer which is used in derived classes.
- Add new methods: find__row(), write_row() and unpack_current_row().
- Change signatures of do_...() methods (replace method arguments by
class members).
- Remove do_prepare_row() method which is no longer used.
- Update method documentation.
- Add Old_rows_log_event class, which contains the old row processing code, as
a friend of Rows_log_event so that it can access all members of an event
instance.
sql/log_event_old.cc:
Move here old implementation of Rows_log_event::do_apply_event() and
helper methods.
sql/log_event_old.h:
- Define new class Old_rows_log_event encapsulating old version of
Rows_log_event::do_apply_event() and the helper methods.
- Add the Old_rows_log_event class as a base for *_old versions of RBR event
classes, ensure that the old version of do_apply_event() is called.
- For *_old classes, declare the helper methods used in the old version of
do_apply_event().
sql/rpl_record.cc:
- Make unpack_row non-destructive for columns not present in the row.
- Don't fill read/write set here as it is done outside these functions.
- Move initialization of a record with default values to a separate
function prepare_record().
sql/rpl_record.h:
- Change signature of unpack_row().
- Declare function prepare_record().
sql/rpl_utility.cc:
Make tabe_def::calc_field_size() a const method.
sql/rpl_utility.h:
Make table_def::calc_field_size() a const method.
Move auto_afree_ptr template here so that it can be re-used (currently
in log_event.cc and log_event_old.cc). Similar with DBUG_PRINT_BITSET
macro.
mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test:
Modification of rpl_ndb_2multi_eng test. Tests with partitioned tables
are removed and a setup with slave having different number of columns
than master is added.
mysql-test/include/rpl_multi_engine2.inc:
Modification of rpl_multi_engine3.inc which operates on more rows and
replaces "DELETE FROM t1" with "TRUNCATE TABLE t1" as the first form
doesn't replicate in NDB -> non-NDB setting (BUG#28538).
mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result:
Results of the test.
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt:
Test options. --log-slave-updates=0 is compulsory as otherwise non-NDB
slave applying row events from NDB master will fail when trying to log
them.
mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test:
Test replication of NDB table to slave using other engine. The main test
is in extra/rpl_tests/rpl_ndb_2multi_basic.test. It is included here
several times with different settings of default storage engine on slave.
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/type_bit.result:
Auto merged
mysql-test/t/type_bit.test:
Auto merged
sql/sql_select.cc:
Merge with 5.0-opt.
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/status.result:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/log_event_old.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/status.test:
Manual resolve with 5.1.
sql/log_event.cc:
Manual resolve with 5.1.
sql/sql_yacc.yy:
Manual resolve with 5.1.
Bug #16979: AUTO_INC lock in InnoDB works a table level lock
- this is a major change in InnoDB auto-inc handling.
Bug #27950: Duplicate entry error in auto-inc after mysqld restart
- Init AUTOINC from delete_row().
Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE
- Use value specified by MySQL, in update_row().
mysql-test/r/innodb.result:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1655:
Fix the innodb.test failure mentioned in r1654.
storage/innobase/dict/dict0dict.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
storage/innobase/dict/dict0mem.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
storage/innobase/handler/ha_innodb.cc:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1718:
Replace mysql_byte with uchar and remove the #define mysql_byte from
ha_innodb.cc. This cleanup was made possible as of r1550:
Revision r1658:
check_trx_exists(): Remove a redundant function call and assignment that
was added by someone at MySQL.
Revision r1656:
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
Revision r1654:
One test case in innodb.test fails because of auto-increment
changes in r1562:1653:
$diff innodb.result innodb.reject
504c504
< 3 test2 this will work
---
> 4 test2 this will work
storage/innobase/handler/ha_innodb.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1654:
One test case in innodb.test fails because of auto-increment
changes in r1562:1653:
$diff innodb.result innodb.reject
504c504
< 3 test2 this will work
---
> 4 test2 this will work
storage/innobase/ibuf/ibuf0ibuf.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1715:
ibuf0ibuf.c: Remove the unused prototype for dict_index_print_low()
that was inadvertently added in r832.
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
storage/innobase/include/dict0dict.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
storage/innobase/include/dict0mem.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
Revision r1719:
Merge r1264 from branches/zip: Avoid memory fragmentation when
adding column definitions to tables.
dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
allocation. Allow it and "name" to be NULL. These parameters are NULL
when creating dummy indexes.
dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
dict_table_get_col_name(): Allow table->col_names to be NULL.
dict_table_add_system_columns(), dict_table_add_to_cache():
Add the parameter "heap".
---
Additional changes that had to be merged from branches/zip:
dict_table_add_system_columns(): New function, factored out from
dict_table_add_to_cache().
mlog_parse_index(): Add some consistency checks, and make use of
dict_table_add_system_columns().
storage/innobase/include/lock0lock.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1664:
lock_number_of_rows_locked(): Fix a typo in comment, and make the comments
in lock0lock.c and lock0lock.h identical. The typo was incorrectly fixed in
r1623.
storage/innobase/include/row0mysql.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
storage/innobase/include/row0sel.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
storage/innobase/include/trx0trx.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
storage/innobase/include/ut0mem.h:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1713:
Fix typo in comment.
storage/innobase/log/log0recv.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1657:
recv_init_crash_recovery(): remove trailing white space
storage/innobase/row/row0mysql.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
storage/innobase/row/row0sel.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
storage/innobase/trx/trx0trx.c:
Apply InnoDB snapshot innodb-5.1-ss1726.
Revision r1645:
Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
is one test that fails as of this commit. The updated test case should be
part of the snapshot from MySQL shortly.
Fix for bug# 27950 - Init AUTOINC from delete_row().
Fix for bug# 28781 - Use value specified by MySQL, in update_row().
Summary of structural changes:
==============================
InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix
for simple INSERT statements (including multi-value inserts), we try and avoid
acquiring the special AUTOINC table level lock unless another transaction has
already reserved the AUTOINC table level lock, in which case we fall back
to the old behavior of acquiring the AUTOINC table level lock.
The max AUTOINC value is now read directly using the low level interface
of InnoDB.
This test case uses the wait_condition helper (only available in 5.1) in order to wait till the select/update opens and locks the table.
mysql-test/r/sp.result:
Test case result for bug 29936
mysql-test/t/sp.test:
Test case for bug 29936
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
libmysql/libmysql.c:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
libmysql/libmysql.c:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/ha_partition.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
Recommit to 5.1.22.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
mysql-test/r/select.result:
Added a test case for bug #30396.
Recommit to 5.1.22.
mysql-test/t/select.test:
Added a test case for bug #30396.
Recommit to 5.1.22.
sql/item_cmpfunc.h:
Removed max_members from the COND_EQUAL class as not useful anymore.
Recommit to 5.1.22.
sql/sql_base.cc:
Added the max_equal_elems field to the st_select_lex structure.
Recommit to 5.1.22.
sql/sql_lex.cc:
Added the max_equal_elems field to the st_select_lex structure.
Recommit to 5.1.22.
sql/sql_lex.h:
Added the max_equal_elems field to the st_select_lex structure.
The field contains the maximal number of elements in multiple equalities
built for the query conditions.
Recommit to 5.1.22.
sql/sql_select.cc:
Fixed bug #30396.
Recommit to 5.1.22.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
The max_equal_elems field to the st_select_lex structure is used now
to calculate the above mentioned upper bound. The field contains the
maximal number of elements in multiple equalities built for the query
conditions.
into bk-internal.mysql.com:/users/gshchepa/mysql-5.1-opt
sql/item.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
In the ha_partition::position() we didn't calculate the number
of the partition of the record. We used m_last_part value instead,
relying on that it is set in other place like previous call of a method
like ::write_row(). In replication we don't call any of these befor
position(). Delete_rows_log_event::do_exec_row calls find_and_fetch_row.
In case of InnoDB-based PARTITION table, we have HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
enabled, so use position() / rnd_pos() calls to fetch the record.
Fixed by adding partition_id calculation to the ha_partition::position()
sql/ha_partition.h:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
column_bitmaps_signal interface added
sql/ha_partition.cc:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
Calculate the number of the partition in ha_partition::position().
ha_partition::column_bitmaps_signal() implemented
mysql-test/r/partition_pruning.result:
Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
test result fixed
Test case contains possible race conditions. This patch fixes these race
conditions and also adjust the test to execute according to its documentation.
mysql-test/r/events.result:
Modified test case to fit test documentation
mysql-test/t/events.test:
Modified test case to fit test documentation
mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
updated main test for DDL
mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
updated main test for DML
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
updated result file
mysql-test/suite/rpl/t/disabled.def:
updated disabled.def
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
sql/field.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/set_var.cc:
Auto merged
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
BUILD/SETUP.sh:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
"Test federated_bug_25714 issues non-existing shell command"
Problem caused by missing '$' symbol in eval statement causing it
to always attempt to run test even if the test was not compiled.
mysql-test/include/have_bug25714.inc:
bug30359
missing '$' in eval statement
This is a performance bug, related to the parsing or 'OR' and 'AND' boolean
expressions.
Let N be the number of expressions involved in a OR (respectively AND).
When N=1
For example, "select 1" involve only 1 term: there is no OR operator.
In 4.0 and 4.1, parsing expressions not involving OR had no overhead.
In 5.0, parsing adds some overhead, with Select->expr_list.
With this patch, the overhead introduced in 5.0 has been removed,
so that performances for N=1 should be identical to the 4.0 performances,
which are optimal (there is no code executed at all)
The overhead in 5.0 was in fact affecting significantly some operations.
For example, loading 1 Million rows into a table with INSERTs,
for a table that has 100 columns, leads to parsing 100 Millions of
expressions, which means that the overhead related to Select->expr_list
is executed 100 Million times ...
Considering that N=1 is by far the most probable expression,
this case should be optimal.
When N=2
For example, "select a OR b" involves 2 terms in the OR operator.
In 4.0 and 4.1, parsing expressions involving 2 terms created 1 Item_cond_or
node, which is the expected result.
In 5.0, parsing these expression also produced 1 node, but with some extra
overhead related to Select->expr_list : creating 1 list in Select->expr_list
and another in Item_cond::list is inefficient.
With this patch, the overhead introduced in 5.0 has been removed
so that performances for N=2 should be identical to the 4.0 performances.
Note that the memory allocation uses the new (thd->mem_root) syntax
directly.
The cost of "is_cond_or" is estimated to be neglectable: the real problem
of the performance degradation comes from unneeded memory allocations.
When N>=3
For example, "select a OR b OR c ...", which involves 3 or more terms.
In 4.0 and 4.1, the parser had no significant cost overhead, but produced
an Item tree which is difficult to evaluate / optimize during runtime.
In 5.0, the parser produces a better Item tree, using the Item_cond
constructor that accepts a list of children directly, but at an extra cost
related to Select->expr_list.
With this patch, the code is implemented to take the best of the two
implementations:
- there is no overhead with Select->expr_list
- the Item tree generated is optimized and flattened.
This is achieved by adding children nodes into the Item tree directly,
with Item_cond::add(), which avoids the need for temporary lists and memory
allocation
Note that this patch also provide an extra optimization, that the previous
code in 5.0 did not provide: expressions are flattened in the Item tree,
based on what the expression already parsed is, and not based on the order
in which rules are reduced.
For example : "(a OR b) OR c", "a OR (b OR c)" would both be represented
with 2 Item_cond_or nodes before this patch, and with 1 node only with this
patch. The logic used is based on the mathematical properties of the OR
operator (it's associative), and produces a simpler tree.
sql/item_cmpfunc.h:
Improved performances for parsing boolean expressions
sql/sql_yacc.yy:
Improved performances for parsing boolean expressions
mysql-test/r/parser_precedence.result:
Added test cases to cover boolean operator precedence
mysql-test/t/parser_precedence.test:
Added test cases to cover boolean operator precedence
client/mysqldump.c:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_yacc.yy:
Manual merge.
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
client/mysqldump.c:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_plugin.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_yacc.yy:
Manual merge with 5.1 main tree.
into trift2.:/MySQL/M51/push-5.1
Includes manual merges.
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/suite/ndb/r/ndb_dd_basic.result:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event_old.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_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/unireg.h:
Auto merged
mysql-test/r/status.result:
Manual merge of two incompatible fixes to test "status".
mysql-test/t/status.test:
Manual merge of two incompatible fixes to test "status".
sql/log_event.cc:
Manual merge.
sql/log_event.h:
Manual merge.
Updated test case to correst inconsistant results on different OS per #bug30559
mysql-test/suite/ndb/t/ndb_dd_ddl.test:
Updated test case to correst inconsistant results on different OS per #bug30559
mysql-test/suite/ndb/r/ndb_dd_ddl.result:
Updated test case to correst inconsistant results on different OS per #bug30559
Fixed wrong hash function prototype (causes failure on 64 bit systems)
mysql-test/r/rpl_events.result:
Removed wrong merge (result file is now identical as in 5.1 tree)
mysys/lf_hash.c:
Fixed compiler warning
mysys/my_safehash.c:
Fixed wrong hash function prototype (causes failure on 64 bit systems)
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
Fixed compiler warning
uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
mysql-test/suite/ndb/t/ndb_dd_dump.test:
uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
mysql-test/suite/ndb/r/ndb_dd_dump.result:
uncommented the test case stated in bug18856 and commiting to mysql-5.1-target-5.1.22 clone per Tomas
Fixed bug when doing rnd_read followed by update.
Don't duplicate error messages in log
Initialize transaction object properly. Fixed failure in event*tests when running with maria
mysql-test/mysql-test-run.pl:
Removed warning when running with --external
mysql-test/r/maria.result:
Added back disabled test
Verified that the result changes are correct
mysql-test/t/maria.test:
Added back disabled test
sql/handler.cc:
More debugging.
Simple style change
sql/sql_class.cc:
Initialize transaction object properly. Fixed failure in event*tests when running with maria
storage/maria/ha_maria.cc:
More dbug info
storage/maria/ma_blockrec.c:
Removed not needed line
storage/maria/ma_rrnd.c:
Removed not used code
Ensure that cur_row.lastpos is always set when reading record with rnd. (Fixes failure in maria.test)
storage/maria/maria_def.h:
Don't call maria_print_error() except with EXTRA_DEBUG
(Removes duplicate error messages when somethings goes wrong)
into hynda.mysql.fi:/home/my/mysql-5.1-marvel
mysql-test/mysql-test-run.pl:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event_old.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_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/status.result:
Manual merge with main 5.0 tree.
mysql-test/t/status.test:
Manual merge with main 5.0 tree.
sql/log_event.cc:
Manual merge with main 5.0 tree.
sql/log_event.h:
Manual merge with main 5.0 tree.
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test:
Auto merged
mysql-test/suite/ndb/r/ndb_read_multi_range.result:
Auto merged
mysql-test/suite/ndb/t/ndb_read_multi_range.test:
Auto merged
mysql-test/suite/rpl/r/rpl_row_max_relay_size.result:
Auto merged
mysql-test/suite/rpl/t/rpl_row_create_table.test:
Auto merged
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
Auto merged
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/rpl_rli.h:
Auto merged
BitKeeper/deleted/.del-rpl_extraMaster_Col.test:
Delete: mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/sql_cache.cc:
Auto merged
into adventure.(none):/home/thek/Development/cpp/bug30269/my51-bug30269
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/sql_cache.cc:
Auto merged
Although the query cache doesn't support retrieval of statements containing
column level access control, it was still possible to cache such statements
thus wasting memory.
This patch extends the access control check on the target tables to avoid
caching a statement with column level restrictions.
Views are excepted and can be cached but only retrieved by super user account.
mysql-test/t/query_cache_with_views.test:
Rename: mysql-test/t/view_query_cache.test -> mysql-test/t/query_cache_with_views.test
mysql-test/r/query_cache_with_views.result:
Rename: mysql-test/r/view_query_cache.result -> mysql-test/r/query_cache_with_views.result
mysql-test/r/query_cache.result:
Modified test case to allow caching of views
mysql-test/t/query_cache.test:
Modified test case to allow caching of views
sql/sql_cache.cc:
Allow caching of views
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/t/information_schema.test:
after merge fix
sql/sql_show.cc:
after merge fix
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge
mysql-test/r/handler_myisam.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/lock.cc:
Auto merged
sql/sql_base.cc:
Auto merged
mysql-test/include/handler.inc:
Auto merged
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/log_event.h:
Auto merged
sql/rpl_record.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
into pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/show_check.test:
Auto merged
added SUPER_ACL check for I_S.TRIGGERS
mysql-test/r/information_schema.result:
result fix
mysql-test/r/information_schema_db.result:
result fix
mysql-test/t/information_schema.test:
test case
sql/sql_show.cc:
added SUPER_ACL check for I_S.TRIGGERS
Finish premature patch which was accidentally pushed; remove debugging
info and correct the test.
mysql-test/r/status.result:
Correct test results
mysql-test/t/status.test:
Disable query log for one statement, and correct some comments
When using --log --log-output=table, we increment Table_locks_immediate
with every query. The wait_condition.inc runs a query a variable number
of times, depending on server load, etc. This is a problem, when the
test is checking the Table_locks_immediate value.
Fix is to adjust the Table_locks_immediate value based on how many times
the wait_condition query was executed.
mysql-test/include/wait_condition.inc:
Add a $wait_condition_reps variable, which lets the caller check how
many times the wait_condition query was executed.
This is used in the main.status test to adjust the value of
Table_locks_immediate (it gets incremented with each query
when --log --log-output=table).
mysql-test/t/status.test:
Adjust Table_locks_immediate value based on how many times the
wait_condition query had to run.
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
into adventure.(none):/home/thek/Development/cpp/bug30269/my51-bug30269
mysql-test/r/query_cache.result:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
mysql-test/t/query_cache.test:
Manual merge
Although the query cache doesn't support retrieval of statements containing
column level access control, it was still possible to cache such statements
thus wasting memory.
This patch extends the access control check on the target tables to avoid
caching a statement with column level restrictions.
mysql-test/r/query_cache.result:
Added test
mysql-test/t/query_cache.test:
Added test
sql/sql_cache.cc:
The function check_table_access leaves the artifact
grant.want_privileges= 1, if a statement refers to tables with column level
privileges. To avoid the statement from being stored into the query cache,
it is enough to check this flag and set 'safe_to_cache_query' to zero.
sql/sql_cache.h:
- Removed 'static' attribute or class methods
- Added THD parameter to process_and_count_tables
mysql_ha_open calls mysql_ha_close on the error path (unsupported) to close the (opened) table before inserting it into the tables hash list handler_tables_hash) but mysql_ha_close only closes tables which are on the hash list, causing the table to be left open and locked.
This change moves the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close (mysql_ha_close).
mysql-test/r/lock_multi.result:
Bug#25856 test result
mysql-test/t/lock_multi.test:
Bug#25856 test case
sql/sql_handler.cc:
Move the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close.
HEAP tables can't index BIT fields. Due to this when grouping by such fields is
needed they are converted to a fields of the LONG type when temporary table
is being created. But a side effect of this is that a wrong type of BIT
fields is returned to a client.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
mysql-test/t/type_bit.test:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
mysql-test/r/type_bit.result:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
sql/sql_select.cc:
Bug#30245: A wrong type of a BIT field is reported when grouped by it.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
mysql-test/r/ndb_restore_compat.result:
add "order by" to select clause
mysql-test/std_data/ndb_backup50/BACKUP-2-0.1.Data:
new data file
mysql-test/std_data/ndb_backup50/BACKUP-2-0.2.Data:
new data file
mysql-test/std_data/ndb_backup50/BACKUP-2.1.ctl:
new ctl file
mysql-test/std_data/ndb_backup50/BACKUP-2.1.log:
new log file
mysql-test/std_data/ndb_backup50/BACKUP-2.2.ctl:
new ctl file
mysql-test/std_data/ndb_backup50/BACKUP-2.2.log:
new log file
mysql-test/t/ndb_restore_compat.test:
add "order by" to select clause
into olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug30396
libmysql/libmysql.c:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Manual merge
into mysql.com:/data0/mysqldev/my/mysql-5.1-30367
sql/sql_show.cc:
Auto merged
sql/table.cc:
Auto merged
sql/log_event.cc:
Manual merge, later version of the fix takes precedence.
Fixed failing func_misc test for embedded server
Added casts to avoid compiler warnings
Removed Table_locks_immediate as it's depending on log file cacheing
Changed type of get_time() to avoid warnings
Removed testing if purger master logs succeded as this is not deterministic
libmysqld/lib_sql.cc:
Fixed failing func_misc test for embedded server
mysql-test/mysql-test-run.pl:
Shut first down slaves, then masters.
This should avoid some errors in the log file about not being able to connect to master during shutdown
mysql-test/r/func_misc.result:
Move DROP TABLE's first
mysql-test/r/status.result:
Removed Table_locks_immediate as it's depending on log file cacheing
mysql-test/suite/ndb/r/ndb_binlog_basic.result:
Removed testing if purger master logs succeded as this is not deterministic
mysql-test/suite/ndb/t/ndb_binlog_basic.test:
Removed testing if purger master logs succeded as this is not deterministic
mysql-test/t/func_misc.test:
Move DROP TABLE's first
mysql-test/t/status.test:
Removed Table_locks_immediate as it's depending on log file cacheing
sql/log_event.cc:
Added cast to avoid warnings
sql/log_event.h:
Changed type of get_time() to avoid warnings
into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.1/mysql-5.1-new-ndb-bj.merge
sql/ha_ndbcluster.cc:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Auto merged
storage/ndb/tools/restore/restore_main.cpp:
Auto merged
WL#3982 Test information_schema.processlist
and replaces the corresponding tests pushed to
mysql-test-extra-5.1/mysql-test/qa-suite/info_schema
mysql-test/suite/funcs_1/datadict/datadict_priv.inc:
Auxiliary script
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
Test of privileges
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
Test of values
mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result:
Expected results
mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result:
Expected results
mysql-test/suite/funcs_1/r/b_processlist_priv_ps.result:
Expected results
mysql-test/suite/funcs_1/r/b_processlist_val_ps.result:
Expected results
mysql-test/suite/funcs_1/t/a_processlist_priv_no_prot.test:
Test of privileges - variant without ps/sp/cursor/view-protocol
mysql-test/suite/funcs_1/t/a_processlist_val_no_prot.test:
Test of values - variant without ps/sp/cursor/view-protocol
mysql-test/suite/funcs_1/t/b_processlist_priv_ps.test:
Test of privileges - variant with ps-protocol
mysql-test/suite/funcs_1/t/b_processlist_val_ps.test:
Test of values - variant with ps-protocol
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
Auto merged
mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
Auto merged
sql/field.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/field.h:
Manual merge
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
mysql-test/r/select.result:
Added a test case for bug #30396.
mysql-test/t/select.test:
Added a test case for bug #30396.
sql/item_cmpfunc.h:
Removed max_members from the COND_EQUAL class as not useful anymore.
sql/sql_base.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.h:
Added the max_equal_elems field to the st_select_lex structure.
The field contains the maximal number of elements in multiple equalities
built for the query conditions.
sql/sql_select.cc:
Fixed bug #30396.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
The max_equal_elems field to the st_select_lex structure is used now
to calculate the above mentioned upper bound. The field contains the
maximal number of elements in multiple equalities built for the query
conditions.
into dev3-63.(none):/home/zhl/mysql/mysql-5.1/bug29674
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Revert the change in parseTableInfo for modified only in 5.0
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Revert declare of pareTableInfo for 5.1
storage/ndb/tools/restore/Restore.cpp:
Revert change in 5.1