Commit graph

338 commits

Author SHA1 Message Date
unknown
abd883f4d0 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
unknown
ddb9f8668f Bug#20393 User name truncation in mysql client
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
2006-08-30 15:56:17 +05:00
unknown
3845856cc6 Bug #20402: DROP USER failure logged as ERROR rather than WARNING
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
2006-07-26 16:33:26 -06:00
unknown
28729caaf6 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17647


sql/sql_acl.cc:
  Auto merged
2006-07-07 12:17:00 +05:00
unknown
af2f9b90fa Bugs#17647: Trouble with "create database"
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
2006-05-04 11:55:09 +05:00
unknown
e89b442b65 Bug#16372: Server crashes when test 'conc_sys' is running
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.
2006-04-27 14:54:36 +04:00
unknown
3ecf9f040a Fix for bug#14385 GRANT and mapping to correct user account problems
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
2006-03-06 14:03:40 +04:00
unknown
da800fe5a4 Merge msvensson@10.100.68.5:/home/msvensson/mysql/bug15598/my41-bug15598
into  devsrv-b.mysql.com:/space/magnus/my41-bug15598


sql/sql_acl.cc:
  Auto merged
2006-01-09 10:57:28 +01:00
unknown
16257e8b35 Bug #15598 Server crashes in specific case during setting new password
- 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 ""
2006-01-09 10:31:07 +01:00
unknown
f577d864cd A fix for Bug#7209 "Client error with "Access Denied" on updates
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
2006-01-04 17:35:30 +03:00
unknown
9a8dde9bc7 BUG#15775 "drop user" command does not refresh acl_check_hosts
- 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
2005-12-28 09:23:27 +01:00
unknown
a2e5a9f923 Bug#14406 GRANTS ON objects with non-ascii names borked after FLUSH PRIVILEGES
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.
2005-11-14 16:36:06 +04:00
unknown
67b470f736 Fix handling of password field at the old size (16 characters) but in
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).
2005-09-20 16:57:58 -07:00
unknown
84ddd543c7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
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.
2005-09-01 17:01:25 +04:00
unknown
2a64e9a2e8 Fix for bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in
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().
2005-09-01 16:52:59 +04:00
unknown
d40acb4d3f Use the hostname with which the user authenticated when determining which
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.
2005-08-22 15:48:50 -07:00
unknown
9e78db81b0 Fix crash when an entry was added to the mysql.tables_priv
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.
2005-06-20 10:21:35 -07:00
unknown
31aad78f3a Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/41test3


sql/sql_acl.cc:
  Auto merged
2005-06-07 15:45:02 -05:00
unknown
e2bf6b04a6 Merge
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
2005-06-01 18:48:29 -07:00
unknown
0218ecf7af Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. 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
2005-06-01 17:34:10 -07:00
unknown
57d4adf60c Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT 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
2005-05-31 19:37:24 +02:00
unknown
c744e27479 BUG# 10181-mysqld.exe crash with an access vioation after INSERT INTO mysql.host
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
2005-05-31 07:21:10 -05:00
unknown
cf2188ca39 Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT 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().
2005-05-31 11:08:14 +02:00
unknown
ac55fc7adb Bug #10181 mysqld.exe crash with an access violation after INSERT INTO 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
2005-05-26 14:02:18 -05:00
unknown
ca5845ea16 merged
myisam/mi_create.c:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  merged with ul
2005-03-26 20:15:18 +01:00
unknown
7f7f4f30b3 fixes for "backport wild_compare fix from 4.1 - bug#3924"
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"
2005-03-26 19:46:42 +01:00
unknown
c9b4f8c3d7 Fix bug in checking of table-specific grats that caused IP/NETMASK
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
2005-03-02 16:30:24 -08:00
unknown
8776230074 Merge mysql.com:/home/jimw/my/mysql-4.1-7989
into mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_acl.cc:
  Auto merged
2005-02-22 13:15:34 -08:00
unknown
cfad792e74 Clean up fix for Bug #7989 by avoiding extra memory copy, and adding some
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.
2005-02-18 12:47:33 -08:00
unknown
cb9b57fb8c Merge mysql.com:/home/jimw/my/mysql-4.1-8471
into mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_acl.cc:
  Auto merged
2005-02-17 13:53:07 -08:00
unknown
2d2d4df7d2 Always lowercase database names from 'host' and 'db' grant tables when they
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.
2005-02-15 13:36:46 -08:00
unknown
ddcb947ff7 Allow hostnames that are IP addresses with a netmask even when
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.
2005-02-14 20:33:14 -08:00
unknown
8bdb500105 fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
unknown
5eaf65ab4b post-merge
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
2004-12-31 11:52:14 +01:00
unknown
379613c3e2 merged 2004-12-30 21:11:40 +01:00
unknown
40a0199e77 unsufficient privilege checks in GRANT, when a grantor has column-level privileges 2004-12-30 21:01:11 +01:00
unknown
19ffa6a4ec Manual merge of changes making GRANTs, which change SSL attributes and/or
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
2004-12-23 22:16:43 +03:00
unknown
4a5ca0bc63 Make GRANTs, which change SSL attributes and/or user limits,
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.
2004-12-23 21:59:36 +03:00
unknown
af07ef79d4 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
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
2004-12-09 13:33:12 +03:00
unknown
9ad51c631c Fix for bug #6765 "Implicit access to time zone description
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().
2004-12-09 13:31:46 +03:00
unknown
72d5625378 Merge mysql.com:/space/bkroot/mysql-4.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
2004-12-03 12:15:31 +01:00
unknown
220acb328e Bug#6391 (binlog-do-db rules ignored)
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.
2004-12-03 12:13:51 +01:00
unknown
491a3d90a9 Fixes (bug #6932: 'revoke all privileges...' doesn't remove all proper 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).
2004-12-02 13:34:30 +04:00
unknown
692311f53c enabled having system tables in ndb 2004-11-17 08:10:26 +00:00
unknown
55ae2e7880 After merge fixes
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
2004-11-12 17:44:17 +02:00
unknown
44070705ea merge with 4.0
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
2004-11-12 11:17:53 +02:00
unknown
b19eb67f08 Bug#6123 - GRANT USAGE creates useless mysql.db row
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
2004-11-11 20:59:03 +00:00
unknown
435b20aa68 Simpler arena swapping code
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root



client/mysqltest.c:
  Remove some not needed defines
  (Things like this should be done in config-win.h)
include/config-win.h:
  Added popen() and pclose() compatibility macros
mysql-test/t/rpl_failed_optimize-master.opt:
  Portability fix
sql/ha_berkeley.cc:
  New thd->memroot handling
sql/item_cmpfunc.cc:
  Simpler arena swapping code
sql/item_func.cc:
  Simpler arena swapping code
sql/item_subselect.cc:
  Simpler arena swapping code
  New thd->mem_root handling
sql/item_sum.cc:
  New thd->mem_root handling
sql/item_timefunc.cc:
  Fixed not-initalized usage errors found by valgrind
sql/log_event.cc:
  New thd->mem_root handling
sql/mysql_priv.h:
  New thd->mem_root handling
sql/mysqld.cc:
  New thd->mem_root handling
sql/opt_range.cc:
  New thd->mem_root handling
sql/repl_failsafe.cc:
  New thd->mem_root handling
sql/set_var.cc:
  New thd->mem_root handling
sql/sql_acl.cc:
  New thd->mem_root handling
sql/sql_base.cc:
  Simpler arena swapping code
  New thd->mem_root handling
sql/sql_class.cc:
  New thd->mem_root handling
sql/sql_class.h:
  Simpler arena swapping code
  New thd->mem_root handling
sql/sql_db.cc:
  New thd->mem_root handling
sql/sql_error.cc:
  New thd->mem_root handling
sql/sql_help.cc:
  New thd->mem_root handling
sql/sql_insert.cc:
  New thd->mem_root handling
sql/sql_parse.cc:
  New thd->mem_root handling
  Added some extra checking of return value of new
sql/sql_prepare.cc:
  New thd->mem_root handling
sql/sql_select.cc:
  New thd->mem_root handling
sql/sql_select.h:
  New thd->mem_root handling
sql/sql_union.cc:
  Simpler arena swapping code
sql/sql_yacc.yy:
  New thd->mem_root handling
sql/table.cc:
  New thd->mem_root handling
sql/thr_malloc.cc:
  New thd->mem_root handling
tests/client_test.c:
  Added drop table to some tests
  Changed some table names to 't1'
2004-11-08 01:13:54 +02:00
unknown
0c7ac260e0 sql_acl.cc:
Correcting problem with merge


sql/sql_acl.cc:
  Correcting problem with merge
2004-10-22 14:32:23 -05:00
unknown
8f06815657 After-merge fixes. 2004-10-22 14:19:42 -05:00