Changed context of Create routine to Databases.
mysql-test/r/grant.result:
result fix
mysql-test/r/sp.result:
result fix
sql/sql_show.cc:
Changed context of Create routine to Databases.
- If missing: add "disconnect <session>"
- If physical disconnect of non "default" sessions is not finished
at test end: add routine which waits till this happened
+ additional improvements
- remove superfluous files created by the test
- replace error numbers by error names
- remove trailing spaces, replace tabs by spaces
- unify writing of bugs within comments
- correct comments
- minor changes of formatting
Fixed tests:
backup
check
compress
grant
information_schema
multi_update
overflow
packet
query_cache_not_embedded
sp-threads
subselect
synchronization
timezone_grant
init user->user struct with
thd->security_ctx->priv_user context
if user->user is not initializied
mysql-test/r/grant.result:
test result
mysql-test/t/grant.test:
test case
sql/set_var.cc:
init user->user struct with
thd->security_ctx->priv_user context
if user->user is not initializied
Fixed interference between tests: Users were added but not properly removed.
This caused later tests to fail.
mysql-test/r/grant.result:
Fixed interference between tests: Users were added but not properly removed.
This caused later tests to fail.
mysql-test/t/grant.test:
Fixed interference between tests: Users were added but not properly removed.
This caused later tests to fail.
When issuing a column level grant on a table which require pre-locking the
server crashed.
The reason behind the crash was that data structures used by the lock api
wasn't properly reinitialized in the case of a column level grant.
mysql-test/r/grant.result:
* Added test case
mysql-test/t/grant.test:
* Added test case
sql/sql_acl.cc:
* The lock api is dending on the thd->lex object and this variable needs to
be re-initialized when opened with a new set of tables than specified in the
original statement.
mysql-test/r/grant.result:
Update test results to .test changes
mysql-test/t/grant.test:
Drop users when done with them, to avoid skewing results of later tests.
For example, running some test which examines the cardinality of the
mysql.user table would fail if run right after this test, due to the
extra users.
clean up SHOW GRANTS so it will show host-names with case as entered.
make REVOKE and friends case-sensitive to make things more intuitive.
Patch by Martin Friebe.
mysql-test/r/grant.result:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
clean up after test so random order of tests is possible
mysql-test/r/grant3.result:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
mysql-test/t/grant.test:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
clean up after test so random order of tests is possible
mysql-test/t/grant3.test:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
Corrected test case for the bug#27878.
mysql-test/t/grant.test:
Corrected test case for the bug#27878.
mysql-test/r/grant.result:
Corrected test case for the bug#27878.
database.
If a user has a right to update anything in the current database then the
access was granted and further checks of access rights for underlying tables
wasn't done correctly. The check is done before a view is opened and thus no
check of access rights for underlying tables can be carried out.
This allows a user to update through a view a table from another database for
which he hasn't enough rights.
Now the mysql_update() and the mysql_test_update() functions are forces
re-checking of access rights after a view is opened.
mysql-test/t/grant.test:
Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database.
mysql-test/r/grant.result:
Added a test case for the bug#27878: Unchecked privileges on a view referring to a table from another database.
sql/sql_update.cc:
Bug#27878: Unchecked privileges on a view referring to a table from another
database.
Now the mysql_update() function forces re-checking of access rights after
the view is opened.
sql/sql_prepare.cc:
Bug#27878: Unchecked privileges on a view referring to a table from another
database.
Now the mysql_test_update() function forces re-checking of access rights after
the view is opened.
into mysql.com:/home/ram/work/b27515/b27515.5.0
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/sql_parse.cc:
Auto merged
The problem was that THD::db_access variable was not restored after
database switch in stored-routine-execution code.
The fix is to restore THD::db_access in this case.
Unfortunately, this fix requires additional changes,
because in prepare_schema_table(), called on the parsing stage, we checked
privileges. That was wrong according to our design, but this flaw haven't
struck so far, because it was masked. All privilege checkings must be
done on the execution stage in order to be compatible with prepared statements
and stored routines. So, this patch also contains patch for
prepare_schema_table(), which moves the checkings to the execution phase.
mysql-test/r/grant.result:
Updated result file.
mysql-test/t/grant.test:
Added test case for BUG#27337.
sql/mysql_priv.h:
Added function declaration.
sql/sql_db.cc:
Fix for BUG#27337 -- set THD::db_access even if we're called
from stored-routine-execution code.
sql/sql_parse.cc:
Split prepare_schema_table() into two functions:
- prepare_schema_table(), which is called from the parser (parsing stage);
- check_show_access(), which is called on the execution stage.
sql/sql_show.cc:
Ignore schema_select_lex member if its table is NULL.
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.
length limit", it's superseded by the fix for Bug#16899 "Possible buffer
overflow in handling of DEFINER-clause". Update test results.
mysql-test/r/grant.result:
A post-merge fix.
mysql-test/t/grant.test:
A new error is returned, use the default database after drop database.
sql/sql_acl.cc:
Remove an unneeded check.
into bodhi.local:/opt/local/work/mysql-5.0-14897
configure.in:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/share/errmsg.txt:
Auto merged
mysql-test/r/grant.result:
Manual merge.
mysql-test/r/view.result:
Manual merge.
mysql-test/t/grant.test:
Manual merge.
mysql-test/t/view.test:
Manual merge.
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.
mysql-test/r/grant.result:
Updated result file.
mysql-test/r/sp.result:
Updated result file.
mysql-test/r/trigger.result:
Updated result file.
mysql-test/r/view.result:
Updated result file.
mysql-test/t/grant.test:
Added test for BUG#16899.
mysql-test/t/sp.test:
Added test for BUG#16899.
mysql-test/t/trigger.test:
Added test for BUG#16899.
mysql-test/t/view.test:
Added test for BUG#16899.
sql/mysql_priv.h:
Added prototype for new function.
sql/share/errmsg.txt:
Added new resources.
sql/sql_acl.cc:
Remove outdated checks.
sql/sql_parse.cc:
Add a new function for checking string length.
sql/sql_yacc.yy:
Check length of user/host name.
into zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
tests/mysql_client_test.c:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
"A SELECT privilege on a view is required for SHOW CREATE VIEW and it will stay
that way because of compatibility reasons." (see #20136)
a test case to illustrate how the ACLs work in this case (and ensure they will continue
to do so in the future)
mysql-test/r/grant.result:
Bug#20214: Incorrect error when user calls SHOW CREATE VIEW on non privileged view
a test case to illustrate how the ACLs work in this case (and ensure they will continue
to do so in the future)
mysql-test/t/grant.test:
Bug#20214: Incorrect error when user calls SHOW CREATE VIEW on non privileged view
a test case to illustrate how the ACLs work in this case (and ensure they will continue
to do so in the future)
This appears to have just been an oversight -- CREATE USER was not enforcing
the existing username limitations.
mysql-test/r/grant.result:
Add new results
mysql-test/t/grant.test:
Add new regression test
sql/sql_acl.cc:
Enforce the user and host name limits in mysql_create_user().
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/grant.result:
Reorder test result
mysql-test/t/grant.test:
Add "use test"
sql/sql_acl.cc:
Add check if host is NULL
Add check if grant_name->host.hostname is null
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/t/grant.test:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/grant.result:
SCCS merged
The check for view security was lacking several points :
1. Check with the right set of permissions : for each table ref that
participates in a view there were the right credentials to use in it's
security_ctx member, but these weren't used for checking the credentials.
This makes hard enforcing the SQL SECURITY DEFINER|INVOKER property
consistently.
2. Because of the above the security checking for views was just ruled out
in explicit ways in several places.
3. The security was checked only for the columns of the tables that are
brought into the query from a view. So if there is no column reference
outside of the view definition it was not detecting the lack of access to
the tables in the view in SQL SECURITY INVOKER mode.
The fix below tries to fix the above 3 points.
mysql-test/r/grant.result:
removed nondeterminism (unspecified order) in some test output
mysql-test/r/view_grant.result:
Somewhat extended test case for the bug and similar queries.
mysql-test/t/grant.test:
removed nondeterminism (unspecified order) in some test output
mysql-test/t/view_grant.test:
Somewhat extended test case for the bug and similar queries.
sql/mysql_priv.h:
A wrapper for setup_tables that also checks access to the tables
sql/sql_acl.cc:
removed artificial security check stop and used the table ref's credentials.
sql/sql_base.cc:
a wrapper for setup_tables to check access to the tables
sql/sql_delete.cc:
wrapper called.
sql/sql_insert.cc:
wrapper called
sql/sql_load.cc:
wrapper called
sql/sql_parse.cc:
wrapper called and artificial check stop removed
sql/sql_select.cc:
wrapper called
sql/sql_update.cc:
wrapper called
sql/table.cc:
Mask table access to the view error as well.
- In function 'handle_grant_struct' when searching the memory structures for an
entry to modify, convert all entries here host.hostname is NULL to "" and compare that
with the host passed in argument "user_from".
- A user created with hostname "" is stored in "mysql.user" table as host="" but when loaded into
memory it'll be stored as host.hostname NULL. Specifiying "" as hostname means
that "any host" can connect. Thus is's correct to turn on allow_all_hosts
when such a user is found.
- Review and fix other places where host.hostname may be NULL.
mysql-test/init_db.sql:
Rename: BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7 -> mysql-test/init_db.sql
mysql-test/r/grant.result:
Add test cases for users with hostname ""
mysql-test/t/grant.test:
Add test cases for users with hostname ""
- Test create, grant and drop as well as connecting as the user with hostname "".
sql/sql_acl.cc:
Convert places where host.hostname is NULL to "" before using it.
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
- Comparing host string against NULL caused crash.
- If host.hostname is NULL treat it as ""
mysql-test/r/grant.result:
Update test results
mysql-test/t/grant.test:
Add test for user with host ""
into neptunus.(none):/home/msvensson/mysql/bug15598/my50-bug15598
mysql-test/t/grant.test:
Auto merged
sql/sql_acl.cc:
Auto merged
mysql-test/r/grant.result:
SCCS merged
- 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 ""
Larger stack size neaded for open table on x86 64 bit
Fix failing test cases
Deleted symlink from bk
BitKeeper/etc/ignore:
added libmysqld/ha_blackhole.cc
BitKeeper/deleted/.del-ha_blackhole.cc~727c69ef7846623a:
Delete: libmysqld/ha_blackhole.cc
include/my_global.h:
Don't use PATH_MAX for FN_REFLEN as this uses too much stack space.
(With a PATH_MAX of 4096, we use 80K for opening a table as there is several objects of size FN_REFLEN on stack)
mysql-test/r/federated.result:
Update results after error message changes
mysql-test/r/grant.result:
Update results after error message changes
mysql-test/r/grant2.result:
Update results after error message changes
sql/ha_federated.cc:
Fix error messages to be more consistent
sql/mysql_priv.h:
Stack size to have when opening a table
(This was needed on x86 64 bit Linux)
sql/share/errmsg.txt:
Remove quotes around error string for federated as two quotes in the output looks strange
sql/sql_base.cc:
More correct stack size
sql/sql_parse.cc:
Set thread_stack before store_globals()
sql/unireg.h:
More correct MAX_DBKEY_LENGTH
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.
fixing tests accordingly
item.cc:
Bug #10892 user variables not auto cast for comparisons
When mixing strings with different character sets,
and coercibility is the same, we allow conversion
if one character set is superset for other character set.
sql/item.cc:
Bug #10892 user variables not auto cast for comparisons
When mixing strings with different character sets,
and coercibility is the same, we allow conversion
if one character set is superset for other character set.
mysql-test/t/grant.test:
fixing tests accordingly
mysql-test/r/grant.result:
fixing tests accordingly
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/query_cache.result:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/grant.result:
Merge
mysql-test/t/grant.test:
Merge
mysql-test/r/grant.result:
test of new table privileges
mysql-test/r/system_mysql_db.result:
added new table priveleges
mysql-test/r/view_grant.result:
error changed
mysql-test/t/grant.test:
test of new table privileges
mysql-test/t/view_grant.test:
error changed
scripts/mysql_create_system_tables.sh:
add new table privileges
scripts/mysql_fix_privilege_tables.sql:
fixed system tables fix script
sql/sql_acl.h:
fixed coding/decoding new tables grants
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.
mysql-test/r/create.result:
Auto merged
mysql-test/r/ctype_latin1_de.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/limit.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/rpl000001.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/ctype_latin1_de.test:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/type_blob.test:
Auto merged
mysql-test/t/type_ranges.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sql_insert.cc:
Auto merged
mysql-test/t/strict.test:
SCCS merged
mysql-test/r/innodb.result:
Auto merged
BitKeeper/deleted/.del-select.result.es~240635f6a3f1a079:
Auto merged
BitKeeper/deleted/.del-type_float.result.es~a5533e4118eadc04:
Auto merged
BitKeeper/deleted/.del-type_ranges.result.es~bb77517f4c9dc978:
Auto merged
mysql-test/r/type_float.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/connect.test:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqlbinlog2.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
mysql-test/t/type_blob.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/mysql-test-run.sh:
Merge
mysql-test/r/alter_table.result:
Update results
mysql-test/r/ctype_ucs.result:
Update results
mysql-test/r/grant.result:
Update results
mysql-test/r/insert_select.result:
Update results
mysql-test/r/ps_1general.result:
Update results
mysql-test/r/select.result:
Update results
mysql-test/r/timezone2.result:
Update results
mysql-test/r/type_blob.result:
Update results
mysql-test/r/type_ranges.result:
Update results
mysql-test/r/user_var.result:
Update results
mysql-test/t/ctype_ucs.test:
Merge
mysql-test/t/grant.test:
Merge
mysql-test/t/insert_select.test:
Merge
mysql-test/t/timezone2.test:
Merge
mysql-test/t/type_ranges.test:
Merge
mysql-test/t/user_var.test:
Merge
to grant.test and using replace_column to neuter the Privileges column in
SHOW FULL COLUMNS.
BitKeeper/deleted/.del-alter_table.result.es~a1077916d429e443:
Delete: mysql-test/r/alter_table.result.es
mysql-test/t/alter_table.test:
Add replace_column for grant-related column
Move grant-related test to grant.test
mysql-test/r/alter_table.result:
Update results
mysql-test/t/grant.test:
Move grant-related test from alter_table.test
mysql-test/r/grant.result:
Add test results
mysql-test/mysql-test-run.sh:
Don't skip alter_table test for embedded server