Commit graph

8 commits

Author SHA1 Message Date
Oleksandr Byelkin
e3982cead2 MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be stopped with no-zero size) 2015-09-04 10:33:56 +02:00
Sergei Golubchik
4cc8cda346 Remove the very old historical but never documented behavior,
than an empty host '' is the same as any-host wildcard '%'.

Replace '' with '%' in the parser (for GRANT ... foo@'') and when loading grant tables.

Side effect: one cannot have foo@'' and foo@'%' both at the same time
(but one can have foo@'%' and foo@'%%')
2013-10-18 11:38:13 -07:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
unknown
1177bea2f1 Rewritten patch of percona - switching query cache on and off, removing comments.
client/mysqltest.cc:
  Column names.
mysql-test/r/grant_cache_no_prot.result:
  fix of text.
mysql-test/r/grant_cache_ps_prot.result:
  Fix of test.
mysql-test/r/query_cache.result:
  Switching on and off query cache.
mysql-test/t/query_cache.test:
  Switching on and off query cache.
mysys/charset.c:
  Fix of parser.
sql/handler.cc:
  thd added to parameters.
sql/log_event.cc:
  thd added to parameters.
sql/log_event_old.cc:
  thd added to parameters.
sql/mysql_priv.h:
  Fixed functions definitions.
sql/mysqld.cc:
  Comments stripping.
sql/set_var.cc:
  Switching on and off query cache.
sql/set_var.h:
  Switching on and off query cache.
sql/share/errmsg.txt:
  New errors.
sql/sql_cache.cc:
  Switching query cache on and off, removing comments.
sql/sql_cache.h:
  thd added to parameters.
sql/sql_class.h:
  Comments stripping.
sql/sql_db.cc:
  thd added to parameters.
sql/sql_lex.cc:
  lex fixed.
sql/sql_parse.cc:
  thd added to parameters.
2011-05-18 16:27:19 +03:00
Georgi Kodinov
9705711596 WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Matthias Leich
21f878e724 Fix for Bug#42308 Several server tests do not pass MTR's --check option
Details:
Most tests mentioned within the bug report were already fixed.
The test modified here failed in stability (high parallel load) tests.

Details:
1. Take care that disconnects are finished before the test terminates.
2. Correct wrong handling of send/reap in events_stress which caused
   random garbled output
3. Minor beautifying of script code
2009-05-15 12:15:56 +02:00
Martin Hansson
3bad2119f9 Bug#36086: SELECT * from views don't check column grants
This patch also fixes bugs 36963 and 35600.
                      
- In many places a view was confused with an anonymous derived
  table, i.e. access checking was skipped. Fixed by introducing a
  predicate to tell the difference between named and anonymous
  derived tables.
                      
- When inserting fields for "SELECT * ", there was no 
  distinction between base tables and views, where one should be
  made. View privileges are checked elsewhere.

mysql-test/include/grant_cache.inc:
  Bug#36086: Changed test case.
mysql-test/r/grant2.result:
  Bug#36086: Changed test result.
mysql-test/r/grant_cache_no_prot.result:
  Bug#36086: Changed test result.
mysql-test/r/grant_cache_ps_prot.result:
  Bug#36086: Changed test result.
mysql-test/r/view_grant.result:
  Bug#36086: Test result.
mysql-test/t/grant2.test:
  Bug#36086: Changed test case.
mysql-test/t/view_grant.test:
  Bug#36086: Test case.
sql/item.cc:
  Bug#36086: Replaced conditional with new methods.
sql/sql_acl.cc:
  Bug no 35600: 
  In mysql_table_grant:
    Replaced conditional with the new accessor method.
  
  In check_grant:
   - Changed the requirement table->derived != null to 
     checking all anonymous derived tables.
   - Use of the accessor methods for getting object and database 
     names.
      
  Bug#36086: In check_grant_all_columns:
    - Updated comment. This function is now called for views
      as well.
    - The error message should not disclose any column names 
      unless the user has privilege to see all column names.
    - Changed names of Field_iterator_table_ref methods.
sql/sql_base.cc:
  Bug no 36963: In insert_fields()
    - Commented.
    - We should call check_grant_all_columns() for views in  
      this case.        
    - Changed names of Field_iterator_table_ref methods.
    - We should not disclose column names in the error message
      when the user has no approprate privilege.
sql/sql_cache.cc:
  Bug#36086: Replaced test with new predicate method.
sql/sql_derived.cc:
  Bug#36086: commenting only. Updated and doxygenated
  comment for mysql_derived_prepare().
sql/sql_parse.cc:
  Bug no 35600: 
  - In check_single_table_access:
    Due to the bug, check_grant would raise an error for a
    SHOW CREATE TABLE command for a TEMPTABLE view. It should in
    fact not be be invoked in this case. This table privilege
    is checked already.
    There is a test case for this in information_schema_db.test.
      
  - In check_access: replaced table->derived
sql/table.cc:
  Bug#36086: 
  
  - In TABLE_LIST::set_underlying_merge(): 
    Commenting only. Doxygenated, corrected spelling,
    added.
  
  - Renamed table_name() and db_name() methods of 
    Field_iterator_table_ref in order to be consistent
    with new methods in TABLE_LIST.
sql/table.h:
  Bug#36086: 
    - Commented GRANT_INFO.
    - Added a predicate is_anonymous_derived_table() to    
      TABLE_LIST.
    - Added get_table_name() and get_db_name() to   
      TABLE_LIST in order to hide the disparate   
      representation of these properties.
2008-09-03 16:45:40 +02:00
unknown
bcb1ff7f48 This changeset belongs to the fix of Bug#735 Prepared Statements: there is no support for Query Cache
- Create "--ps-protocol" and no "--<whatever>-protocol" variants of the former tests
  t/grant_cache.test and t/query_cache_sql_prepare.test.
- Some additional subtest and fixes of bugs
- Minor improvements 


mysql-test/include/grant_cache.inc:
  - Rename mysql-test/t/grant_cache.test to include/grant_cache.inc
  - Toplevel scripts running variants of this test are
       t/grant_cache_ps_prot.test (runs only with "--ps-protocol")
       t/grant_cache_no_prot.test (skipped if any protocol is assigned)
  - Modifications to include/grant_cache.inc:
    - Minor improvements like replace --error <number> by --error <name>
    - enable that some subtests are run with "--ps-protocol"
mysql-test/include/query_cache_sql_prepare.inc:
  - Rename t/query_cache_sql_prepare.test to include/query_cache_sql_prepare.inc
  - Toplevel scripts running variants of this test are
       query_cache_ps_ps_prot.test (skipped if other protocol than --ps-protocol is used.)
       query_cache_ps_no_prot.test (skipped if --<whatever>-protocol is used)   
  - Modifications to include/query_cache_sql_prepare.inc:
  - Minor improvements like add drop table
  - Add tests checking that 
    - another connection gets the same amount of QC hits
    - statements running via ps-protocol do not hit QC results of preceding sql EXECUTEs
mysql-test/r/grant_cache_no_prot.result:
  Updated result
mysql-test/r/query_cache_ps_no_prot.result:
  Updated result
tests/mysql_client_test.c:
  - correct wrong sized "for" loop
  - add some missing tests of query cache hit numbers
mysql-test/r/grant_cache_ps_prot.result:
  New BitKeeper file ``mysql-test/r/grant_cache_ps_prot.result''
mysql-test/r/query_cache_ps_ps_prot.result:
  New BitKeeper file ``mysql-test/r/query_cache_ps_ps_prot.result''
mysql-test/t/grant_cache_no_prot.test:
  Variant of the test grant_cache to be run without any "--<whatever>-protocol"
mysql-test/t/grant_cache_ps_prot.test:
  Variant of the test grant_cache to be run with "--ps-protocol" only
mysql-test/t/query_cache_ps_no_prot.test:
  Variant of the test query_cache_sql_prepare to be run without any "--<whatever>-protocol"
mysql-test/t/query_cache_ps_ps_prot.test:
  Variant of the test query_cache_sql_prepare to be run with "--ps-protocol" only
2007-05-24 22:13:49 +02:00