summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-security.test
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-041-2/+11
| | | | stopped with no-zero size)
* bugfix: IDENTIFIED BY clause was lost in some GRANT variantsSergei Golubchik2014-12-041-0/+8
|
* MDEV-5849 MySQL bug#12602983 - User without privilege on routine can ↵Sergei Golubchik2014-03-201-0/+41
| | | | | | discover its existence by executing "select non_existing_func();" or by "call non_existing_proc()" add or move privilege checks before existence checks
* Merge from mysql-5.1-security to mysql-5.5-securityJon Olav Hauglid2011-04-131-4/+1
|\ | | | | | | | | No conflicts
| * Merge from mysql-5.0-security to mysql-5.1-securityJon Olav Hauglid2011-04-131-4/+1
| |\ | | | | | | | | | | | | Text conflict in mysql-test/r/sp-security.result
| | * Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEEJon Olav Hauglid2011-04-131-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | DEFINITION OF ANY ROUTINE. This follow-up patch removes SHOW PROCEDURE CODE from the test case as this command is only available on debug versions of the server and therefore caused the test to fail on release builds.
* | | Merge from mysql-5.1-security to mysql-5.5-securityJon Olav Hauglid2011-04-111-0/+40
|\ \ \ | |/ / | | | | | | | | | | | | | | | Text conflict in mysql-test/r/sp-security.result Text conflict in mysql-test/t/sp-security.test Text conflict in sql/sp_head.cc
| * | Merge from mysql-5.0-security to mysql-5.1-securityJon Olav Hauglid2011-04-111-0/+40
| |\ \ | | |/ | | | | | | | | | Text conflict in sql/sp_head.cc
| | * Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEEJon Olav Hauglid2011-04-111-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEFINITION OF ANY ROUTINE. The problem was that having the SELECT privilege any column of the mysql.proc table by mistake allowed the user to see the definition of all routines (using SHOW CREATE PROCEDURE/FUNCTION and SHOW PROCEDURE/FUNCTION CODE). This patch fixes the problem by making sure that those commands are only allowed if the user has the SELECT privilege on the mysql.proc table itself. Test case added to sp-security.test.
* | | Fix for bug#57061 "User without privilege on routine can Dmitry Lenev2010-10-071-2/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | discover its existence". The problem was that user without any privileges on routine was able to find out whether it existed or not. DROP FUNCTION and DROP PROCEDURE statements were checking if routine being dropped existed and reported ER_SP_DOES_NOT_EXIST error/warning before checking if user had enough privileges to drop it. This patch solves this problem by changing code not to check if routine exists before checking if user has enough privileges to drop it. Moreover we no longer perform this check using a separate call instead we rely on sp_drop_routine() returning SP_KEY_NOT_FOUND if routine doesn't exist. This change also simplifies one of upcoming patches refactoring global read lock implementation. mysql-test/r/grant.result: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Removed DROP PROCEDURE/FUNCTION statements which have started to fail after this fix (correctly). There is no need in dropping routines in freshly created database anyway. mysql-test/r/sp-security.result: Added new test case for bug#57061 "User without privilege on routine can discover its existence". Updated existing tests according to new behaviour. mysql-test/suite/funcs_1/r/innodb_storedproc_06.result: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Now we drop routines under user which has enough privileges to do so. mysql-test/suite/funcs_1/r/memory_storedproc_06.result: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Now we drop routines under user which has enough privileges to do so. mysql-test/suite/funcs_1/r/myisam_storedproc_06.result: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Now we drop routines under user which has enough privileges to do so. mysql-test/suite/funcs_1/storedproc/storedproc_06.inc: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Now we drop routines under user which has enough privileges to do so. mysql-test/t/grant.test: Updated test case after fixing bug#57061 "User without privilege on routine can discover its existence". Removed DROP PROCEDURE/FUNCTION statements which have started to fail after this fix (correctly). There is no need in dropping routines in freshly created database anyway. mysql-test/t/sp-security.test: Added new test case for bug#57061 "User without privilege on routine can discover its existence". Updated existing tests according to new behaviour. sql/sp.cc: Removed sp_routine_exists_in_table() which is no longer used. sql/sp.h: Removed sp_routine_exists_in_table() which is no longer used. sql/sql_parse.cc: When dropping routine we no longer check if routine exists before checking if user has enough privileges to do so. Moreover we no longer perform this check using a separate call instead we rely on sp_drop_routine() returning SP_KEY_NOT_FOUND if routine doesn't exist.
* | mergeGeorgi Kodinov2009-11-271-0/+2
|\ \ | |/
| * Addendum to bug #48872: disable output in the test case because errors are Georgi Kodinov2009-11-271-0/+2
| | | | | | | | dependent on the case mode
* | mergeGeorgi Kodinov2009-11-271-0/+57
|\ \ | |/
| * Bug #48872 : Privileges for stored functions ignored if function nameGeorgi Kodinov2009-11-271-0/+57
| | | | | | | | | | | | | | is mixed case Transcode the procedure name to lowercase when searching for it in the hash. This is the missing part of the fix for bug #41049.
* | Merge 5.0 -> 5.1 of fix for Bug#42003 and Bug#43114 Matthias Leich2009-03-061-22/+30
|\ \ | |/
| * Merge of fix for Bug#42003 and Bug#43114 into more actual GCA treeMatthias Leich2009-03-051-26/+34
| |\ | | | | | | | | | modifications according to the reviews are included
| | * Last slice of fix for Bug#42003 tests missing the disconnect of connections ↵Matthias Leich2009-03-031-25/+34
| |/ | | | | | | | | | | | | | | <> default + Fix for Bug#43114 wait_until_count_sessions too restrictive, random PB failures + Removal of a lot of other weaknesses found + modifications according to review
* | Check warnings in servers error log as part of test caseunknown2008-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitKeeper/deleted/.del-rpl_bug33931-slave.opt: Delete: mysql-test/suite/rpl/t/rpl_bug33931-slave.opt mysql-test/include/default_mysqld.cnf: Set a default name for "log-bin" mysql-test/mysql-test-run.pl: Check for warnings in mysqld error log files after each testcase, using SQL mysql-test/lib/mtr_cases.pm: Make mtr_match into a perl module mysql-test/lib/mtr_match.pm: Make mtr_match into a perl module mysql-test/lib/mtr_report.pm: Make mtr_match into a perl module Print warnings if testcase failed from warnings mysql-test/r/information_schema.result: Be more selective which databases and tables are select in the queries mysql-test/r/mysql_upgrade.result: Update result, mysql_upgrade will check _all_ databases mysql-test/r/mysqlcheck.result: Update result, mysql_upgrade should check _all_ databases mysql-test/r/sp-destruct.result: Be more selective which databases and tables are select in the queries mysql-test/r/sp-error.result: Backup and restore mysql.proc table mysql-test/r/sp-security.result: Be more selective which databases and tables are select in the queries mysql-test/r/sp.result: Be more selective which databases and tables are select in the queries mysql-test/suite/rpl/r/rpl_bug33931.result: Move the setting of debug flag into the test file instead of in -slave.opt Add supression mysql-test/suite/rpl/r/rpl_idempotency.result: Add supression Add master-slave-end.inc mysql-test/suite/rpl/t/rpl_bug33931.test: Move the setting of debug flag into the test file instead of in -slave.opt Add supression mysql-test/suite/rpl/t/rpl_idempotency.test: Add supression Add master-slave-end.inc mysql-test/t/information_schema.test: Be more selective which databases and tables are select in the queries mysql-test/t/sp-destruct.test: Be more selective which databases and tables are select in the queries mysql-test/t/sp-error.test: Backup and restore mysql.proc table mysql-test/t/sp-security.test: Be more selective which databases and tables are select in the queries mysql-test/t/sp.test: Be more selective which databases and tables are select in the queries mysql-test/include/check-warnings.test: New BitKeeper file ``mysql-test/include/check-warnings.test'' mysql-test/include/mtr_warnings.sql: New BitKeeper file ``mysql-test/include/mtr_warnings.sql''
* | Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvelunknown2007-03-291-29/+48
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix for BUG#9504: Stored procedures: execute privilege doesn'tunknown2007-03-231-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make 'use database' okay. The problem was that we didn't check stored-routine privileges in check_grant_db(). The patch adds this check. mysql-test/r/grant.result: Update result file. mysql-test/r/sp-security.result: Update result fil. mysql-test/t/grant.test: Added test case for BUG#9504. mysql-test/t/sp-security.test: Update test. sql/sql_acl.cc: Check stored routines privileges.
* | Manual merge 5.0->5.1. Post-merge fixes.unknown2006-08-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge bodhi.local:/opt/local/work/tmp_mergeunknown2006-08-121-1/+77
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Bug#18630: Arguments of suid routine calculated in wrong securityunknown2006-07-131-1/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | context. Routine arguments were evaluated in the security context of the routine itself, not in the caller's context. The bug is fixed the following way: - Item_func_sp::find_and_check_access() has been split into two functions: Item_func_sp::find_and_check_access() itself only finds the function and check that the caller have EXECUTE privilege on it. New function set_routine_security_ctx() changes security context for SUID routines and checks that definer have EXECUTE privilege too. - new function sp_head::execute_trigger() is called from Table_triggers_list::process_triggers() instead of sp_head::execute_function(), and is effectively just as the sp_head::execute_function() is, with all non-trigger related code removed, and added trigger-specific security context switch. - call to Item_func_sp::find_and_check_access() stays outside of sp_head::execute_function(), and there is a code in sql_parse.cc before the call to sp_head::execute_procedure() that checks that the caller have EXECUTE privilege, but both sp_head::execute_function() and sp_head::execute_procedure() call set_routine_security_ctx() after evaluating their parameters, and restore the context after the body is executed. mysql-test/r/sp-security.result: Add test case for bug#18630: Arguments of suid routine calculated in wrong security context. mysql-test/t/sp-security.test: Add result for bug#18630: Arguments of suid routine calculated in wrong security context. sql/item_func.cc: Do not change security context before executing the function, as it will be changed after argument evaluation. Do not change security context in Item_func_sp::find_and_check_access(). sql/item_func.h: Change prototype for Item_func_sp::find_and_check_access(). sql/sp_head.cc: Add set_routine_security_ctx() function. Add sp_head::execute_trigger() method. Change security context in sp_head::execute_trigger(), and in sp_head::execute_function() and sp_head::execute_procedure() after argument evaluation. Move pop_all_cursors() call to sp_head::execute(). sql/sp_head.h: Add declaration for sp_head::execute_trigger() and set_routine_security_ctx(). sql/sql_parse.cc: Do not change security context before executing the procedure, as it will be changed after argument evaluation. sql/sql_trigger.cc: Call new sp_head::execute_trigger() instead of sp_head::execute_function(), which is responsible to switch security context.
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.1unknown2006-07-151-0/+46
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/merge-51 (which is mysql-5.1-new-maint team tree) include/my_base.h: Auto merged mysql-test/extra/rpl_tests/rpl_loaddata.test: Auto merged mysql-test/lib/mtr_cases.pl: Auto merged mysql-test/r/rpl_loaddata.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/lib/mtr_report.pl: merge of mysql-5.1 -> mysql-5.1-new-maint mysql-test/mysql-test-run.pl: merge of mysql-5.1 -> mysql-5.1-new-maint
| * Bug#19857: When a user with CREATE ROUTINE priv creates a routine it results ↵unknown2006-06-281-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in NULL p/w sp_grant_privileges(), the function that GRANTs EXECUTE + ALTER privs on a SP, did so creating a user-entry with not password; mysql_routine_grant() would then write that "change" to the user-table. mysql-test/r/sp-security.result: prove that creating a stored procedure will not destroy the creator's password mysql-test/t/sp-security.test: prove that creating a stored procedure will not destroy the creator's password sql/sql_acl.cc: get password from ACLs, convert to correct format, and use it when forcing GRANTS for SPs
* | Move test that requires innodb to sp_transunknown2006-05-181-23/+0
|/
* Cleanup test cases that leaves "stuff" behindunknown2006-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/ctype_latin2_ch.result: Drot table at end of test mysql-test/r/grant2.result: Drop users mysql-test/r/openssl_1.result: Drop users mysql-test/r/rpl_openssl.result: Drop users mysql-test/r/sp-security.result: Drop users mysql-test/r/sp_notembedded.result: Drop table mysql-test/r/trigger.result: Drop table mysql-test/t/ctype_latin2_ch.test: Drop table mysql-test/t/grant2.test: Drop users mysql-test/t/openssl_1.test: Drop users mysql-test/t/rpl_openssl.test: Drop users mysql-test/t/sp-security.test: Drop users mysql-test/t/sp_notembedded.test: Drop table mysql-test/t/trigger.test: Drop table
* Fix for BUG#13198: SP executes if definer does not exist.unknown2006-03-021-0/+95
| | | | | | | | | | | | | | | Basically, this fix contains a test case and removing of a workaround for replication. This fix became possible after pushing WL#2897 (Complete definer support in stored routines). mysql-test/r/sp-security.result: Updated the result file to contain results of test for BUG#13198. mysql-test/t/sp-security.test: Added a test case for BUG#13198. sql/sp_head.cc: Removed the workaround for replication, since WL#2897 is pushed and now definer attribute/clause is fully supported in stored routines.
* Implementation of WL#2897: Complete definer support in the stored routines.unknown2006-03-021-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION statements. Almost all support of definer in stored routines had been already done before this patch. NOTE: this patch changes behaviour of dumping stored routines in mysqldump. Before this patch, mysqldump did not dump DEFINER-clause for stored routines and this was documented behaviour. In order to get full information about stored routines, one should have dumped mysql.proc table. This patch changes this behaviour, so that DEFINER-clause is dumped. Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements before this patch, the clause is covered by additional version-specific comments. client/mysqldump.c: Updated the code for dumping stored routines: cover DEFINER-clause into version-specific comment. mysql-test/r/gis.result: Updated result file after adding DEFINER-clause. mysql-test/r/information_schema.result: Updated result file after adding DEFINER-clause. mysql-test/r/mysqldump.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_ddl.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_sp.result: Updated result file after adding DEFINER-clause. mysql-test/r/rpl_trigger.result: Updated result file after adding DEFINER-clause. mysql-test/r/sp-security.result: Updated result file after adding DEFINER-clause. mysql-test/r/sp.result: Updated result file after adding DEFINER-clause. mysql-test/r/sql_mode.result: Updated result file after adding DEFINER-clause. mysql-test/t/sp-security.test: Updated result file after adding DEFINER-clause. sql/sp.cc: Added DEFINER-clause. sql/sp_head.cc: Added a new convenient variant of set_definer() operation. sql/sp_head.h: Updated result file after adding DEFINER-clause. sql/sql_lex.h: Renamed trigger_definition_begin into stmt_definition_begin to be used for triggers and stored routines. sql/sql_parse.cc: Check DEFINER-clause. sql/sql_trigger.cc: Renamed trigger_definition_begin into stmt_definition_begin to be used for triggers and stored routines. sql/sql_yacc.yy: Added DEFINER-clause.
* Fix for BUG#7787: Stored procedures: improper warning for "grant execute" ↵unknown2006-02-221-0/+22
| | | | | | | | | | | | | | statement. The problem was that error flag was not reset. mysql-test/r/sp-security.result: Results for test case for BUG#7787. mysql-test/t/sp-security.test: A test case for BUG#7787. sql/sp.cc: Reset errors after sp_find_routine().
* Added new test case for BUG#14533: 'desc tbl' in stored procedure causes ↵unknown2006-02-011-0/+38
| | | | | | | | | | | | error 1142 which is no longer repeatable. (Unclear when this was fixed.) mysql-test/r/sp-security.result: Updated results for new test case (BUG#14533) mysql-test/t/sp-security.test: New test case for BUG#14533.
* Merge ↵unknown2006-01-271-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | neptunus.(none):/home/msvensson/mysql/mysqltestrun_check_testcases/my50-mysqltestrun_check_testcases into neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var-integration mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/rpl000001.result: Auto merged mysql-test/r/rpl_loaddata.result: Auto merged mysql-test/r/rpl_loaddata_rule_m.result: Auto merged mysql-test/r/rpl_loaddata_rule_s.result: Auto merged mysql-test/r/rpl_misc_functions.result: Auto merged mysql-test/r/rpl_replicate_do.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/r/view_grant.result: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/rpl000001.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_rule_m.test: Auto merged mysql-test/t/rpl_loaddata_rule_s.test: Auto merged mysql-test/t/rpl_misc_functions.test: Auto merged mysql-test/t/rpl_replicate_do.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/trigger-compat.test: Auto merged mysql-test/r/trigger-compat.result: Merge
| * Add new option "check-testcases" to mysql-test-run.plunknown2006-01-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup the sideeffects from most of the testcases with sideeffects. mysql-test/mysql-test-run.pl: Add option "check-testcases" to mysql-test-run.pl Will execute "include/check-testcase.test" once before each tescase and record the output into "var/tmp/check-testcase.result" After the teastcase it will run again and this time compare the output with previously recorded file. mysql-test/r/analyze.result: Drop table t1 at end of test mysql-test/r/create_select_tmp.result: Drop table t1 at end of test mysql-test/r/ctype_cp932.result: Drop table t1 at end of test mysql-test/r/ctype_recoding.result: Drop table t1 at end of test mysql-test/r/grant2.result: Drop user mysqltest_2 and mysqltest_A@'%' mysql-test/r/join_outer.result: Drop view v1 to cleanup mysql-test/r/ps_1general.result: Drop table t1 at end of test mysql-test/r/query_cache.result: Drop function "f1" mysql-test/r/read_only.result: Reset the "read_only" flag mysql-test/r/rpl000001.result: Remove user "blafasel2" mysql-test/r/rpl000017.result: Remove user "replicate" mysql-test/r/rpl_failed_optimize.result: Drop table t1 to cleanup mysql-test/r/rpl_flush_tables.result: Drop tables t3, t4, t5 mysql-test/r/rpl_ignore_revoke.result: Delete user "user_foo" mysql-test/r/rpl_insert_id.result: Drop table t1 to cleanup mysql-test/r/rpl_loaddata.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_m.result: Drop tyable t1 to cleanup mysql-test/r/rpl_loaddata_rule_s.result: Drop tyable t1 to cleanup mysql-test/r/rpl_misc_functions.result: Drop tyable t1 to cleanup mysql-test/r/rpl_multi_update3.result: Drop tyable t1 and t2 to cleanup mysql-test/r/rpl_replicate_do.result: Drop tyable t1 to cleanup mysql-test/r/rpl_skip_error.result: Drop tyable t1 to cleanup mysql-test/r/rpl_slave_status.result: Drop tyable t1 to cleanup mysql-test/r/sp-prelocking.result: Drop view v1 and tables t1, t2, t3 and t4 to cleanup mysql-test/r/sp-security.result: Delete users to cleanup Delete remaining traces in tables_priv and procs_priv mysql-test/r/subselect_innodb.result: Drop procedure p1 to cleanup mysql-test/r/trigger-compat.result: Drop trigger wl2818_trg1 and wl2818_trg2. Drop table t1, t2 Drop database mysqltest_db1 And the users "mysqltest_dfn@localhost" and "mysqltest_inv@localhost" mysql-test/r/type_bit.result: Drop tables t1 and t2 to cleanup mysql-test/r/variables.result: Set GLOBAL max_join_size to 10 as it originally was in variables-master.opt mysql-test/r/view_grant.result: Dop user "test@localhost" to cleanup mysql-test/t/analyze.test: Drop table t1 to cleanup mysql-test/t/create_select_tmp.test: Drop table t1 to cleanup mysql-test/t/ctype_cp932.test: Drop table t1 to cleanup mysql-test/t/ctype_recoding.test: Drop table t1 to cleanup mysql-test/t/fulltext_var.test: Restore the original ft_boolean_syntax mysql-test/t/grant2.test: Drop users "mysqltest_2" and "mysqltest_A@'%'" to cleanup mysql-test/t/innodb_cache.test: Reset query_cache_size to original value mysql-test/t/join_outer.test: Drop view v1 to cleanup mysql-test/t/ps_1general.test: Drop table t1 to cleanup mysql-test/t/query_cache.test: Drop function "f1" to cleanup mysql-test/t/read_only.test: Reset the readonly flag mysql-test/t/rpl000001.test: Delete user "blafasel2" to cleanup mysql-test/t/rpl000017.test: Delete user "replicate" to cleanup mysql-test/t/rpl_failed_optimize.test: Drop table t1 to cleanup mysql-test/t/rpl_flush_tables.test: Droip table t3, t4 and t5 to cleanup mysql-test/t/rpl_ignore_revoke.test: Delet user "user_foo" to cleanup mysql-test/t/rpl_insert_id.test: drop table t1 to cleanup mysql-test/t/rpl_loaddata.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_m.test: Drop table t1 to cleanup mysql-test/t/rpl_loaddata_rule_s.test: Drop table t1 to cleanup mysql-test/t/rpl_misc_functions.test: Drop table t1 to cleanup mysql-test/t/rpl_multi_update3.test: Drop table t1 and t2 to cleanup mysql-test/t/rpl_replicate_do.test: Drop table t1 to cleanup mysql-test/t/rpl_skip_error.test: Drop table t1 to cleanup mysql-test/t/rpl_slave_status.test: Drop table t1 to cleanup mysql-test/t/sp-prelocking.test: Drop table t1, t2 t3 and t4 to cleanup Drop view v1 mysql-test/t/sp-security.test: Delete test users from mysql.user, mysql.db, mysql.procs_priv and mysql.tables_priv Drop table t1 to cleanup mysql-test/t/subselect_innodb.test: Drop procedure p1 to cleanup mysql-test/t/trigger-compat.test: Drop trigger wl2818_trg1 and wl2818_trg2 to cleanup Drop table t1, t2 Drop users drop database mysqltest_db1 mysql-test/t/type_bit.test: drop table t1 and t2 to cleanup mysql-test/t/variables-master.opt: Increase max_join_size to 100. mysql-test/t/variables.test: Set max_join_size to 10, which was the original value in variables-master.opt mysql-test/t/view_grant.test: Drop the user "test@localhost" mysql-test/include/check-testcase.test: New BitKeeper file ``mysql-test/include/check-testcase.test''
* | Fixed BUG#14834: Server denies to execute Stored Procedureunknown2005-12-151-0/+44
|/ | | | | | | | | | | | | | | | The problem was that databases with '_' in the name did not match a correct ACL with a literal '_' (i.e. '\_') in the db name, only identical strings matched. The fix makes this work, and also ACLs with wildcards in the db name work. mysql-test/r/sp-security.result: New test case for BUG#14834 mysql-test/t/sp-security.test: New test case for BUG#14834 sql/sql_acl.cc: Match wild db:s in ACL in acl_getroot_no_password() (used for "suid" security context switching when invoking stored routines)
* Merge neptunus.(none):/home/msvensson/mysql/ssl_test/my50-ssl_testunknown2005-10-281-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.0 client/mysqltest.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/t/information_schema.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/sp-security.test: Auto merged sql/mysqld.cc: Auto merged sql/sql_show.cc: Auto merged sql/structs.h: Auto merged
| * Always test ssl and compressunknown2005-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Updated after review client/mysqltest.c: Updated after review. Fix "connect" command to take SSL and/or COMPRESS as options instead of enable/disable_ssl and enable/disable_compress Commented do_connect, added test cases etc. Fix safe_get_param to make it possible to call it once for every argument without having any checks inbetween. Make a copy for query->first_argument since safe_get_param will modify query string. Now connect works inside a while loop as well. mysql-test/mysql-test-run.pl: Updated after review mysql-test/r/connect.result: Enable test that was previolsy disabled because of "no error handling" in connect mysql-test/r/mysqltest.result: Added tests for "connect" mysql-test/t/compress.test: Updated after review, use the option argument to connect mysql-test/t/connect.test: Enable test that was previolsy disabled because of "no error handling" in connect Now it's possible to use "--error" before connect, so let's use it. mysql-test/t/information_schema.test: Connection user4 was already used mysql-test/t/myisam.test: Disconnect con1 so the name can be reused mysql-test/t/mysqltest.test: Added tests for "connect" mysql-test/t/openssl_1.test: Updated after review, use the option argument to connect mysql-test/t/sp-security.test: Disconnect user1 connection so the name can be reused mysql-test/t/ssl.test: Updated after review, use the option argument to connect mysql-test/t/ssl_compress.test: Updated after review, use the option argument to connect sql/mysqld.cc: Updated after review, Compression variable is always available sql/sql_show.cc: Updated after review, Compression variable is always available sql/structs.h: Updated after review, Compression variable is always available
* | sp-security.result, sp.result, sp-security.test, sp.test:unknown2005-10-161-0/+24
|/ | | | | | | | | | | | | | Test for bug#12812 moved from sp.test to sp-security.test mysql-test/t/sp.test: Test for bug#12812 moved from sp.test to sp-security.test mysql-test/t/sp-security.test: Test for bug#12812 moved from sp.test to sp-security.test mysql-test/r/sp.result: Test for bug#12812 moved from sp.test to sp-security.test mysql-test/r/sp-security.result: Test for bug#12812 moved from sp.test to sp-security.test
* Fixes during review of new pushed codeunknown2005-08-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed new bug when running a SP without a default database mysql-test/r/information_schema.result: Added test to cover changes made in default handling mysql-test/r/sp-security.result: Added test when executing SP without a default database mysql-test/t/information_schema.test: Added test to cover changes made in default handling mysql-test/t/sp-security.test: Added test when executing SP without a default database sql/item_strfunc.cc: Removed wrong push sql/mysqld.cc: Indentation fix sql/sql_base.cc: Use share->db instead of share->table_cache_key Remove assert that can never fail (because of test in previous row) sql/sql_db.cc: Allow empty database name when called from SP (To allow on run without a default database) sql/sql_parse.cc: Added comment sql/sql_show.cc: Indentation fixes Simplified code by checking for 'wrong' condition first and doing continue instead of going down one level Simplified precision and decimal handling
* Avoid spurious error when restoring INFORMATION_SCHEMA as the current unknown2005-08-111-0/+36
| | | | | | | | | | | | | | | | | | | | | | | database after failing to execute a stored procedure in an inaccessible database. (Bug #12318) mysql-test/r/sp-security.result: Update results mysql-test/t/sp-security.test: Add regression test sql/mysql_priv.h: Add additional argument to mysql_change_db() sql/sp.cc: Use mysql_change_db(), get rid of sp_change_db(). sql/sp.h: Get rid of sp_change_db(). sql/sql_db.cc: Handle no_access_check flag to mysql_change_db, and remove the send_ok() call. sql/sql_parse.cc: Add extra argument to mysql_change_db(), and call send_ok() after successful calls to same (since it no longer does it for us).
* Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0unknown2005-07-161-0/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0 BitKeeper/etc/config: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/sp-security.result: merge mysql-test/r/view.result: merge mysql-test/t/sp-security.test: merge mysql-test/t/view.test: merge sql/item_cmpfunc.cc: merge sql/sql_class.h: merge
| * stop evaluation constant functions in WHERE (BUG#4663)unknown2005-07-161-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correct value of CURRENT_USER() in SP with "security definer" (BUG#7291) BitKeeper/etc/config: switch off open logging mysql-test/r/sp-security.result: correct value from current_user() in function run from "security definer" mysql-test/r/view.result: evaluation constant functions in WHERE (BUG#4663) mysql-test/t/sp-security.test: correct value from current_user() in function run from "security definer" mysql-test/t/view.test: evaluation constant functions in WHERE (BUG#4663) sql/item.cc: Item_static_string_func creation if it is need sql/item.h: support of Item_static_string_func creation sql/item_cmpfunc.cc: do not evaluate items during view creation sql/item_create.cc: create Item_func_user sql/item_strfunc.cc: Item_func_sysconst in case of converting value still have to correctly print itself => use Item_static_string_func instead of Item_string Item_func_user return USER() or CURRENT_USER() sql/item_strfunc.h: support of correct charset conversion procedure in Item_func_sysconst sql/sql_class.h: new method sql/sql_yacc.yy: Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
* | - fixed the "sp-security" test case: drop any possible already existing ↵unknown2005-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | table to avoid failing if a previous test failure left the t1 table around mysql-test/t/sp-security.test: - drop any possible already existing table to avoid failing if a previous test failure left the t1 table around
* | fixed environment restoring in case of error during SP function execution ↵unknown2005-06-231-0/+36
|/ | | | | | | | | | | | | | | | | | (BUG#9503) #define macro improvement mysql-test/r/sp-security.result: BUG#9503: reseting correct parameters of thread after error in SP function mysql-test/t/sp-security.test: BUG#9503: reseting correct parameters of thread after error in SP function sql/item_func.cc: fixed environment restoring in case of error during SP function execution sql/protocol.cc: added debug print sql/sql_class.h: fixed #defines to force them to be alvaise in piar, and variable name made more complex for accident repeating in other code
* Bug#10246 - Parser: bad syntax for GRANT EXECUTEunknown2005-05-171-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename some functions more fine-grained sp privileges make grant/revoke sp grammar less ambigious mysql-test/r/sp-security.result: change test for new syntax mysql-test/r/system_mysql_db.result: change test for new syntax mysql-test/t/sp-security.test: change test for new syntax scripts/mysql_create_system_tables.sh: now store routine_type for procs_priv scripts/mysql_fix_privilege_tables.sql: now store routine_type for procs_priv sql/item_func.cc: rename of function sql/mysql_priv.h: rename of function sql/sp_head.cc: extra arg for check_some_routine_access sql/sql_acl.cc: rename of function. now handle func/proc acls seperately sql/sql_acl.h: rename of function sql/sql_parse.cc: rename of function grants for procs handled distinctly from funcs sql/sql_show.cc: check_some_routine_access extra arg sql/sql_base.cc: fix for build sql/sql_yacc.yy: fix for build
* Cleanup tests and results after merge from 4.1 of embeddedunknown2005-04-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | server testing cleanups. mysql-test/r/innodb.result: Update results mysql-test/r/insert_select-binlog.result: Update results mysql-test/r/mix_innodb_myisam_binlog.result: Update results mysql-test/r/ps_1general.result: Update results mysql-test/r/ps_grant.result: Update results mysql-test/r/view.result: Update results mysql-test/t/client_xml.test: Skip test with embedded server mysql-test/t/flush_read_lock_kill.test: Skip test with embedded server mysql-test/t/grant3.test: Skip test with embedded server mysql-test/t/information_schema.test: Skip test with embedded server mysql-test/t/innodb.test: Fix up filenames mysql-test/t/multi_update.test: Skip test with embedded server mysql-test/t/mysqlshow.test: Skip test with embedded server mysql-test/t/ps_1general.test: Move grant-related tests to ps_grant, and fix cleanup of filename mysql-test/t/ps_grant.test: Add additional tests mysql-test/t/sp-security.test: Skip test with embedded server mysql-test/t/user_limits.test: Skip test with embedded server mysql-test/t/view.test: Split grant-related tests to new test file view_grant
* WL#925 - Privileges for stored routinesunknown2004-12-231-5/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement fine-grained control over access to stored procedures Privileges are cached (same way as existing table/column privs) mysql-test/include/system_db_struct.inc: WL#925 - Privileges for stored routines New system table: procs_priv mysql-test/r/connect.result: WL#925 - Privileges for stored routines New system table: procs_priv mysql-test/r/grant.result: WL#925 - Privileges for stored routines user table has additional privilege attributes SHOW PRIVILEGES amended mysql-test/r/grant2.result: Fix result mysql-test/r/information_schema.result: WL#925 - Privileges for stored routines New system table procs_priv New user privileges mysql-test/r/show_check.result: Fix result mysql-test/r/sp-security.result: WL#925 - Privileges for stored routines Fix existing tests to work with new privileges New tests for new privileges mysql-test/r/sp.result: WL#925 - Privileges for stored routines Fix SHOW PRIVILEGES results mysql-test/r/system_mysql_db.result: WL#925 - Privileges for stored routines New system table: procs_priv user and db tables have new privilege attributes mysql-test/t/grant2.test: Fix test mysql-test/t/show_check.test: Fix test mysql-test/t/sp-security.test: WL#925 - Privileges for stored routines Allow existing tests to run with new privilege checks New tests for privileges mysql-test/t/system_mysql_db_fix.test: WL#925 - Privileges for stored routines New system table: procs_priv scripts/mysql_create_system_tables.sh: WL#925 - Privileges for stored routines db and user has new privilege attributes new system table: procs_priv scripts/mysql_fix_privilege_tables.sql: WL#925 - Privileges for stored routines new system table: procs_priv scripts/mysql_install_db.sh: WL#925 - Privileges for stored routines Amend comment sql/item_func.cc: WL#925 - Privileges for stored routines Privilege check for stored FUNCTION routine sql/lex.h: WL#925 - Privileges for stored routines new token ROUTINE sql/mysql_priv.h: WL#925 - Privileges for stored routines New function: check_procedure_access() sql/mysqld.cc: WL#925 - Privileges for stored routines system option automatic-sp-privileges sql/set_var.cc: WL#925 - Privileges for stored routines system option automatic-sp-privileges sql/share/errmsg.txt: WL#925 - Privileges for stored routines rename errormessage to conform: ER_SP_ACCESS_DENIED_ERROR -> ER_PROCACCESS_DENIED_ERROR New error messages ER_NONEXISTING_PROC_GRANT, ER_PROC_AUTO_GRANT_FAIL, ER_PROC_AUTO_REVOKE_FAIL sql/sp.cc: WL#925 - Privileges for stored routines new function: sp_exists_routine() sql/sp.h: WL#925 - Privileges for stored routines new function: sp_exists_routine() sql/sql_acl.cc: WL#925 - Privileges for stored routines Implementation for SP privileges. Privileges are cached in memory hash. New functions: mysql_procedure_grant() check_grant_procedure() sp_revoke_privileges() sp_grant_privileges() sql/sql_acl.h: WL#925 - Privileges for stored routines New privilege bits: CREATE_PROC_ACL, ALTER_PROC_ACL Alter confusing bit-segments to be shifted New macros: fix_rights_for_procedure() get_rights_for_procedure() New functions: mysql_procedure_grant() check_grant_procedure() sp_grant_privileges() sp_revoke_privileges() sql/sql_lex.h: WL#925 - Privileges for stored routines new all_privileges attribute in LEX sql/sql_parse.cc: WL#925 - Privileges for stored routines Remove function: check_sp_definer_access() Add handling for SP grants/revokes Add privilege checks for stored procedure invocation sql/sql_show.cc: WL#925 - Privileges for stored routines update result for SHOW PRIVILEGES sql/sql_yacc.yy: WL#925 - Privileges for stored routines New token ROUTINE rename some rules handle CREATE ROUTINE / ALTER ROUTINE privileges
* mergeunknown2004-10-281-1/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/sp-security.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/sp.test: Auto merged sql/log_event.cc: Auto merged sql/set_var.cc: Auto merged sql/sp.cc: Auto merged sql/sp_rcontext.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_load.cc: Auto merged sql/sql_yacc.yy: Auto merged
| * Fixed BUG#6030: Stored procedure has no appropriate DROP privilege.unknown2004-10-221-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...and no ALTER privilege either. For now, only the definer and root can drop or alter an SP. include/mysqld_error.h: New access denied error code when dropping/altering stored procedures. include/sql_state.h: New access denied error code when dropping/altering stored procedures. mysql-test/r/sp-error.result: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.) mysql-test/r/sp-security.result: Added tests for access control on who's allowed to drop and alter SPs. mysql-test/r/sp.result: Updated results. (Warning removed.) mysql-test/t/sp-error.test: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.) mysql-test/t/sp-security.test: Added tests for access control on who's allowed to drop and alter SPs. sql/share/czech/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/danish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/dutch/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/english/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/estonian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/french/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/german/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/greek/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/hungarian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/italian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/japanese/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/korean/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/norwegian-ny/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/norwegian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/polish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/portuguese/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/romanian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/russian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/serbian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/slovak/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/spanish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/swedish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/ukrainian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/sql_parse.cc: Added minimal access control for DROP/ALTER PROCEDURE/FUNCTION. Only the definer and root are allowed to do this. sql/sql_yacc.yy: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.)
* | errors without code removedunknown2004-10-201-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed (WL#2133) include/mysqld_error.h: new errors added. mysql-test/r/rpl_charset.result: new error mysql-test/r/rpl_timezone.result: new error mysql-test/r/sp-security.result: more clean error message mysql-test/r/sp.result: now error state intercepted correctly mysql-test/t/connect.test: new error message mysql-test/t/rpl_charset.test: new error message mysql-test/t/rpl_timezone.test: new error mysql-test/t/sp-security.test: more correct error handling mysql-test/t/sp.test: now error state intercepted correctly sql/ha_innodb.cc: -1/1 (sent/unsent) error reporting removed sql/ha_innodb.h: -1/1 (sent/unsent) error reporting removed sql/item.cc: only boolean values should be returned by fix_fields() sql/item_cmpfunc.cc: only boolean values should be returned by fix_fields() sql/item_func.cc: only boolean values should be returned by fix_fields() net_printf/send_error calls replaced by my_error family functions sql/item_row.cc: only boolean values should be returned by fix_fields() sql/item_subselect.cc: only boolean values should be returned by fix_fields() -1/1 (sent/unsent) error reporting removed sql/item_subselect.h: -1/1 (sent/unsent) error reporting removed sql/item_sum.cc: only boolean values should be returned by fix_fields() sql/item_timefunc.cc: only boolean values should be returned by fix_fields() sql/item_uniq.h: only boolean values should be returned by fix_fields() sql/mysql_priv.h: -1/1 (sent/unsent) error reporting removed sql/mysqld.cc: net_printf/send_error calls replaced by my_error family functions changes in my_message_sql to support error handling correctly sql/protocol.cc: net_printf/send_error calls replaced by my_error family functions sql/protocol_cursor.cc: net_printf/send_error calls replaced by my_error family functions sql/repl_failsafe.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/repl_failsafe.h: -1/1 (sent/unsent) error reporting removed sql/set_var.cc: net_printf/send_error calls replaced by my_error family functions sql/share/czech/errmsg.txt: new error messages sql/share/danish/errmsg.txt: new error messages sql/share/dutch/errmsg.txt: new error messages sql/share/english/errmsg.txt: new error messages sql/share/estonian/errmsg.txt: new error messages sql/share/french/errmsg.txt: new error messages sql/share/german/errmsg.txt: new error messages sql/share/greek/errmsg.txt: new error messages sql/share/hungarian/errmsg.txt: new error messages sql/share/italian/errmsg.txt: new error messages sql/share/japanese/errmsg.txt: new error messages sql/share/korean/errmsg.txt: new error messages sql/share/norwegian-ny/errmsg.txt: new error messages sql/share/norwegian/errmsg.txt: new error messages sql/share/polish/errmsg.txt: new error messages sql/share/portuguese/errmsg.txt: new error messages sql/share/romanian/errmsg.txt: new error messages sql/share/russian/errmsg.txt: new error messages sql/share/serbian/errmsg.txt: new error messages sql/share/slovak/errmsg.txt: new error messages sql/share/spanish/errmsg.txt: new error messages sql/share/swedish/errmsg.txt: new error messages sql/share/ukrainian/errmsg.txt: new error messages sql/slave.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/slave.h: -1/1 (sent/unsent) error reporting removed sql/sp.cc: net_printf/send_error calls replaced by my_error family functions sql/sp_head.cc: new eror handling support net_printf/send_error calls replaced by my_error family functions sql/sp_rcontext.cc: net_printf/send_error calls replaced by my_error family functions sql/sql_acl.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/sql_acl.h: -1/1 (sent/unsent) error reporting removed sql/sql_base.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_class.cc: net_printf/send_error calls replaced by my_error family functions sql/sql_class.h: my_messhage_sql now set/reset query_error flag sql/sql_db.cc: -1/1 (sent/unsent) error reporting removed sql/sql_delete.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_do.cc: -1/1 (sent/unsent) error reporting removed sql/sql_error.cc: -1/1 (sent/unsent) error reporting removed sql/sql_handler.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_help.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/sql_insert.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_lex.h: -1/1 (sent/unsent) error reporting removed sql/sql_load.cc: -1/1 (sent/unsent) error reporting removed sql/sql_map.cc: errors without code removed sql/sql_parse.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed from mysql_execute_command sql/sql_prepare.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/sql_repl.cc: error messages fixed net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/sql_repl.h: -1/1 (sent/unsent) error reporting removed sql/sql_select.cc: -1/1 (sent/unsent) error reporting removed sql/sql_select.h: -1/1 (sent/unsent) error reporting removed sql/sql_show.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_table.cc: net_printf/send_error calls replaced by my_error family functions -1/1 (sent/unsent) error reporting removed sql/sql_trigger.cc: -1/1 (sent/unsent) error reporting removed sql/sql_udf.cc: net_printf/send_error calls replaced by my_error family functions sql/sql_union.cc: -1/1 (sent/unsent) error reporting removed sql/sql_update.cc: -1/1 (sent/unsent) error reporting removed net_printf/send_error calls replaced by my_error family functions sql/sql_view.cc: -1/1 (sent/unsent) error reporting removed sql/sql_view.h: -1/1 (sent/unsent) error reporting removed sql/sql_yacc.yy: net_printf/send_error calls replaced by my_error family functions
* After merge fixes of merge with 4.1 that included the new arena code.unknown2004-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset Prefix addresses with 0x for easier comparisons of debug logs Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index This fix changed some 'index' queries to 'range' queries in the test suite Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause. This fix removed of a lot of 'Using where' notes in the test suite. Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS Give NOTE instead of WARNING for safe field-type conversions Makefile.am: Don't automaticly update files from bk client/mysqlbinlog.cc: Merge with 4.1 (+ apply bug fixes for --offset and --start-position) include/my_sys.h: Faster clear_alloc_root() mysql-test/r/bdb.result: Updated results after merge mysql-test/r/create.result: Updated results after merge mysql-test/r/func_group.result: Updated results after merge mysql-test/r/func_if.result: Updated results after merge mysql-test/r/heap_btree.result: Updated results after merge mysql-test/r/index_merge.result: Updated results after merge mysql-test/r/index_merge_ror.result: Updated results after merge mysql-test/r/innodb.result: Updated results after merge mysql-test/r/join_outer.result: Updated results after merge mysql-test/r/mysqlbinlog2.result: Updated results after merge mysql-test/r/negation_elimination.result: Updated results after merge mysql-test/r/null.result: Updated results after merge Added more tests mysql-test/r/null_key.result: Updated results after merge Added more tests mysql-test/r/order_by.result: Updated results after merge mysql-test/r/range.result: Updated results after merge Added more tests mysql-test/r/rpl_charset.result: Updated results after merge mysql-test/r/sp-error.result: Updated results after merge mysql-test/r/sp.result: Updated results after merge Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle mysql-test/r/type_blob.result: Updated results after merge (Some warnings are now notes) mysql-test/r/user_var.result: Updated results after merge Added more tests mysql-test/r/variables.result: Updated results after merge mysql-test/r/view.result: Updated results after merge mysql-test/t/mysqlbinlog2.test: Updated tests to use new positions mysql-test/t/null.test: More tests mysql-test/t/null_key.test: More tests mysql-test/t/range.test: More tests mysql-test/t/rpl_charset.test: Avoid big diffs in the future if tests changes mysql-test/t/sp-error.test: Updated error numbers mysql-test/t/sp-security.test: Updated error numbers mysql-test/t/sp.test: Updated results after merge Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle mysql-test/t/user_var.test: More tests mysql-test/t/view.test: Updated error numbers mysys/my_alloc.c: Write into debug log the address of the allocated area sql/ha_isam.cc: Prefix addresses with 0x for easier comparisons of debug logs sql/ha_myisam.cc: Prefix addresses with 0x for easier comparisons of debug logs sql/ha_ndbcluster.cc: Add missing enum to switch sql/handler.cc: remove compiler warning sql/item.cc: More debugging Simple cleanup sql/item.h: Move Item::cleanup() to item.cc sql/item_cmpfunc.cc: Fix arena code sql/item_subselect.cc: After merge fixes sql/item_subselect.h: After merge fixes sql/item_sum.cc: Updated comment sql/log_event.cc: Remove wrong test sql/mysql_priv.h: Indentation fixes sql/mysqld.cc: After merge fixes Added 0x to pointers in debug log sql/opt_range.cc: Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index This fix changed some 'index' queries to 'range' queries in the test suite sql/set_var.cc: Indentation fixes sql/sp_head.cc: Set state to INITIALIZED to make SP work with new arena code sql/sql_base.cc: After merge fixes sql/sql_class.cc: More debugging Use clear_alloc_root() instead of init_alloc_root() as the former is faster sql/sql_class.h: New method 'only_prepare()' sql/sql_lex.cc: After merge fixes sql/sql_lex.h: After merge fixes sql/sql_parse.cc: Fix for timezone tables. (The old way to add timezone tables to global list in 'create_total_list' doesn't work anymore) Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS sql/sql_prepare.cc: After merge fixes sql/sql_select.cc: Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause. This fix removed of a lot of 'Using where' notes in the test suite sql/sql_table.cc: Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS sql/sql_union.cc: After merge fix sql/sql_view.cc: After merge fix sql/table.cc: After merge fix sql/tztime.cc: Update timezone table handling to use new table lists structure sql/tztime.h: Update timezone table handling to use new table lists structure sql/unireg.cc: Use 0x before pointers