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.
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 gleb.loc:/home/uchum/work/bk/5.1-opt
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
Merge with 5.0-opt.
mysql-test/t/sp.test:
Merge with 5.0-opt.
SP with local variables with non-ASCII names crashed the server.
The server replaces SP local variable names with NAME_CONST calls
when putting statements into the binary log. It used UTF8-encoded
item names as variable names for the replacement inside NAME_CONST
calls. However, statement string may be encoded by any
known character set by the SET NAMES statement.
The server used byte length of UTF8-encoded names to increment
the position in the query string that led to array index overrun.
sql/item.cc:
Fixed bug #30120.
The Item_splocal class constructor has been modified to
accept new parameter `len_in_q': the byte length of
variable name in the query string.
sql/item.h:
Fixed bug #30120.
The Item_splocal class has been modified to keep new
field `len_in_query': the byte length of variable name in
the query string.
sql/sp_head.cc:
Fixed bug #30120.
The subst_spvars function has been modified to increment
position in the query string by the lengths of not
encoded variable names instead of byte length of names
encoded to UTF-8.
sql/sql_yacc.yy:
Fixed bug #30120.
The simple_ident rule action has been modified to
pass the byte length of the local variable name token
to the Item_splocal object constructor.
mysql-test/t/sp.test:
Updated test case for bug #30120.
mysql-test/r/sp.result:
Updated test case for bug #30120.
into gleb.loc:/home/uchum/work/bk/5.0-opt
sql/sql_base.cc:
Auto merged
mysql-test/r/sp.result:
Merge with local tree.
mysql-test/t/sp.test:
Merge with local tree.
Using view columns by their names during an execution of
a prepared SELECT statement or a SELECT statement inside
a SP caused a memory leak.
sql/sql_base.cc:
Fixed bug #29834.
The find_field_in_view function has been modified to
use the execution memory root for the Item_direct_view_ref
objects allocation at non-first executions of
a PS/SP instead of the statement memory.
mysql-test/t/sp.test:
Updated test case for bug #29834.
mysql-test/r/sp.result:
Updated test case for bug #29834.
Additional test case fix for bug #29338.
mysql-test/t/sp.test:
Additional test case fix for bug #29338.
mysql-test/r/sp.result:
Additional test case fix for bug #29338.
into gleb.loc:/home/uchum/work/bk/5.1-opt
sql/item_func.h:
Auto merged
mysql-test/r/sp.result:
Merge with 5.0-opt.
mysql-test/t/sp.test:
Merge with 5.0-opt.
sql/item_func.cc:
Merge with 5.0-opt.
Optimization of queries with DETERMINISTIC functions in the
WHERE clause was not effective: sequential scan was always
used.
Now a SF with the DETERMINISTIC flags is treated as constant
when it's arguments are constants (or a SF doesn't has arguments).
sql/item_func.h:
Fixed bug #29338.
The Item_func_sp::used_tables has been removed
(virtual Item_func::used_tables function is enough).
The virtual Item_func_sp::update_used_tables function
has been added.
sql/item_func.cc:
Fixed bug #29338.
The Item_func_sp::update_used_tables and the
Item_func_sp::fix_field functions have been modified
to take into account the DETERMINISTIC flag of SF definition.
mysql-test/r/sp.result:
Updated test case for bug #29338.
mysql-test/t/sp.test:
Updated test case for bug #29338.
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
mysql-test/t/sp.test:
Auto merged
sql/item.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/t/innodb_mysql.test:
Manual merge.
fails if a database is not selected prior.
The problem manifested itself when a user tried to
create a routine that had non-fully-qualified identifiers in its bodies
and there was no current database selected.
This is a regression introduced by the fix for Bug 19022:
The patch for Bug 19022 changes the code to always produce a warning
if we can't resolve the current database in the parser.
In this case this was not necessary, since even though the produced
parsed tree was incorrect, we never re-use sphead
that was obtained at first parsing of CREATE PROCEDURE.
The sphead that is anyhow used is always obtained through db_load_routine,
and there we change the current database to sphead->m_db before
calling yyparse.
The idea of the fix is to resolve the current database directly using
lex->sphead->m_db member when parsing a stored routine body, when
such is present.
This patch removes the need to reset the current database
when loading a trigger or routine definition into SP cache.
The redundant code will be removed in 5.1.
mysql-test/r/sp.result:
Update test results (Bug#29050)
mysql-test/r/trigger.result:
Update results.
mysql-test/t/sp.test:
Add a test case for Bug#29050
mysql-test/t/trigger.test:
Fix wrong behavior covered with tests.
sql/sql_lex.cc:
Implement st_lex::copy_db_to().
sql/sql_lex.h:
Declare st_lex::copy_db_to().
sql/sql_parse.cc:
Use st_lex::copy_db_to() in add_table_to_list, rather than
THD::copy_db_to(). The former will use the database of the sphead,
if we're parsing a stored routine, not the default database in
THD. The default database is needed to initialize tables->db
when the database part was not explicitly specified in the identifier.
sql/sql_yacc.yy:
Use st_lex::copy_db_to() in the parser, rather than
THD::copy_db_to(). The former will use the database of the sphead,
if we're parsing a stored routine, not the default database in
THD.
'No database selected' is reported when calling stored procedures
Remove the offending warning introduced by the fix for Bug
25082
This minimal patch relies on the intrinsic knowledge of the fact that
mysql_change_db is never called with 'force_switch' set to TRUE
when such a warning may be needed:
* every stored routine belongs to a database (unlike, e.g., a
user defined function, which does not), so if we're activating the
database of a stored routine, it can never be NULL.
Therefore, this branch is never called for activation.
* if we're restoring the 'old' current database after routine
execution is complete, we should not issue a warning, since it's OK to
call a routine without having previously selected the current database.
TODO: 'force_switch' is an ambiguous flag, since we do not actually
have to 'force' the switch in case of stored routines at all.
When we activate the routine's database, we should perform
all the checks as in case of 'use db', and so we already do (in this
case 'force_switch' is unused).
When we load a routine into cache, we should not use mysql_change_db
at all, since there it's enough to call thd->reset_db(). We
do it this way for triggers, but code for routines is different (wrongly).
TODO: bugs are lurking in replication, since it bypasses mysql_change_db
and calls thd->[re_]set_db to set the current database.
The latter does not change thd->db_charset, thd->sctx->db_access
and thd->variables.collation_database (and this may have nasty side
effects).
These todo items are to be addressed in a separate patch, if at all.
mysql-test/r/sp.result:
Update results (Bug#28551)
mysql-test/t/sp.test:
Add a test case (Bug#28551)
sql/sp.cc:
Remove an obsolete comment.
Replace a check with an assert.
sql/sql_db.cc:
Remove the offending warning introduced by the fix for Bug
25082
This minimal patch relies on the intrinsic knowledge of the fact that
mysql_change_db is never called with 'force_switch' set to TRUE
when such a warning may be needed.
into maint1.mysql.com:/data/localhome/tsmith/bk/maint/51
client/mysqldump.c:
Auto merged
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/suite/binlog/r/binlog_multi_engine.result:
Auto merged
mysql-test/suite/binlog/t/binlog_multi_engine.test:
Auto merged
mysql-test/suite/ndb/r/ndb_read_multi_range.result:
Auto merged
mysql-test/suite/ndb/r/ndb_sp.result:
Auto merged
mysql-test/suite/ndb/r/ndb_trigger.result:
Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
Auto merged
mysql-test/suite/ndb/t/loaddata_autocom_ndb.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_alter_table3.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover3.test:
Auto merged
mysql-test/suite/ndb/t/ndb_basic.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_log_bin.test:
Auto merged
mysql-test/suite/ndb/t/ndb_binlog_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_bitfield.test:
Auto merged
mysql-test/suite/ndb/t/ndb_blob.test:
Auto merged
mysql-test/suite/ndb/t/ndb_blob_partition.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_charset.test:
Auto merged
mysql-test/suite/ndb/t/ndb_condition_pushdown.test:
Auto merged
mysql-test/suite/ndb/t/ndb_config.test:
Auto merged
mysql-test/suite/ndb/t/ndb_config2.test:
Auto merged
mysql-test/suite/ndb/t/ndb_cursor.test:
Auto merged
mysql-test/suite/ndb/t/ndb_database.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_alter.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_backuprestore.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_basic.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_ddl.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_disk2memory.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_dump.test:
Auto merged
mysql-test/suite/ndb/t/ndb_dd_sql_features.test:
Auto merged
mysql-test/suite/ndb/t/ndb_gis.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index_ordered.test:
Auto merged
mysql-test/suite/ndb/t/ndb_index_unique.test:
Auto merged
mysql-test/suite/ndb/t/ndb_insert.test:
Auto merged
mysql-test/suite/ndb/t/ndb_limit.test:
Auto merged
mysql-test/suite/ndb/t/ndb_loaddatalocal.test:
Auto merged
mysql-test/suite/ndb/t/ndb_lock.test:
Auto merged
mysql-test/suite/ndb/t/ndb_minmax.test:
Auto merged
mysql-test/suite/ndb/t/ndb_multi.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_error.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_key.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_list.test:
Auto merged
mysql-test/suite/ndb/t/ndb_partition_range.test:
Auto merged
mysql-test/suite/ndb/t/ndb_read_multi_range.test:
Auto merged
mysql-test/suite/ndb/t/ndb_rename.test:
Auto merged
mysql-test/suite/ndb/t/ndb_replace.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore_partition.test:
Auto merged
mysql-test/suite/ndb/t/ndb_restore_print.test:
Auto merged
mysql-test/suite/ndb/t/ndb_row_format.test:
Auto merged
mysql-test/suite/ndb/t/ndb_single_user.test:
Auto merged
mysql-test/suite/ndb/t/ndb_sp.test:
Auto merged
mysql-test/suite/ndb/t/ndb_subquery.test:
Auto merged
mysql-test/suite/ndb/t/ndb_temporary.test:
Auto merged
mysql-test/suite/ndb/t/ndb_transaction.test:
Auto merged
mysql-test/suite/ndb/t/ndb_trigger.test:
Auto merged
mysql-test/suite/ndb/t/ndb_truncate.test:
Auto merged
mysql-test/suite/ndb/t/ndb_types.test:
Auto merged
mysql-test/suite/ndb/t/ndb_update.test:
Auto merged
mysql-test/suite/ndb/t/ndb_view.test:
Auto merged
mysql-test/suite/ndb/t/ndbapi.test:
Auto merged
mysql-test/suite/ndb/t/ps_7ndb.test:
Auto merged
mysql-test/suite/ndb/t/strict_autoinc_5ndb.test:
Auto merged
mysql-test/suite/rpl/r/rpl_events.result:
Auto merged
mysql-test/suite/rpl/r/rpl_replicate_do.result:
Auto merged
mysql-test/suite/rpl/r/rpl_row_UUID.result:
Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
Auto merged
mysql-test/suite/rpl/r/rpl_trigger.result:
Auto merged
mysql-test/suite/rpl/r/rpl_view.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt:
Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
mysql-test/t/disabled.def:
manual merge
(Will need to follow up with moving a few test cases around post-merge)
- BUG#11986: Stored routines and triggers can fail if the code
has a non-ascii symbol
- BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
- BUG#19443: INFORMATION_SCHEMA does not support charsets properly
- BUG#21249: Character set of SP-var can be ignored
- BUG#25212: Character set of string constant is ignored (stored routines)
- BUG#25221: Character set of string constant is ignored (triggers)
There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
definition;
1. No query-definition-character set.
In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.
The context contains the following data:
- client character set;
- connection collation (character set and collation);
- collation of the owner database;
The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).
2. Wrong mysqldump-output.
The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.
Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).
The solution is
- to store definition queries in the original character set;
- to change SHOW CREATE statement to output definition query in the
binary character set (i.e. without any conversion);
- introduce SHOW CREATE TRIGGER statement;
- to dump special statements to switch the context to the original one
before dumping and restore it afterwards.
Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.
3. INFORMATION_SCHEMA showed non-UTF8 strings
The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.
Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.
This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object. Specialized SHOW CREATE statements should be
used for this.
The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).
Example:
- original query:
CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;
- UTF8 query (for INFORMATION_SCHEMA):
CREATE VIEW v1 AS SELECT 'Hello' AS c1;
client/mysqldump.c:
Set original character set and collation before dumping definition query.
include/my_sys.h:
Move out-parameter to the end of list.
mysql-test/lib/mtr_report.pl:
Ignore server-warnings during the test case.
mysql-test/r/create.result:
Update result file.
mysql-test/r/ctype_cp932_binlog_stm.result:
Update result file.
mysql-test/r/events.result:
Update result file.
mysql-test/r/events_bugs.result:
Update result file.
mysql-test/r/events_grant.result:
Update result file.
mysql-test/r/func_in.result:
Update result file.
mysql-test/r/gis.result:
Update result file.
mysql-test/r/grant.result:
Update result file.
mysql-test/r/information_schema.result:
Update result file.
mysql-test/r/information_schema_db.result:
Update result file.
mysql-test/r/lowercase_view.result:
Update result file.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/r/ndb_sp.result:
Update result file.
mysql-test/r/ps.result:
Update result file.
mysql-test/r/rpl_replicate_do.result:
Update result file.
mysql-test/r/rpl_sp.result:
Update result file.
mysql-test/r/rpl_trigger.result:
Update result file.
mysql-test/r/rpl_view.result:
Update result file.
mysql-test/r/show_check.result:
Update result file.
mysql-test/r/skip_grants.result:
Update result file.
mysql-test/r/sp-destruct.result:
Update result file.
mysql-test/r/sp-error.result:
Update result file.
mysql-test/r/sp-security.result:
Update result file.
mysql-test/r/sp.result:
Update result file.
mysql-test/r/sql_mode.result:
Update result file.
mysql-test/r/system_mysql_db.result:
Update result file.
mysql-test/r/temp_table.result:
Update result file.
mysql-test/r/trigger-compat.result:
Update result file.
mysql-test/r/trigger-grant.result:
Update result file.
mysql-test/r/trigger.result:
Update result file.
mysql-test/r/view.result:
Update result file.
mysql-test/r/view_grant.result:
Update result file.
mysql-test/t/events.test:
Update test case (new columns added).
mysql-test/t/information_schema.test:
Update test case (new columns added).
mysql-test/t/show_check.test:
Test case for SHOW CREATE TRIGGER in prepared statements and
stored routines.
mysql-test/t/sp-destruct.test:
Update test case (new columns added).
mysql-test/t/sp.test:
Update test case (new columns added).
mysql-test/t/view.test:
Update test.
mysys/charset.c:
Move out-parameter to the end of list.
scripts/mysql_system_tables.sql:
Add new columns to mysql.proc and mysql.event.
scripts/mysql_system_tables_fix.sql:
Add new columns to mysql.proc and mysql.event.
sql/event_data_objects.cc:
Support new attributes for events.
sql/event_data_objects.h:
Support new attributes for events.
sql/event_db_repository.cc:
Support new attributes for events.
sql/event_db_repository.h:
Support new attributes for events.
sql/events.cc:
Add new columns to SHOW CREATE event resultset.
sql/mysql_priv.h:
1. Introduce Object_creation_ctx;
2. Introduce SHOW CREATE TRIGGER;
3. Introduce auxilary functions.
sql/sp.cc:
Add support for new store routines attributes.
sql/sp_head.cc:
Add support for new store routines attributes.
sql/sp_head.h:
Add support for new store routines attributes.
sql/sql_lex.cc:
Generate UTF8-body on parsing/lexing.
sql/sql_lex.h:
1. Generate UTF8-body on parsing/lexing.
2. Introduce SHOW CREATE TRIGGER.
sql/sql_parse.cc:
Introduce SHOW CREATE TRIGGER.
sql/sql_partition.cc:
Update parse_sql().
sql/sql_prepare.cc:
Update parse_sql().
sql/sql_show.cc:
Support new attributes for views
sql/sql_trigger.cc:
Support new attributes for views
sql/sql_trigger.h:
Support new attributes for views
sql/sql_view.cc:
Support new attributes for views
sql/sql_yacc.yy:
1. Add SHOW CREATE TRIGGER statement.
2. Generate UTF8-body for views, stored routines, triggers and events.
sql/table.cc:
Introduce Object_creation_ctx.
sql/table.h:
Introduce Object_creation_ctx.
sql/share/errmsg.txt:
Add new errors.
mysql-test/include/ddl_i18n.check_events.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_sp.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_triggers.inc:
Aux file for test suite.
mysql-test/include/ddl_i18n.check_views.inc:
Aux file for test suite.
mysql-test/include/have_cp1251.inc:
Aux file for test suite.
mysql-test/include/have_cp866.inc:
Aux file for test suite.
mysql-test/include/have_koi8r.inc:
Aux file for test suite.
mysql-test/include/have_utf8.inc:
Aux file for test suite.
mysql-test/r/ddl_i18n_koi8r.result:
Result file.
mysql-test/r/ddl_i18n_utf8.result:
Result file.
mysql-test/r/have_cp1251.require:
Aux file for test suite.
mysql-test/r/have_cp866.require:
Aux file for test suite.
mysql-test/r/have_koi8r.require:
Aux file for test suite.
mysql-test/r/have_utf8.require:
Aux file for test suite.
mysql-test/t/ddl_i18n_koi8r.test:
Complete koi8r test case for the CS patch.
mysql-test/t/ddl_i18n_utf8.test:
Complete utf8 test case for the CS patch.
mysql-test/r/sp.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
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
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 olga.mysql.com:/home/igor/mysql-5.1-opt-merge
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
sql/field.h:
Auto merged
sql/handler.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysqld.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_update.cc:
Auto merged
mysql-test/r/ps_2myisam.result:
Manual merge.
mysql-test/r/ps_3innodb.result:
Manual merge.
mysql-test/r/ps_4heap.result:
Manual merge.
mysql-test/r/ps_5merge.result:
Manual merge.
mysql-test/r/ps_7ndb.result:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_view.cc:
Manual merge.
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/subselect3.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Manual merge
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/r/sp.result:
Use local
mysql-test/r/sp.result:
Update results.
mysql-test/t/mysql.test:
Fix a typo.
mysql-test/t/mysqltest.test:
Fix a typo.
mysql-test/t/order_by.test:
Fix a typo.
mysql-test/t/row.test:
Remove an unsupported command.
mysql-test/t/sp.test:
Fix a typo.
mysql-test/t/subselect3.test:
Fix mysqltest warnings - now it warns when sees some suspicious --
comment
into moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
mysql-test/r/olap.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/field.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
sql/item_timefunc.cc:
Manual merge
longer showing SP names.
SHOW CREATE VIEW uses Item::print() methods to reconstruct the
statement text from the parse tree.
The print() method for stored procedure calls needs allocate
space to print the function's quoted name.
It was incorrectly calculating the length of the buffer needed
(was too short).
Fixed to reflect the actual space needed.
mysql-test/r/sp.result:
Bug #28605: test case
mysql-test/t/sp.test:
Bug #28605: test case
sql/item_func.cc:
Bug #28605: fixed the string length calculation
Bug#4968 ""Stored procedure crash if cursor opened on altered table"
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from
stored procedure."
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
Bug#24879 "Prepared Statements: CREATE TABLE (UTF8 KEY) produces a
growing key length" (this bug is not fixed in 5.0)
Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).
In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table are not
re-execution friendly: during their operation they modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc
for drop_it.remove() and similar patterns to find evidence.
The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement.
To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.
The problem of crashing bug 22060 stemmed from the fact that the above
metnioned functions were not only modifying HA_CREATE_INFO structure
in LEX, but also were changing it to point to areas in volatile memory
of the execution memory root.
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO in mysql_execute_command.
Additionally, this patch splits the part of mysql_alter_table
that analizes and rewrites information from the parser into
a separate function - mysql_prepare_alter_table, in analogy with
mysql_prepare_table, which is renamed to mysql_prepare_create_table.
mysql-test/r/ps.result:
Update test results (Bug#19182, Bug#22060, Bug#4968, Bug#6895)
mysql-test/r/sp.result:
Update results (Bug#19733)
mysql-test/t/ps.test:
Add test cases for Bug#19182, Bug#22060, Bug#4968, Bug#6895
mysql-test/t/sp.test:
Add a test case for Bug#19733
sql/field.h:
Implement a deep copy constructor for create_field
sql/mysql_priv.h:
LEX::key_list and LEX::create_list were moved to LEX::alter_info.
Update declarations to use LEX::alter_info instead of these two
members.
Remove declarations of mysql_add_index, mysql_drop_index.
sql/sql_class.cc:
Implement deep copy constructors.
sql/sql_class.h:
Implement (almost) deep copy constructors for key_part_spec,
Alter_drop, Alter_column, Key, foreign_key.
Replace pair<columns, keys> with an instance of Alter_info in
select_create constructor. We create a new copy of Alter_info
each time we re-execute SELECT .. CREATE prepared statement.
sql/sql_insert.cc:
Adjust to a new signature of create_table_from_items.
sql/sql_lex.cc:
Implement Alter_info::Alter_info that would make a "deep" copy
of all definition lists (keys, columns).
Move is_partition_management() from sql_partition.cc (feature-based
file division is evil).
sql/sql_lex.h:
Move key_list and create_list to class Alter_info. Implement
Alter_info::Alter_info that can be used with PS and SP.
Get rid of Alter_info::clear() which was an attempt to save on
matches and always use Alter_info::reset().
Implement an auxiliary Alter_info::init_for_create_from_alter()
which is used in mysql_alter_table.
sql/sql_list.cc:
Implement a copy constructor of class List that makes a deep copy
of all list nodes.
sql/sql_list.h:
Implement a way to make a deep copy of all list nodes.
sql/sql_parse.cc:
Adjust to new signatures of mysql_create_table, mysql_alter_table,
select_create. Functions mysql_create_index and mysql_drop_index has
become identical after initialization of alter_info was moved to the
parser, and were merged. Flag enable_slow_log was not updated for
SQLCOM_DROP_INDEX, which was a bug.
Just like CREATE INDEX, DROP INDEX is currently done via complete
table rebuild and is rightfully a slow administrative statement.
sql/sql_partition.cc:
Move is_partition_management() to sql_lex.cc
Adjust code to the new Alter_info.
sql/sql_table.cc:
Adjust mysql_alter_table, mysql_recreate_table, mysql_create_table,
mysql_prepare_table to new signatures.
Rename mysql_prepare_table to mysql_prepare_create_table. Make
sure it follows the convention and returns FALSE for success and
TRUE for error.
Move parts of mysql_alter_table to mysql_prepare_alter_table.
Move the first invokation of mysql_prepare_table from mysql_alter_table
to compare_tables, as it was needed only for the purpose
of correct comparison.
Since now Alter_info itself is created in the runtime mem root,
adjust mysql_prepare_table to always allocate memory in the
runtime memory root.
Remove dead code.
sql/sql_yacc.yy:
LEX::key_list and LEX::create_list moved to class Alter_info
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
into weblab.(none):/home/marcsql/TREE/mysql-5.1-21513
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_lex.cc:
manual merge
Before this fix, the parser would sometime change where a token starts by
altering Lex_input_string::tok_start, which later confused the code in
sql_yacc.yy that needs to capture the source code of a SQL statement,
like to represent the body of a stored procedure.
This line of code in sql_lex.cc :
case MY_LEX_USER_VARIABLE_DELIMITER:
lip->tok_start= lip->ptr; // Skip first `
would <skip the first back quote> ... and cause the bug reported.
In general, the responsibility of sql_lex.cc is to *find* where token are
in the SQL text, but is *not* to make up fake or incomplete tokens.
With a quoted label like `my_label`, the token starts on the first quote.
Extracting the token value should not change that (it did).
With this fix, the lexical analysis has been cleaned up to not change
lip->tok_start (in the case found for this bug).
The functions get_token() and get_quoted_token() now have an extra
parameters, used when some characters from the beginning of the token need
to be skipped when extracting a token value, like when extracting 'AB' from
'0xAB', for example, for a HEX_NUM token.
This exposed a bad assumption in Item_hex_string and Item_bin_string,
which has been fixed:
The assumption was that the string given, 'AB', was in fact preceded in
memory by '0x', which might be false (it can be preceded by "x'" and
followed by "'" -- or not be preceded by valid memory at all)
If a name is needed for Item_hex_string or Item_bin_string, the name is
taken from the original and true source code ('0xAB'), and assigned in
the select_item rule, instead of relying on assumptions related to how
memory is used.
mysql-test/r/sp.result:
Lex_input_stream::tok_start must point at the real start of a token.
mysql-test/t/sp.test:
Lex_input_stream::tok_start must point at the real start of a token.
sql/item.cc:
Lex_input_stream::tok_start must point at the real start of a token.
sql/sql_lex.cc:
Lex_input_stream::tok_start must point at the real start of a token.
sql/sql_yacc.yy:
Lex_input_stream::tok_start must point at the real start of a token.
---
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-vanilla-building
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work-vanilla-building
---
Fix test cases to pass for a plain ./configure && make build. This includes disabling two test cases when certain features are not present in the server. We're not losing coverage from this because these features are usually present, and disabling them here only serves the purpose to make the test cases work in the unlikely case that they aren't.
---
fixes
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
Disable this test case if we don't have partitioning
mysql-test/t/rpl_row_basic_11bugs.test:
Disable warnings in a number of places to make this test case work with servers that don't contain InnoDB
---
make test case look better on request from reviewer
mysql-test/t/rpl_row_mysqlbinlog.test:
Disable this test case if the server does not have cp932 compiled in
mysql-test/t/sp.test:
Disable warnings during table creation in one place where engine=innodb is used, in order to make this test case work with a mysqld that was compiled without InnoDB.
mysql-test/t/sp.test:
Disable warnings during table creation in one place where engine=innodb is used, in order to make this test case work with a mysqld that was compiled without InnoDB.
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
client/mysqldump.c:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
client/mysqldump.c:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_static.c:
Auto merged
mysys/safemalloc.c:
Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
sql/ha_archive.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql-common/client.c:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
mysql-test/r/sp.result:
Merged from main 5.0
sql/sql_load.cc:
Merged from main 5.0
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_static.c:
Auto merged
mysys/safemalloc.c:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/time.cc:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
client/client_priv.h:
Manual merge with main 5.1 source.
sql/event_data_objects.cc:
Manual merge with main 5.1 source.
sql/event_db_repository.cc:
Manual merge with main 5.1 source.
sql/mysqld.cc:
Manual merge with main 5.1 source.
sql/sql_load.cc:
Manual merge with main 5.1 source.
sql/sql_parse.cc:
Manual merge with main 5.1 source.
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
mysql-test/t/sp.test:
Auto merged
mysys/typelib.c:
Auto merged
sql/event_data_objects.cc:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/strfunc.cc:
Auto merged
sql/table.cc:
Auto merged
include/typelib.h:
Merged from 5.1 main tree.
mysql-test/r/sp.result:
Merged from 5.1 main tree.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg04/51
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
BitKeeper/deleted/.del-my_lread.c:
Auto merged
BitKeeper/deleted/.del-my_lwrite.c:
Auto merged
BitKeeper/deleted/.del-raid.cc~488f5fa6538394e1:
Auto merged
BitKeeper/deleted/.del-raid.h~2d2503a66b128ac6:
Auto merged
client/mysqldump.c:
Auto merged
extra/perror.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/r/mysqlbinlog2.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/sp_trans.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/default.c:
Auto merged
mysys/hash.c:
Auto merged
mysys/mf_iocache.c:
Auto merged
mysys/mf_keycache.c:
Auto merged
mysys/my_alloc.c:
Auto merged
mysys/my_dup.c:
Auto merged
mysys/my_getwd.c:
Auto merged
mysys/my_handler.c:
Auto merged
mysys/my_lib.c:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_pread.c:
Auto merged
mysys/my_read.c:
Auto merged
mysys/my_seek.c:
Auto merged
mysys/my_static.c:
Auto merged
mysys/safemalloc.c:
Auto merged
mysys/thr_alarm.c:
Auto merged
mysys/typelib.c:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/strfunc.cc:
Auto merged
sql/table.cc:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
storage/archive/ha_archive.cc:
Auto merged
storage/heap/_check.c:
Auto merged
storage/heap/hp_delete.c:
Auto merged
storage/heap/hp_hash.c:
Auto merged
storage/heap/hp_open.c:
Auto merged
storage/heap/hp_rkey.c:
Auto merged
storage/heap/hp_rrnd.c:
Auto merged
storage/heap/hp_write.c:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/myisam/mi_close.c:
Auto merged
storage/myisam/mi_delete.c:
Auto merged
storage/myisam/mi_dynrec.c:
Auto merged
storage/myisam/mi_keycache.c:
Auto merged
storage/myisam/mi_page.c:
Auto merged
storage/myisam/mi_statrec.c:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisammrg/myrg_extra.c:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/grant.result:
Merged from 5.0
mysql-test/r/sp.result:
Merged from 5.0
mysql-test/r/sp_trans.result:
Merged from 5.0
mysql-test/t/mysqlbinlog2.test:
Merged from 5.0
mysys/thr_lock.c:
Merged from 5.0
sql/ha_ndbcluster.cc:
Merged from 5.0
sql/log.cc:
Merged from 5.0
sql/mysql_priv.h:
Merged from 5.0
sql/mysqld.cc:
Merged from 5.0
sql/set_var.cc:
Merged from 5.0
sql/sql_db.cc:
Merged from 5.0
sql/sql_insert.cc:
Merged from 5.0
sql/sql_parse.cc:
Merged from 5.0
sql/sql_show.cc:
Merged from 5.0
sql/sql_update.cc:
Merged from 5.0
execution breaks replication.
When a stored routine is executed, we switch current
database to the database, in which the routine
has been created. When the stored routine finishes,
we switch back to the original database.
The problem was that if the original database does not
exist (anymore) after routine execution, we raised an error.
The fix is to report a warning, and switch to the NULL database.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Added test case for BUG#25082.
sql/mysql_priv.h:
1. Change mysql_change_db() prototype;
2. Polishing.
sql/sp.cc:
Polishing.
sql/sp_head.cc:
Polishing.
sql/sql_db.cc:
1. Polishing.
2. Fix mysql_change_db().
sql/sql_parse.cc:
Polishing.
sql/sql_show.cc:
Polishing.
into kpdesk.mysql.com:/home/thek/dev/mysql-5.1-runtime
mysql-test/t/sp.test:
Auto merged
sql/item_func.cc:
Auto merged
mysql-test/r/sp.result:
null merge
- 1.84e+15 converted to unsigned bigint should be
18400000000000000000 < 18446744073709551615.
- The test will still fail on windows, and is extracted
into a new bug report.
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_view.cc:
Auto merged
Possible problems: function call could be eliminated from where class and only
be evaluated once; function can be evaluated during table and item setup phase which could
cause side effects not to be registered in binlog.
Fixed with introducing func_item_sp::used_tables() returning the correct table_map constant.
mysql-test/r/sp.result:
results changed
mysql-test/t/sp.test:
regression test demonstrating that function's returns match where condition
of the top-level query table.
sql/item_func.h:
private used_tables() method returning the correct table_bit with meaning the item is not
a constant
into bodhi.local:/opt/local/work/mysql-5.1-runtime
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/events_scheduling.result:
Auto merged
BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8:
Auto merged
BitKeeper/deleted/.del-mysql_create_system_tables.sh:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/events_scheduling.test:
Auto merged
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/view.test:
Auto merged
scripts/mysql_system_tables_fix.sql:
Auto merged
sql/event_db_repository.cc:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.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_help.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/tztime.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/ha_myisam.h:
Auto merged
mysql-test/r/skip_grants.result:
Manualmerge.
mysql-test/r/sp.result:
Manualmerge.
mysql-test/t/skip_grants.test:
Manualmerge.
mysql-test/t/sp.test:
Manualmerge.
sql/event_data_objects.cc:
Manualmerge.
into bodhi.local:/opt/local/work/mysql-5.0-runtime
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
SCCS merged
mysql-test/t/sp.test:
SCCS merged
into naruto.:C:/cpp/bug20777/my51-bug20777
mysql-test/t/sp.test:
Auto merged
sql/item_func.h:
Auto merged
mysql-test/r/sp.result:
Manual merge
sql/item_func.cc:
Manual merge
- Stored procedures returning unsinged values returns signed values if
text protocol is used. The reason is that the stored proceedure item
Item_func_sp wasn't initializing the member variables properly based
on the information contained in the associated result field.
- The patch is to upon field-item association, ::fix_fields, initialize
the member variables in appropriate order.
- Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR.
This is changed to return the type of the actual result field.
- Member function name sp_result_field was refactored to the more
appropriate init_result_field.
- Member function name find_and_check_access was refactored to
sp_check_access.
mysql-test/r/sp.result:
- Added test
mysql-test/t/sp.test:
- Added test
sql/item_func.cc:
Bug#20777 Function w BIGINT UNSIGNED shows diff. behaviour with and without --ps-protocol
- Stored procedures returning unsinged values returns signed values if
text protocol is used. The reason is that the stored proceedure item
Item_func_sp wasn't initializing the member variables properly based
on the information contained in the associated result field.
- The patch is to upon field-item association, ::fix_fields, initialize
the member variables in appropriate order.
- Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR.
This is changed to to return the type of the actual result field.
- Member function name sp_result_field was refactored to the more
appropriate init_result_field.
- Member function name find_and_check_access was refactored to
sp_check_access.
sql/item_func.h:
Bug#20777 Function w BIGINT UNSIGNED shows diff. behaviour with and without --ps-protocol
- Stored procedures returning unsinged values returns signed values if
text protocol is used. The reason is that the stored proceedure item
Item_func_sp wasn't initializing the member variables properly based
on the information contained in the associated result field.
- The patch is to upon field-item association, ::fix_fields, initialize
the member variables in appropriate order.
- Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR.
This is changed to to return the type of the actual result field.
- Member function name sp_result_field was refactored to the more
appropriate init_result_field.
- Member function name find_and_check_access was refactored to
sp_check_access.
Before this fix, the parser would accept illegal code in SQL exceptions
handlers, that later causes the runtime to crash when executing the code,
due to memory violations in the exception handler stack.
The root cause of the problem is instructions within an exception handler
that jumps to code located outside of the handler. This is illegal according
to the SQL 2003 standard, since labels located outside the handler are not
supposed to be visible (they are "out of scope"), so any instruction that
jumps to these labels, like ITERATE or LEAVE, should not parse.
The section of the standard that is relevant for this is :
SQL:2003 SQL/PSM (ISO/IEC 9075-4:2003)
section 13.1 <compound statement>,
syntax rule 4
<quote>
The scope of the <beginning label> is CS excluding every <SQL schema
statement> contained in CS and excluding every
<local handler declaration list> contained in CS. <beginning label> shall
not be equivalent to any other <beginning label>s within that scope.
</quote>
With this fix, the C++ class sp_pcontext, which represent the "parsing
context" tree (a.k.a symbol table) of a stored procedure, has been changed
as follows:
- constructors have been cleaned up, so that only building a root node for
the tree is public; building nodes inside a tree is not public.
- a new member, m_label_scope, indicates if a given syntactic context
belongs to a DECLARE HANDLER block,
- label resolution, in the method find_label(), has been changed to
implement the restriction of scope regarding labels used in a compound
statement.
The actions in the parser, when parsing the body of a SQL exception handler,
have been changed as follows:
- the implementation of an exception handler (DECLARE HANDLER) now creates
explicitly a new sp_pcontext, to isolate the code inside the handler from
the containing compound statement context.
- registering exception handlers as a result occurs in the parent context,
see the rule sp_hcond_element
- the code in sp_hcond_list has been cleaned up, to avoid code duplication
In addition, the flags IN_SIMPLE_CASE and IN_HANDLER, declared in sp_head.h
have been removed, since they are unused and broken by design (as seen with
Bug 19194 (Right recursion in parser for CASE causes excessive stack usage,
limitation), representing a stack in a single flag is not possible.
Tests in sp-error have been added to show that illegal constructs are now
rejected.
Tests in sp have been added for code coverage, to show that ITERATE or LEAVE
statements are legal when jumping to a label in scope, inside the body of
an exception handler.
mysql-test/r/sp-error.result:
SQL Exception handlers define a parsing context for label resolution.
mysql-test/r/sp.result:
SQL Exception handlers define a parsing context for label resolution.
mysql-test/t/sp-error.test:
SQL Exception handlers define a parsing context for label resolution.
mysql-test/t/sp.test:
SQL Exception handlers define a parsing context for label resolution.
sql/sp_head.cc:
Minor cleanup
sql/sp_head.h:
Minor cleanup
sql/sp_pcontext.cc:
SQL Exception handlers define a parsing context for label resolution.
sql/sp_pcontext.h:
SQL Exception handlers define a parsing context for label resolution.
sql/sql_yacc.yy:
SQL Exception handlers define a parsing context for label resolution.
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merging
mysql-test/r/sp.result:
merging
mysql-test/r/view.result:
merging
mysql-test/t/func_str.test:
merging
mysql-test/t/view.test:
merging
into mysql.com:/home/hf/work/mrg/mysql-5.0-opt
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merging
mysql-test/r/sp.result:
merging
mysql-test/r/view.result:
merging
mysql-test/t/func_str.test:
merging
mysql-test/t/view.test:
merging
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
BUILD/check-cpu:
Auto merged
mysql-test/r/explain.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_test.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/explain.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_in.result:
SCCS merged
mysql-test/r/order_by.result:
SCCS merged
mysql-test/r/sp.result:
merging
mysql-test/t/func_in.test:
SCCS merged
mysql-test/t/order_by.test:
SCCS merged
mysql-test/t/view.test:
merging
sql/item_cmpfunc.h:
merging
sql/mysql_priv.h:
merging
sql/sql_select.cc:
SCCS merged
result.
For built-in functions like sqrt() function names are hard-coded and can be
compared by pointer. But this isn't the case for a used-defined stored
functions - names there are dynamical and should be compared as strings.
Now the Item_func::eq() function employs my_strcasecmp() function to compare
used-defined stored functions names.
mysql-test/t/sp.test:
Added a test case for bug#25373: Stored functions wasn't compared correctly which leads to a wrong result.
mysql-test/r/sp.result:
Added a test case for bug#25373: Stored functions wasn't compared correctly which leads to a wrong result.
sql/item_func.cc:
Bug#25373: Stored functions wasn't compared correctly which leads to a wrong
result.
Now the Item_func::eq() function employs my_strcasecmp() function to compare
used-defined stored functions names.
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51
client/mysqltest.c:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_wincond.c:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
client/mysql_upgrade.c:
Manual merge; I chose to keep Magnus' changes because they make the code
more simple; always use *only* the option file created by mysql_upgrade.
mysql-test/extra/binlog_tests/ctype_cp932.test:
Manual merge
mysql-test/r/binlog_row_ctype_cp932.result:
Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
Manual merge
mysql-test/r/mysqlbinlog.result:
Manual merge
mysql-test/r/rpl_switch_stm_row_mixed.result:
Manual merge
mysql-test/t/mysqlbinlog.test:
Manual merge
mysql-test/t/rpl_switch_stm_row_mixed.test:
Manual merge
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/50
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
into weblab.(none):/home/marcsql/TREE/mysql-5.1-8407-merge
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/lock.cc:
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_update.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
Bug 18914 (Calling certain SPs from triggers fail)
Bug 20713 (Functions will not not continue for SQLSTATE VALUE '42S02')
Bug 21825 (Incorrect message error deleting records in a table with a
trigger for inserting)
Bug 22580 (DROP TABLE in nested stored procedure causes strange dependency
error)
Bug 25345 (Cursors from Functions)
This fix resolves a long standing issue originally reported with bug 8407,
which affect the behavior of Stored Procedures, Stored Functions and Trigger
in many different ways, causing symptoms reported by all the bugs listed.
In all cases, the root cause of the problem traces back to 8407 and how the
server locks tables involved with sub statements.
Prior to this fix, the implementation of stored routines would:
- compute the transitive closure of all the tables referenced by a top level
statement
- open and lock all the tables involved
- execute the top level statement
"transitive closure of tables" means collecting:
- all the tables,
- all the stored functions,
- all the views,
- all the table triggers
- all the stored procedures
involved, and recursively inspect these objects definition to find more
references to more objects, until the list of every object referenced does
not grow any more.
This mechanism is known as "pre-locking" tables before execution.
The motivation for locking all the tables (possibly) used at once is to
prevent dead locks.
One problem with this approach is that, if the execution path the code
really takes during runtime does not use a given table, and if the table is
missing, the server would not execute the statement.
This in particular has a major impact on triggers, since a missing table
referenced by an update/delete trigger would prevent an insert trigger to run.
Another problem is that stored routines might define SQL exception handlers
to deal with missing tables, but the server implementation would never give
user code a chance to execute this logic, since the routine is never
executed when a missing table cause the pre-locking code to fail.
With this fix, the internal implementation of the pre-locking code has been
relaxed of some constraints, so that failure to open a table does not
necessarily prevent execution of a stored routine.
In particular, the pre-locking mechanism is now behaving as follows:
1) the first step, to compute the transitive closure of all the tables
possibly referenced by a statement, is unchanged.
2) the next step, which is to open all the tables involved, only attempts
to open the tables added by the pre-locking code, but silently fails without
reporting any error or invoking any exception handler is the table is not
present. This is achieved by trapping internal errors with
Prelock_error_handler
3) the locking step only locks tables that were successfully opened.
4) when executing sub statements, the list of tables used by each statements
is evaluated as before. The tables needed by the sub statement are expected
to be already opened and locked. Statement referencing tables that were not
opened in step 2) will fail to find the table in the open list, and only at
this point will execution of the user code fail.
5) when a runtime exception is raised at 4), the instruction continuation
destination (the next instruction to execute in case of SQL continue
handlers) is evaluated.
This is achieved with sp_instr::exec_open_and_lock_tables()
6) if a user exception handler is present in the stored routine, that
handler is invoked as usual, so that ER_NO_SUCH_TABLE exceptions can be
trapped by stored routines. If no handler exists, then the runtime execution
will fail as expected.
With all these changes, a side effect is that view security is impacted, in
two different ways.
First, a view defined as "select stored_function()", where the stored
function references a table that may not exist, is considered valid.
The rationale is that, because the stored function might trap exceptions
during execution and still return a valid result, there is no way to decide
when the view is created if a missing table really cause the view to be invalid.
Secondly, testing for existence of tables is now done later during
execution. View security, which consist of trapping errors and return a
generic ER_VIEW_INVALID (to prevent disclosing information) was only
implemented at very specific phases covering *opening* tables, but not
covering the runtime execution. Because of this existing limitation,
errors that were previously trapped and converted into ER_VIEW_INVALID are
not trapped, causing table names to be reported to the user.
This change is exposing an existing problem, which is independent and will
be resolved separately.
mysql-test/r/information_schema_db.result:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/r/sp-error.result:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/r/sp.result:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/r/trigger.result:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/r/view.result:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/t/sp-error.test:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/t/sp.test:
Revised the pre-locking code implementation, aligned the tests.
mysql-test/t/trigger.test:
Revised the pre-locking code implementation, aligned the tests.
sql/lock.cc:
table->placeholder now checks for schema_table
sql/mysqld.cc:
my_message_sql(): invoke internal exception handlers
sql/sp_head.cc:
exec_open_and_lock_tables(): open and lock tables, or return the
continuation destination of this instruction
sql/sp_head.h:
exec_open_and_lock_tables(): open and lock tables, or return the
continuation destination of this instruction
sql/sql_base.cc:
Prelock_error_handler: delay open table errors until execution
sql/sql_class.cc:
THD: add internal error handler, as an exception mechanism.
sql/sql_class.h:
THD: add internal error handler, as an exception mechanism.
sql/sql_update.cc:
table->placeholder now checks for schema_table
sql/table.cc:
st_table_list::hide_view_error(): masked more errors for view security
sql/table.h:
table->placeholder now checks for schema_table, and unopened tables
mysql-test/extra/rpl_tests/rpl_row_func003.test:
Fix spelling error
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
Restore sql_mode after test
mysql-test/r/events_logs_tests.result:
Turn even_scheduleroff before test ends
mysql-test/r/events_scheduling.result:
Turn even_scheduleroff before test ends
mysql-test/r/insert.result:
Drop tables t1 before test ends
mysql-test/r/rpl_read_only.result:
Set read_only flag back to default
mysql-test/r/rpl_row_NOW.result:
Drop database mysqltest1 before test ends
mysql-test/r/rpl_row_USER.result:
Drop users created by test
mysql-test/r/rpl_row_basic_11bugs.result:
Drop table and set query_cache_size back to default
mysql-test/r/rpl_row_func002.result:
Drop table created by test
mysql-test/r/rpl_row_sp008.result:
Drop table created by test
mysql-test/r/rpl_row_sp012.result:
Drop user created by test
mysql-test/r/rpl_row_tabledefs_2myisam.result:
Restore sql_mode
mysql-test/r/rpl_row_tabledefs_3innodb.result:
Restore sql_mode
mysql-test/r/rpl_row_tabledefs_7ndb.result:
Restore sql_mode
mysql-test/r/rpl_row_view01.result:
Drop database created by test
mysql-test/r/rpl_slave_status.result:
Remove created users
mysql-test/r/rpl_switch_stm_row_mixed.result:
Reset binlog_format to default
mysql-test/r/sp.result:
Drop procedure created by test
mysql-test/r/varbinary.result:
Drop table created by test
mysql-test/r/variables.result:
Reset changed variables to their defaults
mysql-test/t/events_logs_tests.test:
Turn off event_scheduler before test ends
mysql-test/t/events_scheduling.test:
Turn off event_scheduler
mysql-test/t/insert.test:
Drop table created by test
mysql-test/t/rpl_read_only.test:
Reset read_only flag
mysql-test/t/rpl_row_NOW.test:
Drop db created by test
mysql-test/t/rpl_row_USER.test:
Drop users created
mysql-test/t/rpl_row_basic_11bugs.test:
Drop tables created by test
mysql-test/t/rpl_row_func002.test:
Drop table created by test
mysql-test/t/rpl_row_sp008.test:
Drop table created by test
mysql-test/t/rpl_row_sp012.test:
Drop user created by test
mysql-test/t/rpl_row_view01.test:
Drop db created by test
mysql-test/t/rpl_slave_status.test:
Remove users created by test
mysql-test/t/rpl_switch_stm_row_mixed.test:
Reset binlog_format
mysql-test/t/sp.test:
Drop procedure created by test
mysql-test/t/varbinary.test:
Drop tables created by test
mysql-test/t/variables.test:
Restore variables to their default before test ends
into polly.local:/home/kaa/src/maint/mysql-5.1-maint
mysql-test/include/mix2.inc:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/r/mysqlbinlog.result:
Manual merge
mysql-test/t/innodb.test:
Manual merge
mysql-test/t/mysql.test:
Manual merge
mysql-test/t/mysqlbinlog.test:
Manual merge
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
mysql-test/r/sp.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/r/mysqlbinlog.result:
SCCS merged
into polly.local:/tmp/maint/bug25137/my51-bug25137
mysql-test/extra/binlog_tests/ctype_cp932.test:
Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/ctype_ucs2_def-master.opt:
Auto merged
mysql-test/t/ctype_ucs2_def.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
sql/mysqld.cc:
Auto merged
mysql-test/r/innodb.result:
Manual merge
mysql-test/t/innodb.test:
Manual merge
mysql-test/t/sp.test:
Manual merge
The problem happened because those tests were using "cp932" and "ucs2" without checking whether these character sets are available. This fix moves test parts to make character set specific parts be tested only if they are:
- some parts were moved to "ctype_ucs.test" and "ctype_cp932.test"
- some parts were moved to the newly added tests "innodb-ucs2.test", "mysqlbinglog-cp932.test" and "sp-ucs2.test"
mysql-test/r/ctype_cp932.result:
Moved cp932-specific test case from mysql.test
mysql-test/r/innodb.result:
Moved ucs2-specific test cases to innodb-ucs2.test
mysql-test/r/mysql.result:
Move cp932-specific test cases to ctype_cp932.test
mysql-test/r/mysqlbinlog.result:
Moved cp932-specific test case to mysqlbinlog-cp932.test
mysql-test/r/sp.result:
Moved ucs2-specific test case to sp-ucs2.test
mysql-test/t/ctype_cp932.test:
Moved cp932-specific test case from mysql.test
mysql-test/t/ctype_ucs2_def-master.opt:
Use the comma-separated list of character sets to avoid mysql-test errors when ucs2 is not available in the server
mysql-test/t/ctype_ucs2_def.test:
Added requirement for ucs2 in the server
mysql-test/t/innodb.test:
Moved ucs2-specific test cases to innodb-ucs2.test
mysql-test/t/mysql.test:
Move cp932-specific test cases to ctype_cp932.test
mysql-test/t/mysqlbinlog.test:
Moved cp932-specific test case to mysqlbinlog-cp932.test
mysql-test/t/sp.test:
Moved ucs2-specific test case to sp-ucs2.test
sql/mysqld.cc:
Allow specifying several character sets for test purposes, to make "mysqld" start even if the character set being tested is not compiled:
mysqld --default-character-set=ucs2,latin1
The first available character set will be chosen.
mysql-test/r/innodb-ucs2.result:
New BitKeeper file ``mysql-test/r/innodb-ucs2.result''
mysql-test/r/mysqlbinlog-cp932.result:
New BitKeeper file ``mysql-test/r/mysqlbinlog-cp932.result''
mysql-test/r/sp-ucs2.result:
New BitKeeper file ``mysql-test/r/sp-ucs2.result''
mysql-test/t/innodb-ucs2.test:
New BitKeeper file ``mysql-test/t/innodb-ucs2.test''
mysql-test/t/mysqlbinlog-cp932.test:
New BitKeeper file ``mysql-test/t/mysqlbinlog-cp932.test''
mysql-test/t/sp-ucs2.test:
New BitKeeper file ``mysql-test/t/sp-ucs2.test''
mysql-test/r/create.result:
Fixed error number
mysql-test/r/rpl_sp.result:
Fixed error number
mysql-test/r/sp.result:
Fixed error number
mysql-test/r/view.result:
Better fix for now() handling
mysql-test/t/ndb_basic.test:
Use error names instead of numbers
mysql-test/t/ndb_index_unique.test:
Use error names instead of numbers
mysql-test/t/rpl_skip_error-slave.opt:
Change to new error number
mysql-test/t/sp.test:
Change to new error number
mysql-test/t/view.test:
Better fix for now() handling
into mysql.com:/home/my/mysql-5.1
BUILD/SETUP.sh:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/delayed.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/ndb_index_unique.test:
Auto merged
mysql-test/t/rpl_row_create_table.test:
Auto merged
mysql-test/t/rpl_sp.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/type_binary.test:
Auto merged
mysql-test/t/type_varchar.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/rpl_sp.result:
Manual merge
mysql-test/t/ndb_update.test:
Manual merge
sql/share/errmsg.txt:
Manual merge
Changed error message to be compatible with old error file
Added new error message for new DUP_ENTRY syntax
BUILD/SETUP.sh:
Give warnings for unused objects
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Changed to use new error message
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_foreign_key.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_insert_id.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_insert_id_pk.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_loaddata.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_row_basic.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test:
Changed to use new error message
mysql-test/extra/rpl_tests/rpl_trig004.test:
Changed to use new error message
mysql-test/include/mix1.inc:
Changed to use new error message
mysql-test/include/mix2.inc:
Changed to use new error message
mysql-test/include/ps_modify.inc:
Changed to use new error message
mysql-test/include/query_cache.inc:
Changed to use new error message
mysql-test/include/varchar.inc:
Changed to use new error message
mysql-test/r/create.result:
Changed to use new error message
mysql-test/r/rpl_sp.result:
Changed to use new error message
mysql-test/r/sp.result:
Changed to use new error message
mysql-test/r/view.result:
Changed to use new error message
mysql-test/t/auto_increment.test:
Changed to use new error message
mysql-test/t/create.test:
Changed to use new error message
mysql-test/t/create_select_tmp.test:
Changed to use new error message
mysql-test/t/ctype_utf8.test:
Changed to use new error message
mysql-test/t/delayed.test:
Changed to use new error message
mysql-test/t/heap.test:
Changed to use new error message
mysql-test/t/heap_btree.test:
Changed to use new error message
mysql-test/t/heap_hash.test:
Changed to use new error message
mysql-test/t/innodb.test:
Changed to use new error message
mysql-test/t/insert_select.test:
Changed to use new error message
mysql-test/t/insert_update.test:
Changed to use new error message
mysql-test/t/join_outer.test:
Changed to use new error message
mysql-test/t/key.test:
Changed to use new error message
mysql-test/t/merge.test:
Changed to use new error message
mysql-test/t/myisam.test:
Changed to use new error message
mysql-test/t/ndb_charset.test:
Changed to use new error message
mysql-test/t/ndb_index_unique.test:
Changed to use new error message
mysql-test/t/ndb_insert.test:
Changed to use new error message
mysql-test/t/ndb_replace.test:
Changed to use new error message
mysql-test/t/ndb_update.test:
Changed to use new error message
mysql-test/t/replace.test:
Changed to use new error message
mysql-test/t/rpl_err_ignoredtable.test:
Changed to use new error message
mysql-test/t/rpl_row_create_table.test:
Changed to use new error message
mysql-test/t/rpl_skip_error-slave.opt:
Changed to use new error message
mysql-test/t/rpl_sp.test:
Changed to use new error message
mysql-test/t/show_check.test:
Changed to use new error message
mysql-test/t/sp-error.test:
Changed to use new error message
mysql-test/t/sp.test:
Changed to use new error message
mysql-test/t/sp_trans.test:
Changed to use new error message
mysql-test/t/temp_table.test:
Changed to use new error message
mysql-test/t/type_binary.test:
Changed to use new error message
mysql-test/t/type_bit.test:
Changed to use new error message
mysql-test/t/type_bit_innodb.test:
Changed to use new error message
mysql-test/t/type_blob.test:
Changed to use new error message
mysql-test/t/type_varchar.test:
Changed to use new error message
mysql-test/t/view.test:
Changed to use new error message
sql/handler.cc:
ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
sql/share/errmsg.txt:
Changed error message to be compatible with old error file
Added new error message for new DUP_ENTRY syntax
sql/sql_table.cc:
ER_DUP_ENTRY -> ER_DUP_ENTRY_WITH_KEY_NAME
sql-bench/example:
Example file for how to run tests
into siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/50
client/mysqlbinlog.cc:
Auto merged
include/my_pthread.h:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_parse.cc:
Manual merge
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysql_priv.h:
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_list.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into polly.local:/home/kaa/src/maint/mysql-5.1-maint
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/typelib.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
into polly.local:/tmp/maint/bug24117/my51-bug24117
mysql-test/t/sp.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
mysql-test/r/sp.result:
Manual merge
Problem:
When creating a temporary field for a temporary table in create_tmp_field_from_field(), a resulting field is created as an exact copy of an original one (in Field::new_field()). However, Field_enum and Field_set contain a pointer (typelib) to memory allocated in the parent table's MEM_ROOT, which under some circumstances may be deallocated later by the time a temporary table is used.
Solution:
Override the new_field() method for Field_enum and Field_set and create a separate copy of the typelib structure in there.
include/typelib.h:
Added copy_typelib() declaration
mysql-test/r/sp.result:
Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysql-test/t/sp.test:
Added a testcase for bug #24117 "server crash on a FETCH with a cursor on a table which is not in the table cache"
mysys/typelib.c:
Added copy_typelib() definition
sql/field.cc:
Create a copy of the internal 'typelib' structure when copying Field_enum of Field_set objects.
sql/field.h:
Override new_field method in Field_enum (and Field_set) to copy the typelib structure.
on altered table" and Bug#19733 "Repeated alter, or repeated
create/drop, fails"
mysql-test/r/ps.result:
Post-merge fixes: update results with new tests.
mysql-test/r/sp.result:
Post-merge fixes: update results.
mysql-test/t/ps.test:
Add more test cases for Bug#4968 and related.
mysql-test/t/sp.test:
A post-merge fix: add more testcases for Bug#4968 and related.
sql/sql_insert.cc:
Post-merge fixes: update comments, fix errors of the manual merge.
sql/sql_lex.cc:
Fix a manual merge error.
sql/sql_parse.cc:
Fix a few errors of the manual merge, style.
sql/sql_table.cc:
Post-merge fixes, fix a few errors of the manual merge, fix style.
sql/sql_yacc.yy:
A post-merge fix.
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
BitKeeper/etc/collapsed:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Auto merged
include/Makefile.am:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/parser.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/parser.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/system_mysql_db_fix30020.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/myisampack.c:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/r/udf.result:
Manual merge
mysql-test/t/events_bugs.test:
Manual merge
sql/share/errmsg.txt:
Manual merge
support-files/mysql.spec.sh:
Manual merge
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).
mysql-test/r/func_time.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/grant2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/grant2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Mark function as DETERMINISTIC so it can be called with no error while
doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Modify test that contains non-deterministic functions so it can still be
called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
If 'log_bin_trust_function_creators' variable is set, don't throw an error
on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
while doing statement-based replication (SBR), as the routine body is
executed statement-by-statement.
mysql-test/r/rpl_sf.result:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Test for stored function (SF) calls in different replication modes.
NON DETERMINISTIC SFs are not allowed while doing
statement-based replication (SBR).
into weblab.(none):/home/marcsql/TREE/mysql-5.1-18239
mysql-test/t/sp.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Bug#21025 (misleading error message when creating functions named 'x', or 'y')
Bug#22619 (Spaces considered harmful)
This change contains a fix to report warnings or errors, and multiple tests
cases.
Before this fix, name collisions between:
- Native functions
- User Defined Functions
- Stored Functions
were not systematically reported, leading to confusing behavior.
I) Native / User Defined Function
Before this fix, is was possible to create a UDF named "foo", with the same
name as a native function "foo", but it was impossible to invoke the UDF,
since the syntax "foo()" always refer to the native function.
After this fix, creating a UDF fails with an error if there is a name
collision with a native function.
II) Native / Stored Function
Before this fix, is was possible to create a SF named "db.foo", with the same
name as a native function "foo", but this was confusing since the syntax
"foo()" would refer to the native function. To refer to the Stored Function,
the user had to use the "db.foo()" syntax.
After this fix, creating a Stored Function reports a warning if there is a
name collision with a native function.
III) User Defined Function / Stored Function
Before this fix, creating a User Defined Function "foo" and a Stored Function
"db.foo" are mutually exclusive operations. Whenever the second function is
created, an error is reported. However, the test suite did not cover this
behavior.
After this fix, the behavior is unchanged, and is now covered by test cases.
Note that the code change in this patch depends on the fix for Bug 21114.
mysql-test/r/sp.result:
New test cases.
mysql-test/r/udf.result:
New test cases.
mysql-test/t/sp.test:
New test cases.
mysql-test/t/udf.test:
New test cases.
sql/sql_lex.cc:
Name collisions with native functions.
sql/sql_lex.h:
Name collisions with native functions.
sql/sql_yacc.yy:
Name collisions with native functions.
sql/share/errmsg.txt:
Name collisions with native functions.
mysql-test/r/sp_gis.result:
New test cases.
mysql-test/t/sp_gis.test:
New test cases.
The problem was that THD::row_count_func was zeroed too. It was zeroed
as a fix for bug 4905 "Stored procedure doesn't clear for "Rows affected"
However, the proper solution is not to zero, because THD::row_count_func has
been set to -1 already in mysql_execute_command(), a later fix, which obsoletes
the incorrect fix of #4095
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
test for bug#23760 ROW_COUNT() and store procedure not owrking together
sql/sql_parse.cc:
Remove zeroing for thd->row_count_func
The fix for #4905 wasn't right. Now, it's ok without this zeroing
because if there was an error THD::
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
BitKeeper/deleted/.del-CMakeLists.txt~1:
Auto merged
BitKeeper/deleted/.del-make_win_bin_dist:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
include/mysql.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/log_tables.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
netware/BUILD/mwenv:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/Makefile.am:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/innobase/handler/ha_innodb.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
include/my_time.h:
manual merge.
mysql-test/mysql-test-run.pl:
manual merge.
mysql-test/r/ps.result:
manual merge.
mysql-test/t/disabled.def:
manual merge.
mysql-test/t/ps.test:
manual merge.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/r/ps.result:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/rpl_insert_id.result:
Auto merged
mysql-test/r/sp-vars.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/rpl_insert_id.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
server-tools/instance-manager/guardian.cc:
Auto merged
server-tools/instance-manager/guardian.h:
Auto merged
server-tools/instance-manager/instance_map.cc:
Auto merged
server-tools/instance-manager/listener.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/sp-error.result:
Use local
mysql-test/r/sp.result:
Use local
(will overwrite)
mysql-test/t/view.test:
Use local.
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
server-tools/instance-manager/instance.cc:
Manual merge.
server-tools/instance-manager/manager.cc:
Manual merge.
server-tools/instance-manager/options.cc:
Manual merge.
server-tools/instance-manager/options.h:
Manual merge.
sql/log_event.cc:
Manual merge.
sql/set_var.cc:
Manual merge.
sql/sql_class.h:
Manual merge.
sql/sql_insert.cc:
Manual merge.
sql/sql_load.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
sql/sql_update.cc:
Manual merge.
This patch reverts a change introduced by Bug 6951, which incorrectly
set thd->abort_on_warning for stored procedures.
As per internal discussions about the SQL_MODE=TRADITIONAL,
the correct behavior is to *not* abort on warnings even inside an INSERT/UPDATE
trigger.
Tests for Stored Procedures, Stored Functions, Triggers involving SQL_MODE
have been included or revised, to reflect the intended behavior.
(reposting approved patch, to work around source control issues, no review needed)
mysql-test/include/sp-vars.inc:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/r/sp-vars.result:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/r/sp.result:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/r/trigger.result:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/t/sp-vars.test:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/t/sp.test:
Tests for SQL_MODE='TRADITIONAL'
mysql-test/t/trigger.test:
Tests for SQL_MODE='TRADITIONAL'
sql/sp_head.cc:
For SQL_MODE='TRADITIONAL',
thd->abort_on_warning should be set only when assigning a *column*
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/r/create.result:
Merge
mysql-test/t/create.test:
Merge
mysql-test/t/view.test:
Remove the disable_warnings part as engine=innodb has been removed
The syntax of the CALL statement, to invoke a stored procedure, has been
changed to make the use of parenthesis optional in the argument list.
With this change, "CALL p;" is equivalent to "CALL p();".
While the SQL spec does not explicitely mandate this syntax, supporting it
is needed for practical reasons, for integration with JDBC / ODBC connectors.
Also, warnings in the sql/sql_yacc.yy file, which were not reported by Bison 2.1
but are now reported by Bison 2.2, have been fixed.
The warning found were:
bison -y -p MYSQL -d --debug --verbose sql_yacc.yy
sql_yacc.yy:653.9-18: warning: symbol UNLOCK_SYM redeclared
sql_yacc.yy:656.9-17: warning: symbol UNTIL_SYM redeclared
sql_yacc.yy:658.9-18: warning: symbol UPDATE_SYM redeclared
sql_yacc.yy:5169.11-5174.11: warning: unused value: $2
sql_yacc.yy:5208.11-5220.11: warning: unused value: $5
sql_yacc.yy:5221.11-5234.11: warning: unused value: $5
conflicts: 249 shift/reduce
"unused value: $2" correspond to the $$=$1 assignment in the 1st {} block
in table_ref -> join_table {} {},
which does not procude a result ($$) for the rule but an intermediate $2
value for the action instead.
"unused value: $5" are similar, with $$ assignments in {} actions blocks
which are not for the final reduce.
mysql-test/r/sp.result:
New test case for Bug#21462
mysql-test/t/sp.test:
New test case for Bug#21462
sql/sql_yacc.yy:
"CALL p;" syntax for calling a stored procedure
Fixed bison 2.2 warnings.
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
BitKeeper/deleted/.del-mtr_stress.pl:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
BitKeeper/deleted/.del-mtr_im.pl:
Delete: mysql-test/lib/mtr_im.pl
client/mysqltest.c:
Use remote
mysql-test/mysql-test-run.pl:
Use remote
mysql-test/lib/mtr_process.pl:
Use remote
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
BitKeeper/deleted/.del-ps_6bdb.result:
Auto merged
mysql-test/include/have_multi_ndb.inc:
Auto merged
mysql-test/include/have_ndb.inc:
Auto merged
mysql-test/r/log_tables.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/crash_commit_before.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
BitKeeper/deleted/.del-mtr_im.pl:
Delete: mysql-test/lib/mtr_im.pl
client/mysqltest.c:
Use remote
mysql-test/mysql-test-run.pl:
Use remote
mysql-test/lib/mtr_process.pl:
Use remote
mysql-test/r/csv.result:
Update after add of missing semicolon
mysql-test/r/drop.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
Update result
mysql-test/r/query_cache.result:
Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
Update after add of missing semicolon
mysql-test/r/type_blob.result:
Remove extra drop table
mysql-test/t/csv.test:
Add missing semicolon
mysql-test/t/query_cache.test:
Add missing semicolon
mysql-test/t/sp-error.test:
Remove "tab" from end of error declaration
mysql-test/t/sp.test:
Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
An incomplete error name specification was used.
mysql-test/r/sp.result:
After merge fix.
mysql-test/t/sp.test:
After merge fixes. Restored test for bug 21002 which has mysteriously
disappeared from 5.1 tree.
into shellback.(none):/home/msvensson/mysql/same_tools/my51-same_tools
client/Makefile.am:
Auto merged
mysql-test/r/csv.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/sp_notembedded.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/csv.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
client/mysqltest.c:
Manual merge
mysql-test/r/mysqltest.result:
Manual merge
mysql-test/t/mysqltest.test:
Manual merge
into mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
BitKeeper/etc/collapsed:
auto-union
mysql-test/mysql-test-run.pl:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
- Disable warnings when creating the "innodb" tables if it works anyway.
- Move test that are really innodb dependent to innodb_mysql
mysql-test/r/create.result:
Move the innodb dependent test to innodb_mysql.test
mysql-test/r/innodb_mysql.result:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/create.test:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/innodb_mysql.test:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/lock_multi.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
mysql-test/t/sp.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
mysql-test/t/view.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
into mysql.com:/home/cps/mysql/trees/5.1-runtime-new
sql/handler.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/sp.result:
manual merge
mysql-test/t/sp.test:
manual merge
storage/csv/ha_tina.cc:
manual merge
storage/myisam/ha_myisam.cc:
manual merge
There was possible stack overrun in an edge case which handles invalid body of
a SP in mysql.proc . That should be case when mysql.proc has been changed
manually. Though, due to bug 21513, it can be exploited without having access
to mysql.proc only being able to create a stored routine.
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
add a test case for the bug
sql/sp.cc:
Fix stack overrun. This happen mostly when mysql.proc is damaged, though
it's possible due to another bug which creates invalid SP body in mysql.proc
(leading quote from a label being cut) to create stack overrun even without
having direct access to mysql.proc
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21414
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/heap_hash.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/row.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/sp.test:
SCCS merged
sql/item_cmpfunc.cc:
SCCS merged
sql/sql_select.cc:
SCCS merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
Saved andor structure of the having conditions at the proper moment
before any calls of split_sum_func2 that could modify the having structure
adding new Item_ref objects. (These additions, are produced not with
the statement mem_root, but rather with the execution mem_root.)
mysql-test/r/sp.result:
Added a test case for bug #21493.
mysql-test/t/sp.test:
Added a test case for bug #21493.
sql/sql_delete.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_insert.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.h:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_update.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
The problem was that if after FLUSH TABLES WITH READ LOCK the user
issued DROP/ALTER PROCEDURE/FUNCTION the operation would fail (as
expected), but after UNLOCK TABLE any attempt to execute the same
operation would lead to the error 1305 "PROCEDURE/FUNCTION does not
exist", and an attempt to execute any stored function will also fail.
This happened because under FLUSH TABLES WITH READ LOCK we couldn't open
and lock mysql.proc table for update, and this fact was erroneously
remembered by setting mysql_proc_table_exists to false, so subsequent
statements believed that mysql.proc doesn't exist, and thus that there
are no functions and procedures in the database.
As a solution, we remove mysql_proc_table_exists flag completely. The
reason is that this optimization didn't work most of the time anyway.
Even if open of mysql.proc failed for some reason when we were trying to
call a function or a procedure, we were setting mysql_proc_table_exists
back to true to force table reopen for the sake of producing the same
error message (the open can fail for number of reasons). The solution
could have been to remember the reason why open failed, but that's a lot
of code for optimization of a rare case. Hence we simply remove this
optimization.
mysql-test/r/sp.result:
Add result for bug#21414: SP: Procedure undroppable, to some extent.
mysql-test/t/sp.test:
Remove no longer relevant comment.
Add test case for bug#21414: SP: Procedure undroppable, to some extent.
sql/mysql_priv.h:
Remove declaration of mysql_proc_table_exists.
sql/sp.cc:
Remove references to mysql_proc_table_exists.
sql/sql_acl.cc:
Remove reference to mysql_proc_table_exists.
if join is used
For procedures with selects that use complicated joins with ON expression
re-execution could erroneously ignore this ON expression, giving
incorrect result.
The problem was that optimized ON expression wasn't saved for
re-execution. The solution is to properly save it.
mysql-test/r/sp.result:
Add result for bug#20492: Subsequent calls to stored procedure yield
incorrect result if join is used.
mysql-test/t/sp.test:
Add test case for bug#20492: Subsequent calls to stored procedure yield
incorrect result if join is used.
sql/sql_select.cc:
Save modified ON expression for re-execution.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/deleted/.del-im_check_os.inc:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
configure.in:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_varchar.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/type_varchar.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/mysql-test-run.pl:
Use local. Alik will merge his changes manually.
mysql-test/lib/mtr_process.pl:
Use local.
mysql-test/r/grant.result:
Use local.
mysql-test/r/sp.result:
Use local.
mysql-test/r/ps.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/field.cc:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/share/errmsg.txt:
Manual merge.
sql/sp.cc:
Manual merge.
sql/sp_head.h:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_view.cc:
Manual merge.
The following procedure was not possible if max_sp_recursion_depth is 0
create procedure show_proc() show create procedure show_proc;
Actually there is no recursive call but the limit is checked.
Solved by temporarily increasing the thread's limit just before the fetch from cache
and decreasing after that.
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
Test for bug #21416 SP: Recursion level higher than zero needed for non-recursive call
sql/sp.cc:
Increase the max_sp_recursion_depth temporarily for SHOW CREATE PROCEDURE call.
This call is in fact not recursive but is counted as such. Outcome, it will work
always but if max_sp_recursion_depth is reached we are going to cache one more
sp_head instance.
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.
The fix is to check length of user/host name in parser and if string is too
long, throw an error.
mysql-test/r/grant.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/r/trigger.result:
Updated result file.
mysql-test/r/view.result:
Updated result file.
mysql-test/t/grant.test:
Added test for BUG#16899.
mysql-test/t/sp.test:
Added test for BUG#16899.
mysql-test/t/trigger.test:
Added test for BUG#16899.
mysql-test/t/view.test:
Added test for BUG#16899.
sql/mysql_priv.h:
Added prototype for new function.
sql/share/errmsg.txt:
Added new resources.
sql/sql_acl.cc:
Remove outdated checks.
sql/sql_parse.cc:
Add a new function for checking string length.
sql/sql_yacc.yy:
Check length of user/host name.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
dbug/dbug.c:
Auto merged
extra/perror.c:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqlcheck.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.h:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
mysql-test/r/im_life_cycle.result:
e
use local
mysql-test/r/ps.result:
use local
client/Makefile.am:
Manual merge.
client/mysqlimport.c:
Manual merge.
configure.in:
Manual merge.
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/r/mysqldump.result:
Manual merge.
mysql-test/r/mysqltest.result:
Manual merge.
mysql-test/r/ndb_basic.result:
Manual merge.
mysql-test/r/rpl_view.result:
Manual merge.
mysql-test/r/show_check.result:
Manual merge.
mysql-test/r/sp-error.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/union.result:
Manual merge.
mysql-test/t/mysqldump.test:
Manual merge.
mysql-test/t/mysqltest.test:
Manual merge.
mysql-test/t/ndb_basic.test:
Manual merge.
mysql-test/t/rpl_sp.test:
Manual merge.
mysql-test/t/rpl_view.test:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/item_sum.cc:
Manual merge.
sql/mysql_priv.h:
Manual merge.
sql/sp_head.cc:
Manual merge.
sql/sql_db.cc:
Manual merge.
sql/sql_delete.cc:
Manual merge.
sql/sql_lex.h:
Manual merge.
sql/sql_show.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-runtine-merge
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_base.cc:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
client/mysql.cc:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysys/my_open.c:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
client/mysqltest.c:
Manual merge.
mysql-test/r/ps_1general.result:
Manual merge.
into lmy004.:/work/mysql-5.1-runtime
sql/sp.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
manual merge
mysql-test/t/sp.test:
manual merge
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed.
Fix after 2nd review
mysql-test/r/sp-error.result:
update result
mysql-test/r/sp.result:
update result
mysql-test/t/sp-error.test:
add a test case for bug#20701 BINARY keyword should be forbidden in stored procedures
mysql-test/t/sp.test:
Fix test case which uses binary for the return value of a function.
It's no more possible after fix for bug#20701
BINARY keyword should be forbidden in SP
Fix few glitches where ; is used instead of | . The delimiter is |
sql/sql_yacc.yy:
Fix for bug#20701 BINARY keyword should be forbidden in stored routines
create function func() returns char(10) binary ...
is no more possible. This will be reenabled when
bug 2676 "DECLARE can't have COLLATE clause in stored procedure"
is fixed
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-merge
BitKeeper/deleted/.del-mysys.vcproj~40a49d09c4184822:
Auto merged
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~6aa7b3f9c3e28fcb:
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/sp.cc:
Auto merged
sql/sql_class.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
mysql-test/r/sp.result:
Manual merge. Place 5.0 test before 5.1 test.
mysql-test/t/sp.test:
Manual merge. Place 5.0 test before 5.1 test.
mysys/my_bitmap.c:
Manual merge.
scripts/make_binary_distribution.sh:
Manual merge.
sql/Makefile.am:
Manual merge.
sql/slave.cc:
Manual merge.
sql/sql_class.h:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_select.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
The following procedure was not possible if max_sp_recursion_depth is 0
create procedure show_proc() show create procedure show_proc;
Actually there is no recursive call but the limit is checked.
Solved by temporarily increasing the thread's limit just before the fetch from cache
and decreasing after that.
mysql-test/r/sp.result:
update result
mysql-test/t/sp.test:
Test for bug #21416 SP: Recursion level higher than zero needed for non-recursive call
sql/sp.cc:
Increase the max_sp_recursion_depth temporarily for SHOW CREATE PROCEDURE call.
This call is in fact not recursive but is counted as such. Outcome, it will work
always but if max_sp_recursion_depth is reached we are going to cache one more
sp_head instance.
Before this fix,
- a runtime error in a statement in a stored procedure with no error handlers
was properly detected (as expected)
- a runtime error in a statement with an error handler inherited from a non
local runtime context (i.e., proc a with a handler, calling proc b) was
properly detected (as expected)
- a runtime error in a statement with a *local* error handler was executed
as follows :
a) the statement would succeed, regardless of the error condition, (bug)
b) the error handler would be called (as expected).
The root cause is that functions like my_messqge_sql would "forget" to set
the thread flag thd->net.report_error to 1, because of the check involving
sp_rcontext::found_handler_here().
Failure to set this flag would cause, later in the call stack,
in Item_func::fix_fields() at line 190, the code to return FALSE and consider
that executing the statement was successful.
With this fix :
- error handling code, that was duplicated in different places in the code,
is now implemented in sp_rcontext::handle_error(),
- handle_error() correctly sets thd->net.report_error when a handler is
present, regardless of the handler location (local, or in the call stack).
A test case, bug8153_subselect, has been written to demonstrate the change
of behavior before and after the fix.
Another test case, bug8153_function_a, as also been writen.
This test has the same behavior before and after the fix.
This test has been written to demonstrate that the previous expected
result of procedure bug18787, was incorrect, since select no_such_function()
should fail and therefore not produce a result.
The incorrect result for bug18787 has the same root cause as Bug#8153,
and the expected result has been adjusted.
sql/mysqld.cc:
Bug#8153, use sp_rcontext::handle_error() to handle errors.
sql/sql_error.cc:
Bug#8153, use sp_rcontext::handle_error() to handle errors.
sql/protocol.cc:
Bug#8153, use sp_rcontext::handle_error() to handle errors.
sql/sp_rcontext.h:
Bug#8153, created helper sp_rcontext::handle_error() to handle errors.
sql/sp_rcontext.cc:
Bug#8153, created helper sp_rcontext::handle_error() to handle errors.
mysql-test/t/sp.test:
Bug#8153, added test cases.
mysql-test/r/sp.result:
Bug#8153, added test cases, fixed expected result of bug18787.
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/udf.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
mysql-test/t/udf.test:
Manual merge.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/t/sp.test:
Manual merge
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
include/mysql.h:
Auto merged
include/sql_common.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/ps.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/ps.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/sql_prepare.cc:
Manual merge.
sql/table.cc:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/time.cc:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
strings/decimal.c:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/bigint.result:
Manual merge
mysql-test/r/create.result:
Manual merge
mysql-test/r/information_schema.result:
Manual merge
mysql-test/r/ps_2myisam.result:
Manual merge
mysql-test/r/ps_3innodb.result:
Manual merge
mysql-test/r/ps_4heap.result:
Manual merge
mysql-test/r/ps_5merge.result:
Manual merge
mysql-test/r/ps_6bdb.result:
Manual merge
mysql-test/r/rpl_insert_id.result:
Manual merge
mysql-test/r/select.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/information_schema.test:
Manual merge
mysql-test/t/rpl_insert_id.test:
Manual merge
sql/field.h:
Manual merge
sql/item.cc:
Manual merge
sql/item.h:
Manual merge
sql/item_strfunc.h:
Manual merge
sql/item_sum.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/share/errmsg.txt:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_select.cc:
Manual merge
Fix for BUG#16676: Database CHARSET not used for stored procedures
The problem in BUG#16211 is that CHARSET-clause of the return type for
stored functions is just ignored.
The problem in BUG#16676 is that if character set is not explicitly
specified for sp-variable, the server character set is used instead
of the database one.
The fix has two parts:
- always store CHARSET-clause of the return type along with the
type definition in mysql.proc.returns column. "Always" means that
CHARSET-clause is appended even if it has not been explicitly
specified in CREATE FUNCTION statement (this affects BUG#16211 only).
Storing CHARSET-clause if it is not specified is essential to avoid
changing character set if the database character set is altered in
the future.
NOTE: this change is not backward compatible with the previous releases.
- use database default character set if CHARSET-clause is not explicitly
specified (this affects both BUG#16211 and BUG#16676).
NOTE: this also breaks backward compatibility.
mysql-test/r/mysqldump.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Provided test cases for BUG#16211, BUG#16676.
sql/mysql_priv.h:
Added two convenient functions for work with databases.
sql/sp.cc:
1. Add CHARSET-clause to CREATE-statement if it has been explicitly specified.
2. Polishing -- provided some comments.
sql/sp_head.cc:
Use database charset as default charset of sp-variable.
sql/sp_head.h:
Move init_sp_name() out of init_strings().
sql/sql_db.cc:
Two new functions created:
- load_db_opt_by_name();
- check_db_dir_existence();
sql/sql_show.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_table.cc:
Eliminate duplicated code by using
check_db_dir_existence() and load_db_opt_by_name()
sql/sql_yacc.yy:
Call sp_head::init_sp_name() to initialize stored routine name.
When there is no index defined filesort is used to sort the result of a
query. If there is a function in the select list and the result set should be
ordered by it's value then this function will be evaluated twice. First time to
get the value of the sort key and second time to send its value to a user.
This happens because filesort when sorts a table remembers only values of its
fields but not values of functions.
All functions are affected. But taking into account that SP and UDF functions
can be both expensive and non-deterministic a temporary table should be used
to store their results and then sort it to avoid twice SP evaluation and to
get a correct result.
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
mysql-test/t/udf.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/t/sp.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/sp.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/udf.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
sql/sql_select.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
sql/item_func.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item_func.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
- Disable test case until fixed
mysql-test/r/sp.result:
Disable test case until bug#21039 is fixed
mysql-test/t/sp.test:
Disable test case until bug#21039 is fixed
"real" table fails in JOINs".
This is a regression caused by the fix for Bug 18444.
This fix removed the assignment of empty_c_string to table->db performed
in add_table_to_list, as neither me nor anyone else knew what it was
there for. Now we know it and it's covered with tests: the only case
when a table database name can be empty is when the table is a derived
table. The fix puts the assignment back but makes it a bit more explicit.
Additionally, finally drop sp.result.orig which was checked in by mistake.
BitKeeper/deleted/.del-sp.result.orig:
Delete: mysql-test/r/sp.result.orig
mysql-test/r/derived.result:
Updated result file.
mysql-test/r/sp.result:
Test results fixed (Bug#21002)
mysql-test/t/derived.test:
New error return for the case when MULTI-DELETE tries to delete from
a derived table: now derived tables belong to their own db (""), and
MUTLI-DELETE can't find the correspondent table for it in the
DELETE list, as it can't resolve tables in different dbs by alias
(See Bug#21148 for details)
mysql-test/t/sp.test:
Add a test case for Bug#21002 "Derived table not selecting from a "real"
table fails in JOINs"
sql/sp.cc:
Make empty_c_string globally accessible.
sql/sql_class.cc:
Add empty_c_string definition.
sql/sql_class.h:
Add a comment for the constructor of Table_ident which is
used for derived tables. Make sure this constructor also initializes
the database name, not only the table name.
sql/sql_parse.cc:
Don't call check_db_name for empty database.
Currently the only case when a table database name can be empty
is when the table is a derived table.
Report the right error if the database name is wrong (ER_WRONG_DB_NAME,
not ER_WRONG_TABLE_NAME).
and Stored Procedure
The essence of the bug was that for every re-execution of stored
routine or prepared statement new items for character set conversions
were created, thus increasing the number of items and the time of their
processing, and creating memory leak.
No test case is provided since current test suite can't cover such type
of bugs.
mysql-test/r/sp.result:
Add result for bug#21013: Performance Degrades when importing data
that uses Trigger and Stored Procedure.
mysql-test/t/sp.test:
Add test case for bug#21013: Performance Degrades when importing data
that uses Trigger and Stored Procedure.
sql/item.cc:
Switch arena only when in statement prepare mode. Subsequent executions
will use cached item tree.
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ndb_autodiscover3.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
BUILD/compile-dist:
Auto merged
BitKeeper/deleted/.del-partition_innodb.result:
Auto merged
BitKeeper/deleted/.del-partition_innodb.test:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/create_not_windows.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
mysys/my_lib.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
manuakl merge
mysql-test/lib/mtr_process.pl:
manuakl merge
mysql-test/mysql-test-run.pl:
manuakl merge
mysql-test/r/type_newdecimal.result:
manuakl merge
mysql-test/t/create.test:
manuakl merge
mysql-test/t/func_group.test:
manuakl merge
mysql-test/t/type_newdecimal.test:
manuakl merge
into mysql.com:/opt/local/work/mysql-5.0-17199
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
SCCS merged
mysql-test/t/sp.test:
SCCS merged
Bug#19022 "Memory bug when switching db during trigger execution"
Bug#17199 "Problem when view calls function from another database."
Bug#18444 "Fully qualified stored function names don't work correctly in
SELECT statements"
Documentation note: this patch introduces a change in behaviour of prepared
statements.
This patch adds a few new invariants with regard to how THD::db should
be used. These invariants should be preserved in future:
- one should never refer to THD::db by pointer and always make a deep copy
(strmake, strdup)
- one should never compare two databases by pointer, but use strncmp or
my_strncasecmp
- TABLE_LIST object table->db should be always initialized in the parser or
by creator of the object.
For prepared statements it means that if the current database is changed
after a statement is prepared, the database that was current at prepare
remains active. This also means that you can not prepare a statement that
implicitly refers to the current database if the latter is not set.
This is not documented, and therefore needs documentation. This is NOT a
change in behavior for almost all SQL statements except:
- ALTER TABLE t1 RENAME t2
- OPTIMIZE TABLE t1
- ANALYZE TABLE t1
- TRUNCATE TABLE t1 --
until this patch t1 or t2 could be evaluated at the first execution of
prepared statement.
CURRENT_DATABASE() still works OK and is evaluated at every execution
of prepared statement.
Note, that in stored routines this is not an issue as the default
database is the database of the stored procedure and "use" statement
is prohibited in stored routines.
This patch makes obsolete the use of check_db_used (it was never used in the
old code too) and all other places that check for table->db and assign it
from THD::db if it's NULL, except the parser.
How this patch was created: THD::{db,db_length} were replaced with a
LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
manually checked and:
- if the place uses thd->db by pointer, it was fixed to make a deep copy
- if a place compared two db pointers, it was fixed to compare them by value
(via strcmp/my_strcasecmp, whatever was approproate)
Then this intermediate patch was used to write a smaller patch that does the
same thing but without a rename.
TODO in 5.1:
- remove check_db_used
- deploy THD::set_db in mysql_change_db
See also comments to individual files.
mysql-test/r/create.result:
Modify the result file: a database can never be NULL.
mysql-test/r/ps.result:
Update test results (Bug#17199 et al)
mysql-test/r/sp.result:
Update test results (Bug#17199 et al)
mysql-test/t/create.test:
Update the id of the returned error.
mysql-test/t/ps.test:
Add test coverage for prepared statements and current database. In scope of
work on Bug#17199 "Problem when view calls function from another database."
mysql-test/t/sp.test:
Add a test case for Bug#17199 "Problem when view calls function from another
database." and Bug#18444 "Fully qualified stored function names don't work
correctly in SELECT statements". Test a complementary problem.
sql/item_strfunc.cc:
Touch the code that reads thd->db (cleanup).
sql/log_event.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.h:
Remove a declaration for a method that is used only in one module.
sql/sp.cc:
Rewrite sp_use_new_db: this is a cleanup that I needed in order to understand
this function and ensure that it has no bugs.
sql/sp.h:
Add a new declaration for sp_use_new_db (uses LEX_STRINGs) and a comment.
sql/sp_head.cc:
- drop sp_name_current_db_new - a creator of sp_name class that was used
when sp_name was created for an identifier without an explicitly initialized
database. Now we pass thd->db to constructor of sp_name right in the
parser.
- rewrite sp_head::init_strings: name->m_db is always set now
- use the new variant of sp_use_new_db
- we don't need to update thd->db with SP MEM_ROOT pointer anymore when
parsing a stored procedure, as noone will refer to it (yes!)
sql/sp_head.h:
- remove unneded methods and members
sql/sql_class.h:
- introduce 3 THD methods to work with THD::db:
.set_db to assign the current database
.reset_db to reset the current database (temporarily) or set it to NULL
.opt_copy_db_to - to deep-copy thd->db to a pointer if it's not NULL
sql/sql_db.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_insert.cc:
- replace checks with asserts: table_list->db must be always set in the parser.
sql/sql_lex.h:
- add a comment
sql/sql_parse.cc:
- implement the invariant described in the changeset comment.
- remove juggling with lex->sphead in SQLCOM_CREATE_PROCEDURE:
now db_load_routine uses its own LEX object and doesn't damage the main
LEX.
- add DBUG_ASSERT(0) to unused "check_db_used"
sql/sql_table.cc:
- replace a check with an assert (table_ident->db)
sql/sql_trigger.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_udf.cc:
- use thd->set_db instead of direct modification of to thd->db
sql/sql_view.cc:
- replace a check with an assert (view->db)
sql/sql_yacc.yy:
- make sure that we always copy table->db or name->db or ident->db or
select_lex->db from thd->db if the former is not set. If thd->db
is not set but is accessed, return an error.
sql/tztime.cc:
- be nice, never copy thd->db by pointer.
into mysql.com:/opt/local/work/mysql-5.1-runtime
mysql-test/r/sp-prelocking.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/ndberror.c:
Auto merged
strings/ctype-mb.c:
Auto merged
mysql-test/t/sp-prelocking.test:
Manual merge.
with PREPARE fails with weird error".
More generally, re-executing a stored procedure with a complex SP cursor query
could lead to a crash.
The cause of the problem was that SP cursor queries were not optimized
properly at first execution: their parse tree belongs to sp_instr_cpush,
not sp_instr_copen, and thus the tree was tagged "EXECUTED" when the
cursor was declared, not when it was opened. This led to loss of optimization
transformations performed at first execution, as sp_instr_copen saw that the
query is already "EXECUTED" and therefore either not ran first-execution
related blocks or wrongly rolled back the transformations caused by
first-execution code.
The fix is to update the state of the parsed tree only when the tree is
executed, as opposed to when the instruction containing the tree is executed.
Assignment if i->state is moved to reset_lex_and_exec_core.
mysql-test/r/sp.result:
Test results fixed (Bug#15217)
mysql-test/t/sp.test:
Add a test case for Bug#15217
sql/sp_head.cc:
Move assignment of stmt_arena->state to reset_lex_and_exec_core
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/extra/rpl_tests/rpl_ddl.test:
Auto merged
mysql-test/r/rpl_ddl.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/rpl_ndb_charset.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/r/trigger-grant.result:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/federated.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger-grant.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/create.result:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
sql/handler.cc:
Manual merge
sql/share/errmsg.txt:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_delete.cc:
Manual merge
sql/sql_insert.cc:
Manual merge
sql/sql_table.cc:
Manual merge
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
BUILD/compile-dist:
Auto merged
client/mysqltest.c:
Auto merged
config/ac-macros/ssl.m4:
Auto merged
include/config-win.h:
Auto merged
include/my_base.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/rpl_insert_id_pk.result:
Auto merged
mysql-test/r/rpl_ndb_multi_update3.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/r/rpl_ndb_sp006.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_clock.c:
Auto merged
mysys/my_copy.c:
Auto merged
mysys/my_create.c:
Auto merged
mysys/my_dup.c:
Auto merged
mysys/my_lib.c:
Auto merged
mysys/my_open.c:
Auto merged
mysys/my_redel.c:
Auto merged
mysql-test/r/create.result:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/r/join_outer.result:
Manual merge
mysql-test/t/func_group.test:
Manual merge
mysql-test/t/group_min_max.test:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
Under row-based replication, DELETE FROM will now always be
replicated as individual row deletions, while TRUNCATE TABLE will
always be replicated as a statement.
mysql-test/extra/rpl_tests/rpl_ddl.test:
Using --echo instead of SELECT to print message.
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Result change.
mysql-test/r/federated.result:
Result change.
mysql-test/r/range.result:
Result change.
mysql-test/r/rpl_sp_effects.result:
Result change.
mysql-test/r/show_check.result:
Result change.
mysql-test/r/sp-error.result:
Result change.
mysql-test/r/sp.result:
Result change.
mysql-test/r/timezone2.result:
Result change.
mysql-test/r/trigger-grant.result:
Result change.
mysql-test/r/type_datetime.result:
Result change.
mysql-test/r/type_ranges.result:
Result change.
mysql-test/r/type_timestamp.result:
Result change.
mysql-test/r/view.result:
Result change.
mysql-test/t/archive.test:
Test contain statements that only works for statement-based logging.
mysql-test/t/disabled.def:
Disabling test due to reported bug.
mysql-test/t/federated.test:
Adding ORDER BY clause to SELECT statements
mysql-test/t/range.test:
Adding ORDER BY clause to SELECT (sub-)statement
mysql-test/t/rpl_sp_effects.test:
Adding ORDER BY clause to SELECT statement.
mysql-test/t/show_check.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp-error.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp.test:
Adding ORDER BY clause to SELECT statement.
mysql-test/t/timezone2.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/trigger-grant.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_datetime.test:
Adding ORDER BY clause to SELECT statement.
mysql-test/t/type_ranges.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_timestamp.test:
Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/view.test:
Adding ORDER BY clause to SELECT statement.
sql/sql_class.h:
Adding member function to set replication to statement-based.
sql/sql_delete.cc:
When row-based replication is used, DELETE FROM will always delete the
contents of the table row-by-row and not use delete_all_rows().
mysql-test/extra/rpl_tests/rpl_truncate.test:
New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate.test''
mysql-test/extra/rpl_tests/rpl_truncate_helper.inc:
New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate_helper.inc''
mysql-test/r/rpl_truncate_2myisam.result:
New BitKeeper file ``mysql-test/r/rpl_truncate_2myisam.result''
mysql-test/r/rpl_truncate_3innodb.result:
New BitKeeper file ``mysql-test/r/rpl_truncate_3innodb.result''
mysql-test/r/rpl_truncate_7ndb.result:
New BitKeeper file ``mysql-test/r/rpl_truncate_7ndb.result''
mysql-test/t/rpl_truncate_2myisam.test:
New BitKeeper file ``mysql-test/t/rpl_truncate_2myisam.test''
mysql-test/t/rpl_truncate_3innodb.test:
New BitKeeper file ``mysql-test/t/rpl_truncate_3innodb.test''
mysql-test/t/rpl_truncate_7ndb.test:
New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb.test''
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/r/lock_multi.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/lock_multi.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/default.c:
Auto merged
server-tools/instance-manager/guardian.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
storage/heap/hp_write.c:
Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
Auto merged
client/mysqlbinlog.cc:
Manual merge from 5.0
client/mysqldump.c:
Manual merge from 5.0
configure.in:
Manual merge from 5.0
mysql-test/r/mysqldump.result:
Manual merge from 5.0
mysql-test/t/mysqldump.test:
Manual merge from 5.0
mysql-test/t/rpl_insert_id.test:
Manual merge from 5.0
server-tools/instance-manager/manager.cc:
Manual merge from 5.0
sql/field.cc:
Manual merge from 5.0
sql/ha_ndbcluster.cc:
Manual merge from 5.0
sql/mysqld.cc:
Manual merge from 5.0
sql/sql_base.cc:
Manual merge from 5.0
sql/sql_lex.cc:
Manual merge from 5.0
sql/sql_select.cc:
Manual merge from 5.0
sql/sql_table.cc:
Manual merge from 5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
into mysql.com:/usr/local/mysql/merge-5.1
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger-grant.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger-grant.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
server-tools/instance-manager/options.h:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
server-tools/instance-manager/options.cc:
Manual merge
sql/item_func.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/sp_head.cc:
Manual merge
sql/sql_table.cc:
Manual merge
garbles data if longer than 766 chars.
The problem is that a stored routine returns BLOBs to the previous
caller, BLOBs are shallow-copied (i.e. only pointers to the data are
copied). The fix is to also copy data of BLOBs.
mysql-test/r/sp.result:
Updated result file.
mysql-test/t/sp.test:
Added a test case for BUG#18587.
sql/field_conv.cc:
Do not jump to optimization if the field type is BLOB and
the destination table requires copying of BLOBs.
sql/item_func.cc:
Request copying BLOBs for the result table.
into mysql.com:/home/dlenev/mysql-5.0-bg12472
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
or implicitly uses stored function gives "Table not locked" error'
CREATE TABLE ... SELECT ... statement which was explicitly or implicitly
(through view) using stored function gave "Table not locked" error.
The actual bug resides in the current locking scheme of CREATE TABLE SELECT
code, which first opens and locks tables of the SELECT statement itself,
and then, having SELECT tables locked, creates the .FRM, opens the .FRM and
acquires lock on it. This scheme opens a possibility for a deadlock, which
was present and ignored since version 3.23 or earlier. This scheme also
conflicts with the invariant of the prelocking algorithm -- no table can
be open and locked while there are tables locked in prelocked mode.
The patch makes an exception for this invariant when doing CREATE TABLE ...
SELECT, thus extending the possibility of a deadlock to the prelocked mode.
We can't supply a better fix in 5.0.
mysql-test/r/sp.result:
Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
explicitly or implicitly uses stored function gives "Table not locked" error'
mysql-test/t/sp.test:
Added tests for bugs#12472/#15137 'CREATE TABLE ... SELECT ... which
explicitly or implicitly uses stored function gives "Table not locked" error'
sql/mysql_priv.h:
Added flag which can be passed to open_table() routine in order to ignore
set of locked tables and prelocked mode.
We don't need declaration of create_table_from_items() any longer as it was
moved into sql_insert.cc and made static.
sql/sql_base.cc:
open_table():
Added flag which allows open table ignoring set of locked tables and
prelocked mode.
sql/sql_insert.cc:
Moved create_table_from_items() from sql_table.cc to sql_insert.cc as it was
not used outside of sql_insert.cc and contains code which is specific for
CREATE TABLE ... SELECT.
Also now when we are executing CREATE TABLE ... SELECT ... statement which
SELECT part requires execution in prelocked mode we ignore set of locked
tables in order to get access to the table we just have created.
We probably don't want to do this if we are under real LOCK TABLES since
it will widen window for deadlock too much.
sql/sql_table.cc:
Moved create_table_from_items() routine into sql_insert.cc, since it was not
used anywhere outside of this file and contains logic which is specific for
CREATE TABLE ... SELECT statement.
into mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/timezone_grant.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/lex.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_view.cc:
Auto merged
mysql-test/r/rpl_insert_id.result:
Manual merge.
mysql-test/t/disabled.def:
Manual merge.
mysql-test/t/rpl_insert_id.test:
Manual merge.
sql/item_func.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge - not complete yet.
Do not reset value of LAST_INSERT_ID() in sub-statement.
mysql-test/r/rpl_insert_id.result:
Add result for bug#15728.
mysql-test/r/sp.result:
Add result for bug#15728.
mysql-test/t/rpl_insert_id.test:
Add test case for bug#15728.
mysql-test/t/sp.test:
Add test case for bug#15728.
sql/sql_class.cc:
Do not reset value of LAST_INSERT_ID() in sub-statement.
We must use the db key length in sp_drop_db_routines (and not the
number of characters), or long db names will be truncated in the key.
mysql-test/r/sp.result:
Updated results for new test case (BUG#18344)
mysql-test/t/sp.test:
Added new test case for BUG#18344.
sql/sp.cc:
In sp_drop_db_routines(), give the key field's ("db") key length
instead of the number of characters to index_read(), or the key
packing will truncate long db names.
into mysql.com:/extern/mysql/5.0/bug18787/mysql-5.0-runtime
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_func.cc:
Auto merged
a misnamed function
... in the presence of a continue handler. The problem was that with a
handler, it continued to execute as if function existed and had set a
useful return value (which it hadn't).
The fix is to set a null return value and do an error return when a function
wasn't found.
mysql-test/r/sp.result:
Updated results for a new test case (BUG#18787).
mysql-test/t/sp.test:
New testcase for BUG#18787.
sql/item_func.cc:
Don't set "out of resources" error in Item_func_sp::execute() if no
result field is returned, it's simply wrong, it can be sometthing else,
like a function not found. Instead set null_value and return error.
Also, set "out of resources" when field creation fails in
Item_func_sp::sp_result_field() and Item_func_sp::tmp_table_field().
into april.(none):/home/svoj/devel/mysql/BUG14945/mysql-5.1-new
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_delete.cc:
Manual merge
counter".
When TRUNCATE TABLE was called within an stored procedure the
auto_increment counter was not reset to 0 even if straight
TRUNCATE for this table did this.
This fix makes TRUNCATE in stored procedures to be handled exactly
in the same way as straight TRUNCATE. We achieve this by rolling
back the fix for bug 8850, which is no longer needed since stored
procedures don't require prelocked mode anymore (and TRUNCATE is
not allowed in stored functions or triggers).
mysql-test/r/sp.result:
Test case for BUG#14945.
mysql-test/t/sp.test:
Test case for BUG#14945.
sql/sql_delete.cc:
Handle TRUNCATE in stored procedures exactly in the same way as straight
TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
this by rolling back the fix for bug 8850, which is no longer relevant
since stored procedures don't require prelocked mode anymore
(and TRUNCATE is not allowed in stored functions or triggers).
sql/sql_parse.cc:
Handle TRUNCATE in stored procedures exactly in the same way as straight
TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
this by rolling back the fix for bug 8850, which is no longer relevant
since stored procedures don't require prelocked mode anymore
(and TRUNCATE is not allowed in stored functions or triggers).
into mysql.com:/opt/local/work/mysql-5.1-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/sp-prelocking.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/field.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.cc:
Auto merged
mysql-test/t/sp-prelocking.test:
Manual merge.
into mysql.com:/extern/mysql/5.0/bug16474/mysql-5.0-runtime
mysql-test/t/sp.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/ps.result:
Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/r/sp.result:
Added reference to test case for BUG#16474.
mysql-test/t/ps.test:
Added test coverage for "order by" in prepared statements (related to BUG#16474).
mysql-test/t/sp.test:
Added reference to test case for BUG#16474.
sql/sql_select.cc:
Fixed comment and test for basic_const_item() instead of is_splocal().
into mysql.com:/users/lthalmann/bk/mysql-5.1-new-wl3023-mats
mysql-test/t/sp.test:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
fix_fields() was not called for "order by" variables if the type was a
"constant integer", and thus interpreted as a column index.
However, a local variable is an expression and should not be interpreted
as a column index. Instead it behaves just like when using a user variable
for instance (i.e. it will not affect the ordering).
mysql-test/r/sp.result:
Updated results for new test case (BUG#16474).
mysql-test/t/sp.test:
New test case for BUG#16474.
sql/sql_select.cc:
When processing order list,
into mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.1-merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/skip_grants.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
produce wrong data
By default Item_sp_func::val_str() returns string from it's result_field
internal buffer. When grouping is present Item_copy_string is used to
store SP function result, but it doesn't additionally buffer the result.
When the next record is read, internal buffer is overwritten, due to
this Item_copy_string::val_str() will have wrong data. Thus producing
weird query result.
The Item_func_sp::val_str() now makes a copy of returned value to prevent
occasional corruption.
mysql-test/t/sp.test:
Added test case for bug#13575: SP funcs in select with distinct/group and order by can
produce wrong data
mysql-test/r/sp.result:
Added test case for bug#13575: SP funcs in select with distinct/group and
order by can produce wrong data
sql/item_func.h:
Fixed bug#13575: SP funcs in select with distinct/group and order by can
produce wrong data
The Item_func_sp::val_str() now makes a copy of returned value to prevent
occasinal corruption.
into neptunus.(none):/home/msvensson/mysql/bug10656/my51-bug10656
mysql-test/r/sp.result:
Auto merged
mysql-test/r/sp_trans.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
-Add test case
Move testcase that needs innodb from sp.test => sp_trans.test
mysql-test/r/sp.result:
Move test cases tyhat requires innodb to sp_trans.test
mysql-test/r/sp_trans.result:
Move test cases tyhat requires innodb to sp_trans.test
Add test case for bug#10656
mysql-test/t/sp.test:
Move test cases tyhat requires innodb to sp_trans.test
mysql-test/t/sp_trans.test:
Add test case for bug#10656
Move test cases that require innodb to sp_trans.test
into mysql.com:/home/bk/w3023-mysql-5.1-new
configure.in:
Auto merged
mysql-test/r/rpl_row_create_table.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.h:
Auto merged
into mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
libmysql/libmysql.c:
Auto merged
mysql-test/r/binary.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/t/binary.test:
Auto merged
mysql-test/t/federated.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/field_conv.cc:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_federated.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
support-files/mysql.spec.sh:
Manual merge. (use local)
into mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/skip_grants.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
VC++Files/mysql.sln:
Manual merge (use local).
configure.in:
Manual merge.
sql/table.cc:
Manual merge.
time per connection
Removed const_string() method from Item_string (it was only used in one
place, in a bad way). Defer possible SP variable, and access data directly
instead, in date_format item.
mysql-test/r/sp.result:
Updated results for new test (BUG#17476).
mysql-test/t/sp.test:
New test case (BUG#17476)
sql/item.h:
Removed const_string() from Item_string.
It was only used in one place, and we can just use str_value in Item directly.
sql/item_timefunc.cc:
Must defer a (possible) local SP variable to use max_length and str_value
in Item_func_date_format::fix_length_and_dec(), and refer to str_value
directly without the const_string() method (now removed); the cast didn't
work in all cases anyway.
into mysql.com:/home/bk/w3023-mysql-5.1-new
configure.in:
Auto merged
BitKeeper/deleted/.del-sp_notembedded.test:
Auto merged
mysql-test/extra/binlog_tests/binlog.test:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/log.h:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.h:
Auto merged
into mysql.com:/home/my/mysql-5.1
BitKeeper/deleted/.del-innodb_notembedded.test:
Delete: mysql-test/t/innodb_notembedded.test
BitKeeper/deleted/.del-sp_notembedded.test:
Delete: mysql-test/t/sp_notembedded.test
BitKeeper/deleted/.del-subselect_notembedded.test:
Delete: mysql-test/t/subselect_notembedded.test
BitKeeper/deleted/.del-ctype_cp932_notembedded.result:
Delete: mysql-test/r/ctype_cp932_notembedded.result
BitKeeper/deleted/.del-innodb_notembedded.result:
Delete: mysql-test/r/innodb_notembedded.result
BitKeeper/deleted/.del-sp_notembedded.result:
Delete: mysql-test/r/sp_notembedded.result
BitKeeper/deleted/.del-subselect_notembedded.result:
Delete: mysql-test/r/subselect_notembedded.result
configure.in:
Auto merged
include/mysql.h:
Auto merged
libmysql/libmysql.c:
Auto merged
libmysqld/emb_qcache.cc:
Auto merged
libmysqld/embedded_priv.h:
Auto merged
libmysqld/libmysqld.c:
Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/query_cache_notembedded.result:
Auto merged
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/backup.test:
Auto merged
mysql-test/t/compress.test:
Auto merged
mysql-test/t/delayed.test:
Auto merged
mysql-test/t/handler.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysql_client_test.test:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/query_cache_notembedded.test:
Auto merged
mysql-test/t/read_only.test:
Auto merged
mysql-test/t/skip_grants.test:
Auto merged
mysql-test/t/sp-destruct.test:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp-threads.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/temp_table.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
mysys/mf_dirname.c:
Auto merged
sql/field.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.h:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_cursor.cc:
Auto merged
sql/sql_db.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
sql/tztime.h:
Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Auto merged
tests/mysql_client_test.c:
Auto merged
libmysqld/lib_sql.cc:
Manual merge
mysql-test/extra/binlog_tests/binlog.test:
Manual merge
mysql-test/extra/binlog_tests/ctype_cp932.test:
No changes
mysql-test/r/binlog_stm_binlog.result:
Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
No changes
mysql-test/t/innodb.test:
Manual merge
mysql-test/t/view.test:
Manual merge
mysys/my_bitmap.c:
Manual merge
scripts/mysql_fix_privilege_tables.sql:
Manual merge
sql/item.cc:
Manual merge
sql/sql_cache.h:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_update.cc:
Manual merge
(Needed for "list of pushes" web page and autopush)
include/mysql.h:
Fix to embedded server to be able to run tests on it
libmysql/libmysql.c:
Fix to embedded server to be able to run tests on it
libmysqld/emb_qcache.cc:
Fix to embedded server to be able to run tests on it
libmysqld/embedded_priv.h:
Fix to embedded server to be able to run tests on it
libmysqld/lib_sql.cc:
Fix to embedded server to be able to run tests on it
libmysqld/libmysqld.c:
Fix to embedded server to be able to run tests on it
mysql-test/mysql-test-run.sh:
Fix to embedded server to be able to run tests on it
mysql-test/r/binlog.result:
Updated test for embedded server
mysql-test/r/ctype_cp932.result:
Updated test for embedded server
mysql-test/r/innodb.result:
Updated test for embedded server
mysql-test/r/mysqltest.result:
Updated test for embedded server
mysql-test/r/query_cache.result:
Updated test for embedded server
mysql-test/r/query_cache_notembedded.result:
Updated test for embedded server
mysql-test/r/sp-error.result:
Updated test for embedded server
mysql-test/r/sp.result:
Updated test for embedded server
mysql-test/r/subselect.result:
Updated test for embedded server
mysql-test/r/view.result:
Updated test for embedded server
mysql-test/r/view_grant.result:
Updated test for embedded server
mysql-test/t/backup.test:
Updated test for embedded server
mysql-test/t/binlog.test:
Updated test for embedded server
mysql-test/t/blackhole.test:
Updated test for embedded server
mysql-test/t/compress.test:
Updated test for embedded server
mysql-test/t/ctype_cp932.test:
Updated test for embedded server
mysql-test/t/delayed.test:
Updated test for embedded server
mysql-test/t/handler.test:
Updated test for embedded server
mysql-test/t/innodb.test:
Updated test for embedded server
mysql-test/t/mysql.test:
Updated test for embedded server
mysql-test/t/mysql_client_test.test:
Updated test for embedded server
mysql-test/t/mysqltest.test:
Updated test for embedded server
mysql-test/t/query_cache.test:
Updated test for embedded server
mysql-test/t/query_cache_notembedded.test:
Updated test for embedded server
mysql-test/t/read_only.test:
Updated test for embedded server
mysql-test/t/skip_grants.test:
Updated test for embedded server
mysql-test/t/sp-destruct.test:
Updated test for embedded server
mysql-test/t/sp-error.test:
Updated test for embedded server
mysql-test/t/sp-threads.test:
Updated test for embedded server
mysql-test/t/sp.test:
Updated test for embedded server
mysql-test/t/subselect.test:
Updated test for embedded server
mysql-test/t/temp_table.test:
Updated test for embedded server
mysql-test/t/view.test:
Updated test for embedded server
mysql-test/t/view_grant.test:
Updated test for embedded server
mysql-test/t/wait_timeout.test:
Updated test for embedded server
mysys/mf_dirname.c:
Review fix: Don't access data outside of array
mysys/my_bitmap.c:
Remove compiler warnings
scripts/mysql_fix_privilege_tables.sql:
Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
sql-common/client.c:
Updated test for embedded server
sql/item.cc:
Remove DBUG_PRINT statement that can cause crashes when running with --debug
sql/mysqld.cc:
Fix to embedded server to be able to run tests on it
sql/protocol.cc:
Fix to embedded server to be able to run tests on it
(Trivial reconstruction of code)
sql/protocol.h:
Fix to embedded server to be able to run tests on it
sql/sql_base.cc:
Better comment
sql/sql_class.cc:
Fix to embedded server to be able to run tests on it
sql/sql_class.h:
Fix to embedded server to be able to run tests on it
sql/sql_cursor.cc:
Fix to embedded server to be able to run tests on it
sql/sql_parse.cc:
Fix to embedded server to be able to run tests on it
Don't crash for disabled commands when using embedded server
sql/sql_prepare.cc:
Fix to embedded server to be able to run tests on it
mysql-test/r/ctype_cp932_notembedded.result:
New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
mysql-test/r/innodb_notembedded.result:
New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
mysql-test/r/sp.result.orig:
New BitKeeper file ``mysql-test/r/sp.result.orig''
mysql-test/r/sp_notembedded.result:
New BitKeeper file ``mysql-test/r/sp_notembedded.result''
mysql-test/r/subselect_notembedded.result:
New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
mysql-test/t/ctype_cp932_notembedded.test:
New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
mysql-test/t/innodb_notembedded.test:
New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
mysql-test/t/sp.test.orig:
New BitKeeper file ``mysql-test/t/sp.test.orig''
mysql-test/t/sp_notembedded.test:
New BitKeeper file ``mysql-test/t/sp_notembedded.test''
mysql-test/t/subselect_notembedded.test:
New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
into mysql.com:/home/bk/w3023-mysql-5.1-new
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
Auto merged
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
Auto merged
mysql-test/r/binlog_row_insert_select.result:
Auto merged
mysql-test/r/rpl_row_delayed_ins.result:
Auto merged
mysql-test/t/rpl_sp.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
mysql-test/t/rpl_ndb_dd_basic.test:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_11bugs.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_2myisam.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_3innodb.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_create_table.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log_innodb.result:
Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_sp008.result:
Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_basic_11bugs.test:
Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_sp008.test:
Merge with 5.1.7 release clone.
Adaptions to make it work with NDB.
mysql-test/extra/binlog_tests/binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/blackhole.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_cp932.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_cp932_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/drop_temp_table.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/insert_select-binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_log.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_multi_query.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_row_charset.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
Using replace_regex to remove table id.
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
Using replace_regex to remove table id.
mysql-test/include/rpl_row_basic.inc:
Removing sync with master on cleanup since there are engines that does
not work in a "syncronized" fashion on dropping tables.
mysql-test/r/binlog_row_binlog.result:
Result change
mysql-test/r/binlog_row_blackhole.result:
Result change
mysql-test/r/binlog_row_ctype_cp932.result:
Result change
mysql-test/r/binlog_row_ctype_ucs.result:
Result change
mysql-test/r/binlog_row_insert_select.result:
Result change
mysql-test/r/binlog_row_mix_innodb_myisam.result:
Result change
mysql-test/r/ctype_cp932_binlog_row.result:
Result change
mysql-test/r/rpl_row_basic_11bugs.result:
Result change
mysql-test/r/rpl_row_basic_2myisam.result:
Result change
mysql-test/r/rpl_row_basic_3innodb.result:
Result change
mysql-test/r/rpl_row_charset.result:
Result change
mysql-test/r/rpl_row_create_table.result:
Result change
mysql-test/r/rpl_row_delayed_ins.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_sp008.result:
Result change
mysql-test/t/binlog_stm_binlog.test:
Using replace_regex to remove table id.
mysql-test/t/ndb_binlog_ddl_multi.test:
Using replace_regex to remove table id.
mysql-test/t/ndb_binlog_ignore_db.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_heap.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_loaddata_s.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_ndb_blob.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_ndb_disk.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_basic_11bugs.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_create_table.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_drop.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_row_sp008.test:
Using replace_regex to remove table id.
mysql-test/t/rpl_sp.test:
Using replace_regex to remove table id.
mysql-test/t/sp.test:
Using replace_regex to remove table id.
mysql-test/t/sp_notembedded.test:
Using replace_regex to remove table id.
mysql-test/t/user_var-binlog.test:
Using replace_regex to remove table id.
sql/ha_ndbcluster_binlog.cc:
Assign_new_table_id() now takes table share.
Removed gratuitous friend declaration of ndb_add_binlog_index().
Turning of binlogging during execution of ndb_add_binlog_index().
sql/handler.h:
Removed gratuitous friend declaration of ndb_add_binlog_index().
sql/log.cc:
Adding debug printout.
sql/log_event.cc:
Closing thread tables on dummy event.
sql/rpl_injector.cc:
Added support for new locking scheme.
sql/rpl_injector.h:
Added support for new locking scheme.
into neptunus.(none):/home/msvensson/mysql/mysql-5.1
mysql-test/r/sp.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/mysql-test-run.pl:
Merge locationwhere to search for client bins
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
mysql-test/r/sp-error.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/errmsg.txt:
Manual merge
sql/sql_base.cc:
Manual merge.
into neptunus.(none):/home/msvensson/mysql/mysql-5.1
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
client/mysqltest.c:
Merge
mysql-test/mysql-test-run.pl:
Merge
mysql-test/t/mysqldump.test:
Merge
mysql-test/t/mysqltest.test:
Merge