An error occurred fetching the project authors.
  1. 09 Aug, 2007 1 commit
    • unknown's avatar
      Bug#30310 wrong result on SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE .. · 4144c032
      unknown authored
      1. added check to fill_schema_schemata() func.
         if we have db lookup value we should check that db exists
      2. added check to get_all_tables() func
         if we have lookup db name or tables name values we shoud check that
         these values are not empty strings
      3. fixed typo
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      4144c032
  2. 02 Aug, 2007 1 commit
    • unknown's avatar
      WL#3732 Information schema optimization · 82d28fad
      unknown authored
      client/mysqldump.c:
        table type compare is changed to case insensitive
      mysql-test/r/information_schema.result:
        test result
      mysql-test/r/information_schema_db.result:
        result fix
      mysql-test/suite/ndb/r/ndb_alter_table.result:
        result fix
      mysql-test/suite/ndb/r/ndb_temporary.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      sql/ha_ndbcluster.cc:
        char* variables are changed to LEX_STRING
      sql/ha_ndbcluster.h:
        char* variables are changed to LEX_STRING
      sql/ha_ndbcluster_binlog.cc:
        char* variables are changed to LEX_STRING
      sql/handler.cc:
        char* variables are changed to LEX_STRING
      sql/handler.h:
        char* variables are changed to LEX_STRING
      sql/sql_base.cc:
        Modified functions which are used during open table process
        according to table opening method and requested_object.
      sql/sql_select.cc:
        Add support for I_S tables into select_describe() function
      sql/sql_show.cc:
        1. Added initialization of 'open_method' to 'st_field_info' structs.
        2. Added initialization of 'i_s_requested_object' to 'ST_SCHEMA_TABLE' structs.
        3. New function which calculates database name and table name values 
           from 'where' condition if it's possible
           void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *table,
                                        LOOKUP_FIELD_VALUES *lookup_field_vals);
        4. New function which set table open method
           setup_table_open_method(TABLE_LIST *tables,
                                   ST_SCHEMA_TABLE *schema_table,
                                   enum enum_schema_tables schema_table_idx)
        5. New function
           int make_db_list(THD *thd, List<LEX_STRING> *files,
                            LOOKUP_FIELD_VALUES *lookup_field_vals,
                            bool *with_i_schema)
        6. New function
           int make_table_name_list(THD *thd, List<LEX_STRING> *files, LEX *lex,
                                    LOOKUP_FIELD_VALUES *lookup_field_vals,
                                    bool with_i_schema, LEX_STRING *db_name)
        7. Modified 'get_all_tables' function according to new schema(see wl#3732).
      sql/sql_show.h:
        char* variables are changed to LEX_STRING
      sql/table.cc:
        Modified functions which are used during open table process
        according to table opening method and requested_object.
      sql/table.h:
        1. added new constants(open_method)
        #define SKIP_OPEN_TABLE 0
        #define OPEN_FRM_ONLY   1
        #define OPEN_FULL_TABLE 2
            
        2. Added new field 'open_method' into struct st_field_info;
           uint open_method;
            
        3. Added new field into ST_SCHEMA_TABLE struct
           uint i_s_requested_object;  /* the object we need to open(TABLE | VIEW) */.
        4. Added new field to TABLE_LIST struct.
           uint i_s_requested_object;
           This field is set from ST_SCHEMA_TABLE.i_s_requested_object
           for processed table before opening.
            
        5. Added new fields to TABLE_LIST struct, used for 'explain select' for I_S table
           bool has_db_lookup_value;
           bool has_table_lookup_value;
           uint table_open_method;
      sql/unireg.h:
        added new constants
      82d28fad
  3. 11 Jul, 2007 1 commit
    • unknown's avatar
      A fix and a test case for Bug#25859 ALTER DATABASE works w/o parameters. · 0bc3e69f
      unknown authored
      Fix the parser to make the database options not optional.
      
      
      mysql-test/r/information_schema.result:
        Update results (Bug#25859)
      mysql-test/t/information_schema.test:
        Add a test case for Bug#25859 "ALTER DATABASE works w/o parameters"
      sql/sql_yacc.yy:
        Fix Bug#25859 ALTER DATABASE works w/o parameters - require
        parameters in the parser.
      0bc3e69f
  4. 28 Jun, 2007 1 commit
    • unknown's avatar
      Patch for the following bugs: · 405f82d3
      unknown authored
        - BUG#11986: Stored routines and triggers can fail if the code
          has a non-ascii symbol
        - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
        - BUG#19443: INFORMATION_SCHEMA does not support charsets properly
        - BUG#21249: Character set of SP-var can be ignored
        - BUG#25212: Character set of string constant is ignored (stored routines)
        - BUG#25221: Character set of string constant is ignored (triggers)
      
      There were a few general problems that caused these bugs:
      1. Character set information of the original (definition) query for views,
         triggers, stored routines and events was lost.
      2. mysqldump output query in client character set, which can be
         inappropriate to encode definition-query.
      3. INFORMATION_SCHEMA used strings with mixed encodings to display object
         definition;
      
      1. No query-definition-character set.
      
      In order to compile query into execution code, some extra data (such as
      environment variables or the database character set) is used. The problem
      here was that this context was not preserved. So, on the next load it can
      differ from the original one, thus the result will be different.
      
      The context contains the following data:
        - client character set;
        - connection collation (character set and collation);
        - collation of the owner database;
      
      The fix is to store this context and use it each time we parse (compile)
      and execute the object (stored routine, trigger, ...).
      
      2. Wrong mysqldump-output.
      
      The original query can contain several encodings (by means of character set
      introducers). The problem here was that we tried to convert original query
      to the mysqldump-client character set.
      
      Moreover, we stored queries in different character sets for different
      objects (views, for one, used UTF8, triggers used original character set).
      
      The solution is
        - to store definition queries in the original character set;
        - to change SHOW CREATE statement to output definition query in the
          binary character set (i.e. without any conversion);
        - introduce SHOW CREATE TRIGGER statement;
        - to dump special statements to switch the context to the original one
          before dumping and restore it afterwards.
      
      Note, in order to preserve the database collation at the creation time,
      additional ALTER DATABASE might be used (to temporary switch the database
      collation back to the original value). In this case, ALTER DATABASE
      privilege will be required. This is a backward-incompatible change.
      
      3. INFORMATION_SCHEMA showed non-UTF8 strings
      
      The fix is to generate UTF8-query during the parsing, store it in the object
      and show it in the INFORMATION_SCHEMA.
      
      Basically, the idea is to create a copy of the original query convert it to
      UTF8. Character set introducers are removed and all text literals are
      converted to UTF8.
      
      This UTF8 query is intended to provide user-readable output. It must not be
      used to recreate the object.  Specialized SHOW CREATE statements should be
      used for this.
      
      The reason for this limitation is the following: the original query can
      contain symbols from several character sets (by means of character set
      introducers).
      
      Example:
      
        - original query:
          CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;
      
        - UTF8 query (for INFORMATION_SCHEMA):
          CREATE VIEW v1 AS SELECT 'Hello' AS c1;
      
      
      client/mysqldump.c:
        Set original character set and collation before dumping definition query.
      include/my_sys.h:
        Move out-parameter to the end of list.
      mysql-test/lib/mtr_report.pl:
        Ignore server-warnings during the test case.
      mysql-test/r/create.result:
        Update result file.
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Update result file.
      mysql-test/r/events.result:
        Update result file.
      mysql-test/r/events_bugs.result:
        Update result file.
      mysql-test/r/events_grant.result:
        Update result file.
      mysql-test/r/func_in.result:
        Update result file.
      mysql-test/r/gis.result:
        Update result file.
      mysql-test/r/grant.result:
        Update result file.
      mysql-test/r/information_schema.result:
        Update result file.
      mysql-test/r/information_schema_db.result:
        Update result file.
      mysql-test/r/lowercase_view.result:
        Update result file.
      mysql-test/r/mysqldump.result:
        Update result file.
      mysql-test/r/ndb_sp.result:
        Update result file.
      mysql-test/r/ps.result:
        Update result file.
      mysql-test/r/rpl_replicate_do.result:
        Update result file.
      mysql-test/r/rpl_sp.result:
        Update result file.
      mysql-test/r/rpl_trigger.result:
        Update result file.
      mysql-test/r/rpl_view.result:
        Update result file.
      mysql-test/r/show_check.result:
        Update result file.
      mysql-test/r/skip_grants.result:
        Update result file.
      mysql-test/r/sp-destruct.result:
        Update result file.
      mysql-test/r/sp-error.result:
        Update result file.
      mysql-test/r/sp-security.result:
        Update result file.
      mysql-test/r/sp.result:
        Update result file.
      mysql-test/r/sql_mode.result:
        Update result file.
      mysql-test/r/system_mysql_db.result:
        Update result file.
      mysql-test/r/temp_table.result:
        Update result file.
      mysql-test/r/trigger-compat.result:
        Update result file.
      mysql-test/r/trigger-grant.result:
        Update result file.
      mysql-test/r/trigger.result:
        Update result file.
      mysql-test/r/view.result:
        Update result file.
      mysql-test/r/view_grant.result:
        Update result file.
      mysql-test/t/events.test:
        Update test case (new columns added).
      mysql-test/t/information_schema.test:
        Update test case (new columns added).
      mysql-test/t/show_check.test:
        Test case for SHOW CREATE TRIGGER in prepared statements and
        stored routines.
      mysql-test/t/sp-destruct.test:
        Update test case (new columns added).
      mysql-test/t/sp.test:
        Update test case (new columns added).
      mysql-test/t/view.test:
        Update test.
      mysys/charset.c:
        Move out-parameter to the end of list.
      scripts/mysql_system_tables.sql:
        Add new columns to mysql.proc and mysql.event.
      scripts/mysql_system_tables_fix.sql:
        Add new columns to mysql.proc and mysql.event.
      sql/event_data_objects.cc:
        Support new attributes for events.
      sql/event_data_objects.h:
        Support new attributes for events.
      sql/event_db_repository.cc:
        Support new attributes for events.
      sql/event_db_repository.h:
        Support new attributes for events.
      sql/events.cc:
        Add new columns to SHOW CREATE event resultset.
      sql/mysql_priv.h:
        1. Introduce Object_creation_ctx;
        2. Introduce SHOW CREATE TRIGGER;
        3. Introduce auxilary functions.
      sql/sp.cc:
        Add support for new store routines attributes.
      sql/sp_head.cc:
        Add support for new store routines attributes.
      sql/sp_head.h:
        Add support for new store routines attributes.
      sql/sql_lex.cc:
        Generate UTF8-body on parsing/lexing.
      sql/sql_lex.h:
        1. Generate UTF8-body on parsing/lexing.
        2. Introduce SHOW CREATE TRIGGER.
      sql/sql_parse.cc:
        Introduce SHOW CREATE TRIGGER.
      sql/sql_partition.cc:
        Update parse_sql().
      sql/sql_prepare.cc:
        Update parse_sql().
      sql/sql_show.cc:
        Support new attributes for views
      sql/sql_trigger.cc:
        Support new attributes for views
      sql/sql_trigger.h:
        Support new attributes for views
      sql/sql_view.cc:
        Support new attributes for views
      sql/sql_yacc.yy:
        1. Add SHOW CREATE TRIGGER statement.
        2. Generate UTF8-body for views, stored routines, triggers and events.
      sql/table.cc:
        Introduce Object_creation_ctx.
      sql/table.h:
        Introduce Object_creation_ctx.
      sql/share/errmsg.txt:
        Add new errors.
      mysql-test/include/ddl_i18n.check_events.inc:
        Aux file for test suite.
      mysql-test/include/ddl_i18n.check_sp.inc:
        Aux file for test suite.
      mysql-test/include/ddl_i18n.check_triggers.inc:
        Aux file for test suite.
      mysql-test/include/ddl_i18n.check_views.inc:
        Aux file for test suite.
      mysql-test/include/have_cp1251.inc:
        Aux file for test suite.
      mysql-test/include/have_cp866.inc:
        Aux file for test suite.
      mysql-test/include/have_koi8r.inc:
        Aux file for test suite.
      mysql-test/include/have_utf8.inc:
        Aux file for test suite.
      mysql-test/r/ddl_i18n_koi8r.result:
        Result file.
      mysql-test/r/ddl_i18n_utf8.result:
        Result file.
      mysql-test/r/have_cp1251.require:
        Aux file for test suite.
      mysql-test/r/have_cp866.require:
        Aux file for test suite.
      mysql-test/r/have_koi8r.require:
        Aux file for test suite.
      mysql-test/r/have_utf8.require:
        Aux file for test suite.
      mysql-test/t/ddl_i18n_koi8r.test:
        Complete koi8r test case for the CS patch.
      mysql-test/t/ddl_i18n_utf8.test:
        Complete utf8 test case for the CS patch.
      405f82d3
  5. 09 Jun, 2007 1 commit
    • unknown's avatar
      Bug#28266 IS_UPDATABLE field on VIEWS table in I_S database is wrong · ce4e9f75
      unknown authored
      IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
      the algorithm is not 'temporary'.
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/r/view.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      mysql-test/t/view.test:
        test case
      sql/sql_show.cc:
        IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
        the algorithm is not 'temporary'.
      ce4e9f75
  6. 05 Apr, 2007 1 commit
    • unknown's avatar
      3d attempt to fix information_schema.test failure on HP-UX. · dd0c20ac
      unknown authored
      Apparently it's the only platform in pushbuild where we 
      compile without openssl.
      
      
      mysql-test/r/information_schema.result:
        Update results.
      mysql-test/r/openssl_1.result:
        Update results.
      mysql-test/t/information_schema.test:
        Move the part of the test case that needs SSL support to 
        openssl_1.test
      mysql-test/t/openssl_1.test:
        Add a test case that needs SSL support.
      dd0c20ac
  7. 04 Apr, 2007 1 commit
    • unknown's avatar
      Fix a failure of this test case on HP-UX. · a0c4e184
      unknown authored
      mysql-test/r/information_schema.result:
        Fix a race in the test case (second attempt).
      mysql-test/t/information_schema.test:
        Fix a race in the test case (second attempt).
      a0c4e184
  8. 03 Apr, 2007 1 commit
  9. 02 Apr, 2007 1 commit
    • unknown's avatar
      Bug#26174 Server Crash:INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event · 05e3c7e0
      unknown authored
      - Some variables in I_S.GLOBAL_STATUS were depending on a network
        connection in order to evaluate. Since no network connection is 
        present during the execution of an event, this caused the server
        to crash.
      - The variable function hooks does now verify that the vio-
        object is valid before attempting to use it.
      
      
      mysql-test/r/information_schema.result:
        Added test case.
      mysql-test/t/information_schema.test:
        Added test case.
      05e3c7e0
  10. 12 Feb, 2007 1 commit
    • unknown's avatar
      Bug#24630 Subselect query crashes mysqld · 2572c826
      unknown authored
      The crash happens because second filling of the same I_S table happens in
      case of subselect with order by. table->sort.io_cache previously allocated
      in create_sort_index() is deleted during second filling
      (function get_schema_tables_result). There are two places where
      I_S table can be filled: JOIN::exec and create_sort_index().
      To fix the bug we should check if the table was already filled
      in one of these places and skip processing of the table in second.
      
      
      mysql-test/r/information_schema.result:
        test case
      mysql-test/t/information_schema.test:
        test case
      sql/mysql_priv.h:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_select.cc:
        added new parameter 'executed_place' to function get_schema_tables_result()
      sql/sql_show.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.cc:
        added more accurate check for cases when we need to refresh I_S table
      sql/table.h:
        added more accurate check for cases when we need to refresh I_S table
      2572c826
  11. 01 Feb, 2007 1 commit
    • unknown's avatar
      Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail · a3083046
      unknown authored
      additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
      a3083046
  12. 01 Dec, 2006 2 commits
    • unknown's avatar
      Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to... · 85b58cb4
      unknown authored
      Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema
      
      
      
      85b58cb4
    • unknown's avatar
      Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS" · 2f0b1d65
      unknown authored
      - Refactoring of duplicate code
      - Modified bad test cases
      - Changed expected error when operating on information_schema.
      
      
      mysql-test/r/information_schema.result:
        - updated result file with new error code.
      mysql-test/r/rpl_sp.result:
        - Modified test case
      mysql-test/t/information_schema.test:
        - Changed error code for operations on information_schema
      mysql-test/t/rpl_sp.test:
        - Modified test case
      sql/sql_parse.cc:
        - Cleaned up code:
          * replace tab with space
          * simplified if/switch statements
          * refactored duplicated code
      2f0b1d65
  13. 21 Nov, 2006 2 commits
    • unknown's avatar
      Added --debug-info to most clients to detect memory leaks in mysql-test-run · 85a590a2
      unknown authored
      Moved .progress files into the log directory
      Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
      Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
      Fixed some compiler warnings
      Fixed small memory leak in libmysql
      Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
      
      
      client/client_priv.h:
        Added OPT_DEBUG_INFO and OPT_COLUMN_TYPES
      client/mysql.cc:
        Split --debug-info into --debug-info and --column-type-info
      client/mysql_upgrade.c:
        Give only error info at end if using --debug-info
      client/mysqladmin.cc:
        Added --debug-info to detect memory leaks in mysqltest
      client/mysqlbinlog.cc:
        Added --debug-info to detect memory leaks in mysqltest
      client/mysqlcheck.c:
        Added --debug-info to detect memory leaks in mysqltest
      client/mysqlimport.c:
        Added --debug-info to detect memory leaks in mysqltest
      client/mysqlshow.c:
        Added --debug-info to detect memory leaks in mysqltest
      client/mysqltest.c:
        Added --debug-info to detect memory leaks in mysqltest
        Added option --logdir to force .progress files in a specific directory
      libmysql/libmysql.c:
        Fixed memory leak
      mysql-test/include/ndb_setup_slave.inc:
        Moved cluster tables under 'mysql'
      mysql-test/include/query_cache.inc:
        Added more tests for query cache
      mysql-test/lib/init_db.sql:
        Move cluster.binlog_index -> mysql.binlog_index
      mysql-test/lib/mtr_report.pl:
        Find memory leaks
      mysql-test/mysql-test-run-shell.sh:
        Added --debug-info to programs to detect memory leaks
      mysql-test/mysql-test-run.pl:
        Added --debug-info to programs to detect memory leaks
        Force log files to var/log
        cluster tables moved under 'mysql'
      mysql-test/r/cache_innodb.result:
        New query cache test with innodb
      mysql-test/r/connect.result:
        binlog_index is now in mysql
      mysql-test/r/drop.result:
        Removed 'cluster' database
      mysql-test/r/information_schema.result:
        Removed 'cluster' database
      mysql-test/r/mysqlcheck.result:
        cluster.binlog_index -> mysql.binlog_index
      mysql-test/r/ndb_binlog_basic.result:
        cluster.binlog_index -> mysql.binlog_index
      mysql-test/r/ndb_binlog_ddl_multi.result:
        cluster -> mysql
      mysql-test/r/ndb_binlog_discover.result:
        cluster -> mysql
      mysql-test/r/ndb_binlog_multi.result:
        cluster -> mysql
      mysql-test/r/ndb_restore_compat.result:
        cluster -> mysql
      mysql-test/r/ps_1general.result:
        Removed cluster database
      mysql-test/r/rpl_create_database.result:
        Removed cluster database
      mysql-test/r/rpl_load_from_master.result:
        Removed cluster database
      mysql-test/r/rpl_loaddata_m.result:
        Removed cluster database
      mysql-test/r/rpl_ndb_bank.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_dd_advance.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_dd_basic.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_idempotent.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_log.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_multi.result:
        cluster -> mysql
      mysql-test/r/rpl_ndb_sync.result:
        cluster -> mysql
      mysql-test/r/rpl_row_basic_11bugs.result:
        Removed cluster database
      mysql-test/r/rpl_truncate_7ndb.result:
        Position have changed
      mysql-test/r/rpl_truncate_7ndb_2.result:
        cluster -> mysql
      mysql-test/r/schema.result:
        Removed cluster database
      mysql-test/r/show_check.result:
        Removed cluster database
      mysql-test/r/system_mysql_db.result:
        binlog_index moved under mysql
      mysql-test/r/upgrade.result:
        More tests
      mysql-test/t/information_schema.test:
        cluster -> mysql
      mysql-test/t/mysqldump.test:
        More test to detect memory leaks
      mysql-test/t/ndb_binlog_basic.test:
        cluster -> mysql
      mysql-test/t/ndb_binlog_multi.test:
        cluster -> mysql
      mysql-test/t/ndb_restore_compat.test:
        cluster -> mysql
      mysql-test/t/rpl_ndb_bank.test:
        cluster -> mysql
      mysql-test/t/rpl_ndb_dd_advance.test:
        cluster -> mysql
      mysql-test/t/rpl_ndb_idempotent.test:
        cluster -> mysql
      mysql-test/t/rpl_ndb_multi.test:
        cluster -> mysql
      mysql-test/t/rpl_ndb_sync.test:
        cluster -> mysql
      mysql-test/t/system_mysql_db_fix.test:
        Drop also binlog_index
      mysql-test/t/upgrade.test:
        Check that tables created with 3.23 works
      mysys/my_error.c:
        Remove all registered errors (to avoid memory leaks)
      mysys/my_init.c:
        call my_error_unregister_all() to avoid some possible memory leaks
      mysys/mysys_priv.h:
        Added prototype
      scripts/mysql_create_system_tables.sh:
        cluster -> mysql
      scripts/mysql_fix_privilege_tables.sql:
        Changed -- to #
        Create binlog_index table if it dosesn't exist
      sql/field.cc:
        Made offset() inline
      sql/field.h:
        Changed prototype of offset() to not make it depending on TABLE structure
      sql/field_conv.cc:
        Removed some usage of current_thd
      sql/ha_ndbcluster_tables.h:
        cluster -> mysql
      sql/item_sum.cc:
        Usage of new 'offset' parameters
      sql/key.cc:
        Changed 'find_ref_key' to not be dependent on field->table
        (This fixed a crash when using a table created in MySQL 3.23)
      sql/mysql_priv.h:
        Changed find_ref_key() to not use field->table
      sql/mysqld.cc:
        Fix that plugin_init() works properly on bootstrap
        (Previously we got warnings from plugin_init)
      sql/sql_class.cc:
        new 'field->offset()'
      sql/sql_select.cc:
        New field->offset()
      sql/table.cc:
        We don't need field->table to be set in find_ref_key() or find_field() anymore.
      storage/archive/ha_archive.cc:
        New field->offset()
      storage/federated/ha_federated.cc:
        New field->offset()
      storage/innobase/handler/ha_innodb.cc:
        Fixed compiler warnings
      storage/myisam/ha_myisam.cc:
        Fixed compiler warnings (Wrong paramter to sprintf())
        New field->offset()
      storage/myisam/ha_myisam.h:
        Fixed wrong type of table_flags
      storage/ndb/tools/restore/Restore.cpp:
        Fixed compiler warning
      mysql-test/r/1st.result:
        New BitKeeper file ``mysql-test/r/1st.result''
      mysql-test/std_data/old_table-323.frm:
        New BitKeeper file ``mysql-test/std_data/old_table-323.frm''
      mysql-test/t/1st.test:
        New BitKeeper file ``mysql-test/t/1st.test''
      85a590a2
    • unknown's avatar
      Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash · 1ae9f3b9
      unknown authored
      disable filling of I_S tables for EXPLAIN
      
      
      mysql-test/r/information_schema.result:
        Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
        test case
      mysql-test/t/information_schema.test:
        Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
        test case
      1ae9f3b9
  14. 23 Oct, 2006 1 commit
    • unknown's avatar
      Fix for bug#23037 Bug in field "Default" of query "SHOW COLUMNS FROM table" · 29947efc
      unknown authored
        
      To the documentor: The DEFAULT value in SHOW COLUMNS/SELECT FROM I_S.COLUMNS
      was truncated to NAME_LEN (which effectively is 64) characters.
      
      
      mysql-test/r/information_schema.result:
        Update result
        
        Because the length of I_S.COLUMNS.COLUMN_DEFAULT was increased to
        65535 the column changed it's type from varchar(64) to longtext
        The type is longtext if the length is > 65532 (the max varchar len)
      mysql-test/t/information_schema.test:
        test case for bug#23037: Bug in field "Default" of
        query "SHOW COLUMNS FROM table"
        
        Both SHOW COLUMNS and I_S.COLUMNS is TESTED as well the
        value returned by both. Using --replace_regex is unfeasible
        as the repetition value cannot be > 255.
        --replace_regex /A{256}/VALUE/ doesn't work, not to talk about
          /A{65532}/VALUE/
        /(A{255}){255}/VALUE/ is awfully slow. Thus, simple function with
        cursor is used to extract the value.
      sql/sql_show.cc:
        Default value can have TIMESTAMP, CHAR, VARCHAR, ENUM
        VARCHAR can have the longest value, up to 65535. However, because
        of table handler limitations the actual limit is 65532 characters,
        latin1 charset. However, here is used MAX_FIELD_VARCHARLENGTH macro,
        because there could be a storage engine without such limitation.
      29947efc
  15. 15 Aug, 2006 1 commit
    • unknown's avatar
      BUG#21648 information_schema test fails --with-ndbcluster · 3106a0a5
      unknown authored
      make test work both with and without ndbcluster
      
      
      mysql-test/r/information_schema.result:
        fix test so that it passes --with-ndbcluster
        
        add conditions to ignore the table_schema='cluster' on some queries as different
        tables are in the cluster database if ndb is running or not.
      mysql-test/t/information_schema.test:
        ignore the 'cluster' database as results differ if --with-ndbcluster or without
        
        explictly use schema 'test' for bug7476 check.
      3106a0a5
  16. 25 Jul, 2006 1 commit
    • unknown's avatar
      Fixed bug #21231: wrong results for a simple query with a · d64f605e
      unknown authored
      a non-correlated single-row subquery over information schema.
      
      The function get_all_tables filling all information schema
      tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
      this the function could evaluate partial conditions related to
      some columns. If these conditions contained a subquery over
      information schema it led to a wrong evaluation and a wrong 
      result set.
      This bug was already fixed in 5.1.
      This patch follows the way how it was done in 5.1 where
      the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
      in get_all_tables only for the calls of the function 
      open_normal_and_derived_tables and is restored after these
      calls.
      
      
      mysql-test/r/information_schema.result:
        Added a test case for bug #21231.
      mysql-test/t/information_schema.test:
        Added a test case for bug #21231.
      d64f605e
  17. 22 Jul, 2006 1 commit
    • unknown's avatar
      Fixed bug #18925: wrong results for queries with · 43df9fd3
      unknown authored
      subqueries on information schema that use MIN/MAX aggregation.
      
      Execution of some correlated subqueries may set the value
      of null_row to 1 for tables used in the subquery.
      If the the subquery is on information schema it causes
      rejection of any row for the following executions of
      the subquery in the case when an optimization filtering
      by some condition is applied.
      
      The fix restores the value of the null_row flag for 
      each execution of a subquery on information schema.
      
      
      mysql-test/r/information_schema.result:
        Added a test case for bug #18925.
      mysql-test/t/information_schema.test:
        Added a test case for bug #18925.
      sql/sql_show.cc:
        Fixed bug #18925.
        Execution of some correlated subqueries may set the value
        of null_row to 1 for tables used in the subquery.
        If the the subquery is on information schema it causes
        rejection of any row for the following execitions of
        the subquery in the case when an optimization filtering
        by some condition is applied.
        
        The fix restores the value of the null_row flag for 
        each execution of a subquery on information schema.
      43df9fd3
  18. 29 Jun, 2006 1 commit
    • unknown's avatar
      Bug#20230: routine_definition is not null · 8368f437
      unknown authored
      SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION are fixed as well as
      INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME.
      
      
      mysql-test/r/information_schema.result:
        Add result for bug#20230.
      mysql-test/t/information_schema.test:
        Add test case for bug#20230.
      sql/sp_head.cc:
        Return NULL for routine definition if the user doesn't have enough
        privilege to see it.
      sql/sql_show.cc:
        Make INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME NULL-able.  Return
        NULL if the user doesn't have enough privilege to see routine
        definition.
      8368f437
  19. 20 Jun, 2006 1 commit
    • unknown's avatar
      SHOW STATUS does not anymore change local status variables (except... · f3a56a17
      unknown authored
      SHOW STATUS does not anymore change local status variables (except com_show_status). Global status variables are still updated.
      SHOW STATUS are not anymore put in slow query log because of no index usage.
      
      Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command()
      This simplifies code and allows us to remove some if statements all over the code.
      
      Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands.
      This allowed some overall simplifaction when testing sql_command.
      
      Fixes bugs:
      Bug#10210: running SHOW STATUS increments counters it shouldn't
      Bug#19764: SHOW commands end up in the slow log as table scans
      
      
      mysql-test/r/grant_cache.result:
        Fixed results after SHOW STATUS doesn't anymore affect status variables
      mysql-test/r/information_schema.result:
        Added extra test to cover more code
      mysql-test/r/query_cache.result:
        Remove resuts from previous tests
      mysql-test/r/status.result:
        Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
        (Bug#10210)
      mysql-test/r/temp_table.result:
        Fixed results after SHOW STATUS doesn't anymore affect status variables
      mysql-test/r/union.result:
        Fixed results after SHOW STATUS is not logged to slow query log
        (Bug#19764)
      mysql-test/t/events_microsec.test:
        Disable warnings at init
      mysql-test/t/information_schema.test:
        Added extra test to cover more code
      mysql-test/t/query_cache.test:
        Remove resuts from previous tests
      mysql-test/t/status.test:
        Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
        (Bug #10210)
      sql/mysql_priv.h:
        Added 'sql_command_flags'
      sql/sql_class.cc:
        New function add_diff_to_status(), used to update global status variables when using SHOW STATUS
      sql/sql_class.h:
        New function 'fill_information_schema_tables()'
        (One could not anymore use fill_derived_tables() for this as only_view_structures() is not relevant for information schema tables)
        Added defines for bit flags in sql_command_flags[]
      sql/sql_lex.cc:
        Remove orig_sql_command
      sql/sql_lex.h:
        Remove orig_sql_command
      sql/sql_parse.cc:
        Rename uc_update_queries -> sql_command_flags.
        Enhanced 'sql_command_flags' to better classify SQL commands
        uc_update_queries[] != 0 is changed to (sql_command_flags[] & CF_CHANGES_DATA)
        lex->orig_sql_command == SQLCOM_END is changed to (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0)
        
        Simplify incrementing of thd->status_var.com_stat[] as we don't have to do special handling for SHOW commands.
        
        Split SQLCOM_SELECT handling in mysql_execute_command() to a separate function.
        Added special handling of SHOW STATUS commands in mysql_execute_command() and call common SQLCOM_SELECT handling.
        These changes allows us to easily fix that we save and restore status variables during execution of a SHOW STATUS command.
        Don't log SHOW STATUS commands to slow query log.
        
        This fixes Bug#10210 and Bug#19764 without adding additional 'if' code.
        (The new code is faster than the original as we now have fewer if's than before)
      sql/sql_prepare.cc:
        Clean up prepare-check handling of SQLCOM commands by using sql_command_flags[]
        This simplifes code and ensures that code works even if someone forgets to put a new status commands into the switch statement.
      sql/sql_select.cc:
        Remove special handling of SHOW STATUS.
        (This is now done in SQLCOM_SHOW_STATUS part in mysql_execute_command())
      sql/sql_show.cc:
        Remove orig_sql_command
        Only change sql_command during 'open_normal_and_derived_tables()' (for views) and not for the full duration of generating data.
        Changed 'show status' to use thd->initial_status_var to ensure that the current statement is not affecting the to-be-used values.
        Use thd->fill_information_schema_tables() instead of 'thd->fill_derived_tables()' as the later wrongly checks the value of sql_command.
      sql/sql_yacc.yy:
        Remove usage of orig_sql_command.
        One side effect of this is that we need to test for cursors if the current command is a SELECT or a SHOW command.
      sql/structs.h:
        Updated comment
      f3a56a17
  20. 06 Jun, 2006 2 commits
  21. 23 May, 2006 2 commits
  22. 12 May, 2006 2 commits
    • unknown's avatar
      Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes · 9ffa09be
      unknown authored
      replaced get_field(MEM_ROOT *mem, Field *field) with 
      get_field(MEM_ROOT *mem, Field *field, String *res).
      It allows to avoid strlen().
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
        test case
      mysql-test/t/information_schema.test:
        Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
        test case
      9ffa09be
    • unknown's avatar
      Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH · af797c16
      unknown authored
      mysql-test/r/information_schema.result:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        test case
      mysql-test/r/join.result:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        result fix
      mysql-test/t/information_schema.test:
        Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
        test case
      af797c16
  23. 04 May, 2006 1 commit
    • unknown's avatar
      Bug#18474 Unlistable directories yield no info from information_schema, part2 · 0c7aa68d
      unknown authored
       - Move "chmod" part of information_schema test to separate file
      
      
      mysql-test/r/information_schema.result:
        Move "chmod" part of information_schema test to separate file
      mysql-test/t/information_schema.test:
        Move "chmod" part of information_schema test to separate file
      mysql-test/r/information_schema_chmod.result:
        Move "chmod" part of information_schema test to separate file
      mysql-test/t/information_schema_chmod.test:
        Move "chmod" part of information_schema test to separate file
      0c7aa68d
  24. 24 Apr, 2006 3 commits
    • unknown's avatar
      Revert use of octal numbers for chmod · fefc0452
      unknown authored
      fefc0452
    • unknown's avatar
      Test it it works better to set no read access for a file by using 000 instead of -r · 008da9b9
      unknown authored
      Looks like the trigger.test works that way
      
      
      mysql-test/t/information_schema.test:
        Test it it works better to set no read access for a file by using 000 instead of -r
      008da9b9
    • unknown's avatar
      Bug#17002 mysql-test-run as root user · 1d16bc69
      unknown authored
       - Add test to see if tests are running with root permissions
       - Disables tests that uses chmod if that is the case
      
      
      mysql-test/mysql-test-run.pl:
        Add test to check if mysql-test-run is run with root permission. 
        Set environment variable MYSQL_TEST_ROOT to 'YES' or 'NO'.
      mysql-test/t/information_schema.test:
        Disable test if running as root
      mysql-test/t/rpl_rotate_logs.test:
        Disable test if running as root.
      mysql-test/include/not_as_root.inc:
        New BitKeeper file ``mysql-test/include/not_as_root.inc''
      mysql-test/r/not_as_root.require:
        New BitKeeper file ``mysql-test/r/not_as_root.require''
      1d16bc69
  25. 07 Apr, 2006 1 commit
  26. 04 Apr, 2006 1 commit
    • unknown's avatar
      After merge fix for Bug#12076 --with-extra-charsets has no effect · ff3495c4
      unknown authored
      mysql-test/r/information_schema.result:
        IS_COMPILED is not determenistic
      mysql-test/t/information_schema.test:
        IS_COMPILED is not determenistic
      strings/conf_to_src.c:
        Adding dumping of extra 5.0 fields
      strings/ctype-extra.c:
        Recreating sources according to 5.0 XML files using conf_to_src.
      ff3495c4
  27. 20 Mar, 2006 1 commit
    • unknown's avatar
      Fix for bug#18224 VIEW on information_schema crashes the server · 53862e60
      unknown authored
        additional check for subselect
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#18224 VIEW on information_schema crashes the server
          test case
      mysql-test/t/information_schema.test:
        Fix for bug#18224 VIEW on information_schema crashes the server
          test case
      53862e60
  28. 16 Feb, 2006 1 commit
    • unknown's avatar
      The patch adds PROCESSLIST information schema · 99ea15c9
      unknown authored
      mysql-test/r/information_schema.result:
        Fixing results after PROCESSLIST information schema is added.
      mysql-test/r/information_schema_db.result:
        Fixing results after PROCESSLIST information schema is added.
      mysql-test/t/information_schema.test:
        Test case to check PROCESSLIST information schema.
          (Note that selecting other fields from PROCESSLIST
          can make the test unstable).
      sql/sql_show.cc:
        Code for PROCESSLIST information schema
      sql/table.h:
        Added for PROCESSLIST informarion schema
      99ea15c9
  29. 27 Jan, 2006 1 commit
    • unknown's avatar
      Use MYSQLTEST_VARDIR · f300c891
      unknown authored
      mysql-test/t/information_schema.test:
        Use MYSQLTEST_VARDIR instead of MYSQL_TEST_DIR/var
      f300c891
  30. 24 Jan, 2006 2 commits
    • unknown's avatar
      Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver) · 333b1f85
      unknown authored
        Fill schema tables with data before filesort if it's necessary
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
          test result
      mysql-test/t/information_schema.test:
        Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
          test case
      333b1f85
    • unknown's avatar
      Fix for bug#15851 Unlistable directories yield no info from information_schema · fbc24f33
      unknown authored
        to skip directories which are not allowed for read
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#15851 Unlistable directories yield no info from information_schema
          test result
      mysql-test/t/information_schema.test:
        Fix for bug#15851 Unlistable directories yield no info from information_schema
          test case
      fbc24f33
  31. 19 Jan, 2006 1 commit
    • unknown's avatar
      WL1019: complete patch. Reapplied patch to the clean · 41536fce
      unknown authored
      tree to get rid of multiple typos in CS comments and
      unify the patch.
      
      
      configure.in:
        CSV is compiled in by default now
      include/my_base.h:
        add new ha_extra flag for the log tables
      mysql-test/include/im_check_os.inc:
        we should only run im tests if csv is on for now: im relies
        on mysqld options available only in csv build.
      mysql-test/include/system_db_struct.inc:
        check log tables structure
      mysql-test/lib/init_db.sql:
        create log tables when running tests.
      mysql-test/mysql-test-run.pl:
        Add old logs flag to IM tests. As IM could only deal with
        old logs (this feature is not needed with log tables)
      mysql-test/r/connect.result:
        update result
      mysql-test/r/csv.result:
        update result
      mysql-test/r/im_utils.result:
        update result
      mysql-test/r/information_schema.result:
        update result
      mysql-test/r/mysqlcheck.result:
        update result
      mysql-test/r/show_check.result:
        update result
      mysql-test/r/system_mysql_db.result:
        update result
      mysql-test/t/connect.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/csv.test:
        add tests for concurrent insert (the functionality is added
        to CSV in this patch)
      mysql-test/t/information_schema.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/mysqlcheck.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/show_check.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/system_mysql_db.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      mysql-test/t/system_mysql_db_fix.test:
        disable test if CSV engine is not in: result depends on the
        presence of CSV-based log tables
      scripts/mysql_create_system_tables.sh:
        new system tables: slow_log and general_log
      scripts/mysql_fix_privilege_tables.sql:
        add new log tables: use an SP to create them for
        non-csv build to work fine.
      sql/ha_myisam.cc:
        move locking-related checks to the hanlder
      sql/ha_myisam.h:
        new function declared
      sql/handler.h:
        new virtual function is added: we should check for handler-related
        locking issues in the handler
      sql/lock.cc:
        from now on we check for handler-related locking issues
        in the handler itself rather then in lock.cc
      sql/log.cc:
        Add log tables support, refactoring: there are log event
        handlers with common interface. They are used by the LOGGER
        class, which is responsible for their initialization, cleanup
        and managment. Logging to the tables provided by one of the
        log event handler types.
      sql/log.h:
        declare new log classes
      sql/log_event.cc:
        convert old logging routines calls to use new API
      sql/mysql_priv.h:
        define common log routines and objects
      sql/mysqld.cc:
        Add support for the log tables. Their initalization, cleanup
        and specific options.
      sql/share/errmsg.txt:
        add new error messages for the log tables
      sql/slave.cc:
        convert old logging routines calls to use new API
      sql/sql_base.cc:
        TABLE objects used by the logger should be skipped
        during refreshes (as log tables are always opened
        and locked). fix table_is_used to skip them.  This
        is needed for FLUSH LOGS to work
      sql/sql_db.cc:
        convert old logging routines calls to use new API
      sql/sql_delete.cc:
        fix TRUNCATE to work with log tables
      sql/sql_parse.cc:
        command_name is now an array of LEX_STRINGs
      sql/sql_prepare.cc:
        convert old logging routines calls to use new API
      sql/sql_show.cc:
        convert old logging routines calls to use new API
      sql/sql_table.cc:
        don't reoped the log tables for admin purposes
      sql/table.cc:
        mark log tables as such during the open
      sql/table.h:
        add log-related info
      storage/csv/ha_tina.cc:
        add support for concurrent insert (see bk commit - 5.1 tree
        (petr:1.1910) for standalone patch), add log tables-specific
        csv table handling.
      storage/csv/ha_tina.h:
        enable concurrent insert for CSV, add log table flag
      mysql-test/r/log_tables.result:
        New BitKeeper file ``mysql-test/r/log_tables.result''
      mysql-test/t/log_tables.test:
        New BitKeeper file ``mysql-test/t/log_tables.test''
      41536fce
  32. 03 Jan, 2006 1 commit
    • unknown's avatar
      Fix for bug#15533 crash, information_schema, function, view · 5e7cbbcb
      unknown authored
        enable view prepared mode during getting metedata for I_S table
      
      
      mysql-test/r/information_schema.result:
        Fix for bug#15533 crash, information_schema, function, view
          test case
      mysql-test/t/information_schema.test:
        Fix for bug#15533 crash, information_schema, function, view
          test case
      5e7cbbcb