summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge bk-internal:/home/bk/mysql-4.1-maintunknown2006-09-281-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into rama.(none):/home/jimw/my/mysql-4.1-clean include/my_global.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_class.h: Auto merged sql/mysqld.cc: Resolve conflict
| * Bug #2717: include/my_global.h mis-defines __attribute__unknown2006-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying __attribute__((format(...))) safely, make more use of the format attribute, and fix some of the warnings that this turns up (plus a bonus unrelated one). include/m_ctype.h: Add ATTRIBUTE_FORMAT to printf-like functions. include/m_string.h: Add ATTRIBUTE_FORMAT to my_snprintf() declaration. include/my_global.h: Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers. Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it is available from different versions of gcc and g++. include/my_sys.h: Add ATTRIBUTE_FORMAT() to my_printf_error declaration sql/item_subselect.cc: Silence warning about members being initialized out-of-order sql/item_timefunc.cc: Fix format specifier in snprintf() calls with milliseconds sql/mysql_priv.h: Add ATTRIBUTE_FORMAT to printf-like functions. sql/mysqld.cc: Fix various format specifiers Make sure that method_conv is always set by myisam_stats_method sql/opt_range.cc: Cast pointers to correct type for %lx sql/set_var.cc: Fix __attribute__((unused)) (missing inner set of parens) sql/slave.cc: Fix format specifier sql/slave.h: Add ATTRIBUTE_FORMAT to slave_print_error() declaration. sql/sql_acl.cc: Fix number of arguments passed for formatting, and fix acl_host_or_ip being passed instead of just the hostname. sql/sql_class.h: Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
* | Patch for bug#21432 is revertedunknown2006-09-271-5/+1
| |
* | Bug#20393 User name truncation in mysql clientunknown2006-08-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte include/mysql_com.h: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN mysql-test/r/ctype_utf8.result: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case mysql-test/t/ctype_utf8.test: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case sql-common/client.c: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/sql_acl.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that user name is not longer than USERNAME_LENGTH symbols sql/sql_parse.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/table.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that db name is not longer than NAME_LEN symbols
* | Bug #20402: DROP USER failure logged as ERROR rather than WARNINGunknown2006-07-261-15/+0
|/ | | | | | | | | | | | | slave.cc, sql_acl.cc: - remove sql_print_error() for events that are not server errors sql/slave.cc: Bug #20402: DROP USER failure logged as ERROR rather than WARNING remove sql_print_error() for events that are not server errors sql/sql_acl.cc: Bug #20402: DROP USER failure logged as ERROR rather than WARNING remove sql_print_error() for events that are not server errors
* Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-07-071-1/+3
|\ | | | | | | | | | | | | | | into mysql.com:/usr/home/bar/mysql-4.1.b17647 sql/sql_acl.cc: Auto merged
| * Bugs#17647: Trouble with "create database"unknown2006-05-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: if a user was granted privileges on database "d1", it also was able to act on "D1" (i.e. in upper case), even on Unix with case sensitive file system. Fix: Initialize grant hash to use binary comparison if lower_case_file_system is not set (on most unixes), and case insensitive comparison otherwise (Windows, MacOSX). sql/sql_acl.cc: Initialize hash to use binary comparison with case sensitive FS. mysql-test/include/have_case_sensitive_file_system.inc: New BitKeeper file ``mysql-test/include/have_case_sensitive_file_system.inc'' Backporting from 5.1 mysql-test/r/case_sensitive_file_system.require: New BitKeeper file ``mysql-test/r/case_sensitive_file_system.require'' Backporting from 5.1 mysql-test/r/lowercase_fs_off.result: Adding test case mysql-test/t/lowercase_fs_off.test: Adding test case
* | Bug#16372: Server crashes when test 'conc_sys' is runningunknown2006-04-271-6/+31
|/ | | | | | | | | | | | | | | Concurrent read and update of privilege structures (like simultaneous run of SHOW GRANTS and ADD USER) could result in server crash. Ensure that proper locking of ACL structures is done. No test case is provided because this bug can't be reproduced deterministically. sql/sql_acl.cc: Ensure that access to ACL data is protected by acl_cache->lock mutex. Use system_charset_info for host names consistently.
* Fix for bug#14385 GRANT and mapping to correct user account problemsunknown2006-03-061-1/+4
| | | | | | | | | | | | Check if the host of table hash record exactly matches host from GRANT command mysql-test/r/grant.result: Fix for bug#14385 GRANT and mapping to correct user account problems test case mysql-test/t/grant.test: Fix for bug#14385 GRANT and mapping to correct user account problems test case
* Merge msvensson@10.100.68.5:/home/msvensson/mysql/bug15598/my41-bug15598unknown2006-01-091-2/+3
|\ | | | | | | | | | | | | | | into devsrv-b.mysql.com:/space/magnus/my41-bug15598 sql/sql_acl.cc: Auto merged
| * Bug #15598 Server crashes in specific case during setting new passwordunknown2006-01-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | - When acl_user->host.hostname is NULL compare it as "" mysql-test/r/grant.result: Test user with host '' mysql-test/t/grant.test: Test user with host '' sql/sql_acl.cc: If acl_user->host.hostname is NULL compare it as ""
* | A fix for Bug#7209 "Client error with "Access Denied" on updates unknown2006-01-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when high concurrency": remove HASH::current_record and make it an external search parameter, so that it can not be the cause of a race condition under high concurrent load. The bug was in a race condition in table_hash_search, when column_priv_hash.current_record was overwritten simultaneously by multiple threads, causing the search for a suitable grant record to fail. No test case as the bug is repeatable only under concurrent load. include/hash.h: - remove current_record from HASH, instead modify hash_first, hash_next to accept HASH_SEARCH_STATE as an IN/OUT parameter mysys/hash.c: - remove HASH::current_record - change declarations of functions that use HASH in read-only mode to accept const HASH * instead of HASH *. - implement hash_search; move the old implementation of hash_search to hash_first mysys/testhash.c: - adjust the test case to changed function declarations sql/lock.cc: - adjust to changed declarations of hash_search, hash_next sql/sql_acl.cc: - adjust to changed declarations of hash_search, hash_next sql/sql_base.cc: - adjust to changed declarations of hash_search, hash_nex sql/sql_cache.cc: - adjust to a changed declaration of hash_replace
* | BUG#15775 "drop user" command does not refresh acl_check_hostsunknown2005-12-281-4/+12
|/ | | | | | | | | | | | | | | - DROP USER command didn't reload the acl_check_hosts cache causing subsequent connect's via TCP to fail randomly. - 4.1 version mysql-test/r/grant2.result: Update test results mysql-test/t/grant2.test: Add test for to check that connect via TCP work after "drop user" sql/sql_acl.cc: Reload acl_check_hosts as its memory is mapped to acl_user Use acl_user->host.hostname when searching the acl_check_hosts list
* Bug#14406 GRANTS ON objects with non-ascii names borked after FLUSH PRIVILEGESunknown2005-11-141-47/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ps_grant.result: Fixing result order. grant.result: Adding test case, fixing result order. grant.test: Adding test case. sql_acl.cc: Fixed that my_charset_latin1 was incorrectly used instead of system_charset_info. This problem was previously fixed by Ingo in 5.0. This patch is basically a backport of the same changes into 4.1. sql/sql_acl.cc: Bug#14406 GRANTS ON objects with non-ascii names borked after FLUSH PRIVILEGES Fixed that my_charset_latin1 was incorrectly used instead of system_charset_info. This problem was previously fixed by Ingo in 5.0. This patch is basically a backport of the same changes into 4.1. mysql-test/t/grant.test: Adding test case. mysql-test/r/grant.result: Adding test case, fixing result order. mysql-test/r/ps_grant.result: Fixing result order.
* Fix handling of password field at the old size (16 characters) but inunknown2005-09-201-3/+6
| | | | | | | | | the UTF-8 character set. (Bug #13064) sql/sql_acl.cc: Take character set of passworld field into account when figuring out what format it is in (3.23/4.0 or 4.1).
* Merge bk-internal.mysql.com:/home/bk/mysql-4.1unknown2005-09-011-161/+241
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-4.1-bg12423 sql/mysqld.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: Auto merged mysql-test/r/grant2.result: Manual merge. mysql-test/t/grant2.test: Manual merge.
| * Fix for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in unknown2005-09-011-161/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi-threaded environment". To avoid deadlocks between several simultaneously run account management commands (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT commands) we should always take table and internal locks during their execution in the same order. In other words we should first open and lock privilege tables and only then obtain acl_cache::lock/LOCK_grant locks. mysql-test/r/grant2.result: Added test for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in multi-threaded environment". mysql-test/t/grant2.test: Added test for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in multi-threaded environment". sql/mysqld.cc: acl_init/grant_init() are now used only at server start up so they always allocate temporary THD object and don't need argument for passing pointer to it. sql/sql_acl.cc: To avoid deadlocks between several simultaneously run account management commands (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT commands) we should always take table and internal locks during their execution in the same order. In other words we should first open and lock privilege tables and only then obtain acl_cache::lock/LOCK_grant locks. Changed acl_reload()/grant_reload() and change_password()/update_user_table() in such way that they obey this principle. Now in acl_reload()/grant_reload()/ change_password() we open and lock privilege tables, then obtain internal locks and then call acl_load()/grant_load()/update_user_table() functions to do actual loading or updating. sql/sql_acl.h: acl_init/grant_init() are now used only at server start up so they always allocate temporary THD object and don't need argument for passing pointer to it. acl_reload()/grant_reload() now are able to report about their success or failure through return value. sql/sql_parse.cc: If reload_acl_and_cache() is called from SIGHUP handler we have to allocate temporary THD for execution of acl_reload()/grant_reload().
* | Use the hostname with which the user authenticated when determining whichunknown2005-08-221-8/+11
|/ | | | | | | | | | | | | | | user to update with 'SET PASSWORD = ...'. (Bug #12302) mysql-test/r/grant2.result: Add new results mysql-test/t/grant2.test: Add new tests sql/set_var.cc: Pass priv_host into check_change_password(). sql/sql_acl.cc: Add exact flag for find_acl_user, so we can specify that we want an exact match on the hostname.
* Fix crash when an entry was added to the mysql.tables_privunknown2005-06-201-1/+2
| | | | | | | | | | | | table with an empty hostname. (Bug #11330) mysql-test/r/grant.result: Update results mysql-test/t/grant.test: Add new regression test sql/sql_acl.cc: Don't call strlen() on a NULL pointer.
* Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2005-06-071-5/+5
|\ | | | | | | | | | | | | | | into mdk10.(none):/home/reggie/bk/41test3 sql/sql_acl.cc: Auto merged
| * BUG# 10181-mysqld.exe crash with an access vioation after INSERT INTO mysql.hostunknown2005-05-311-4/+4
| | | | | | | | | | | | | | | | | | this is a followup cset after changes suggested by Serg. sql/sql_acl.cc: removed extra parameters used in sql_print_warning added code to output "" when host.db is null in the top sql_print_warning call
| * Bug #10181 mysqld.exe crash with an access violation after INSERT INTO ↵unknown2005-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | mysql.host sql_acl.cc: Make sure host.db is a valid string pointer before we do our lower_case_table_names comparison sql/sql_acl.cc: Make sure host.db is a valid string pointer before we do our lower_case_table_names comparison
* | Mergeunknown2005-06-011-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/ha_heap.cc: Auto merged sql/item_subselect.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/examples/ha_archive.cc: Auto merged sql/examples/ha_example.cc: Auto merged sql/examples/ha_tina.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_repl.cc: SCCS merged
| * | Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. ↵unknown2005-06-011-5/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed a number of dumb things in ha_tina. client/mysqladmin.cc: gcc 4.0 fix sql/examples/ha_archive.cc: Bunch of little cleanups from -Wall and gcc 4.0 fixes sql/examples/ha_example.cc: Noticed that the error call was not quite right. sql/examples/ha_tina.cc: Bunch of cleanups (many of which were quite dumb of me... and I have no earthly idea how they missed everyone's notice). sql/ha_heap.cc: Removed unused variable (-Wall find) sql/item_subselect.cc: Removed unused label. sql/mysqld.cc: Cleanup of unused function and gcc 4.0 bit. sql/opt_range.h: Cleanup for gcc 4.0 sql/repl_failsafe.cc: Cleanup for gcc 4.0 sql/slave.cc: Cleanup for gcc 4.0 sql/sql_acl.cc: Cleanup for gcc 4.0 sql/sql_insert.cc: Cleanedup for gcc 4.0 sql/sql_parse.cc: Cleanedup for gcc 4.0 sql/sql_repl.cc: Removed unused variable sql/sql_select.cc: Cleanedup for gcc 4.0
* | Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT ↵unknown2005-05-311-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement. Hand merged from 4.0. sql/lock.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_table.cc: Auto merged
| * Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT ↵unknown2005-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement. 1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Used the new option in create_table_from_items(). It is necessary to prevent the SELECT table from being reopend. It would get new storage assigned for its fields, while the SELECT part of the command would still use the old (freed) storage. 2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. 3.) Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. mysql-test/r/create.result: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added test results. mysql-test/t/create.test: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added tests which do not require concurrency. sql/lock.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Changed the parameter list. Removed two unnecessary functions. Their functionality is included in wait_if_global_read_lock() and start_waiting_global_read_lock(). sql/mysql_priv.h: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Changed the declaration of mysql_lock_tables(). Added definitions for the new options. sql/sql_acl.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_base.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_handler.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_insert.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_parse.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. sql/sql_table.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. Used the new option in create_table_from_items().
* | mergedunknown2005-03-261-2/+6
|\ \ | |/ | | | | | | | | | | | | | | myisam/mi_create.c: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: merged with ul
| * fixes for "backport wild_compare fix from 4.1 - bug#3924"unknown2005-03-261-2/+6
| | | | | | | | | | | | | | sql/sql_acl.cc: don't use acl_cache for GRANT sql/sql_parse.cc: fixed backporting error in "backport wild_compare fix from 4.1 - bug#3924"
* | Fix bug in checking of table-specific grats that caused IP/NETMASKunknown2005-03-021-28/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hostnames to not be matched correctly. (Bug #3309) sql/sql_acl.cc: Use an acl_host_or_ip in the GRANT_TABLE struct instead of storing the host itself, and use compare_hostname() in testing it. This adds support for IP addresses with netmasks to table-specific grants, and results in simplified code by making use of compare_hostname() in more places. mysql-test/r/grant2.result: Add new results mysql-test/t/grant2.test: Add new regression test
* | Merge mysql.com:/home/jimw/my/mysql-4.1-7989unknown2005-02-221-12/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/jimw/my/mysql-4.1-clean sql/sql_acl.cc: Auto merged
| * | Clean up fix for Bug #7989 by avoiding extra memory copy, and adding someunknown2005-02-181-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | more information to the error message. sql/sql_acl.cc: Change strmov() call to strnmov(), and don't do redundant copy. Add to warning message that privilege can't be removed with REVOKE.
* | | Merge mysql.com:/home/jimw/my/mysql-4.1-8471unknown2005-02-171-0/+37
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | into mysql.com:/home/jimw/my/mysql-4.1-clean sql/sql_acl.cc: Auto merged
| * | Always lowercase database names from 'host' and 'db' grant tables when theyunknown2005-02-151-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are loaded and lower_case_table_names is set, but issue a warning when it is done. (Bug #7989) sql/sql_acl.cc: Lowercase database names in 'host' and 'db' grant tables when loading, but issue a warning to the log about them.
* | | Allow hostnames that are IP addresses with a netmask even whenunknown2005-02-141-1/+1
|/ / | | | | | | | | | | | | | | | | running with --skip-name-resolve. (Bug #8471) sql/sql_acl.cc: Add '/' to list of characters that doesn't trigger a need for resolving the hostname, so that the IP mask syntax works with skip-name-resolve.
* | fixes/cleanups according to Coverity reportunknown2005-01-241-5/+9
| |
* | post-mergeunknown2004-12-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/grant2.result: new test case mysql-test/r/variables.result: don't fail w/o innodb mysql-test/t/grant2.test: new test case mysql-test/t/multi_update.test: don't fail w/o innodb mysql-test/t/variables.test: don't fail w/o innodb sql/sql_acl.cc: cleanup
* | mergedunknown2004-12-301-51/+50
|\ \ | |/
| * unsufficient privilege checks in GRANT, when a grantor has column-level ↵unknown2004-12-301-50/+50
| | | | | | | | privileges
* | Manual merge of changes making GRANTs, which change SSL attributes and/orunknown2004-12-231-26/+33
|\ \ | |/ | | | | | | | | | | | | | | | | user limits to behave well on 5.0 tables, into 4.1 tree. mysql-test/r/grant.result: Auto merged mysql-test/t/grant.test: Auto merged
| * Make GRANTs, which change SSL attributes and/or user limits,unknown2004-12-231-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | to behave well on 5.0 tables (well now you can't use tables from 4.1 and 5.0 with 4.0 because former use utf8, but still it is nice to have similar code in acl_init() and replace_user_table()). This also will make such GRANTs working in 5.0 (they are broken now). mysql-test/r/grant.result: Added test for GRANT which manipulates user limits. mysql-test/t/grant.test: Added test for GRANT which manipulates user limits.
* | Merge bk-internal.mysql.com:/home/bk/mysql-4.1unknown2004-12-091-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/dlenev/src/mysql-4.1-bg6765 sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged
| * | Fix for bug #6765 "Implicit access to time zone description unknown2004-12-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tables requires privileges for them if some table or column level grants present" (with after-review fixes). We should set SELECT_ACL for implicitly opened tables in my_tz_check_n_skip_implicit_tables() to be able to bypass privilege checking in check_grant(). Also we should exclude those tables from privilege checking in multi-update. mysql-test/r/timezone2.result: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" mysql-test/t/timezone2.test: Extended test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone tables" Added test for bug #6765 "Implicit access to time zone description tables requires privileges for them if some table or column level grants present" sql/item_geofunc.cc: sql_acl.h is now included via mysql_priv.h sql/item_strfunc.cc: sql_acl.h is now included via mysql_priv.h sql/log.cc: sql_acl.h is now included via mysql_priv.h sql/mysql_priv.h: Now we have to include sql_acl.h before tztime.h, since my_tz_check_n_skip_implicit_tables() defined there requires SELECT_ACL constant defined in sql_acl.h. sql/mysqld.cc: sql_acl.h is now included via mysql_priv.h sql/repl_failsafe.cc: sql_acl.h is now included via mysql_priv.h sql/set_var.cc: sql_acl.h is now included via mysql_priv.h sql/sql_acl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_base.cc: sql_acl.h is now included via mysql_priv.h sql/sql_cache.cc: sql_acl.h is now included via mysql_priv.h sql/sql_class.cc: sql_acl.h is now included via mysql_priv.h sql/sql_db.cc: sql_acl.h is now included via mysql_priv.h sql/sql_derived.cc: sql_acl.h is now included via mysql_priv.h sql/sql_do.cc: sql_acl.h is now included via mysql_priv.h sql/sql_insert.cc: sql_acl.h is now included via mysql_priv.h sql/sql_parse.cc: check_one_table_access(): Tweaked comments. multi_update_precheck(): Added skipping of implicitly opened tables during privilege checking. sql/sql_prepare.cc: sql_acl.h is now included via mysql_priv.h sql/sql_repl.cc: sql_acl.h is now included via mysql_priv.h sql/sql_show.cc: sql_acl.h is now included via mysql_priv.h sql/sql_update.cc: sql_acl.h is now included via mysql_priv.h sql/sql_yacc.yy: sql_acl.h is now included via mysql_priv.h sql/tztime.h: my_tz_check_n_skip_implicit_tables(): We should set SELECT_ACL for implictly opened tables to be able to bypass privilege checking in check_grant().
* | | Merge mysql.com:/space/bkroot/mysql-4.1unknown2004-12-031-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/space/bk/b6391-mysql-4.1 sql/handler.cc: Auto merged sql/item_func.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged
| * | | Bug#6391 (binlog-do-db rules ignored)unknown2004-12-031-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREATE DATABASE statement used the current database instead of the database created when checking conditions for replication. CREATE/DROP/ALTER DATABASE statements are now replicated based on the manipulated database. mysql-test/t/rpl_until.test: Longer sleep to allow slave to stop. mysql-test/t/rpl_charset.test: Position change in binary file. mysql-test/r/drop_temp_table.result: Position change in binlog. mysql-test/r/rpl_loaddata_rule_m.result: Position change in binlog. mysql-test/r/rpl_charset.result: Position change in binlog. sql/log_event.h: Added new flag and parameter to suppress generation of USE statements. sql/log_event.cc: Added parameter and code to suppress generation of USE statements. sql/sql_db.cc: Suppress generation of USE before CREATE/ALTER/DROP DATABASE statements. sql/log.cc: Query_log_event have new extra parameter. sql/sql_table.cc: Query_log_event have new extra parameter. sql/sql_base.cc: Query_log_event have new extra parameter. sql/sql_update.cc: Query_log_event have new extra parameter. sql/sql_insert.cc: Query_log_event have new extra parameter. sql/sql_rename.cc: Query_log_event have new extra parameter. sql/sql_delete.cc: Query_log_event have new extra parameter. sql/sql_acl.cc: Query_log_event have new extra parameter. sql/handler.cc: Query_log_event have new extra parameter. sql/item_func.cc: Query_log_event have new extra parameter. sql/sql_parse.cc: Query_log_event have new extra parameter.
* | | Fixes (bug #6932: 'revoke all privileges...' doesn't remove all proper ↵unknown2004-12-021-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | columns from columns_priv bug #6933: error in the tests/grant.pl test). mysql-test/r/grant.result: A fix (bug #6932: 'revoke all privileges...' doesn't remove all proper columns from columns_priv). mysql-test/t/grant.test: A fix (bug #6932: 'revoke all privileges...' doesn't remove all proper columns from columns_priv). sql/sql_acl.cc: A fix (bug #6932: 'revoke all privileges...' doesn't remove all proper columns from columns_priv). The problem is that we use whole key length (including 'Column_name' keypart) during scanning the 'columns_priv' table in case of revoke_grant. tests/grant.pl: A fix (bug #6933: error in the tests/grant.pl test).
* | enabled having system tables in ndbunknown2004-11-171-10/+27
| |
* | After merge fixesunknown2004-11-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client/mysqldump.c: Merge with 4.0 (and reordering of options) client/mysqltest.c: Added DB as a user variable myisam/mi_check.c: Trivial cleanup mysql-test/r/grant.result: Move test to be in same order as in 4.0 mysql-test/r/mix_innodb_myisam_binlog.result: Updated results mysql-test/r/ps_1general.result: Updated tests to work after privilege fixes mysql-test/r/timezone3.result: Updated results to 4.1 mysql-test/t/ps_1general.test: Updated tests to work after privilege fixes sql-common/my_time.c: Applied sub-second patch from 4.0 sql/sql_acl.cc: More debugging
* | merge with 4.0unknown2004-11-121-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-Makefile.am: Delete: Docs/Images/Makefile.am Build-tools/Bootstrap: Auto merged Docs/Makefile.am: Auto merged configure.in: Auto merged include/mysql.h: Auto merged innobase/dict/dict0dict.c: Auto merged libmysql/libmysql.c: Auto merged mysys/default.c: Auto merged scripts/mysqld_safe.sh: Auto merged sql/log.cc: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged sql/mysqld.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_table.cc: Auto merged client/mysqldump.c: merge with 4.0 (This only reorders options) sql/ha_innodb.cc: merge with 4.0 (Keep original code) sql/time.cc: Note that part of this patch is done in my_time.c
| * Bug#6123 - GRANT USAGE creates useless mysql.db rowunknown2004-11-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent creation of a row which grants no rights Test included mysql-test/r/grant.result: Test for Bug#6123 mysql-test/t/grant.test: Test for Bug#6123 sql/sql_acl.cc: Bug#6123 Prevent creation of useless row
| * Using MySQL 4.0 with privilege tables from 5.0 caused a crash.unknown2004-10-081-20/+36
| | | | | | | | | | | | | | (Fixed this by backporting some logic from 4.1)