Commit graph

14 commits

Author SHA1 Message Date
Sergey Glukhov
1968895ed3 5.0-bugteam->5.1-bugteam merge 2009-10-27 14:09:36 +04:00
Sergey Glukhov
58b7761ed8 Bug#41049 does syntax "grant" case insensitive?
Problem 1:
column_priv_hash uses utf8_general_ci collation
for the key comparison. The key consists of user name,
db name and table name. Thus user with privileges on table t1
is able to perform the same operation on T1
(the similar situation with user name & db name, see acl_cache).
So collation which is used for column_priv_hash and acl_cache
should be case sensitive.
The fix:
replace system_charset_info with my_charset_utf8_bin for
column_priv_hash and acl_cache
Problem 2:
The same situation with proc_priv_hash, func_priv_hash,
the only difference is that Routine name is case insensitive.
So the fix is to use my_charset_utf8_bin for
proc_priv_hash & func_priv_hash and convert routine name into lower
case before writing the element into the hash and
before looking up the key.
Additional fix: mysql.procs_priv Routine_name field collation
is changed to utf8_general_ci.
It's necessary for REVOKE command
(to find a field by routine hash element values).
Note: 
It's safe for lower-case-table-names mode too because
db name & table name are converted into lower case
(see GRANT_NAME::GRANT_NAME).
2009-10-27 12:09:19 +04:00
andrey@example.com
9c8c1817ce Fix for bug #20665 All commands supported in Stored Procedures
should work in Prepared Statements. Post-review changeset.

Problem: There are some commands which are avaiable to be executed in SP
         but cannot be prepared. This patch fixes this and makes it possible
         prepare these statements.

Changes: The commands later are made available in PS. RESET has been forbidden
         in SF/Trigger.

Solution: All current server commands where checked and those missing (see later)
          we added. Tests for all of the commands with repeated executions were
          added - testing with SP, SF and PS.

SHOW BINLOG EVENTS
SHOW (MASTER | SLAVE) STATUS
SHOW (MASTER | BINARY) LOGS
SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
CHANGE MASTER
RESET (MASTER | SLAVE | QUERY CACHE)
SLAVE (START | STOP)
CHECKSUM (TABLE | TABLES)
INSTALL PLUGIN
UNINSTALL PLUGIN
CACHE INDEX
LOAD INDEX INTO CACHE
GRANT
REVOKE
KILL
(CREATE | RENAME | DROP) DATABASE
(CREATE | RENAME | DROP) USER
FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
       LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)
2006-08-23 15:50:06 +02:00
monty@mysql.com
ef1de7da1d After merge fixes 2005-07-28 21:39:24 +03:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
af6863e7d0 Moved test for 'show full processlist' to not_embedded_server.test becasue it could fail on a slow computer where previous connections has not yet disconnected 2005-07-27 13:45:06 +03:00
konstantin@mysql.com
62dacf0813 Manual merge (4.1->5.0) 2005-06-17 00:34:35 +04:00
konstantin@mysql.com
dcb0e65dcb Fix Bug#9334 "PS API queries in log file" and
Bug#8367 "low log doesn't gives complete information about prepared 
statements"
Implement status variables for prepared statements commands (a port of
the patch by Andrey Hristov).
See details in comments to the changed files.
No test case as there is no way to test slow log/general log in 
mysqltest.
2005-06-17 00:11:48 +04:00
konstantin@mysql.com
6b90352eac More post-merge fixes. 2005-05-14 14:42:25 +04:00
konstantin@mysql.com
aa57e40df6 A post-merge fix. 2005-05-14 13:26:01 +04:00
mleich@mysql.com
1494f0ab68 If the system is under high load 'show full processlist' might report the
process of the predecessing test case instead of the current test case. 
Shifting the command to the end of the current test case should avoid this problem.
2005-05-12 17:49:34 +02:00
jimw@mysql.com
c18307e8a2 Cleanup tests and results after merge from 4.1 of embedded
server testing cleanups.
2005-04-04 12:43:58 -07:00
jimw@mysql.com
1ebcd90364 Fix the new ps_grant test to clean itself up properly. 2005-04-01 09:13:20 -08:00
jimw@mysql.com
690183d1a0 Eliminate most of the remaining hardcoded list of tests to skip
by adding check for embedded server within tests and splitting some
tests into multiple test files.
2005-03-29 17:17:46 -08:00