Commit graph

60 commits

Author SHA1 Message Date
unknown
8b08f2fa44 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-08-22 17:46:21 -07:00
unknown
57f575b2e4 sql_show.cc:
Database name was set incorrectly for any show command
  that used sunqueries in its where condition.
information_schema.test, information_schema.result:
  Added a test case for bug #12636.


mysql-test/r/information_schema.result:
  Added a test case for bug #12636.
mysql-test/t/information_schema.test:
  Added a test case for bug #12636.
sql/sql_show.cc:
  Database name was set incorrectly for any show command
  that used sunqueries in its where condition.
2005-08-22 17:32:02 -07:00
unknown
3eda70b270 Fixes during review of new pushed code
Fixed new bug when running a SP without a default database


mysql-test/r/information_schema.result:
  Added test to cover changes made in default handling
mysql-test/r/sp-security.result:
  Added test when executing SP without a default database
mysql-test/t/information_schema.test:
  Added test to cover changes made in default handling
mysql-test/t/sp-security.test:
  Added test when executing SP without a default database
sql/item_strfunc.cc:
  Removed wrong push
sql/mysqld.cc:
  Indentation fix
sql/sql_base.cc:
  Use share->db instead of share->table_cache_key
  Remove assert that can never fail (because of test in previous row)
sql/sql_db.cc:
  Allow empty database name when called from SP
  (To allow on run without a default database)
sql/sql_parse.cc:
  Added comment
sql/sql_show.cc:
  Indentation fixes
  Simplified code by checking for 'wrong' condition first and doing continue instead of going down one level
  Simplified precision and decimal handling
2005-08-20 11:00:00 +03:00
unknown
c1f1118335 information_schema.test:
Added a comment line for a test case used for bug #12301.
information_schema.result:
  Fixed some test cases results (bug #12301).
sql_show.cc:
  Fixed bug #12301.
  The bug was due to a missing value setting for the NUMERIC_SCALE column
   in the get_schema_column_record() function (sql_show.cc).


sql/sql_show.cc:
  Fixed bug #12301.
  The bug was due to a missing value setting for the NUMERIC_SCALE column
   in the get_schema_column_record() function (sql_show.cc).
mysql-test/r/information_schema.result:
  Fixed some test cases results (bug #12301).
mysql-test/t/information_schema.test:
  Added a comment line for a test case used for bug #12301.
2005-08-16 23:11:04 +04:00
unknown
2fc78cb3fd Bug#12518
"COLUMN_DEFAULT has wrong value if NOT NULL is set"
  Show NULL instead of empty string when no default value is set


mysql-test/r/information_schema.result:
  test for bug 12518
mysql-test/t/information_schema.test:
  test for bug 12518
sql/sql_show.cc:
  report NULL for information schema result when there is no default value
2005-08-15 17:14:55 +01:00
unknown
8103db27bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/sp.result:
  Manual merge
mysql-test/t/sp.test:
  Manual merge
sql/sql_class.h:
  Manual merge
2005-08-09 11:43:55 +04:00
unknown
39fda60043 Fix for bug #10055 "Using stored function with information_schema causes empty
result set".

To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).


mysql-test/r/alter_table.result:
  Updated test results. This change was caused by the fact that now when
  we build contents of I_S tables (and thus output of SHOW INDEX) we
  don't use instances of tables which may be already opened and locked
  by thread (we always use new instance).
mysql-test/r/information_schema.result:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/r/sp.result:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
mysql-test/t/information_schema.test:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/t/sp.test:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
sql/mysql_priv.h:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sp.cc:
  close_proc_table/open_proc_table_for_read/db_find_routine():
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
  open_proc_table_for_read():
    Since now we can have several open tables states stacked up we can't rely
    rely on checking whether we have some tables open in previous state.
    Instead we always assume that some tables are open and we need to ignore
    flush while locking mysql.proc. We don't really need 
    MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK in this case since we open mysql.proc table
    only for reading.
sql/sp.h:
  Added declarations of open_proc_table_for_read()/close_proc_table() to be
  able to use them in sql_show.cc.
sql/sql_base.cc:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_class.cc:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_class.h:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_handler.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_prepare.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_show.cc:
  get_all_tables():
    Now we use THD::reset_n_/restore_backup_open_tables_state() for 
    saving/restoring open tables state instead of working with it directly
    (This also allows us to have proper content of I_S system tables in
    statements with stored functions and in stored functions). We also
    ignore possible flushes when opening tables (we may create deadlock
    otherwise). Also we do all needed manipulations with LEX in this function
    and not in get_schema_tables_result() now.
  get_schema_tables_record():
    Let us use handler::info() method with HA_STATUS_AUTO flag for obtaining
    information about table's auto-increment value. This allows to avoid locking
    of tables which is needed when we use handler::update_auto_increment() method.
  fill_schema_proc():
    Now we use open_proc_table_for_read/close_proc_table() for access to
    mysql.proc table (so we won't cause deadlock if we already have some
    tables open and locked, this also allows us to have proper content in
    ROUTINES system table in statements using stored functions/in stored
    functions).
  get_schema_tables_result():
    Moved all manipulations with Open_tables_state and LEX needed for
    safe opening of tables to ST_SCHEMA_TABLE::fill_table functions
    (i.e. get_all_tables() and fill_schema_proc()).
sql/sql_update.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
2005-08-08 17:46:06 +04:00
unknown
31febd5459 Fix test to avoid spurious failure message. (Bug #11233)
mysql-test/t/information_schema.test:
  Stub out column in results that we don't care about, and may vary
mysql-test/r/information_schema.result:
  Update results
2005-08-02 16:50:10 -07:00
unknown
6b3478ec12 Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.


client/client_priv.h:
  Added OPT_TRIGGERS (to get rid of compiler warning)
client/mysql.cc:
  Added cast to get rid of compiler warning
client/mysqldump.c:
  Added OPT_TRIGGERS (to get rid of compiler warning)
  Abort if we can't write to outfile (even if --ignore-errors is given)
client/mysqltest.c:
  Added --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
include/my_sys.h:
  Make my_progname const
include/my_time.h:
  Avoid using 'bool' in C programs
mysql-test/lib/init_db.sql:
  Align with mysql_create_system_tables
  (Ideally this file should be auto-generated from the above script)
mysql-test/r/mysqltest.result:
  Test for --enable_parsing
mysql-test/r/variables.result:
  Update results after fix for overflow checking of max_heap_table_size
mysql-test/t/information_schema.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/mysqltest.test:
  Test for --enable_parsing
mysql-test/t/sp.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/variables.test:
  Portability fix for 64 bit systems
mysql-test/t/view.test:
  USe --enable/disable parsing instead of comments
mysys/my_init.c:
  May my_progname const
mysys/my_static.c:
  May my_progname const
mysys/thr_lock.c:
  Remove not needed casts
sql-common/my_time.c:
  Change bool -> my_bool as bool is not portable in C programs
sql/field.cc:
  Test number_to_datetime() for -1 instead of < 0 (Safety fix)
  New prototype for TIME_to_timestamp()
sql/item.h:
  Don't have prototypes for both uint32 and ulong as these 'may' be the same thing
sql/item_timefunc.cc:
  New prototype for TIME_to_timestamp()
sql/log.cc:
  Remove compiler warnings
sql/mysql_priv.h:
  New prototype for TIME_to_timestamp()
  Added function for comparing LEX_STRING
sql/set_var.cc:
  Added overflow checking when setting ulong variable
sql/sql_base.cc:
  Added function is_equal()
  Changed strncmp -> is_equal() as strncmp() to not match "V" (instead of "VIEW")
sql/sql_class.cc:
  Added comment
sql/sql_select.cc:
  Portability fixes
  After review fixes
sql/sql_trigger.cc:
  Use 'tables_alias_charset' for comparing database name
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/sql_view.cc:
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/time.cc:
  New prototype for TIME_to_timestamp() to allow easyer mapping to C function
sql/tztime.cc:
  bool -> my_bool (to allow calling C code from C++ code)
sql/tztime.h:
  bool -> my_bool (to allow calling C code from C++ code)
2005-07-31 12:49:55 +03:00
unknown
983a836f74 Fix for bug#12127 triggers do not show in info_schema before they are used if set to the database(2nd version)
use db name of table which trigger belongs to
  instead of thd->db name during trigger body parsing
2005-07-27 16:17:05 +05:00
unknown
a160bc9cce Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-tn


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Manual merge.
2005-07-19 20:55:09 +04:00
unknown
a32bf7fb82 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"


mysql-test/r/information_schema.result:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/r/information_schema_db.result:
  INFORMATION_SCHEMA.TRIGGERS view was added.
mysql-test/r/rpl_sp.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/r/trigger.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/r/view.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/information_schema.test:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/t/rpl_sp.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/trigger.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/t/view.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
sql/handler.cc:
  Added .TRN tho the list of known file extensions assoicated with tables.
sql/item.h:
  trg_action_time_type/trg_event_type enums:
    Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
    magical values in various loops where we iterate through all types of trigger
    action times or/and trigger event types.
sql/lex.h:
  Added new symbol "TRIGGERS".
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger name (.TRN) files.
sql/mysqld.cc:
  Added statistical variable for SHOW TRIGGERS command.
sql/share/errmsg.txt:
  Added error message saying that one attempts to create trigger in wrong schema.
sql/sp.cc:
  Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
sql/sql_base.cc:
  open_unireg_entry():
    Now Table_triggers_list::check_n_load() has one more argument which
    controls whether we should prepare Table_triggers_list with fully functional
    triggers or load only their names.
sql/sql_lex.h:
  Added element for new SHOW TRIGGERS command to enum_sql_command enum.
sql/sql_parse.cc:
  prepare_schema_table():
    Added support for SHOW TRIGGERS statement.
sql/sql_show.cc:
  Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
sql/sql_table.cc:
  mysql_rm_table_part2():
    Replaced simple deletion of .TRG file with call to
    Table_triggers_list::drop_all_triggers which will also delete .TRN files
    for all triggers associated with table.
sql/sql_trigger.cc:
  Now triggers have database wide namespace. To support it we create special .TRN
  file with same name as trigger for each trigger. This file contains name of
  trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
  Moreover DROP TRIGGER treats first part of trigger identifier as database name
  now. Updated mysql_create_or_drop_trigger() routine and
  Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
  accordingly. Added add_table_for_trigger() routine and
  Table_triggers_list::drop_all_triggers() method.
  
  Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
sql/sql_trigger.h:
  Table_triggers_list:
    Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
    Added get_trigger_info() method for obtaining trigger's meta-data.
    Added drop_all_triggers() method which drops all triggers for table.
    Added declarations of trg_action_time_type_names/trg_event_type_names
    arrays which hold names of triggers action time types  and event types.
sql/sql_yacc.yy:
  Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
  namespace. Added new SHOW TRIGGERS statement.
sql/table.h:
  enum enum_schema_tables:
    Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
2005-07-19 20:06:49 +04:00
unknown
a2df1eb821 Fix for bug#11057 information_schema: columns table has some questionable contents
fixed BLOB, TEXT(wrong maximum length), BIT and integer types(wrong numeric_precision value)
2005-07-19 14:30:32 +05:00
unknown
11ff7b1654 Bug#11577 'show procedure/function status' doesn't work for user with limited access
changed 'SHOW PROCEDURE' behavoiur to be like INFORMATION_SCHEMA.routines
2005-07-19 13:49:43 +05:00
unknown
6efca84f29 Merge jwinstead@production.mysql.com:my/mysql-5.0-10844
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
2005-07-05 15:24:35 -07:00
unknown
306ebf7b1c Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling


myisam/mi_unique.c:
  Improved comments
myisam/myisampack.c:
  Updated version number
mysql-test/r/group_by.result:
  Added test that was lost during earlier merge
mysql-test/r/information_schema.result:
  Safety fix: Drop procedures before used
mysql-test/t/group_by.test:
  Added test that was lost during earlier merge
mysql-test/t/information_schema.test:
  Safety fix: Drop procedures before used
mysys/hash.c:
  Updated comment
sql/field.cc:
  false -> FALSE
sql/ha_ndbcluster.cc:
  Fix some style issues
  - No () around argument to 'case'
  - Space before ( in switch and if
  - Removed 'goto'
  - Added {}
  - Added () to make expressions easier to read
  - my_snprintf -> strmov
sql/handler.cc:
  if( -> if (
sql/item.cc:
  Indentation changes
sql/item.h:
  false -> FALSE
sql/item_cmpfunc.cc:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_cmpfunc.h:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_func.cc:
  Indentation fixes
  Fixed wrong goto label
sql/mysqld.cc:
  Remove test for opt_disable_networking as this flag can never be set here
sql/opt_range.cc:
  Simplify code
sql/sql_class.h:
  Move define out from middle of class definition
sql/sql_parse.cc:
  Remove extra empty lines
sql/sql_select.cc:
  use real_item() instead of (Item_ref*) item
  Modifed function comment to be align with others
  Simple optimization
sql/sql_union.cc:
  Portability fix:
  Don't use 'bool_variable|=...'
sql/sql_view.cc:
  Move List_iterator_fast out from loops (rewind is faster than creating a new itearator)
strings/ctype-utf8.c:
  if( -> if (
strings/ctype.c:
  Remove disabled code
strings/decimal.c:
  Indentation fixes
strings/xml.c:
  Indentation fixes
2005-07-04 03:42:33 +03:00
unknown
93f7607de0 Fix information_schema test on Windows. (Bug #10844)
mysql-test/mysql_test_run_new.c:
  Add --log-bin-trust-routine-creators
mysql-test/mysql-test-run.pl:
  Add --log-bin-trust-routine-creators
mysql-test/t/information_schema.test:
  Fix use of users to cope with lack of grant to %@localhost to test.*
mysql-test/r/information_schema.result:
  Update results
2005-06-18 03:02:27 +02:00
unknown
5574de167c Fix for bug#9434 SHOW CREATE DATABASE information_schema;
added ability to do SHOW CREATE DATABASE `information_schema`
2005-06-16 13:27:22 +05:00
unknown
8dd1be2d97 Fix for bug#11055: information_schema: routines.sql_data_access has wrong value 2005-06-16 12:12:47 +05:00
unknown
7a6c62a107 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Bugs/5.0.10964


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2005-06-07 11:31:07 +05:00
unknown
a88d3cc149 Fix for bug#10964: Information Schema:Authorization check on(2nd version, after review)
privilege tables is improper
    added privilege check for USER_PRIVILEGES, SCHEMA_PRIVILEGES,
    TABLE_PRIVILEGES, COLUMN_PRIVILEGES tables
2005-06-02 15:33:53 +05:00
unknown
906b210a4a Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge


client/mysql.cc:
  Code cleanups & simply optimizations
mysql-test/r/information_schema.result:
  Safety
mysql-test/t/information_schema.test:
  Safety
sql/ha_ndbcluster.cc:
  Code cleanups
sql/item.cc:
  Code cleanups
sql/item_subselect.cc:
  Code cleanups
sql/item_sum.cc:
  Code cleanups
sql/opt_range.cc:
  Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
  Simple optimization
  Fixed wrong key_part->key_length usage in index_merge
  Removed not used variable n_used_covered
  Indentation fixes & comment cleanups
sql/parse_file.cc:
  Code cleanups
sql/sql_base.cc:
  Code cleanups
sql/sql_bitmap.h:
  Added missing return
sql/sql_insert.cc:
  Ensure we get error if INSERT IGNORE ... SELECT fails
sql/sql_select.cc:
  Code cleanups
sql/sql_show.cc:
  Safety fix if a LOT of errors are ignored
sql/sql_update.cc:
  Code cleanups
sql/table.cc:
  Code cleanups
sql/table.h:
  Code cleanups
sql/uniques.cc:
  Code cleanups
strings/decimal.c:
  Simple optimization
  Code cleanups
2005-06-01 16:35:09 +03:00
unknown
910f990984 manual merge 2005-05-09 17:21:44 +00:00
unknown
37dc7c80a5 Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries
heap/hp_hash.c:
  Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries 
      use length in symbols instead of length in bytes
      to calculate record length and key length
2005-05-09 16:22:49 +00:00
unknown
6cc34bf222 Fix for bug#10261: INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
I_S table columns information is available for any user 


mysql-test/r/information_schema.result:
  Fix for bug#10261: INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
mysql-test/t/information_schema.test:
  Fix for bug#10261: INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
sql/sql_show.cc:
  Fix for bug#10261: INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
2005-05-07 15:14:34 +00:00
unknown
bd58e3e59c Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing
sql/sql_acl.cc:
  Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing
    -increase grant_version in acl_init, mysql_table_grant
    -table privileges should be taken into account when we calculate column
     grants
sql/sql_show.cc:
  Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing
       use 'base_name', 'file_name' because 'tables->db', 'tables->tables' could be invalid in
       case of view(derived tables).
2005-05-07 13:55:46 +00:00
unknown
cfefd88d37 information_schema.result, information_schema.test:
Added a test in connection with the fix for
  bug #6106.
view.result, view.test:
  Added test cases for bugs #6106/6107.
sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.


sql/sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.
sql/sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
mysql-test/t/view.test:
  Added test cases for bugs #6106/6107.
mysql-test/r/view.result:
  Added test cases for bugs #6106/6107.
mysql-test/t/information_schema.test:
  Added a test in connection with the fix for
  bug #6106.
mysql-test/r/information_schema.result:
  Added a test in connection with the fix for
  bug #6106.
2005-04-13 23:06:37 -07:00
unknown
82091c8467 Fix for bug#7214: information_schema: unauthorized user can see metadata
the fix for 'columns' table only
    Rights check for 'routines' table is already done
    (see WL2131 Access control for SHOW ... PROCEDURE|FUNCTION ...)
    rename 'testtets' database to 'mysqltest' to keep number of
      DBs which created by mysql-test as small as possible


mysql-test/r/information_schema.result:
  Fix for bug#7214: information_schema: unauthorized user can see metadata
mysql-test/t/information_schema.test:
  Fix for bug#7214: information_schema: unauthorized user can see metadata
sql/sql_show.cc:
  Fix for bug#7214: information_schema: unauthorized user can see metadata
2005-04-05 15:12:15 +05:00
unknown
4189e7c85f Cleanup tests and results after merge from 4.1 of embedded
server testing cleanups.


mysql-test/r/innodb.result:
  Update results
mysql-test/r/insert_select-binlog.result:
  Update results
mysql-test/r/mix_innodb_myisam_binlog.result:
  Update results
mysql-test/r/ps_1general.result:
  Update results
mysql-test/r/ps_grant.result:
  Update results
mysql-test/r/view.result:
  Update results
mysql-test/t/client_xml.test:
  Skip test with embedded server
mysql-test/t/flush_read_lock_kill.test:
  Skip test with embedded server
mysql-test/t/grant3.test:
  Skip test with embedded server
mysql-test/t/information_schema.test:
  Skip test with embedded server
mysql-test/t/innodb.test:
  Fix up filenames
mysql-test/t/multi_update.test:
  Skip test with embedded server
mysql-test/t/mysqlshow.test:
  Skip test with embedded server
mysql-test/t/ps_1general.test:
  Move grant-related tests to ps_grant, and fix cleanup of filename
mysql-test/t/ps_grant.test:
  Add additional tests
mysql-test/t/sp-security.test:
  Skip test with embedded server
mysql-test/t/user_limits.test:
  Skip test with embedded server
mysql-test/t/view.test:
  Split grant-related tests to new test file view_grant
2005-04-04 12:43:58 -07:00
unknown
77d568597f Fix for bug #9344 INFORMATION_SCHEMA, wrong content, numeric columns
The columns CHARACTER_MAXIMUM_LENGTH and CHARACTER_OCTET_LENGTH 
  of INFORMATION_SCHEMA.COLUMNS must be NULL for numeric columns


mysql-test/r/information_schema.result:
  Fix for bug #9344 INFORMATION_SCHEMA, wrong content, numeric columns
mysql-test/t/information_schema.test:
  Fix for bug #9344 INFORMATION_SCHEMA, wrong content, numeric columns
sql/sql_show.cc:
  Fix for bug #9344 INFORMATION_SCHEMA, wrong content, numeric columns
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-03-31 13:44:42 +05:00
unknown
a7f5977c3c Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
there was no check of result of 
  table->file->write_row() function. When count of rows was
  more than table max_rows(HEAP table) the following recodrs
  were not inserted to the table
  -'schema_table_store_record' function is added. 
    The function checks result of write_row function
    and convert HEAP table to MyISAM if necessary
  - Result check after write_row is added into all 
    I_S function which store the records to I_S tables  


mysql-test/r/information_schema.result:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
mysql-test/t/information_schema.test:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_select.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/sql_show.cc:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
sql/table.h:
  Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
2005-03-24 16:32:11 +03:00
unknown
6fcd1a40e2 Fix for bug #8790:Test 'information_schema': 'Max_data_length' shows 10 * (2 giga - 1) + 9 2005-03-15 20:54:44 +03:00
unknown
0d7e68c92a WL2131: Access control for SHOW ... PROCEDURE|FUNCTION ... 2005-03-05 14:35:32 +03:00
unknown
c7fdbffa0d Fix for bug #8164: subquery with INFORMATION_SCHEMA.COLUMNS, 100 % CPU 2005-03-03 19:20:16 +03:00
unknown
9e1ead5a4a Fix for bug #7217: information_schema: columns are varbinary() instead of timestamp &
bug #7215: information_schema: columns are longtext instead of varchar
2005-02-23 15:15:36 +03:00
unknown
b8adcb3bef Fix for bug #7476: crash on SELECT * FROM INFORMATION_SCHEMA.TABLES(after review) 2005-02-22 14:42:44 +03:00
unknown
53944e1c22 Fix for bug#7915: crash,JOIN VIEW, subquery, SELECT .. FROM INFORMATION_SCHEMA.COLUMNS 2005-02-16 13:00:03 +03:00
unknown
3f24932124 WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.


mysql-test/r/information_schema.result:
  Updated result for WL#2130.
mysql-test/r/lock.result:
  Updated result for WL#2130.
mysql-test/r/sp-error.result:
  Updated result for WL#2130.
mysql-test/r/sp.result:
  Updated result for WL#2130.
mysql-test/r/view.result:
  Updated result for WL#2130.
mysql-test/t/information_schema.test:
  Disabled one test case due to a bug involving LOCK TABLES,
  which shows up with WL#2130.
mysql-test/t/lock.test:
  New error message with WL#2130. This change is under debate and might change
  in the future, but will do for now.
mysql-test/t/sp-error.test:
  Updated for WL#2130. Some tests are voided when table access does work from
  functions.
mysql-test/t/sp.test:
  Updated for WL#2130.
mysql-test/t/view.test:
  Updated for WL#2130.
sql/item_func.cc:
  We now have to set net.no_send_ok for functions too, with WL#2130.
sql/share/errmsg.txt:
  Reused an error code since the old use was voided by WL#2130, but a new
  one was needed instead (similar, but more specific restriction).
sql/sp.cc:
  Fixed error handling and collection of used tables for WL#2130.
sql/sp.h:
  Fixed error handling and collection of used tables for WL#2130.
sql/sp_head.cc:
  Added support functions for collecting and merging hash tables and lists
  of used tables from SPs and substatements, for WL#2130.
sql/sp_head.h:
  Added support functions for collecting and merging hash tables and lists
  of used tables from SPs and substatements, for WL#2130.
sql/sql_base.cc:
  Changed the way table->query_id is tested and set during with locked tables
  in effect. This makes some SP test cases work with WL#2130, but has a side
  effect on some error cases with explicit LOCK TABLES. It's still debated if
  this is the correct way, so it might change.
sql/sql_class.h:
  Added flags for circumventing some interference between WL#2130 and mysql_make_view().
sql/sql_derived.cc:
  Added some missing initializations. (Potential bugs.)
sql/sql_lex.cc:
  Clear the new hash tables for WL#2130.
sql/sql_lex.h:
  Added hash tables for procedures and tables too (as for functions), for WL#2130.
sql/sql_parse.cc:
  WL#2130: Make table accesses from stored functions work by adding an implicit
  LOCK TABLES around (most) executed statements. To do this, we have to go through
  a loop where we collect all SPs and tables in mysql_execute_statement.
sql/sql_prepare.cc:
  Cache both functions and procedures for WL#2130.
sql/sql_show.cc:
  Added some missing initializations. (Potential bugs.)
sql/sql_view.cc:
  Shortcut mysql_make_view() if thd->shortcut_make_view is true during
  the pre-open phase for collecting tables in WL#2130. Otherwise, the
  similar mechanism here causes interference.
sql/sql_yacc.yy:
  For WL#2130, added caching of procedures and disallowed LOCK/UNLOCK TABLES in SPs.
2005-02-08 20:52:50 +01:00
unknown
373d911d25 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-01-27 20:01:37 +03:00
unknown
79414bb3d0 A fix: information_schema test fails on Mac OSX 2005-01-27 13:16:51 +03:00
unknown
e9db02074f Additional fix for WL#1629: SHOW with WHERE(discussed with PeterG)
- Do not allow a column list as part of SHOW WITH WHERE task.
 - The WHERE clause must accept field names which are
   valid in SHOW, not INFORMATION_SCHEMA names.


mysql-test/r/information_schema.result:
  The test correction
mysql-test/t/information_schema.test:
  The test correction
sql/sql_base.cc:
  Process field translation table for 'show' commands
sql/sql_parse.cc:
  schema_table_seformed is always true for 'show' commands
sql/sql_show.cc:
  - Do not allow a column list as part of SHOW WITH WHERE task.
  - The WHERE clause must accept field names which are
    valid in SHOW, not INFORMATION_SCHEMA names.
sql/sql_yacc.yy:
  Do not allow a column list as part of SHOW WITH WHERE task
sql/table.h:
  A new 'schema_table_reformed' variable in table_list
  If schema_table_reformed is true select items should be 
  translated using field translation table
2005-01-24 18:44:54 +03:00
unknown
0e2a6843ce Fix for bug #7981: SHOW GLOBAL STATUS crashes server 2005-01-18 17:37:45 +03:00
unknown
525242d37f wl#1629 SHOW with WHERE(final part, after review)
added syntax:
  'show variables where', 'show status where', 'show open tables where'


mysql-test/r/grant_cache.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/information_schema.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/query_cache.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/temp_table.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/r/union.result:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/t/information_schema.test:
  wl#1629 SHOW with WHERE(final part,after review)
mysql-test/t/query_cache.test:
  wl#1629 SHOW with WHERE(final part,after review)
sql/item.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/mysql_priv.h:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_parse.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_select.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_show.cc:
  wl#1629 SHOW with WHERE(final part,after review)
sql/sql_yacc.yy:
  wl#1629 SHOW with WHERE(final part,after review)
sql/table.h:
  wl#1629 SHOW with WHERE(final part,after review)
2004-12-30 15:20:40 +03:00
unknown
2c92b3f880 Fix for bug: #7218: information_schema: errors in "tables" 2004-12-24 12:16:47 +03:00
unknown
1fabc5de0a Bug#7219 information_schema: errors in "columns"
changed field names in 'collations' table(discussed with PGulutzan)


mysql-test/r/information_schema.result:
  result fix
mysql-test/t/information_schema.test:
  test for bug2719
2004-12-23 13:35:34 +03:00
unknown
e3f1d56252 Fix for bug #7213: information_schema: redundant non-standard TABLE_NAMES table 2004-12-18 13:49:13 +03:00
unknown
fb8758d654 Fix for bug #7210: information_schema: can't access when table-name = reserved word 2004-12-18 12:48:01 +03:00
unknown
0e7f1ae3a0 Fix for bug#7211: information_schema: crash if bad view(after review) 2004-12-16 17:44:36 +03:00
unknown
05bbcee9e6 Fix for bug#7212: information_schema: "Can't find file" errors if storage engine gone(after review) 2004-12-16 16:31:36 +03:00
unknown
b603cbc3ba Fix bug#7222 information_schema: errors in "routines" 2004-12-14 14:55:28 +03:00