Commit graph

573 commits

Author SHA1 Message Date
mats@kindahl-laptop.dnsalias.net
2f74826394 BUG#29030 (DROP USER command that errors still gets written to binary log
and replicated):

A DROP USER statement with a non-existing user was correctly written to
the binary log (there might be users that were removed, but not all),
but the error code was not set, which caused the slave to stop with an
error.

The error reporting code was moved to before the statement was logged
to ensure that the error information for the thread was correctly set
up. This works since my_error() will set the fields net.last_errno and
net.last_error for the thread that is reporting the error, and this
will then be picked up when the Query_log_event is created and written
to the binary log.
2007-06-20 14:24:31 +02:00
kaa@polly.local
c674243497 Merge polly.local:/home/kaa/src/maint/bug28895/my50-bug28895
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-06-07 10:26:04 +04:00
kaa@polly.local
35dd1fc535 Fix for bug #28895 "Test 'information_schema_db' fails on i5/OS 32 bit".
In acl_getroot_no_password(), use a separate variable for traversing the acl_users list so that the last entry is not used when no matching entries are found.
2007-06-05 22:18:07 +04:00
thek@adventure.(none)
4ec0f6ceb9 Bug#24988 FLUSH PRIVILEGES causes brief unavailability
- A race condition caused brief unavailablility when trying to acccess
  a table.
- The unprotected variable 'grant_option' wasn't intended to alternate
  during normal execution. Variable initialization moved to grant_init
  a lines responsible for the alternation are removed.
2007-05-28 13:50:33 +02:00
anozdrin/alik@booka.opbmk
30c8ec9fdc Fix for BUG#9504: Stored procedures: execute privilege doesn't
make 'use database' okay.

The problem was that we didn't check stored-routine privileges
in check_grant_db().

The patch adds this check.
2007-03-23 14:12:11 +03:00
gluh@mysql.com/eagle.(none)
ec4f730ba7 Bug#26285 selecting information_schema crahes server
The crash happens when 'skip-grant-tables' is enabled.
We skip the filling of I_S privilege tables 
if acl_cache is not initialized.
2007-03-16 12:15:51 +04:00
monty@mysql.com/narttu.mysql.fi
e5cc397f33 Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases)
2007-02-22 16:59:57 +02:00
lars/lthalmann@mysql.com/dl145j.mysql.com
c380de50ef Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-01-12 12:22:54 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
lars@mysql.com/black.(none)
e2e3f0e5c3 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge
2006-12-08 23:33:39 +01:00
rafal@quant.(none)
dc57928573 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug24507
2006-12-08 16:50:06 +01:00
monty@mysql.com/narttu.mysql.fi
3d40956039 Fixed portability issue in my_thr_init.c (was added in my last push)
Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.
2006-11-30 18:25:05 +02:00
bar@mysql.com/bar.intranet.mysql.r18.ru
dcde1be17d Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
Problem: ``SET PASSWORD FOR foo@localhost'' was written into
binary log using double quites: ``SET PASSWORD FOR "foo"@"localhost"...''.
If sql_mode was set to ANSI_QUOTES, parser on slave considered
"foo" and "localhost" as identifiers instead of strigns constants,
so it failed to parse, generated syntax error and slave then stopped.
Fix: changing binary log entries to use single quotes:
``SET PASSWORD FOR 'foo'@'localhost'...'' not to depend on ANSI_QUOTES.
2006-11-30 11:08:23 +04:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
cmiller@zippy.cornsilk.net
87ba07e832 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug14262/my50-bug14262
2006-10-13 08:57:15 -04:00
cmiller@zippy.cornsilk.net
5512100c6a Bug #14262: SP: DROP PROCEDURE|VIEW (maybe more) write to binlog too late \
(race cond)

It was possible for one thread to interrupt a Data Definition Language 
statement and thereby get messages to the binlog out of order.  Consider:

Connection 1: Drop Foo x
Connection 2: Create or replace Foo x
Connection 2: Log "Create or replace Foo x"
Connection 1: Log "Drop Foo x"

Local end would have Foo x, but the replicated slaves would not.

The fix for this is to wrap all DDL and logging of a kind in the same mutex.  
Since we already use mutexes for the various parts of altering the server, 
this only entails moving the logging events down close to the action, inside 
the mutex protection.
2006-10-03 13:38:25 -04:00
dlenev@mockturtle.local
a4ee7ec153 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mockturtle.local:/home/dlenev/src/mysql-5.0-rt-merge
2006-09-29 10:55:03 +04:00
gluh@mysql.com/gluh.(none)
c3d63bef2b after merge fix 2006-09-27 19:21:29 +05:00
gluh@mysql.com/gluh.(none)
437c94317b Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/5.0
2006-09-27 18:06:46 +05:00
gluh@mysql.com/gluh.(none)
a039376c43 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
kroki/tomash@moonlight.intranet
18dda5abaf Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21414
2006-09-27 11:46:29 +04:00
kroki/tomash@moonlight.intranet
ed0cb3e4ba BUG#21414: SP: Procedure undroppable, to some extent
The problem was that if after FLUSH TABLES WITH READ LOCK the user
issued DROP/ALTER PROCEDURE/FUNCTION the operation would fail (as
expected), but after UNLOCK TABLE any attempt to execute the same
operation would lead to the error 1305 "PROCEDURE/FUNCTION does not
exist", and an attempt to execute any stored function will also fail.

This happened because under FLUSH TABLES WITH READ LOCK we couldn't open
and lock mysql.proc table for update, and this fact was erroneously
remembered by setting mysql_proc_table_exists to false, so subsequent
statements believed that mysql.proc doesn't exist, and thus that there
are no functions and procedures in the database.

As a solution, we remove mysql_proc_table_exists flag completely.  The
reason is that this optimization didn't work most of the time anyway.
Even if open of mysql.proc failed for some reason when we were trying to
call a function or a procedure, we were setting mysql_proc_table_exists
back to true to force table reopen for the sake of producing the same
error message (the open can fail for number of reasons).  The solution
could have been to remember the reason why open failed, but that's a lot
of code for optimization of a rare case.  Hence we simply remove this
optimization.
2006-09-12 14:56:25 +04:00
gluh@mysql.com/gluh.(none)
e2684ad5d7 after merge fix 2006-09-07 18:09:49 +05:00
msvensson@shellback.(none)
d463972da7 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-31 11:57:36 +02:00
gluh@mysql.com/gluh.(none)
af9895d4c2 Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
2006-08-30 15:56:17 +05:00
kostja@bodhi.local
8566db3fc7 Remove the fix for Bug#10668 "CREATE USER does not enforce username
length limit", it's superseded by the fix for Bug#16899 "Possible buffer
overflow in handling of DEFINER-clause". Update test results.
2006-08-30 01:48:15 +04:00
kostja@bodhi.local
f8d34e1030 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897
2006-08-30 00:45:33 +04:00
tsmith/tim@siva.hindu.god
ade64d467e Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-50
into  siva.hindu.god:/usr/home/tim/m/bk/50
2006-08-23 16:28:53 -06:00
tsmith/tim@siva.hindu.god
0831d404e1 Manual merge 2006-08-23 15:46:57 -06:00
tsmith/tim@siva.hindu.god
dba7b8e81c Bug #20402: DROP USER failure logged as ERROR rather than WARNING
Remove some sql_print_error() calls which were triggered by user error (i.e., not server-level events at all).

Also, convert an sql_print_error -> sql_print_information for a non-error server event.
2006-08-23 15:37:54 -06:00
anozdrin/alik@alik.
9af756efd3 Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.

The fix is to check length of user/host name in parser and if string is too
long, throw an error.
2006-08-23 21:31:00 +04:00
tnurnberg@salvation.intern.azundris.com
10c351b124 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-maint-20411
2006-08-22 14:31:57 +02:00
tnurnberg@salvation.intern.azundris.com
002adef0e1 Bug#20411: "GRANT ... REQUIRE ISSUER nnn AND SUBJECT mmm" fails to require both
when X.509 subject was required for a connect, we tested whether it was the right
one, but did not refuse the connexion if not. fixed.

(corrected CS now --replace_results socket-path)
2006-08-22 14:29:48 +02:00
cmiller@zippy.cornsilk.net
64092ca93b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:55:57 -04:00
cmiller@zippy.cornsilk.net
c627a6ce84 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:42:50 -04:00
iggy@rolltop.ignatz42.dyndns.org
00ab7be7b9 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_20328
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-merge
2006-08-16 19:31:33 -04:00
iggy@rolltop.ignatz42.dyndns.org
af844dbed6 manual merge 2006-08-16 19:19:49 -04:00
iggy@rolltop.ignatz42.dyndns.org
ca6532af50 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_20328
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint_20328
2006-08-16 16:16:10 -04:00
tsmith/tim@siva.hindu.god
f5764cecde 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
2006-07-26 16:33:26 -06:00
gluh@mysql.com/gluh.(none)
e47b22c6a2 Bug#20543 select on information_schema strange warnings, view, different schemas/users
The fix is: if user has privileges to view fields and user has any
(insert,select,delete,update) privileges on underlying view 
then 'show fields' and select from I_S.COLUMNS table are sucsessful.
2006-07-25 17:23:25 +05:00
jimw@rama.(none)
36a26abd8f Bug #10668: CREATE USER does not enforce username length limit
This appears to have just been an oversight -- CREATE USER was not enforcing
  the existing username limitations.
2006-07-24 16:45:26 -07:00
igreenhoe/greenman@anubis.greendragongames.com
abb75129f8 4.1 -> 5.0 merge 2006-07-13 16:35:25 -07:00
bar@mysql.com
2303077238 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17647
2006-07-07 12:17:00 +05:00
gluh@mysql.com
d2b378d57f Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt
2006-07-03 13:19:18 +05:00
gluh@eagle.intranet.mysql.r18.ru
9901efea1f Bug#15298 SHOW GRANTS FOR CURRENT_USER: Incorrect output in DEFINER context
user name is calculated on function execution stage instead of parse stage
2006-06-29 15:50:44 +05:00
tnurnberg@mysql.com
763752ef2e Bug#19857: When a user with CREATE ROUTINE priv creates a routine it results 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.
2006-06-28 12:40:17 +02:00
msvensson@neptunus.(none)
076ddbf840 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-29 15:06:37 +02:00
msvensson@neptunus.(none)
3e2c08cc99 Update after merge to 5.0 2006-05-29 15:05:31 +02:00
msvensson@neptunus.(none)
20e0714176 Merge neptunus.(none):/home/msvensson/mysql/bug16297/my50-bug16297
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-29 13:16:17 +02:00
gkodinov@mysql.com
b6acee915a Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18681
2006-05-26 11:57:56 +03:00