into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
SCCS merged
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
client/mysqltest.c:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
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_lex.cc:
Auto merged
sql/sql_lex.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
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
strings/decimal.c:
Auto merged
into mysql.com:/home/my/mysql-5.1
BUILD/SETUP.sh:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/log_event.cc:
Manual merge
sql/sql_binlog.cc:
Manual merge
into mysql.com:/home/hf/work/mysql-5.1-mrg
BitKeeper/deleted/.del-bdb-deadlock.test:
Auto merged
Makefile.am:
Auto merged
include/mysql.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/include/deadlock.inc:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/flush_block_commit.test:
Auto merged
mysql-test/t/innodb-lock.test:
Auto merged
mysql-test/t/lock_multi.test:
Auto merged
mysql-test/t/rename.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/status.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
client/mysqltest.c:
merging
include/my_time.h:
merging
libmysql/libmysql.c:
merging
mysql-test/t/order_by.test:
merging
sql/sql_yacc.yy:
merging
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
BUILD/SETUP.sh:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/item_timefunc.cc:
Manual merge.
sql/mysqld.cc:
Manual merge.
sql/mysqld.cc.rej:
manual merge
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.
into mysql.com:/home/hf/work/mysql-5.1.clean
include/my_time.h:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.h:
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_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/records.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
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-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/type_newdecimal.result:
SCCS merged
mysql-test/t/type_newdecimal.test:
merging
sql/item.cc:
merging
sql/item_subselect.cc:
SCCS merged
sql/item_timefunc.h:
merging
sql/sql_lex.cc:
SCCS merged
sql/sql_select.h:
merging
into example.com:/work/mysql-5.1-runtime-bug22830-new
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Events: crash with procedure which alters events with function
Post-review CS
This fix also changes the handling of KILL command combined with
subquery. It changes the error message given back to "not supported",
from parse error. The error for CREATE|ALTER EVENT has also been changed
to generate "not supported yet" instead of parse error.
In case of a SP call, the error is "not supported yet". This change
cleans the parser from code which should not belong to there. Still
LEX::expr_allows_subselect is existant because it simplifies the handling
of SQLCOM_HA_READ which forbids subselects.
mysql-test/r/events_bugs.result:
update resut
mysql-test/r/events_grant.result:
update result
mysql-test/r/kill.result:
the error message has been changed for KILL
mysql-test/t/events_bugs.test:
Update old tests with the new emitted error
Add a test case for
BUG#22830 Events: crash with procedure which alters events with function
mysql-test/t/events_grant.test:
add ORDER BY clause to keep the result deterministic.
mysql-test/t/kill.test:
use name of the error, and change the error
from parse error, to not supported
sql/sql_lex.cc:
Add an auxiliary function that checks whether SP and/or
tables are used in the statement. This function is helpful for
statements that cannot handle subqueries ans SP calls. Adding out
of the parser cleans the latter of handling of special cases and
letting it do its job of parsing.
sql/sql_lex.h:
helper function to check whether a table or SP was used
sql/sql_parse.cc:
Use LEX::table_or_sp_used() for SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT
and SQLCOM_KILL. SQLCOM_DROP event does not use `expr` rule and thus a check is
not needed.
sql/sql_yacc.yy:
Remove usage of LEX::expr_allows_subselect for CREATE|ALTER EVENT
and KILL. There is only one left occurence - SQLCOM_HAREAD, but it
adds one table to the list of tables
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
include/hash.h:
Introduced auxillary hash_init_opt() macro which simplifies
lazy initialization of HASH objects.
sql/sp.cc:
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
sql/sql_lex.cc:
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
sql/sql_lex.h:
Updated comment describing Query_tables_list::sroutines to
reflect that now we are use lazy initialization for this hash.
Added constant for initial size of this hash.
Evaluate "NULL IN (SELECT ...)" in a special way: Disable pushed-down
conditions and their "consequences":
= Do full table scans instead of unique_[index_subquery] lookups.
= Change appropriate "ref_or_null" accesses to full table scans in
subquery's joins.
Also cache value of NULL IN (SELECT ...) if the SELECT is not correlated
wrt any upper select.
mysql-test/r/subselect.result:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Updated test results
sql/item.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added comments
sql/item_cmpfunc.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
Made Item_in_optimizer to:
- cache the value of "NULL IN (uncorrelated select)"
- Turn off pushed-down predicates when evaluating "NULL IN (SELECT ...)"
sql/item_cmpfunc.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Made Item_in_optimizer cache the value of "NULL IN (uncorrelated select)"
- Added comments
sql/item_subselect.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- When needed, wrap the predicates we push into subquery into an
Item_func_trig_cond so we're able to turn them off when evaluating
NULL IN (SELECT ...).
- Added code to evaluate NULL IN (SELECT ...) in a special way:
= In [unique_]index_subquery, do full table scan to see if there
are any rows.
= For other subqueries, change ref[_or_null] to ALL if the
ref[_or_null] was created from pushed-down predicate.
sql/item_subselect.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added Item_subselect::is_correlated
- Added comments
sql/records.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Make rr_sequential() non-static
sql/sql_lex.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added st_select_lex::is_correlated and Item_subselect::is_correlated.
sql/sql_lex.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added st_select_lex::is_correlated
sql/sql_select.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added KEY_FIELD::outer_ref to keep track of which ref accesses are
created from predicates that were pushed down into the subquery.
sql/sql_select.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added KEYUSE::outer_ref
mysql-test/r/subselect3.result:
New BitKeeper file ``mysql-test/r/subselect3.result''
mysql-test/t/subselect3.test:
New BitKeeper file ``mysql-test/t/subselect3.test''
into rakia.gmz:/home/kgeorge/mysql/autopush/B21809-5.0-opt
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
select OK.
The SQL parser was using Item::name to transfer user defined function attributes
to the user defined function (udf). It was not distinguishing between user defined
function call arguments and stored procedure call arguments. Setting Item::name
was causing Item_ref::print() method to print the argument as quoted identifiers
and caused views that reference aggregate functions as udf call arguments (and
rely on Item::print() for the text of the view to store) to throw an undefined
identifier error.
Overloaded Item_ref::print to print aggregate functions as such when printing
the references to aggregate functions taken out of context by split_sum_func2()
Fixed the parser to properly detect using AS clause in stored procedure arguments
as an error.
Fixed printing the arguments of udf call to print properly the udf attribute.
mysql-test/r/udf.result:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
mysql-test/t/udf.test:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
sql/item.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- Don't print the refs to SUM functions as refs.
sql/item_func.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/item_func.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/sql_lex.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_lex.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_yacc.yy:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
- fix bison duplicate symbol warnings
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.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/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
BitKeeper/deleted/.del-bdb.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
include/my_base.h:
SCCS merged
mysql-test/include/mix1.inc:
SCCS merged
mysql-test/r/group_by.result:
SCCS merged
mysql-test/r/innodb_mysql.result:
SCCS merged
mysql-test/t/group_by.test:
SCCS merged
sql/sql_select.cc:
SCCS merged
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
BUILD/SETUP.sh:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_parse.cc:
remove_escape() function removed. Manual merge.
sql/table.cc:
Manually merged. Old line removed.
tests/mysql_client_test.c:
Manually merged. test_status position now last.
sql/sql_parse.cc.rej:
undefined
sql/table.cc.rej:
undefined
tests/mysql_client_test.c.rej:
undefined
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
mysql-test/r/select.result:
Added a test case for bug #19579.
mysql-test/t/select.test:
Added a test case for bug #19579.
sql/item_cmpfunc.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_base.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.h:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_select.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
BUILD/SETUP.sh:
Added check for CCACHE_DISABLE. If set, do not
use ccache at all.
BUILD/compile-pentium-gcov:
Moved CCACHE_DISABLE up before going into SETUP.sh.
Added debug_extra_flags to extra_flags.
mysql-test/r/create.result:
Added tests for incorrect database names.
mysql-test/r/ctype_create.result:
Added tests for incorrect alter database names.
mysql-test/r/events.result:
Added tests for incorrect database names.
mysql-test/r/grant.result:
Output changed to capital letters.
mysql-test/t/alter_table.test:
Removed extra empty line
mysql-test/t/create.test:
Added tests for incorrect database names.
mysql-test/t/ctype_create.test:
Added tests for incorrect name handling
mysql-test/t/events.test:
Added tests for incorrect database names.
sql/item_timefunc.cc:
Added dummy case to avoid compiler warning.
sql/mysql_priv.h:
Changed argument from char pointer to LEX_STRING pointer.
sql/mysqld.cc:
Added a missing component from struct.
sql/sql_class.h:
Added function LEX_STRING_make that sets the string and length.
sql/sql_db.cc:
Changed several char pointers to lex_strings.
sql/sql_lex.cc:
name is now LEX_STRING
sql/sql_lex.h:
Changed name to LEX_STRING.
sql/sql_parse.cc:
Changed several char pointers to lex_strings.
db_length needed a trick, because in old client protocol there
was an extra char zero added to the string.
check_db_name() now takes LEX_STRING pointer as an argument.
Changed remove_escape() to take LEX_STRING pointer as an argument.
Removed COM_CREATE_DB and COM_DROP_DB. These are obsolete.
sql/sql_table.cc:
char* -> LEX_STRING*
sql/sql_yacc.yy:
Changed char* -> LEX_STRING*
sql/table.cc:
check_db_name() now takes LEX_STRING* as argument instead of char*.
Optimized code a bit.
tests/mysql_client_test.c:
Added test for (short) status.
After defining out (ifdef) COM_DROP_DB and COM_CREATE_DB
in mysqld.cc mysql_client_test needed to be informed that
failing in recognizing these commands is not fatal error
anymore.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp-error.result:
Manual merge.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20953
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp-error.result:
Manual merge.
should fail to create
The problem was that this type of errors was checked during view
creation, which doesn't happen when CREATE VIEW is a statement of
a created stored routine.
The solution is to perform the checks at parse time. The idea of the
fix is that the parser checks if a construction just parsed is allowed
in current circumstances by testing certain flags, and this flags are
reset for VIEWs.
The side effect of this change is that if the user already have
such bogus routines, it will now get a error when trying to do
SHOW CREATE PROCEDURE proc;
(and some other) and when trying to execute such routine he will get
ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
However there should be very few such users (if any), and they may
(and should) drop these bogus routines.
mysql-test/r/sp-error.result:
Add result for bug#20953: create proc with a create view that uses
local vars/params should fail to create.
mysql-test/r/view.result:
Update results.
mysql-test/t/sp-error.test:
Add test case for bug#20953: create proc with a create view that uses
local vars/params should fail to create.
mysql-test/t/view.test:
Add second test for variable in a view.
Remove SP variable in a view test, as it tests wrong behaviour.
Add test for derived table in a view.
sql/sql_lex.cc:
Remove LEX::variables_used.
sql/sql_lex.h:
Remove LEX::variables_used and add st_parsing_options structure and
LEX::parsing_options member.
sql/sql_view.cc:
Move some error checking to sql/sql_yacc.yy.
sql/sql_yacc.yy:
Check for disallowed syntax in a CREATE VIEW at parse time to rise a
error when it is used inside CREATE PROCEDURE and CREATE FUNCTION, as
well as by itself.
into macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.1-opt
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/mi_check.c:
Auto merged
mysql-test/r/ps.result:
merge 5.0-opt -> 5.1-opt
sql/unireg.cc:
merge 5.0-opt -> 5.1-opt
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
Before this patch the such views were converted into
into temporary table views.
mysql-test/r/view.result:
Added a test case for bug #21646.
mysql-test/t/view.test:
Added a test case for bug #21646.
sql/mysql_priv.h:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
sql/sql_lex.cc:
Fixed bug #21646.
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
sql/sql_yacc.yy:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
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.
into mysql.com:/usr/home/ram/work/mysql-5.1-maint
BitKeeper/etc/ignore:
auto-union
mysql-test/mysql-test-run.pl:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge
BitKeeper/etc/ignore:
auto-union
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
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_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/r/not_embedded_server.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/ctype_recoding.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/ctype_recoding.test:
manual merge.
sql/sql_lex.h:
manual merge.
sql/sql_table.cc:
manual merge.
make st_select_lex::setup_ref_array() take into account that
Item_sum-descendant objects located within descendant SELECTs
may be added into ref_pointer_array.
sql/item_sum.cc:
BUG#21477 "memory overruns for certain kinds of subqueries":
Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
that exist within this SELECT.
sql/sql_lex.h:
BUG#21477 "memory overruns for certain kinds of subqueries":
Add SELECT_LEX::n_sum_items and SELECT_LEXT::n_child_sum_items.
sql/sql_yacc.yy:
BUG#21477 "memory overruns for certain kinds of subqueries":
Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
that exist within this SELECT.
into maint2.mysql.com:/data/localhome/tsmith/bk/50
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/net_serv.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
vio/viosocket.c:
Auto merged
client/mysql.cc:
Manual merge.
mysql-test/t/ctype_recoding.test:
Manual merge.
sql/sql_lex.h:
SCCS merged
sql/sql_table.cc:
Manual merge.
mysql-test/r/ctype_recoding.result:
Manual merge
handle them.
Problem:
CREATE|ALTER EVENT, HANDLER READ, KILL, Partitioning uses `expr` from the
parser. This rule comes with all the rings and bells including subqueries.
However, these commands are not subquery safe. For this reason there are two
fuse checks in the parser. They were checking by command id. CREATE EVENT
should forbid subquery is the fix for
bug#16394 Events: Crash if schedule contains SELECT
The fix has been incorporated as part of the patch for WL#3337 (Event scheduler
new architecture).
Solution:
A new flag was added to LEX command_forbids_subselect. The fuse checks were
changed. The commands are responsible to set the value to true whenever
they can't handle subselects.
sql/sql_lex.cc:
initialize the variable
sql/sql_lex.h:
Add a new flag whether the parser should allow a subselect when
parsing. This is temporarily turned off by commands like CREATE|ALTER EVENT,
HA_READ, KILL. Could be used by other parts which reuse `expr` rule of the
grammar and should not allow subqueries as part of it.
sql/sql_yacc.yy:
Forbid subselects in some commands in a better way.
CREATE|ALTER EVENT, HANDLER READ, KILL, are not subselect
safe for parameters and therefore they should be forbidden already in
the parser.
This patch makes it easier for the developer to add new commands in that
sense similar to the mentioned above.
into bk-internal.mysql.com:/data0/bk/mysql-5.1
client/mysql.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/gis.test:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
server-tools/instance-manager/messages.cc:
Auto merged
sql/item_geofunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_lex.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
sql/share/errmsg.txt:
Auto merged
tests/mysql_client_test.c:
Auto merged
into maint1.mysql.com:/data/localhome/cmiller/bug20908/my51-bug20908
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/sql_lex.cc:
Auto merged
Zero-length variables caused failures when using the length to look
up the name in a hash. Instead, signal that no zero-length name can
ever be found and that to encounter one is a syntax error.
mysql-test/r/variables.result:
Results for test.
mysql-test/t/variables.test:
Insert tests to prove that zero-length variable names do not cause
faults.
sql/gen_lex_hash.cc:
If the length is zero, then there is nothing to look-up in the
hash.
sql/sql_lex.cc:
Names of variables must not be empty. Signal an error of that
happens.
- if there are two character set definitions in the column declaration,
we replace the first one with the second one as we store both in the LEX->charset
slot. Add a separate slot to the LEX structure to store underscore charset.
- convert default values to the column charset of STRING, VARSTRING fields
if necessary as well.
mysql-test/r/ctype_recoding.result:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- test result.
mysql-test/t/ctype_recoding.test:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- test case.
sql/sql_lex.cc:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_lex.h:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_table.cc:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- convert default values to the column charset of VARSTRING, STRING, ENUM,
SET fields if necessary.
sql/sql_yacc.yy:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
into example.com:/work/mysql-5.1-runtime-wl3337
BitKeeper/etc/ignore:
auto-union
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp_notembedded.result:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/share/errmsg.txt:
C
mysql-test/r/events_bugs.result:
update result
manual merge
mysql-test/r/ps_1general.result:
update result
manual merge
sql/sql_yacc.yy:
manual merge
client/mysqldump.c:
A post-merge fix - 'sock' was renamed to 'mysql'
mysql-test/r/events_bugs.result:
A post merge fix: now we strip rear comments from the query before
it gets into the log.
mysql-test/r/func_group.result:
A post merge fix: default clause is now printed uppercase.
mysql-test/r/im_life_cycle.result:
Fix my mistake in manual resolve.
mysql-test/r/mysqlcheck.result:
use test; - after we drop client_test_db there is no current database.
This cleanup is present in 5.1 only, but the test that was added in
5.0 assumes there is a current database, test.
mysql-test/r/mysqldump.result:
Ignore results of execution of mysqldump: we can't rely on
MASTER_LOG_POS in test results, it's different for statement
and row level logging.
mysql-test/r/mysqlshow.result:
A post-merge fix: information schema contains a few more tables
in 5.1
mysql-test/r/mysqltest.result:
A post merge fix: add 5.1 test end separator.
mysql-test/r/ndb_basic.result:
A post-merge fix: add test end separators.
mysql-test/r/rpl_switch_stm_row_mixed.result:
A post merge fix: length of varbinary column is now 3 times less.
Assuming a side effect of some other change. Length of any
field is not relevant in this test.
mysql-test/r/rpl_view.result:
Add an end of test marker.
mysql-test/r/show_check.result:
Remove duplicate results. Add results from a merged test case.
mysql-test/r/sp-error.result:
Add test end separators.
mysql-test/r/sp-security.result:
Post-merge fix: use test after the current database is dropped.
mysql-test/r/sp.result:
Remove a duplicate result (bad merge that left a copy of
the test case for Bug#19862 in the test suite).
mysql-test/r/strict.result:
An after-merge fix for a new test case: in 5.1 we issue a more accurate
error message: "Incorrect value" instead of "Truncated value". I reason
it so that in case of an error nothing is truncated, really.
Also found similar changes in other test cases.
mysql-test/r/type_datetime.result:
Fix the text of an error.
mysql-test/r/union.result:
A post-merge fix: CHARACTER SET is now uppercase.
mysql-test/t/mysqlcheck.test:
A post-merge fix: use test, after current database is dropped, there
is no current database.
mysql-test/t/mysqldump.test:
Disable result log: it's dependent on binlog position.
mysql-test/t/sp-security.test:
use test
sql/item_sum.cc:
Adjust the call to the constructor after the merge.
sql/sp_head.cc:
Add a missing DBUG_VOID_RETURN, move security checks out of
execute_trigger to Table_triggers_list: in 5.1 we check for
TRIGGER privilege, not SUPER privilege to execute triggers, so these
checks lack table context inside execute_trigger and have to be
performed when we have table object on hand.
sql/sql_db.cc:
A post-merge fix: adjust load_db_opt_by_name and check_db_dir_existence
(new functions added in 5.0) to be tablename-to-filename encoding
friendly.
sql/sql_lex.cc:
A post-merge fix: make skip_rear_comments operate on const uchar *s.
sql/sql_lex.h:
A post-merge fix.
sql/sql_show.cc:
A post-merge fix: fix a bad merge, rename orig_sql_command -> sql_command.
sql/sql_trigger.cc:
A post-merge fix: move security checks to process_triggers
from execute_trigger.
sql/sql_view.cc:
Adjust to the new signature of skip_rear_comments.
sql/sql_yacc.yy:
Adjust to the new signature of init_strings.