An error occurred fetching the project authors.
- 13 May, 2006 1 commit
-
-
unknown authored
itself when executing queries referring to a view with GROUP BY an expression containing non-constant interval. It happened because Item_date_add_interval::eq neglected the fact that the method can be applied to an expression of the form date(col) + interval time_to_sec(col) second at the time when col could not be evaluated yet. An attempt to evaluate time_to_sec(col) in this method resulted in a crash. mysql-test/r/view.result: Added a test case for bug #19490. mysql-test/t/view.test: Added a test case for bug #19490. sql/item_timefunc.cc: Fixed bug #19490. The bug that caused server crash manifested itself when executing queries referring to a view with GROUP BY an expression containing non-constant interval. It happened because Item_date_add_interval::eq neglected the fact that the method can be applied to an expression of the form date(col) + interval time_to_sec(col) second at the time when col could not be evaluated yet. An attempt to evaluate time_to_sec(col) in this method resulted in a crash. The code of Item_date_add_interval::eq was corrected.
-
- 11 May, 2006 1 commit
-
-
unknown authored
When a view statement is compiled on CREATE VIEW time, most of the optimizations should not be done. Finding the right optimization for a subquery is one of them. Unfortunately the optimizer is resolving the column references of the left expression of IN subqueries in the process of deciding witch optimization to use (if needed). So there should be a special case in Item_in_subselect::fix_fields() : check the validity of the left expression of IN subqueries in CREATE VIEW mode and then proceed as normal. mysql-test/r/subselect.result: test case mysql-test/r/view.result: chnaged explain due to column being resolved mysql-test/t/subselect.test: test case sql/item_subselect.cc: overloaded fix_fields to fix the left_expr in prepare_view_mode sql/item_subselect.h: fix_fields overloaded so it can prepare left_expr
-
- 26 Apr, 2006 1 commit
-
-
unknown authored
-
- 22 Apr, 2006 1 commit
-
-
unknown authored
Error was emitted when one tried to select information from view which used merge algorithm and which also had CONVERT_TZ() function in its select list. This bug was caused by wrong assumption that global table list for view which is handled using merge algorithm begins from tables belonging to the main select of this view. Nowadays the above assumption is not true only when one uses convert_tz() function in view's select list, but in future other cases may be added (for example we may support merging of views with subqueries in select list one day). Relying on this false assumption led to the usage of wrong table list for field lookups and therefor errors. With this fix we explicitly use pointer to the beginning of main select's table list. mysql-test/r/timezone_grant.result: Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs" that checks that usage of CONVERT_TZ() function in view does not require additional privileges. mysql-test/r/view.result: Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs". mysql-test/t/timezone_grant.test: Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs" that checks that usage of CONVERT_TZ() function in view does not require additional privileges. mysql-test/t/view.test: Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs". sql/sql_view.cc: mysql_make_view(): We should not assume that global table list for view which is handled using merge algorithm begins from tables belonging to the main select of this view. Nowadays the above assumption is not true only when one uses convert_tz() function in view's select list, but in future other cases may be added (for example we may support merging of views with subqueries in select list one day). So let us instead explicitly use pointer to the beginning of main select's table list.
-
- 13 Apr, 2006 1 commit
-
-
unknown authored
mysql-test/r/view.result: BUG#14308 test suite. mysql-test/t/view.test: BUG#14308 test suite. sql/share/errmsg.txt: New error message about a recursive view. sql/sql_view.cc: The check of view recursion.
-
- 08 Apr, 2006 1 commit
-
-
unknown authored
The function agg_cmp_type in item_cmpfunc.cc neglected the fact that the first argument in a BETWEEN/IN predicate could be a field of a view. As a result in the case when the retrieved table was hidden by a view over it and the arguments in the BETWEEN/IN predicates are of the date/time type the function did not perform conversion of the constant arguments to the same format as the first field argument. If formats of the arguments differed it caused wrong a evaluation of the predicates. mysql-test/r/view.result: Added a test case for bug #16069. mysql-test/t/view.test: Added a test case for bug #16069.
-
- 04 Apr, 2006 1 commit
-
-
unknown authored
The code in opt_sum_query that prevented the COUNT/MIN/MAX optimization from being applied to outer joins was not adjusted after introducing nested joins. As a result if an outer join contained a reference to a view as an inner table the code of opt_sum_query missed the presence of an on expressions and erroneously applied the mentioned optimization. mysql-test/r/view.result: Added a test case for bug #18237. mysql-test/t/view.test: Added a test case for bug #18237.
-
- 28 Mar, 2006 1 commit
-
-
unknown authored
An invalid assertion in Item_direct_view_ref::eq caused an assertion abort in the debug version. mysql-test/r/view.result: Added a test case for bug #18386. mysql-test/t/view.test: Added a test case for bug #18386. sql/item.cc: Fixed bug #18386. An invalid assertion in Item_direct_view_ref::eq caused an assertion abort in the debug version. Changed the assertion.
-
- 03 Mar, 2006 1 commit
-
-
unknown authored
When the Item_cond::fix_fields() function reduces cond tree, it in loop scans it's own list and when it founds Item_cond with same function (AND or OR) it does next things: 1) replaces that item with item's list. 2) empties item's list. Due to this operation is done twice - for update and for view, at the update phase cond's list of lower view is already empty. Empty list returns ref to itself, thus making endless loop by replacing list with itself, emptying, replacing again and so on. This results in server hung up. To the Item_cond::fix_fields() function added check that ensures that list being replaced with isn't empty. mysql-test/t/view.test: Added test for bug#17726: Not checked empty list caused endless loop mysql-test/r/view.result: Added test for bug#17726: Not checked empty list caused endless loop sql/item_cmpfunc.cc: Fixed bug#17726: Not checked empty list caused endless loop To the Item_cond::fix_fields() function added check that ensures that list being replaced with isn't empty.
-
- 24 Feb, 2006 1 commit
-
-
unknown authored
(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''
-
- 13 Feb, 2006 1 commit
-
-
unknown authored
proper processing of multiple sql statements sent as a single command. mysql-test/r/view.result: result file update for #15943 test case mysql-test/t/view.test: test case added for bug #15943
-
- 02 Feb, 2006 1 commit
-
-
unknown authored
When an ambiguous field name is used in a group by clause a warning is issued in the find_order_in_list function by a call to push_warning_printf. An expression that was not always valid was passed to this call as the field name parameter. mysql-test/r/view.result: Added a test case for bug #16382. mysql-test/t/view.test: Added a test case for bug #16382.
-
- 24 Jan, 2006 1 commit
-
-
unknown authored
mysql-test/include/have_outfile.inc: Use MYSQLTEST_VARDIR mysql-test/include/test_outfile.inc: Use MYSQLTEST_VARDIR mysql-test/mysql-test-run.pl: Create variable $MYSQLTEST_VARDIR that points to the vardir Don't create a symlink from var/ to the physical vardir if it's somewhere else Setup a symlink(or copy dir on windows) for std_data so it is available in the physical vardir Use "../tmp" as slave-load-tmpdir, since the server is started in var/master-data and slave in var/slave-data they will both find the dumps in "../tmp" mysql-test/mysql-test-run.sh: Export MYSQLTEST_VARDIR, always pointing at mysql-test/var mysql-test/r/backup.result: Use MYSQLTEST_VARDIR mysql-test/r/blackhole.result: Use "../std_data_ln" to find std_data files mysql-test/r/loaddata.result: Use "../std_data_ln" to find std_data files mysql-test/r/mysqlbinlog.result: Use "../std_data_ln" to find std_data files mysql-test/r/mysqltest.result: Use MYSQLTEST_VARDIR mysql-test/r/outfile.result: Use MYSQLTEST_VARDIR mysql-test/r/query_cache.result: Add missing drop function mysql-test/r/rpl000001.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl000004.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_innodb.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata_rule_m.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddata_rule_s.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_loaddatalocal.result: Use MYSQLTEST_VARDIR mysql-test/r/rpl_log.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_misc_functions.result: Use MYSQLTEST_VARDIR mysql-test/r/rpl_replicate_do.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_rewrite_db.result: Use "../std_data_ln" to find std_data files mysql-test/r/rpl_timezone.result: Use "../std_data_ln" to find std_data files mysql-test/r/symlink.result: Use MYSQLTEST_VARDIR mysql-test/r/trigger.result: Use "../std_data_ln" to find std_data files mysql-test/r/view.result: Use "../std_data_ln" to find std_data files mysql-test/r/warnings.result: Use "../std_data_ln" to find std_data files mysql-test/t/backup-master.sh: Use MYSQLTEST_VARDIR mysql-test/t/backup.test: Use MYSQLTEST_VARDIR mysql-test/t/blackhole.test: Use "../std_data_ln" to find std_data files mysql-test/t/ctype_ucs_binlog.test: Use MYSQLTEST_VARDIR mysql-test/t/im_daemon_life_cycle-im.opt: Use MYSQLTEST_VARDIR mysql-test/t/im_options_set.imtest: Use MYSQLTEST_VARDIR mysql-test/t/im_options_unset.imtest: Use MYSQLTEST_VARDIR mysql-test/t/loaddata.test: Use "../std_data_ln" to find std_data files mysql-test/t/myisam.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqlbinlog.test: Use "../std_data_ln" to find std_data files mysql-test/t/mysqlbinlog2.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqldump.test: Use MYSQLTEST_VARDIR mysql-test/t/mysqltest.test: Use MYSQLTEST_VARDIR mysql-test/t/ndb_autodiscover.test: Use MYSQLTEST_VARDIR mysql-test/t/outfile.test: Use MYSQLTEST_VARDIR mysql-test/t/query_cache.test: Add missing drop function mysql-test/t/repair.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl000001.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl000004.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl000009.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl000015-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl000017-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_EE_error.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_charset.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_drop_db.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-master.opt: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-master.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-slave.opt: Use MYSQLTEST_VARDIR mysql-test/t/rpl_flush_log_loop-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_innodb.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata_rule_m.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddata_rule_s.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_loaddatalocal.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_log.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_misc_functions-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_misc_functions.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_replicate_do.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_rewrite_db.test: Use "../std_data_ln" to find std_data files mysql-test/t/rpl_rotate_logs-slave.sh: Use MYSQLTEST_VARDIR mysql-test/t/rpl_rotate_logs.test: Use MYSQLTEST_VARDIR mysql-test/t/rpl_timezone.test: Use MYSQLTEST_VARDIR mysql-test/t/show_check.test: Use MYSQLTEST_VARDIR mysql-test/t/sp-destruct.test: Use MYSQLTEST_VARDIR mysql-test/t/symlink.test: Use MYSQLTEST_VARDIR mysql-test/t/temp_table-master.opt: Use MYSQLTEST_VARDIR mysql-test/t/trigger-compat.test: Use MYSQLTEST_VARDIR mysql-test/t/trigger-grant.test: Use MYSQLTEST_VARDIR mysql-test/t/trigger.test: Use "../std_data_ln" to find std_data files mysql-test/t/type_varchar.test: Use MYSQLTEST_VARDIR mysql-test/t/user_var-binlog.test: Use MYSQLTEST_VARDIR mysql-test/t/view.test: Use "../std_data_ln" to find std_data files mysql-test/t/warnings.test: Use "../std_data_ln" to find std_data files mysql-test/include/sourced.inc: New BitKeeper file ``mysql-test/include/sourced.inc'' mysql-test/include/sourced1.inc: New BitKeeper file ``mysql-test/include/sourced1.inc''
-
- 07 Jan, 2006 1 commit
-
-
unknown authored
mysql-test/r/view.result: Added a test case for bug #16016. mysql-test/t/view.test: Added a test case for bug #16016. sql/opt_sum.cc: Fixed bug #16016: MIN/MAX optimization was not applied to views. The fix employs the standard way of handling direct references to view fields.
-
- 05 Jan, 2006 1 commit
-
-
unknown authored
- Fixed tests - Optimized new code - Fixed some unlikely core dumps - Better bug fixes for: - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null mysql-test/r/create.result: Update results after removing wrong warnings for CREATE ... SELECT New tests mysql-test/r/handler.result: Drop used tables mysql-test/r/kill.result: Make test portable mysql-test/r/mysqlshow.result: Drop tables used by previous test mysql-test/r/trigger.result: Reuse old procedure name mysql-test/r/view.result: Extra tests mysql-test/t/create.test: New tests to test fix of removing wrong warnings for CREATE ... SELECT mysql-test/t/disabled.def: Enable 'kill' test (should now be portable) mysql-test/t/handler.test: Drop used tables mysql-test/t/kill.test: Make test portable even if kill doesn't work at once mysql-test/t/mysqlshow.test: Drop tables used by previous test mysql-test/t/trigger.test: Reuse old procedure name mysql-test/t/view.test: Extra tests sql/field.cc: Removed compiler warning sql/ha_federated.cc: my_snprintf -> strmake() (Simple optimization) sql/ha_ndbcluster.cc: Indentation cleanups and trival optimization sql/item.cc: Moved save_org_in_field() to item.cc to make it easier to test Remove setting of null_value as this is not needed sql/item.h: Moved save_org_in_field() to item.cc to make it easier to test sql/log_event.cc: Remove inline of slave_load_file_stem() Added 'extension' parameter to slave_load_file_stem() to get smaller code Removed not critical (or needed) DBUG_ASSERT()'s Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths Indentation fixes sql/opt_range.cc: Moved code from declaration to function body (To make it more readable) sql/parse_file.cc: Fixed DBUG_PRINT sql/sp.cc: Simple cleanups - Removed not needed {} level - Ensure saved variables starts with old_ sql/sp_head.cc: Indentation fixes Remove core dump when using --debug when m_next_cached_sp == 0 Fixed compiler warnings Trivial optimizations sql/sp_head.h: Changed argument to set_definer() to const Added THD argument to recursion_level_error() to avoid call to current_thd sql/sql_acl.cc: Removed not needed test (first_not_own_table is the guard) sql/sql_base.cc: Removed extra empty line sql/sql_handler.cc: Don't test table version in mysql_ha_read() as this is already tested in lock_tables() Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash) sql/sql_insert.cc: Mark fields that are set in CREATE ... SELECT as used (Removed wrong warnings about field not having a default value) sql/sql_parse.cc: Removed not needed test of 'tables' (first_not_own_table is the guard) Simplify code sql/sql_select.cc: Use group->field to check if value is null instead of item called by 'save_org_in_field' This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null) sql/sql_trigger.cc: Move sql_modes_parameters outside of function Indentation fixes Fixed compiler warning Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access() (This allows us to remove the extra test in check_grant() and check_table_access())
-
- 19 Dec, 2005 1 commit
-
-
unknown authored
Create tmp table filed using original item name when it's necessary mysql-test/r/view.result: Fix for bug#14861 aliased column names are not preserved. test case mysql-test/t/view.test: Fix for bug#14861 aliased column names are not preserved. test case
-
- 07 Dec, 2005 1 commit
-
-
unknown authored
impossible view security". We should not expose names of tables which are explicitly or implicitly (via routine or trigger) used by view even if we find that they are missing. So during building of list of prelocked tables for statement we track which routines (and therefore tables for these routines) are used from views. We mark elements of LEX::routines set which correspond to routines used in views by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST object for topmost view which uses routine. We propagate this mark to all routines which are used by this routine and which we add to this set. We also mark tables used by such routine which we add to the list of tables for prelocking as belonging to this view. mysql-test/r/sp-error.result: Added test for bug #11555 "Stored procedures: current SP tables locking make impossible view security". mysql-test/r/view.result: We should not expose tables which are expicitly/implicitly used in view in check table statement. mysql-test/t/sp-error.test: Added test for bug #11555 "Stored procedures: current SP tables locking make impossible view security". mysql-test/t/view.test: Removed comment obsoleted by bugfix. sql/sp.cc: We should not expose names of tables which are explicitly or implicitly (via routine or trigger) used by view even if we find that they are missing. So during building of list of prelocked tables for statement we track which routines (and therefore tables for these routines) are used from views. We mark elements of LEX::routines set which correspond to routines used in views by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST object for topmost view which uses routine. We propagate this mark to all routines which are used by this routine and which we add to this set. We also mark tables used by such routine which we add to the list of tables for prelocking as belonging to this view. sql/sp.h: sp_cache_routines_and_add_tables_for_view()/for_triggers(): To be able to determine correctly uppermost view which uses this view/table with trigger we have to pass pointer to TABLE_LIST object instead of pointer to view's LEX or to Table_triggers_list object. sql/sp_head.cc: sp_head::add_used_tables_to_table_list(): Added new argument which allows to mark tables which are added to table list for prelocking as belonging to view (this allows properly hide names of tables which are used in routines used by views). sql/sp_head.h: sp_head::add_used_tables_to_table_list(): Added new argument which allows to mark tables which are added to table list for prelocking as belonging to view (this allows properly hide names of tables which are used in routines used by views). sql/sql_base.cc: open_tables(): sp_cache_routines_and_add_tables_for_view()/for_triggers() now accept pointer to table list element as last argument, this allows them to determine correctly uppermost view which uses this view/table with trigger. sql/sql_trigger.h: Table_triggers_list: sp_cache_routines_and_add_tables_for_triggers() now accept pointer to table list element as last argument, this allows to determine correctly uppermost view which uses this table with trigger.
-
- 05 Dec, 2005 1 commit
-
-
unknown authored
-
- 02 Dec, 2005 1 commit
-
-
unknown authored
of SELECT from query begining, to be independet of query buffer allocation. Correct procedure used to find beginning of the current statement during parsing (BUG#14885). mysql-test/r/view.result: BUG#14885 test suite. mysql-test/t/view.test: BUG#14885 test suite. sql/sp_head.cc: The debug print statement fixed to prevent crash in case of NULL in m_next_cached_sp. sql/sql_lex.h: Now we shall store only position (index of first character) of SELECT from query beginning. sql/sql_view.cc: Position of the SELECT used to output it to .frm. sql/sql_yacc.yy: Now we shall store only position (index of first character) of SELECT from query beginning. Correct procedure used to find beginning of the current statement during parsing.
-
- 01 Dec, 2005 1 commit
-
-
unknown authored
mysql-test/r/view.result: BUG#15096 test suite. mysql-test/t/view.test: BUG#15096 test suite. sql/sql_view.cc: View placed in a function never get TABLE during view creation, because we have never executed that function in this process. So we should expect empty TABLE_LIST::table pointer.
-
- 18 Nov, 2005 1 commit
-
-
unknown authored
Enabled view tests that didn't work before. mysql-test/r/view.result: Enabled natural outer join tests with views - now they work after WL#2486 was pushed. mysql-test/t/view.test: Enabled natural outer join tests with views - now they work after WL#2486 was pushed.
-
- 14 Nov, 2005 2 commits
-
-
unknown authored
test_if_order_by_key() expected only Item_fields to be in order->item, thus failing to find available index on view's field, which results in reported error. Now test_if_order_by_key() calls order->item->real_item() to get field for choosing index. sql/sql_select.cc: Fix bug #14816 test_if_order_by_key() expected only Item_fields. Make test_if_order_by_key() use real_item() to get field. mysql-test/r/view.result: Test case for bug#14816 test_if_order_by_key() expected only Item_fields. mysql-test/t/view.test: Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
-
unknown authored
Item_ref's null_value wasn't updated in save_org_in_field() causing reported error. sql/item.h: Fix bug #14850 Item_ref's null_value wasn't updated Make save_org_in_field() update Item_ref's null_value. mysql-test/r/view.result: Test case for bug #14850 Item_ref's null_value wasn't updated mysql-test/t/view.test: Test case for bug #14850 Item_ref's null_value wasn't updated
-
- 11 Nov, 2005 1 commit
-
-
unknown authored
View .frm parser assumes that query string will take only 1 line, with \n in aliases query stringmay take several lines thus produces bad .frm file. 'query' parameter type changed from 'string' to 'escaped string' sql/sql_view.cc: Fix bug #13622 \n in column alias results in broken .frm 'query' parameter type changed to 'escaped string' mysql-test/r/view.result: Test case for bug #13622 Wrong view .frm created if some field's alias contain \n mysql-test/t/view.test: Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
-
- 10 Nov, 2005 1 commit
-
-
unknown authored
checks on trigger activation) mysql-test/r/information_schema.result: Update result file: a new column DEFINER has been added to INFORMATION_SCHEMA.TRIGGERS. mysql-test/r/mysqldump.result: Update result file: a new column DEFINER has been added to INFORMATION_SCHEMA.TRIGGERS. mysql-test/r/rpl_ddl.result: Update result file: a new column DEFINER has been added to INFORMATION_SCHEMA.TRIGGERS. mysql-test/r/rpl_sp.result: Update result file: a new clause DEFINER has been added to CREATE TRIGGER statement. mysql-test/r/rpl_trigger.result: Results for new test cases were added. mysql-test/r/skip_grants.result: Error message has been changed. mysql-test/r/trigger.result: Added DEFINER column. mysql-test/r/view.result: Error messages have been changed. mysql-test/r/view_grant.result: Error messages have been changed. mysql-test/t/mysqldump.test: Drop created procedure to not affect further tests. mysql-test/t/rpl_trigger.test: Add tests for new column in information schema. mysql-test/t/skip_grants.test: Error tag has been renamed. mysql-test/t/view.test: Error tag has been renamed. mysql-test/t/view_grant.test: Error tag has been changed. sql/item_func.cc: Fix typo in comments. sql/mysql_priv.h: A try to minimize copy&paste: - introduce operations to be used from sql_yacc.yy; - introduce an operation to be used from trigger and view processing code. sql/share/errmsg.txt: - Rename ER_NO_VIEW_USER to ER_MALFORMED_DEFINER in order to be shared for view and trigger implementations; - Fix a typo; - Add a new error code for trigger warning. sql/sp.cc: set_info() was split into set_info() and set_definer(). sql/sp_head.cc: set_info() was split into set_info() and set_definer(). sql/sp_head.h: set_info() was split into set_info() and set_definer(). sql/sql_acl.cc: Add a new check: exit from the cycle if the table is NULL. sql/sql_lex.h: - Rename create_view_definer to definer, since it is used for views and triggers; - Change st_lex_user to LEX_USER, since st_lex_user is a structure. So, formally, it should be "struct st_lex_user", which is longer than just LEX_USER; - Add trigger_definition_begin. sql/sql_parse.cc: - Add a new check: exit from the cycle if the table is NULL; - Implement definer-related functions. sql/sql_show.cc: Add DEFINER column. sql/sql_trigger.cc: Add DEFINER support for triggers. sql/sql_trigger.h: Add DEFINER support for triggers. sql/sql_view.cc: Rename create_view_definer to definer. sql/sql_yacc.yy: Add support for DEFINER-clause in CREATE TRIGGER statement. Since CREATE TRIGGER and CREATE VIEW can be similar at the start, yacc is unable to distinguish between them. So, had to modify both statements in order to make it parsable by yacc. mysql-test/r/trigger-compat.result: Result file for triggers backward compatibility test. mysql-test/r/trigger-grant.result: Result file of the test for WL#2818. mysql-test/t/trigger-compat.test: Triggers backward compatibility test: check that the server still can load triggers w/o definer attribute and modify tables with such triggers (add a new trigger, etc). mysql-test/t/trigger-grant.test: Test for WL#2818 -- check that DEFINER support in triggers works properly
-
- 09 Nov, 2005 1 commit
-
-
unknown authored
Corrected the syntax for the current_user() case. (It's "definer = current_user[()]", not just "current_user[()]".) mysql-test/r/view.result: New test case for BUG#14719 mysql-test/t/view.test: New test case for BUG#14719 sql/sql_yacc.yy: Corrected the CREATE VIEW syntax for the current_user() DEFINER case. (It's "definer = current_user[()]", not just "current_user[()]".)
-
- 06 Nov, 2005 1 commit
-
-
unknown authored
-
- 03 Nov, 2005 2 commits
- 02 Nov, 2005 2 commits
-
-
unknown authored
new file sql_table.cc, handler.h: Fixed bug #14540. Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE to report that an operation cannot be applied for views. view.test, view.result: Added a test case for bug #14540. errmsg.txt: Fixed bug #14540. Added error ER_CHECK_NOT_BASE_TABLE. mysql-test/r/view.result: Added a test case for bug #14540. mysql-test/t/view.test: Added a test case for bug #14540. sql/handler.h: Fixed bug #14540. Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE to report that an operation cannot be applied for views. sql/share/errmsg.txt: Added error ER_CHECK_NOT_BASE_TABLE. sql/sql_table.cc: Fixed bug #14540. Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE to report that an operation cannot be applied for views.
-
unknown authored
for underlying tables of a merge VIEWs, too. mysql-test/r/view.result: Testcase for BUG#14026 mysql-test/t/view.test: Testcase for BUG#14026
-
- 01 Nov, 2005 1 commit
-
-
unknown authored
Item_func_group_concat::print() wasn't printing sort order thus creating wrong view. This results in reported error. sql/item_sum.cc: Fix bug #14466 lost sort order in GROUP_CONCAT() in a view Now Item_func_group_concat::print() prints sort order. mysql-test/r/view.result: Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view mysql-test/t/view.test: Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
-
- 28 Oct, 2005 1 commit
-
-
unknown authored
Changed the parser test for wildcards in hostname to checking for empty strings instead (analogous with the test in default_view_definer()), since wildcards do appear in the definer's host-part sometimes. mysql-test/r/view.result: Updated result. mysql-test/r/view_grant.result: Added test for BUG#14256. mysql-test/t/view.test: Changed test for explicit definer; wildcards in host are ok, empty host-part is not. mysql-test/t/view_grant.test: Added test for BUG#14256. sql/sql_yacc.yy: Changed test for wildcards in hostpart of explicit view definer to test for empty host part instead. (Analogous with sql_parse.cc:default_view_definer().)
-
- 27 Oct, 2005 1 commit
-
-
unknown authored
mysql-test/r/information_schema.result: error message changed mysql-test/r/sp.result: error message changed mysql-test/r/sql_mode.result: fixed test suite mysql-test/r/view.result: error message changed mysql-test/r/view_grant.result: test of underlying view tables check mysql-test/t/sql_mode.test: fixed test suite mysql-test/t/view_grant.test: test of underlying view tables check sql/item.cc: check of underlying tables privilege added sql/item.h: Name the resolution context points to the security context of view (if item belong to the view) sql/item_func.cc: a view error hiding for execution of prepared function belonged to a view fixed checking privileges if stored functions belonds to some view sql/mysql_priv.h: refult of derived table processing functions changed to bool Security_context added as an argument to find_field_in_table() sql/share/errmsg.txt: error message fixed sql/sql_acl.cc: Storing requested privileges of tables added View underlying tables privilege check added sql/sql_base.cc: View underlying tables privilege check added sql/sql_cache.cc: Code cleunup: we should not register underlying tables of view second time sql/sql_delete.cc: ancestor -> merge_underlying_list renaming sql/sql_derived.cc: refult of derived table processing functions changed to bool do not give SELECT_ACL for TEMPTABLE views sql/sql_lex.h: The comment added sql/sql_parse.cc: registration of requested privileges added sql/sql_prepare.cc: registration of requested privileges added sql/sql_update.cc: manipulation of requested privileges for underlying tables made the same as for table which we are updating sql/sql_view.cc: underlying tables of view security check support added sql/table.cc: renaming and fixing view preparation methods, methods for checking underlyoing tables security context added sql/table.h: storege for reuested privileges added
-
- 11 Oct, 2005 1 commit
-
-
unknown authored
- CHAR() now returns binary string as default - CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR() - Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() (Some old systems returns ETIME and it's safer to test for both values than to try to write a wrapper for each old system) - Fixed new introduced bug in NOT BETWEEN X and X - Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed - Use octet2hex() for all conversion of string to hex - Simplify and optimize code client/mysqldump.c: Simple optimizations of new code Indentation fixes client/mysqltest.c: Removed not needed variable include/mysql_com.h: Made octec2hex() more usable mysql-test/r/ctype_utf8.result: CHAR() now returns binary string as default mysql-test/r/func_str.result: CHAR() now returns binary string as default mysql-test/r/range.result: Added test to verify new introduced bug in NOT BETWEEN X and X mysql-test/r/user_var-binlog.result: CHAR() now returns binary string as default mysql-test/r/view.result: More tests of view rename mysql-test/t/ctype_utf8.test: CHAR() now returns binary string as default mysql-test/t/func_str.test: CHAR() now returns binary string as default mysql-test/t/range.test: Added test to verify new introduced bug in NOT BETWEEN X and X mysql-test/t/view.test: More tests of view rename mysys/mf_keycache.c: Indentation changes Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() mysys/my_os2cond.c: Fix to MySQL coding style Optimized functions mysys/thr_lock.c: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() mysys/thr_mutex.c: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() server-tools/instance-manager/instance.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() server-tools/instance-manager/thread_registry.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() sql/ha_federated.cc: Use octet2hex() sql/ha_ndbcluster.cc: Removed not used variable sql/handler.cc: Simplify code Use *NONE* instead of 'none' for not existing storage engine Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed sql/item.h: Remove not needed test for *ref. (If ref is set, it should never point at 0) sql/item_func.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() Simplify code More comments Require that last argument to find_and_check_access() is given (Made code shorter and faster) sql/item_strfunc.cc: Changed CHAR() to return result in binary collation CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR() Bar will shortly add the following syntax: CHAR(.... USING character_set) and ensure that CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings Use ocet2hex() sql/item_strfunc.h: CHAR() now returns a binary string sql/log_event.cc: Use octet2hex() Simplify code sql/parse_file.cc: Indentation fixes Use for() instead of while() sql/password.c: Make octet2hex() more generally usable by returning pointer to end 0 sql/slave.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() sql/sql_base.cc: Indentation fixes sql/sql_insert.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() sql/sql_manager.cc: Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait() sql/sql_parse.cc: Don't check thd->db when checking for function privileges sql/sql_prepare.cc: Fixed wrong merge sql/sql_select.cc: Fixed new bug for NOT BETWEEN X and X sql/sql_show.cc: Removed not used variable sql/sql_table.cc: Indentation fixed Removed DBUG_PRINT that is obvious from context sql/sql_view.cc: Simplify code sql/unireg.cc: Use octet2hex()
-
- 10 Oct, 2005 1 commit
-
-
unknown authored
check_equality() finds equalities among field items. It checks input items to be Item_fields thus skipping view's fields, which are represented by Item_direct_view_ref. Because of this index wasn't applied in all cases it can be. To fix this problem check_equality() now takes real item of Item_direct_view_ref, except outer view refs (with depended_from set). sql/sql_select.cc: Fix bug #13327 VIEW performs index scan For proper views fields handling check_equality() now takes real item from Item_direct_view_ref, with exception of outer view refs. mysql-test/r/view.result: Test case for bug#13327 VIEW performs index scan mysql-test/t/view.test: Test case for bug#13327 VIEW performs index scan
-
- 01 Oct, 2005 1 commit
-
-
unknown authored
The problem was then when a column reference was resolved to a view column, the new Item created for this column contained the name of the view, and not the view alias. mysql-test/r/view.result: Additional test for BUG#13410. mysql-test/t/view.test: Additional test for BUG#13410. sql/item.cc: Correctly cast 'cur_field' to Item_ident because if the original item is an Item_field, the cur_field is either an Item_field or an Item_ref. Thus we have to cast cur_field to a common super-class of both. sql/item.h: - real_item() may be called before Item_ref::ref is set (i.e. the Item_ref object was resolved). - To avoid a crash and to return some meaningful value in such cases we return 'this'. sql/sql_base.cc: - 'item' may be an Item_ref, so we test for the type of the actual referenced item. - Correctly cast 'cur_field' to Item_ident because if the original item is an Item_field, the cur_field is either an Item_field or an Item_ref. Thus we have to cast cur_field to a common super-class of both. sql/table.cc: - When creating a new Item for a reference to a view column, use the view alias, and not the real view name. - Removed old code
-
- 27 Sep, 2005 2 commits
-
-
unknown authored
Fixed bug #13410. Fixed name resolution for qualified reference to a view column in the HAVING clause. view.result, view.test: Added a test case for bug #13410. mysql-test/t/view.test: Added a test case for bug #13410. mysql-test/r/view.result: Added a test case for bug #13410. sql/item.cc: Fixed bug #13410. Fixed name resolution for qualified reference to a view column in the HAVING clause.
-
unknown authored
Fixed bug #13411. Fixed name resolution for non-qualified reference to a view column in the HAVING clause. view.result, view.test: Added a test case for bug #13411. mysql-test/t/view.test: Added a test case for bug #13411. mysql-test/r/view.result: Added a test case for bug #13411. sql/item.cc: Fixed bug #13411. Fixed name resolution for non-qualified reference to a view column in the HAVING clause. sql/sql_base.cc: Fixed bug #13411. Fixed name resolution for non-qualified reference to a view column in the HAVING clause.
-
- 16 Sep, 2005 1 commit
-
-
unknown authored
mysql-test/r/view.result: test results for rename table view1 to view2 mysql-test/t/view.test: tests for rename table view1 to view2 sql/share/errmsg.txt: added new errormessage (schema change not allowed in rename table view) sql/sql_rename.cc: added support for renaming views sql/sql_view.cc: added new function mysql_rename_view sql/sql_view.h: added prototype mysql_rename_view
-