An error occurred fetching the project authors.
  1. 09 Dec, 2008 1 commit
    • Sergey Glukhov's avatar
      Bug#35796 SHOW CREATE TABLE and default value for BIT field · cbb368aa
      Sergey Glukhov authored
      show default value for BIT field in printable format
      
      
      mysql-test/r/type_bit.result:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        test result
      mysql-test/t/type_bit.test:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        test case
      sql/item.cc:
        Bug#35796 SHOW CREATE TABLE and default value for BIT field
        issue an error if BIN|HEX deafult value is empty value
        (behaviour like for INT fields)
      cbb368aa
  2. 28 Nov, 2008 1 commit
    • Georgi Kodinov's avatar
      Bug #37339: SHOW VARIABLES not working properly with multi-byte datadir · 8e688a7a
      Georgi Kodinov authored
            
      The SHOW VARIABLES LIKE .../SELECT @@/SELECT ... FROM INFORMATION_SCHEMA.VARIABLES
      were assuming that all the system variables are in system charset (UTF-8).
      However the variables that are settable through command line will have a different
      character set (character_set_filesystem).
      Fixed the server to remember the correct character set of basedir, datadir, tmpdir,
      ssl, plugin_dir, slave_load_tmpdir, innodb variables; init_connect and init_slave 
      variables and use it when processing data.
      
      mysql-test/r/ctype_filesystem.result:
        Bug #37339: test case (should be in utf-8)
      mysql-test/t/ctype_filesystem-master.opt:
        Bug #37339: test case (should be in ISO-8859-1)
      mysql-test/t/ctype_filesystem.test:
        Bug #37339: test case
      sql/mysqld.cc:
        Bug #37339: remember the correct character set for init_slave and init_connect
      sql/set_var.cc:
        Bug #37339: 
          - remember the character set of the relevant variables
          - implement storing and using the correct 
            character set
      sql/set_var.h:
        Bug #37339: implement storing and using the correct 
        character set
      sql/sql_show.cc:
        Bug #37339: implement storing and using the correct 
        character set
      8e688a7a
  3. 13 Nov, 2008 3 commits
    • Sergey Glukhov's avatar
      Bug#38909 CREATE_OPTIONS in information_schema produces wrong results · fc27d038
      Sergey Glukhov authored
      table->partition_info is unitialized when we open frm file only.
      The fix is check share->partition_info_len which is set on
      frm opening stage.
      
      
      mysql-test/r/information_schema_part.result:
        test result
      mysql-test/t/information_schema_part.test:
        test case
      sql/sql_show.cc:
        table->partition_info is unitialized when we open frm file only.
        The fix is check share->partition_info_len which is set on
        frm opening stage.
      fc27d038
    • Sergey Glukhov's avatar
      Bug#39955 SELECT on INFORMATION_SCHEMA.GLOBAL_VARIABLES takes too long · 53b30523
      Sergey Glukhov authored
      VARIABLE_VALUE field is decreased to 1024 symbols.
      (affected I_S tables: GLOBAL_VARIABLES, SESSION_VARIABLES,
       GLOBAL_STATUS, SESSION_STATUS).
      The only variable which can be longer than 1024 is
      init_connect. The variable will be truncated with warning.
      Additional fix:
      Added where condition filter which speed up queries which
      have where condition with expressions which use VARIABLE_NAME
      field.
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/r/show_check.result:
        result fix
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        VARIABLE_VALUE field is decreased to 1024 symbols.
        (affected I_S tables: GLOBAL_VARIABLES, SESSION_VARIABLES,
         GLOBAL_STATUS, SESSION_STATUS).
        The only variable which can be longer than 1024 is
        init_connect. The variable will be truncated with warning.
        Additional fix:
        Added where condition filter which speed up queries which
        have where condition with expressions which use VARIABLE_NAME
        field.
      53b30523
    • Sergey Glukhov's avatar
      Bug#35789 wrong datatypes for collation and charset columns in EVENTS, ROUTINES, TRIGGERS · 0dff7272
      Sergey Glukhov authored
      changed 'charset', 'collation' field length from 64 to MY_CS_NAME_SIZE(32)
      in tables:
      SCHEMATA, TABLES, COLUMNS, CHARACTER_SETS,
      COLLATIONS, COLLATION_CHARACTER_SET_APPLICABILITY
      
      
      mysql-test/r/create.result:
        result fix
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/show_check.result:
        result fix
      mysql-test/suite/funcs_1/r/is_character_sets.result:
        result fix
      mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result:
        result fix
      mysql-test/suite/funcs_1/r/is_collations.result:
        result fix
      mysql-test/suite/funcs_1/r/is_columns.result:
        result fix
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        result fix
      mysql-test/suite/funcs_1/r/is_routines.result:
        result fix
      mysql-test/suite/funcs_1/r/is_schemata.result:
        result fix
      mysql-test/suite/funcs_1/r/is_tables.result:
        result fix
      sql/sql_show.cc:
        changed 'charset', 'collation' field length from 64 to MY_CS_NAME_SIZE(32)
        in tables:
        SCHEMATA, TABLES, COLUMNS, CHARACTER_SETS,
        COLLATIONS, COLLATION_CHARACTER_SET_APPLICABILITY
        additional fix: ROUTINES.SQL_MODE is changed to be VARCHAR(addon for Bug#29153)
      0dff7272
  4. 04 Nov, 2008 1 commit
    • Mattias Jonsson's avatar
      Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output · bb1ad9ce
      Mattias Jonsson authored
      The partitioning clause is only a very long single line, which is very
      hard to interpret for a human. This patch breaks the partitioning
      syntax into one line for the partitioning type, and one line per
      partition/subpartition.
      
      mysql-test/r/information_schema_part.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_archive.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_datatype.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_mgm.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_mgm_err.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_not_windows.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_range.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/r/partition_symlink.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/ndb/r/ndb_partition_key.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/ndb/r/ndb_partition_range.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/inc/partition_directory.inc:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Changed partitioning clause format for verifying the new output format.
      mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter2_1_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter2_1_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter2_2_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter2_2_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter3_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter3_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter4_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_alter4_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_archive.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_blackhole.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_memory.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_auto_increment_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_basic_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_basic_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_bit_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_bit_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_bit_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_char_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_char_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_datetime_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_datetime_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_decimal_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_decimal_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_engine_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_engine_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_engine_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_float_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_float_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_int_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_int_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_int_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc0_archive.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc0_memory.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc1_archive.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc1_memory.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc2_archive.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc2_memory.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_special_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_special_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_syntax_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/partition_syntax_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/parts/r/rpl_partition.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl/r/rpl_extraCol_innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl/r/rpl_extraCol_myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl/r/rpl_row_basic_8partition.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Updated test result due to the new partitioning clause output format.
      mysql-test/t/partition.test:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Added small tests for for the new partitioning clause output format.
      mysql-test/t/partition_mgm.test:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Added small tests for for the new partitioning clause output format.
      sql/sql_partition.cc:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Changed formatting of the partitioning clause from single line into
        multiple indented lines
      sql/sql_show.cc:
        Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output
        
        Changed formatting of the partitioning clause from single line into
        multiple indented lines
      bb1ad9ce
  5. 09 Oct, 2008 3 commits
    • Sergey Glukhov's avatar
      Bug#29153 SHOW and INFORMATION_SCHEMA commands increment Created_tmp_disk_tables · 169a65aa
      Sergey Glukhov authored
      TRIGGERS.SQL_MODE, EVENTS.SQL_MODE, TRIGGERS.DEFINER:
      field type is changed to VARCHAR.
      
      
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/show_check.result:
        result fix
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        result fix
      mysql-test/suite/funcs_1/r/is_events.result:
        result fix
      mysql-test/suite/funcs_1/r/is_triggers.result:
        result fix
      sql/sql_show.cc:
        TRIGGERS.SQL_MODE, EVENTS.SQL_MODE, TRIGGERS.DEFINER:
        field type is changed to VARCHAR.
      169a65aa
    • Sergey Glukhov's avatar
      Bug#38918 selecting from information_schema.columns is disproportionately slow · 95b721e6
      Sergey Glukhov authored
      The problem: table_open_method is not calculated properly if '*' is used in 'select'
      The fix: added table_open_method calculation for such case
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        The problem: table_open_method is not calculated properly if '*' is used in 'select'
        The fix: added table_open_method calculation for such case
      95b721e6
    • Kristofer Pettersson's avatar
      Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines · f985e787
      Kristofer Pettersson authored
                       
      When running Stored Routines the Status Variable "Questions" was wrongly
      incremented. According to the manual it should contain the "number of
      statements that clients have sent to the server"
                    
      Introduced a new status variable 'questions' to replace the query_id
      variable which currently corresponds badly with the number of statements
      sent by the client.
                  
      The new behavior is ment to be backward compatible with 4.0 and at the
      same time work with new features in a similar way.
                  
      This is a backport from 6.0
      
      mysql-test/r/status2.result:
        Added test case
      mysql-test/t/status2.test:
        Added test case
      sql/mysqld.cc:
        Introduced a new status variable 'questions' to replace the query_id
        variable which currently corresponds badly with the number of statements
        sent by the client.
      sql/sql_class.h:
        Introduced a new status variable 'questions' to replace the query_id
        variable which currently corresponds badly with the number of statements
        sent by the client.
      sql/sql_parse.cc:
        To be backward compatible with 4.0 and at the same time extend the 
        interpretation of the Question variable, it should be increased on
        all COM-commands but COM_STATISTICS, COM_PING, COM_STMT_PREPARE,
        COM_STMT_CLOSE and COM_STMT_RESET.
        Since COM_QUERY can process multiple statements, there has to be an
        extra increase there as well.
      sql/sql_show.cc:
        Removed deprecated SHOW_QUESTION status code.
      sql/structs.h:
        Removed deprecated SHOW_QUESTION status code.
      f985e787
  6. 08 Oct, 2008 1 commit
    • Mats Kindahl's avatar
      Bug #34707: Row based replication: slave creates table within wrong database · dcd050c5
      Mats Kindahl authored
      The failure was caused by executing a CREATE-SELECT statement that creates a
      table in another database than the current one. In row-based logging, the
      CREATE statement was written to the binary log without the database, hence
      creating the table in the wrong database, causing the following inserts to
      fail since the table didn't exist in the given database.
      
      Fixed the bug by adding a parameter to store_create_info() that will make
      the function print the database name before the table name and used that
      in the calls that write the CREATE statement to the binary log. The database
      name is only printed if it is different than the currently selected database.
      
      The output of SHOW CREATE TABLE has not changed and is still printed without
      the database name.
      
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Added test to check that CREATE-SELECT into another database than the
        current one replicates.
      sql/sql_insert.cc:
        Adding parameter to calls to store_create_info().
      sql/sql_show.cc:
        Adding parameter to calls to store_create_info().
        
        Extending store_create_info() with parameter 'show_database' that will cause
        the database to be written before the table name.
      sql/sql_show.h:
        Adding parameter to call to store_create_info() to tell if the database should be shown or not.
      sql/sql_table.cc:
        Adding parameter to calls to store_create_info().
      dcd050c5
  7. 02 Oct, 2008 1 commit
    • Sergey Glukhov's avatar
      Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS · 7e60f710
      Sergey Glukhov authored
      The problem:
      I_S views table does not check the presence of SHOW_VIEW_ACL|SELECT_ACL
      privileges for a view. It leads to discrepancy between SHOW CREATE VIEW
      and I_S.VIEWS.
      The fix:
      added appropriate check.
      
      
      mysql-test/r/information_schema_db.result:
        test result
      mysql-test/t/information_schema_db.test:
        test case
      sql/sql_show.cc:
        The problem:
        I_S views table does not check the presence of SHOW_VIEW_ACL|SELECT_ACL
        privileges for a view. It leads to discrepancy between SHOW CREATE VIEW
        and I_S.VIEWS.
        The fix:
        added appropriate check.
      7e60f710
  8. 20 Aug, 2008 1 commit
  9. 18 Aug, 2008 1 commit
  10. 15 Aug, 2008 1 commit
    • Chad MILLER's avatar
      Bug#37301 Length and Max_length differ with no obvious reason(2nd version) · 21598ea0
      Chad MILLER authored
      Length value is the length of the field,
      Max_length is the length of the field value.
      So Max_length can not be more than Length.
      The fix: fixed calculation of the Item_empty_string item length
      
      (Patch applied and queued on demand of Trudy/Davi.)
      
      sql/item.h:
        fixed calculation of the item length
      sql/sql_show.cc:
        removed unnecessary code
      21598ea0
  11. 12 May, 2008 1 commit
    • unknown's avatar
      Bug#35997 Event scheduler seems to let the server crash, if it is embedded. · 3703bbf6
      unknown authored
      SHOW commands fail in embedded mode because schema_table array doesn't
      correspond to enum_schema_tables.
      
      This patch implements a dummy implementation of the abstract fill_table
      function to be used when the event scheduler (or other core feature)
      isn't part of the build.
      
      
      libmysqld/lib_sql.cc:
        Fixed type conversion warning.
      sql/sql_show.cc:
        Leave entry for EVENTS to keep array consistent but set the 
        fill_table function pointer to a dummy function instead.
      3703bbf6
  12. 09 May, 2008 1 commit
    • unknown's avatar
      Bug#35997 Event scheduler seems to let the server crash, if it is embedded. · 3cf9e6eb
      unknown authored
      The event scheduler was not designed to work in embedded mode. This
      patch disables and excludes the event scheduler when the server is
      compiled for embedded build.
      
      
      libmysqld/Makefile.am:
        Reduce the amount of event code in an embedded build.
      mysql-test/t/events_trans.test:
        Disable test if run in embedded mode.
      sql/Makefile.am:
        Introduce definition HAVE_EVENT_SCHEDULER and one new source file.
      sql/event_data_objects.cc:
        Refactor Event_parse_data to new file.
      sql/event_data_objects.h:
        Refactor Event_parse_data to new file.
        Move global definitions to new file.
      sql/event_queue.cc:
        Move all parsed items to Event_parse_data for easier modularization.
      sql/events.cc:
        Move all parsed items to Event_parse_data for easier modularization.
      sql/mysqld.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/set_var.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/set_var.h:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/sql_db.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/sql_parse.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/sql_show.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/sql_test.cc:
        Disable the event schedular subsystem if the server is compiled in
        embedded mode.
      sql/sql_yacc.yy:
        Only include event-code needed for parsing to reduce impact on embedded
        build.
        Move all constants to Event_parse_data class.
      mysql-test/r/events_embedded.result:
        Add test case to make sure the 'event_scheduler' can't be activated
        in embedded mode.
      mysql-test/r/is_embedded.require:
        Add test case to make sure the 'event_scheduler' can't be activated
        in embedded mode.
      mysql-test/t/events_embedded.test:
        Add test case to make sure the 'event_scheduler' can't be activated
        in embedded mode.
      sql/event_parse_data.cc:
        New file. Extracted Event_parse data into a new file.
      sql/event_parse_data.h:
        New file. Extracted Event_parse data into a new file.
      3cf9e6eb
  13. 19 Mar, 2008 1 commit
    • unknown's avatar
      Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY · 3c5894ba
      unknown authored
        
      When swapping out heap I_S tables to disk, this is done after plan refinement.
      Thus, READ_RECORD::file will still point to the (deleted) heap handler at start
      of execution. This causes segmentation fault if join buffering is used and the 
      query is a star query where the result is found to be empty before accessing
      some table. In this case that table has not been initialized (i.e. had its 
      READ_RECORD re-initialized) before the cleanup routine tries to close the handler.
      Fixed by updating READ_RECORD::file when changing handler.
      
      
      mysql-test/r/information_schema.result:
        Bug#34529: Test result.
      mysql-test/t/information_schema.test:
        Bug#34529: Test case.
      sql/sql_show.cc:
        Bug#34529: The fix.
      3c5894ba
  14. 14 Mar, 2008 1 commit
    • unknown's avatar
      Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes · 45b4d937
      unknown authored
      referenced_key_name field can be uninitialized in the case when
      referenced table is dropped.
      Added codition which allows to handle this situation.
      
      
      mysql-test/r/information_schema_inno.result:
        test result
      mysql-test/t/information_schema_inno.test:
        test result
      sql/sql_show.cc:
        referenced_key_name field can be uninitialized in the case when
        referenced table is dropped.
        Added codition which allows to handle this situation.
      45b4d937
  15. 07 Mar, 2008 2 commits
    • unknown's avatar
      BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR || · 44df0f6e
      unknown authored
                  m_status == DA_OK
      
      Reading from information_scema.tables or information_schema.columns
      may cause assertion failure in debug builds. This may happen under
      rare circumstances when information_schema fails to get information
      about a table (e.g. when a connection is killed).
      
      This happens because open_normal_and_derived_tables() can return an
      error without setting an error message in THD. But information_schema
      attempts to get an error message from THD unconditionally.
      
      With this fix information_schema attempts to get an error message
      from THD only in case error message is set in THD.
      
      
      mysql-test/r/information_schema.result:
        A test case for BUG#34656.
      mysql-test/t/information_schema.test:
        A test case for BUG#34656.
      sql/item_func.cc:
        Set proc info to "User sleep".
      sql/sql_show.cc:
        open_normal_and_derived_tables() can return an error without
        setting an error message in THD. That means we must access
        error message conditionally, only in case thd->is_error() is
        true.
      44df0f6e
    • unknown's avatar
      Bug #34367: sql/sql_show.cc: create_schema_table should handle · 4aae2099
      unknown authored
      MYSQL_TYPE_NEWDECIMAL
      
      Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like
      MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until
      we have a working information_schema plugin as part of the source
      distribution.
      
      
      sql/sql_show.cc:
        Bug#34367: The fix. Corrected wrong comments and a DBUG_ENTER with wrong 
        function name.
      sql/table.h:
        Bug#34367: Added comments to st_field_info.
      4aae2099
  16. 22 Feb, 2008 1 commit
    • unknown's avatar
      Fix for Bug#30217: Views: changes in metadata behaviour · a3e83048
      unknown authored
      between 5.0 and 5.1.
        
      The problem was that in the patch for Bug#11986 it was decided
      to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
      This approach however turned out to be quite difficult to implement
      properly. The main problem is to preserve the same IS-output after
      dump/restore.
        
      So, the fix is to rollback to the previous functionality, but also
      to fix it to support multi-character-set-queries properly. The idea
      is to generate INFORMATION_SCHEMA-query from the item-tree after
      parsing view declaration. The IS-query should:
        - be completely in UTF8;
        - not contain character set introducers.
        
      For more information, see WL4052.
      
      
      mysql-test/include/ddl_i18n.check_views.inc:
        Add a test case for Bug#30217.
      mysql-test/r/ddl_i18n_koi8r.result:
        Update result file.
      mysql-test/r/ddl_i18n_utf8.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/mysqldump.result:
        Update result file.
      mysql-test/r/show_check.result:
        Update result file.
      mysql-test/t/ddl_i18n_koi8r.test:
        Add a test case for Bug#30217.
      mysql-test/t/ddl_i18n_utf8.test:
        Add a test case for Bug#30217.
      mysql-test/t/mysqldump.test:
        Add a test case for Bug#30217.
      sql/ha_ndbcluster.cc:
        Add a parameter to print().
      sql/item.cc:
        1. Add a parameter to print().
        2. Item_string::print():
              - Do not append character set introducer to the text literal
                if we're building a query for INFORMATION_SCHEMA;
              - Convert text literal to UTF8 if we're building a query
                for INFORMATION_SCHEMA.
      sql/item.h:
        Add a parameter to print().
      sql/item_cmpfunc.cc:
        Add a parameter to print().
      sql/item_cmpfunc.h:
        Add a parameter to print().
      sql/item_func.cc:
        Add a parameter to print().
      sql/item_func.h:
        Add a parameter to print().
      sql/item_geofunc.h:
        Add a parameter to print().
      sql/item_row.cc:
        Add a parameter to print().
      sql/item_row.h:
        Add a parameter to print().
      sql/item_strfunc.cc:
        Add a parameter to print().
      sql/item_strfunc.h:
        Add a parameter to print().
      sql/item_subselect.cc:
        Add a parameter to print().
      sql/item_subselect.h:
        Add a parameter to print().
      sql/item_sum.cc:
        Add a parameter to print().
      sql/item_sum.h:
        Add a parameter to print().
      sql/item_timefunc.cc:
        Add a parameter to print().
      sql/item_timefunc.h:
        Add a parameter to print().
      sql/mysql_priv.h:
        Add a parameter to print().
      sql/sp_head.cc:
        Add a parameter to print().
      sql/sql_lex.cc:
        Add a parameter to print().
      sql/sql_lex.h:
        Add a parameter to print().
      sql/sql_parse.cc:
        Add a parameter to print().
      sql/sql_select.cc:
        Add a parameter to print().
      sql/sql_show.cc:
        Add a parameter to print().
      sql/sql_test.cc:
        Add a parameter to print().
      sql/sql_view.cc:
        Build INFORMATION_SCHEMA query from Item-tree.
      sql/sql_yacc.yy:
        Build INFORMATION_SCHEMA query from Item-tree.
      sql/table.h:
        Add a parameter to print().
      a3e83048
  17. 19 Feb, 2008 1 commit
  18. 30 Jan, 2008 2 commits
    • unknown's avatar
      Fix a build failure (embedded server). · 96f33937
      unknown authored
      96f33937
    • unknown's avatar
      A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and · 39509d64
      unknown authored
      pre-locking.
      
      The crash was caused by an implicit assumption in check_table_access() that
      table_list parameter is always a part of lex->query_tables.
      
      When iterating over the passed list of tables, check_table_access() used
      to stop only when lex->query_tables_last_not_own was reached. 
      In case of pre-locking, lex->query_tables_last_own is not NULL and points
      to some element of lex->query_tables. When the parameter
      of check_table_access() was not part of lex->query_tables, loop invariant
      could never be violated and a crash would happen when the current table
      pointer would point beyond the end of the provided list.
      
      The fix is to change the signature of check_table_access() to also accept
      a numeric limit of loop iterations, similarly to check_grant(), and 
      supply this limit in all places when we want to check access of tables
      that are outside lex->query_tables, or just want to check access to one table.
      
      
      mysql-test/r/information_schema.result:
        Update test results (Bug#34166).
      mysql-test/t/information_schema.test:
        Add a test case for Bug#34166.
      sql/mysql_priv.h:
        Change signature of check_table_access() to accept a numeric limit
        of tables to check.
      sql/sp_head.cc:
        Update to the new signature of check_table_access().
      sql/sql_acl.cc:
        Improve code clarity: if there is a numeric limit, we should not need
        to look at first_not_own_table.
      sql/sql_base.cc:
        Update to the new signature of check_table_access().
      sql/sql_cache.cc:
        Update to the new signature of check_table_access().
      sql/sql_parse.cc:
        Update to the new signature of check_table_access().
        Change check_table_access() to accept an optional numeric limit of tables
        to check. A crash would happen when check_table_access() was
        passed a list of tables that is not part of lex->query_tables and
        lex->query_tables_last_own was not NULL.
      sql/sql_plugin.cc:
        Update to the new signature of check_table_access().
      sql/sql_prepare.cc:
        Update to the new signature of check_table_access().
      sql/sql_show.cc:
        Update to the new signature of check_table_access().
        Ensure that check_table_access() only checks access to the first
        table in the table list when called from list_open_tables().
        list_open_tables() supplies a table list that is created on stack,
        whereas check_table_access() used to assume that the supplied list is a part
        of thd->lex.
      sql/sql_trigger.cc:
        Update to the new signature of check_table_access().
      sql/sql_view.cc:
        Update to the new signature of check_table_access().
      39509d64
  19. 20 Dec, 2007 1 commit
    • unknown's avatar
      A pre-requisite for the fix for Bug#12713 "Error in a stored function · 0fbc29c1
      unknown authored
      called from a SELECT doesn't cause ROLLBACK of state"
      Make private all class handler methods (PSEA API) that may modify
      data. Introduce and deploy public ha_* wrappers for these methods in 
      all sql/.
      This necessary to keep track of all data modifications in sql/,
      which is in turn necessary to be able to optimize two-phase
      commit of those transactions that do not modify data.
      
      
      sql/ha_partition.cc:
        Class ha_partition is no longer a friend of class handler.
        Use the public handler interface (handler::ha_ methods) for partition
        operations.
        Remove unnecessary casts from char[] to const char *.ppзи выафвыаafa
      sql/handler.cc:
        Function ha_create_table() is no longer a friend of class handler.
        Use public handler::change_table_ptr() to access private members.
        This fixes a subtle bug (no test case in the test suite) when a
        deletion error occurs inside one partition of a partitioned engine. 
        The old code would crash in handler::print_error() in this case.
        
        Implement the newly introduced public ha_* wrappers of the private
        virtual handler methods.
      sql/handler.h:
        Introduce ha_* wrappers to all class handler methods that may
        modify data. This is necessary to be able to keep track of
        data modifying operations of class handler and optimize read-only
        transactions.
      sql/item_sum.cc:
        delete_all_rows -> ha_delete_all_rows
      sql/sql_base.cc:
        Use the new public wrappers.
      sql/sql_delete.cc:
        delete_all_rows -> ha_delete_all_rows
      sql/sql_partition.cc:
        Use the new public wrappers.
      sql/sql_select.cc:
        delete_all_rows -> ha_delete_all_rows
        delete_table -> ha_delete_table
        disabe_indexes -> ha_disable_idnexes
      sql/sql_show.cc:
        delete_all_rows -> ha_delete_all_rows
      sql/sql_table.cc:
        Use the public wrappers for class handler DDL methods.
        All methods which may change handler data are now accessed via a public
        wrapper.
      sql/sql_union.cc:
        delete_all_rows -> ha_delete_all_rows
        {enable,disable}_indexes -> ha_{enable,disable}_indexes
      sql/sql_update.cc:
        bulk_update_row -> ha_bulk_update_row
      sql/unireg.cc:
        create_handler_files -> ha_create_handler_files
      0fbc29c1
  20. 12 Dec, 2007 1 commit
    • unknown's avatar
      Bug#12713 "Error in a stored function called from a SELECT doesn't · 2a0d2fef
      unknown authored
      cause ROLLBACK of statement", part 1. Review fixes.
      
      Do not send OK/EOF packets to the client until we reached the end of 
      the current statement.
      This is a consolidation, to keep the functionality that is shared by all 
      SQL statements in one place in the server.
      Currently this functionality includes:
      - close_thread_tables()
      - log_slow_statement().
      
      After this patch and the subsequent patch for Bug#12713, it shall also include:
      - ha_autocommit_or_rollback()
      - net_end_statement()
      - query_cache_end_of_result().
      
      In future it may also include:
      - mysql_reset_thd_for_next_command().
      
      
      include/mysql_com.h:
        Rename now unused members of NET: no_send_ok, no_send_error, report_error.
        These were server-specific variables related to the client/server
        protocol. They have been made obsolete by this patch.
        
        Previously the same members of NET were used to store the error message
        both on the client and on the server. 
        The error message was stored in net.last_error (client: mysql->net.last_error,
        server: thd->net.last_error).
        The error code was stored in net.last_errno (client: mysql->net.last_errno,
        server: thd->net.last_errno).
        The server error code and message are now stored elsewhere 
        (in the Diagnostics_area), thus NET members are no longer used by the
        server.
        Rename last_error to client_last_error, last_errno to client_last_errno
        to avoid potential bugs introduced by merges.
      include/mysql_h.ic:
        Update the ABI file to reflect a rename. 
        Renames do not break the binary compatibility.
      libmysql/libmysql.c:
        Rename last_error to client_last_error, last_errno to client_last_errno.
        This is necessary to ensure no unnoticed bugs introduced by merged
        changesets.
        
        Remove net.report_error, net.no_send_ok, net.no_send_error.
      libmysql/manager.c:
        Rename net.last_errno to net.client_last_errno.
      libmysqld/lib_sql.cc:
        Rename net.last_errno to net.client_last_errno.
        
        Update the embedded implementation of the client-server protocol to
        reflect the refactoring of protocol.cc.
      libmysqld/libmysqld.c:
        Rename net.last_errno to net.client_last_errno.
      mysql-test/r/events.result:
        Update to reflect the change in mysql_rm_db(). Now we drop stored
        routines and events for a given database name only if there
        is a directory for this database name. ha_drop_database() and
        query_cache_invalidate() are called likewise. 
        Previously we would attempt to drop routines/events even if database
        directory was not found (it worked, since routines and events are stored
        in tables). This fixes Bug 29958 "Weird message on DROP DATABASE if mysql.proc
        does not exist".
        The change was done because the previous code used to call send_ok()
        twice, which led to an assertion failure when asserts against it were
        added by this patch.
      mysql-test/r/grant.result:
        Fix the patch for Bug 16470, now FLUSH PRIVILEGES produces an error 
        if mysql.procs_priv is missing.
        This fixes the assert that send_ok() must not called after send_error()
        (the original patch for Bug 16470 was prone to this).
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result:
        Produce a more detailed error message.
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result:
        Produce a more detailed error message.
      mysql-test/t/grant.test:
        Update the test, now FLUSH PRIVILEGES returns an error if mysql.procs_priv
        is missing.
      server-tools/instance-manager/mysql_connection.cc:
        Rename net.last_errno to net.client_last_errno.
      sql/ha_ndbcluster_binlog.cc:
        Add asserts. 
        
        Use getters to access statement status information.
        
        Add a comment why run_query() is broken. Reset the diagnostics area
        in the end of run_query() to fulfill the invariant that the diagnostics_area
        is never assigned twice per statement (see the comment in the code
        when this can happen). We still do not clear thd->is_fatal_error and
        thd->is_slave_error, which may lead to bugs, I consider the whole affair
        as something to be dealt with separately.
      sql/ha_partition.cc:
        fatal_error() doesn't set an error by itself. Perhaps we should
        remove this method altogether and instead add a flag to my_error 
        to set thd->is_fatal_error property.
        
        Meanwhile, this change is a part of inspection made to the entire source
        code with the goal to ensure that fatal_error()
        is always accompanied by my_error().
      sql/item_func.cc:
        There is no net.last_error anymore. Remove the obsolete assignment.
      sql/log_event.cc:
        Use getters to access statement error status information.
      sql/log_event_old.cc:
        Use getters to access statement error status information.
      sql/mysqld.cc:
        Previously, if a continue handler for an error was found, my_message_sql() 
        would not set an error in THD. Since the current statement
        must be aborted in any case, find_handler() had a hack to assign 
        thd->net.report_error to 1.
        
        Remove this hack. Set an error in my_message_sql() even if the continue
        handler is found. The error will be cleared anyway when the handler
        is executed. This is one action among many in this patch to ensure the 
        invariant that whenever thd->is_error() is TRUE, we have a message in 
        thd->main_da.message().
      sql/net_serv.cc:
        Use a full-blown my_error() in net_serv.cc to report an error,
        instead of just setting net->last_errno. This ensures the invariant that
        whenever thd->is_error() returns TRUE, we have a message in 
        thd->main_da.message().
        
        Remove initialization of removed NET members.
      sql/opt_range.cc:
        Use my_error() instead of just raising thd->net.report_error. 
        This ensures the invariant that whenever thd->is_error() returns TRUE, 
        there is a message in thd->main_da.message().
      sql/opt_sum.cc:
        Move invocation of fatal_error() right next to the place where
        we set the error message. That makes it easier to track that whenever
        fatal_error() is called, there is a message in THD.
      sql/protocol.cc:
        Rename send_ok() and send_eof() to net_send_ok() and net_send_eof() 
        respectively. These functions write directly to the network and are not 
        for use anywhere outside the client/server protocol code. 
        
        Remove the code that was responsible for cases when either there is 
        no error code, or no error message, or both.
        Instead the calling code ensures that they are always present. Asserts
        are added to enforce the invariant.
        
        Instead of a direct access to thd->server_status and thd->total_warn_count
        use function parameters, since these from now on don't always come directly
        from THD.
        
        Introduce net_end_statement(), the single-entry-point replacement API for 
        send_ok(), send_eof() and net_send_error().
        
        Implement Protocol::end_partial_result_set to use in select_send::abort()
        when there is a continue handler.
      sql/protocol.h:
        Update declarations.
      sql/repl_failsafe.cc:
        Use getters to access statement status information in THD.
        Rename net.last_error to net.client_last_error.
      sql/rpl_record.cc:
        Set an error message in prepare_record() if there is no default
        value for the field -- later we do print this message to the client.
      sql/rpl_rli.cc:
        Use getters to access statement status information in THD.
      sql/slave.cc:
        In create_table_from_dump() (a common function that is used in 
        LOAD MASTER TABLE SQL statement and COM_LOAD_MASTER_DATA), instead of hacks
        with no_send_ok, clear the diagnostics area when mysql_rm_table() succeeded.
        
        Update has_temporary_error() to work correctly when no error is set.
        This is the case when Incident_log_event is executed: it always returns
        an error but does not set an error message.
        
        Use getters to access error status information.
      sql/sp_head.cc:
        Instead of hacks with no_send_error, work through the diagnostics area 
        interface to suppress sending of OK/ERROR packets to the client.
        
        Move query_cache_end_of_result before log_slow_statement(), similarly
        to how it's done in dispatch_command().
      sql/sp_rcontext.cc:
        Remove hacks with assignment of thd->net.report_error, they are not
        necessary any more (see the changes in mysqld.cc).
      sql/sql_acl.cc:
        Use getters to access error status information in THD.
      sql/sql_base.cc:
        Access thd->main_da.sql_errno() only if there is an error. This fixes
        a bug when auto-discovery, that was effectively disabled under pre-locking.
      sql/sql_binlog.cc:
        Remove hacks with no_send_ok/no_send_error, they are not necessary 
        anymore: the caller is responsible for network communication.
      sql/sql_cache.cc:
        Disable sending of OK/ERROR/EOF packet in the end of dispatch_command
        if the response has been served from the query cache. This raises the 
        question whether we should store EOF packet in the query cache at all,
        or generate it anew for each statement (we should generate it anew), but
        this is to be addressed separately.
      sql/sql_class.cc:
        Implement class Diagnostics_area. Please see comments in sql_class.h
        for details.
        
        Fix a subtle coding mistake in select_send::send_data: when on slave, 
        an error in Item::send() was ignored.
        The problem became visible due to asserts that the diagnostics area is
        never double assigned.
        
        Remove initialization of removed NET members.
        
        In select_send::abort() do not call select_send::send_eof(). This is
        not inheritance-safe. Even if a stored procedure continue handler is
        found, the current statement is aborted, not succeeded.
        Instead introduce a Protocol API to send the required response, 
        Protocol::end_partial_result_set().
        
        This simplifies implementation of select_send::send_eof(). No need
        to add more asserts that there is no error, there is an assert inside
        Diagnostics_area::set_ok_status() already.
        
        Leave no trace of no_send_* in the code.
      sql/sql_class.h:
        Declare class Diagnostics_area. 
        
        Remove the hack with no_send_ok from
        Substatement_state.
        
        Provide inline implementations of send_ok/send_eof.
        
        Add commetns.
      sql/sql_connect.cc:
        Remove hacks with no_send_error. 
        
        Since now an error in THD is always set if net->error, it's not necessary
        to check both net->error and thd->is_error() in the do_command loop.
        
        Use thd->main_da.message() instead of net->last_errno.
        
        Remove the hack with is_slave_error in sys_init_connect. Since now we do not
        reset the diagnostics area in net_send_error (it's reset at the beginning
        of the next statement), we can access it safely even after 
        execute_init_command.
      sql/sql_db.cc:
        Update the code to satisfy the invariant that the diagnostics area is never
        assigned twice.
        Incidentally, this fixes Bug 29958 "Weird message on DROP DATABASE if 
        mysql.proc does not exist".
      sql/sql_delete.cc:
        Change multi-delete to abort in abort(), as per select_send protocol.
        Fixes the merge error with the test for Bug 29136
      sql/sql_derived.cc:
        Use getters to access error information.
      sql/sql_insert.cc:
        Use getters to access error information.
      sql-common/client.c:
        Rename last_error to client_last_error, last_errno to client_last_errno.
      sql/sql_parse.cc:
        Remove hacks with no_send_error. Deploy net_end_statement().
        
        The story of COM_SHUTDOWN is interesting. Long story short, the server 
        would become on its death's door, and only no_send_ok/no_send_error assigned
        by send_ok()/net_send_error() would hide its babbling from the client.
        
        First of all, COM_QUIT does not require a response. So, the comment saying
        "Let's send a response to possible COM_QUIT" is not only groundless 
        (even mysqladmin shutdown/mysql_shutdown() doesn't send COM_QUIT after 
        COM_SHUTDOWN), it's plainly incorrect.
        
        Secondly, besides this additional 'OK' packet to respond to a hypothetical
        COM_QUIT, there was the following code in dispatch_command():
        
        if (thd->killed)
          thd->send_kill_message();
        if (thd->is_error()
          net_send_error(thd);
        
        This worked out really funny for the thread through which COM_SHUTDOWN
        was delivered: we would get COM_SHUTDOWN, say okay, say okay again, 
        kill everybody, get the kill signal ourselves, and then attempt to say 
        "Server shutdown in progress" to the client that is very likely long gone.
        
        This all became visible when asserts were added that the Diagnostics_area
        is not assigned twice.
        
        Move query_cache_end_of_result() to the end of dispatch_command(), since
        net_send_eof() has been moved there. This is safe, query_cache_end_of_result()
        is a no-op if there is no started query in the cache.
        
        Consistently use select_send interface to call abort() or send_eof()
        depending on the operation result.
        
        Remove thd->fatal_error() from reset_master(), it was a no-op. 
        in hacks with no_send_error woudl save us
        from complete breakage of the client/server protocol.
        
        Consistently use select_send::abort() whenever there is an error, 
        and select_send::send_eof() in case of success.
        The issue became visible due to added asserts.
      sql/sql_partition.cc:
        Always set an error in THD whenever there is a call to fatal_error().
      sql/sql_prepare.cc:
        Deploy class Diagnostics_area.
        Remove the unnecessary juggling with the protocol in 
        Select_fetch_protocol_binary::send_eof(). EOF packet format is 
        protocol-independent.
      sql/sql_select.cc:
        Call fatal_error() directly in opt_sum_query.
        Call my_error() whenever we call thd->fatal_error().
      sql/sql_servers.cc:
        Use getters to access error information in THD.
      sql/sql_show.cc:
        Use getters to access error information in THD.
        
        Add comments.
        
        Call my_error() whenever we call fatal_error().
      sql/sql_table.cc:
        Replace hacks with no_send_ok with the interface of the diagnostics area.
        
        Clear the error if ENOENT error in ha_delete_table().
      sql/sql_update.cc:
        Introduce multi_update::abort(), which is the proper way to abort a
        multi-update. This fixes the merge conflict between this patch and
        the patch for Bug 29136.
      sql/table.cc:
        Use a getter to access error information in THD.
      sql/tztime.cc:
        Use a getter to access error information in THD.
      2a0d2fef
  21. 06 Dec, 2007 1 commit
    • unknown's avatar
      Bug#31752: check strmake() bounds · 08053848
      unknown authored
      post-fixes: prevent semi-related overflow, additional comments
      
      
      mysys/mf_pack.c:
        extra comments
      sql/log.cc:
        prevent overflow (length parameter of strmake() should
        never become < 0)
      sql/sql_show.cc:
        additional comments
      sql/unireg.cc:
        additional comments
      08053848
  22. 26 Nov, 2007 1 commit
    • unknown's avatar
      Bug#31752: check strmake() bounds · a905ac34
      unknown authored
      strmake() calls are easy to get wrong. Add checks in extra
      debug mode to identify possible exploits.
      
      Remove some dead code.
      
      Remove some off-by-one errors identified with new checks.
      
      
      sql/log.cc:
        fix off-by-one buffer-length argument to prevent stack smashing
      sql/repl_failsafe.cc:
        fix off-by-one buffer-length argument to prevent stack smashing
      sql/set_var.cc:
        fix off-by-one buffer-length argument to prevent stack smashing
        (already approved, backports #31588)
      sql/sql_show.cc:
        misdimensioned buffers: functions further down the callstack
        expect bufsize of FN_REFLEN
      sql/unireg.cc:
        When EXTRA_DEBUG is enabled, strmake() will write funny patterns to
        buffers it operates on to identify possibly overflows. This leads to
        badness in mysql_create_frm(), so we explicitly put any unused bytes
        (back) into a defined state. Not a bug-fix, but part of the strmake()
        bug detector.
      strings/strmake.c:
        strmake() takes maximum string length rather than buffer-length
        (string length + 1 to accomodate \0 terminator) as argument.
        Since this is easy to get wrong, add extra debug code to identify
        off-by-ones so we can prevent stack smashing.
        
        Alternative "BAD_STRING_COMPILER" removed after checking
        with Monty.
      a905ac34
  23. 13 Nov, 2007 1 commit
    • unknown's avatar
      Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS · b1b1d627
      unknown authored
      command and reported to a client.
      
      The fact that a timestamp field will be set to NO on UPDATE wasn't shown 
      by the SHOW COMMAND and reported to a client through connectors. This led to
      problems in the ODBC connector and might lead to a user confusion.
      
      A new filed flag called ON_UPDATE_NOW_FLAG is added. 
      Constructors of the Field_timestamp set it when a field should be set to NOW
      on UPDATE.
      
      The get_schema_column_record function now reports whether a timestamp field
      will be set to NOW on UPDATE.
      
      
      mysql-test/t/information_schema.test:
        A test case adjusted after fixing the bug#30081.
      mysql-test/r/type_timestamp.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/type_ranges.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/show_check.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_5merge.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_4heap.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_3innodb.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/ps_2myisam.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/metadata.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/log_tables.result:
        Adjusted a test case after fixing bug#30081.
      mysql-test/r/information_schema.result:
        A test case adjusted after fixing the bug#30081.
      mysql-test/r/grant.result:
        Adjusted a test case after fixing bug#30081.
      tests/mysql_client_test.c:
        A test case adjusted after fixing the bug#30081.
      sql/sql_show.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        The get_schema_column_record function now reports whether a timestamp field
        will be set to NOW on UPDATE.
      sql/field.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        Constructors of the Field_timestamp set the ON_UPDATE_NOW_FLAG on a field when
        it should be set to NOW on UPDATE.
      include/mysql_com.h:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        A new filed flag called ON_UPDATE_NOW_FLAG  is added.
      client/mysql.cc:
        Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW FIELDS
        command and reported to a client.
        The fieldflag2str function is adjusted to print the ON_UPDATE_NOW_FLAG.
      b1b1d627
  24. 09 Nov, 2007 1 commit
    • unknown's avatar
      Rewrite profiler code to be easier to maintain and less buggy. · 69aee073
      unknown authored
      Between 5.0 and 5.1, the step of incrementing the global query id
      changed, which broke how the profiler noticed when a new query had
      started.  That reset the state list and caused all but the last 
      five (or so) states to be thrown away.
      
      Now, don't watch for query_id changes in the lower level.
      
      Add a bogus state change at the end of profiling so that the last 
      real state change is timed.
      
      Emit source reference for the start of the span of time instead of
      the end of it.
      
      
      mysql-test/r/profiling.result:
        Add a test that shows continuation of execution with multi-statement
        packets.
      mysql-test/t/profiling.test:
        Add a test that shows continuation of execution with multi-statement
        packets.
      sql/sql_parse.cc:
        Insert profiling calls at beginnings and ends of each query.
        
        Remove the old way of keeping or discarding profiles, and flipping 
        to new query profiles.
      sql/sql_profile.cc:
        No longer use the thread's query_id to determine when we flip
        to a new statement.
        
        Some status statements are set to be NULL in the server.  We don't
        log those, as it doesn't fit this style of profiling yet.
        
        Rewrite the parser code to be more active and legible.  
        
        Relying on passive/lazy discovery of new queries was buggy.
        
        Add a bogus status change before ending a profile, so that the 
        previous real status has a endpoint.
        
        Emit source reference of the start of the span-of-time instead of
        the end of it.
      sql/sql_profile.h:
        Store the server_query_id at instantiation time for a new query.
        
        Rewrite the parser code to be more active.  Relying on passive/lazy
        discovery of new queries was buggy.
        
        Name first state to more honestly describe the state.  We don't 
        really know of initialization that will follow.
      sql/sql_show.cc:
        Update comment to note the decidedly weird field_length behavior
        on Decimal types in information_schema.
      69aee073
  25. 02 Nov, 2007 1 commit
    • unknown's avatar
      Fix several merge problems. There are many changes in 5.1 from 5.0 · b01c89ed
      unknown authored
      that affect profiling.
      
      
      mysql-test/r/information_schema.result:
        Merge fixed.  This result moved to a new file.
      sql/sql_parse.cc:
        Include profiling in statistics.
        
        Add hook for SHOW_PROFILE in execution.
      sql/sql_profile.cc:
        Move/add the FEATURE_DISABLED warning to the I_S filling func.
        
        Fix merge, where a new member was added to ST_FIELD_INFO.
        
        orig_sql_command method was removed from Lex structure.
      sql/sql_show.cc:
        Fix merge problem.
      sql/sql_yacc.yy:
        orig_sql_command member removed from Lex structure in 5.1 .
      b01c89ed
  26. 01 Nov, 2007 1 commit
    • unknown's avatar
      Bug #31866: MySQL Server crashes on SHOW CREATE TRIGGER statement · 124af3f8
      unknown authored
      SHOW CREATE TRIGGER was not checking for detected errors 
      opening/reading the trigger file. 
      Fixed to return the already generated error.
      
      
      mysql-test/r/trigger.result:
        Bug #31866: test case
      mysql-test/t/trigger.test:
        Bug #31866: test case
      sql/sql_show.cc:
        Bug #31866: test for error and return it.
      124af3f8
  27. 23 Oct, 2007 1 commit
    • unknown's avatar
      Bug#31633 Information schema = NULL queries crash the server · 565c105c
      unknown authored
      added correct handling of NULL values for lookup fields
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        added correct handling of NULL values for lookup fields
      565c105c
  28. 17 Oct, 2007 1 commit
    • unknown's avatar
      Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA · 666efa1c
      unknown authored
      move 'table_collation' field filling outside of if(file) condition
      because this field has 'OPEN_FRM_ONLY' attribute
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        move 'table_collation' field filling outside of if(file) condition
        because this field has 'OPEN_FRM_ONLY' attribute
      666efa1c
  29. 11 Oct, 2007 2 commits
    • unknown's avatar
      BUG#29549 (Endians: test failures on Solaris): · 06fb8c2d
      unknown authored
      Refactoring code to add parameter to pack() and unpack() functions with
      purpose of indicating if data should be packed in little-endian or
      native order. Using new functions to always pack data for binary log
      in little-endian order. The purpose of this refactoring is to allow
      proper implementation of endian-agnostic pack() and unpack() functions.
      
      Eliminating several versions of virtual pack() and unpack() functions
      in favor for one single virtual function which is overridden in
      subclasses.
      
      Implementing pack() and unpack() functions for some field types that
      packed data in native format regardless of the value of the
      st_table_share::db_low_byte_first flag.
      
      The field types that were packed in native format regardless are:
      Field_real, Field_decimal, Field_tiny, Field_short, Field_medium,
      Field_long, Field_longlong, and Field_blob.
      
      Before the patch, row-based logging wrote the rows incorrectly on
      big-endian machines where the storage engine defined its own
      low_byte_first() to be FALSE on big-endian machines (the default
      is TRUE), while little-endian machines wrote the fields in correct
      order. The only known storage engine that does this is NDB. In effect,
      this means that row-based replication from or to a big-endian
      machine where the table was using NDB as storage engine failed if the
      other engine was either non-NDB or on a little-endian machine.
      
      With this patch, row-based logging is now always done in little-endian
      order, while ORDER BY uses the native order if the storage engine
      defines low_byte_first() to return FALSE for big-endian machines.
      
      In addition, the max_data_length() function available in Field_blob
      was generalized to the entire Field hierarchy to give the maximum
      number of bytes that Field::pack() will write.
      
      
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Sorting by columns that produces deterministic order.
      mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
        Result change.
      mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
        Result change.
      mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result:
        Result change.
      mysql-test/suite/rpl/t/disabled.def:
        Enabling tests.
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
        Adding missing sync_slave_with_master causing slave to keep tables
        after shutdown.
      mysql-test/suite/rpl_ndb/t/disabled.def:
        Enabling tests.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb-slave.opt:
        Adding --new option
      mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb2ndb.test:
        Adding have_log_bin.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb-slave.opt:
        Adding --new option
      mysql-test/suite/rpl_ndb/t/rpl_ndb_myisam2ndb.test:
        Adding have_log_bin
      mysql-test/t/partition.test:
        Adding have_archive, since that is used in the test.
      sql/field.cc:
        Eliminating all two-argument pack() and unpack() functions and moving
        functionality into the four-argument version. The four argument version
        is introduced so that it is possible to avoid using the storage engine
        default when writing and reading the packed format (the unpacked format
        still uses the storage engine's default). This is used by row-based
        replication to write the fields in a storage engine- and endian-agnostic
        format.
        
        Packing integral and floating-point numbers in little-endian format
        (if requested).
        
        Using pad_char for the field instead of spaces (0x20) when unpacking.
        
        Adding some Doxygen documentation.
        ---
        Adding max_data_length() to denote the maximum number of bytes that
        pack() will write.
        
        Adding casts to remove warnings for debug printouts.
      sql/field.h:
        Eliminating all virtual pack() and unpack() functions except the four-
        argument version, which now is the function that shall be overridden.
        The two-argument versions are convenience functions, to prevent changes
        to code that uses these.
        
        Adding code to pack integer numbers and floating-point numbers in
        little-endian format, if requested.
        ---
        Adding max_data_length() to denote the maximum number of bytes that
        pack() will write.
      sql/log.cc:
        Removing debug printout causing crash when starting NDB on Solaris.
      sql/log_event.cc:
        Adding missing #ifndef causing compile failure. Adding debug printouts.
      sql/rpl_record.cc:
        Debriding code. Using new pack() and unpack() functions to always pack
        fields little-endian. Adding debug printouts.
        ---
        Using max_data_length() when packing field into row.
        
        Adding casts to debug printouts.
      sql/sql_show.cc:
        Adding code that causes crash on Solaris machines since printf() cannot
        handle NULL values for strings properly.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result:
        New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result''
      mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result:
        New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result''
      06fb8c2d
    • unknown's avatar
      Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 · fb84f573
      unknown authored
      - Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options
      - Added syncing of directory when creating .frm files
      - Portability fixes
      - Added missing cast that could cause bugs
      - Code cleanups
      - Made some bit functions inline
      - Moved things out of myisam.h to my_handler.h to make them more accessable
      - Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM)
      - Fixed bugs in error conditions
      - Use compiler time asserts instead of run time
      - Fixed indentation
      HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong
      (Added a define for old value to ensure we don't break any old code)
      Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong)
      - Initialize error messages early to get better errors when mysqld or an engine fails to start
      - Fix windows bug that query_performance_frequency was not initialized if registry code failed
      - thread_stack -> my_thread_stack_size
      
      
      BitKeeper/etc/ignore:
        added libmysqld/scheduler.cc libmysqld/sql_connect.cc libmysqld/sql_tablespace.cc
      include/Makefile.am:
        Added my_bit.h
      include/m_string.h:
        Added bzero_if_purify() to simplify code
      include/my_base.h:
        Reserve options for the future
        Added HA_OPTION_NULL_FIELDS, HA_OPTION_PAGE_CHECKSUM, HA_CREATE_PAGE_CHECKSUM
        Added new error message HA_ERR_NEW_FILE
        Added optional new row type BLOCK_RECORD
        Renamed HA_EXTRA_PREPARE_FOR_DELETE to HA_EXTRA_PREPARE_FOR_DROP
        Added HA_EXTRA_PREARE_FOR_RENAME to inform handler we will do a rename
        (Added define to make things compatible until 6.0)
        Moved invalidator_by_filename form myisam.h
      include/my_dbug.h:
        Poirtablity fix
      include/my_global.h:
        Added helper macros STATIC_INLINE and MY_ERRPTR
        Added NEED_EXPLICIT_SYNC_DIR
      include/my_handler.h:
        Added missing casts
        Moved some constants and macros out from myisam.h to make these generally available
        Renamed mi_compare_text() to ha_compare_text() as this function is not myisam specific
        Renamed mi_portable_sizeof_char_ptr to portable_sizeof_char_ptr
        Added registering of handler messages for better error reporting during startup
      include/my_sys.h:
        Added my_sync_dir() and my_sync_dir_by_file()
        More comments
        Some indentation fixes
        Moved bit functions to my_bit.h
        Added prototype for crc32()
      include/myisam.h:
        Moved things from here to my_handler.h to make them more accessable
      libmysql/Makefile.shared:
        Added my_sync
      mysys/array.c:
        Fixed indentation and spelling errors
        Split set_dynamic() to two functions
        Added allocate_dynamic() as a new visiable function
        (no new code, only refactoring)
      mysys/mf_iocache.c:
        More DBUG
      mysys/mf_keycache.c:
        More explicite ASSERT
        Removed some casts
        Fixed indentation
      mysys/mf_tempfile.c:
        Fixed bug with possible dangling file descriptor
      mysys/my_atomic.c:
        Use compile time asserts instead of run time
      mysys/my_bit.c:
        Make most bit functions inline
      mysys/my_bitmap.c:
        Added my_bit.h
      mysys/my_compress.c:
        Fixed indentation
      mysys/my_create.c:
        Added my_sync_by_dir()
      mysys/my_delete.c:
        Added my_sync_by_dir()
      mysys/my_error.c:
        init_glob_errs() is now done in my_init()
      mysys/my_handler.c:
        mi_compare_text() -> ha_compare_text() as this is not MyISAM specific
        Added functions to initialize handler error messages
        Fixed indentation
        More clear usage of include files
      mysys/my_init.c:
        Added my_thread_stack_size to be used by other programs
        Ensure that global error messages are always initialized
        Fix windows bug that query_performance_frequency was not initialized if registry code failed
      mysys/my_open.c:
        More comments
        Removed duplicate code
      mysys/my_pread.c:
        Ensure that my_errno is set even if errno is 0
      mysys/my_realloc.c:
        Added comment
      mysys/my_rename.c:
        Added syncing of directories
      mysys/my_symlink.c:
        Added my_sync_by_dir()
      mysys/my_sync.c:
        Added my_sync_dir()
         
        On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync()
        (see "man fsync" on Mac OS X 10.3).
        my_sync_dir(): to sync a directory after a file creation/deletion/
        renaming; can be called directly or via MY_SYNC_DIR in my_create/
        my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux).
        my_sync_dir_from_file(): same as above, just more practical when the
        caller has a file name but no directory name ready.
        Should the #warning even be a #error? I mean do we want to release
        binaries which don't guarantee any durability?
      mysys/safemalloc.c:
        Added sf_malloc_report_allocated() (Debugging aid)
      sql/gen_lex_hash.cc:
        Remove inline for big function
      sql/ha_partition.cc:
        HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
        prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
      sql/ha_partition.h:
        prepare_for_delete -> prepare_for_rename() as this is the the time this function is called
      sql/handler.cc:
        ha_init_errors() is now called at startup before plugins
        This allows us to get better error messages
      sql/handler.h:
        Reserve enum value for Maria
        Add future proof enum for page checksums
      sql/item_func.cc:
        Include my_bit.h
      sql/lex.h:
        Added future proof CREATE table options
      sql/log.cc:
        Added comment
      sql/mysql_priv.h:
        thread_stack moved to mysys
      sql/mysqld.cc:
        thread_stack moved to mysys
        thread_stack -> my_thread_stack_size
        Initialize myisam key caches before plugins starts
        Initialize error to allow storage engine to give better error messages if init failes.
        Fixed indentation
        Group all MyISAM options together
        Added new status variable 'Opened_table_definitions' to allow one to monitor if table definition cache is too small
        Clarified some option help messages
      sql/opt_range.cc:
        Removed wrong usage of SAFE_MODE (this disabled key usage for UPDATES, which was never the intention)
        Removed print if total cost in a place where it didn't have any usable value
      sql/set_var.cc:
        thread_stack -> my_thread_stack
      sql/sql_class.cc:
        Intialize transaction object properly
      sql/sql_parse.cc:
        thread_stack -> my_thread_stack
      sql/sql_select.cc:
        Include my_bit.h
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      sql/sql_show.cc:
        Simplify handling of ha_choice variables
        Added future safe PAGE_CHECKSUM option
        Addid missing 'transactional=#' in information schema
      sql/sql_table.cc:
        HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_FORCE_REOPEN when doing reopen
        HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_RENAME when doing rename
        Removed not needed initialization
      sql/sql_test.cc:
        thread_stack -> my_thread_stack
      sql/sql_yacc.yy:
        Simplify handling of ha_choice variables
        Added future proof create table options TABLE_CHECKSUM=# & PAGE_CHECKSUM=#
      sql/table.cc:
        Save page_checksum in .frm
      sql/table.h:
        Added variable to hold create table option PAGE_CHECKSUM
      sql/unireg.cc:
        Added syncing of directories
      storage/myisam/ft_boolean_search.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ft_eval.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ft_nlq_search.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ft_parser.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ft_stopwords.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ft_test1.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/ft_update.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/ha_myisam.cc:
        Include my_bit.h
      storage/myisam/mi_check.c:
        MI_MAX_POSSIBLE_KEY_BUFF -> HA_MAX_POSSIBLE_KEY_BUFF
        mi_compare_text() -> ha_compare_text()
        Added BLOCK_RECORD to avoid compiler warnings
      storage/myisam/mi_checksum.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_create.c:
        MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
        MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_dynrec.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_extra.c:
        HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
      storage/myisam/mi_open.c:
        MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_packrec.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_range.c:
        mi_compare_text -> ha_compare_text
      storage/myisam/mi_test1.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_test2.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/mi_unique.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/mi_write.c:
        mi_compare_text() -> ha_compare_text()
      storage/myisam/myisamchk.c:
        Include my_bit.h
      storage/myisam/myisamdef.h:
        Moved store_key_length_inc to handler.h
      storage/myisam/myisampack.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisam/sp_test.c:
        mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr
      storage/myisammrg/ha_myisammrg.cc:
        HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP
      include/my_bit.h:
        New BitKeeper file ``include/my_bit.h''
      fb84f573
  30. 28 Sep, 2007 1 commit
    • unknown's avatar
      Bug#30795 Query on INFORMATION_SCHEMA.SCHEMATA, wrong result · fcc3be91
      unknown authored
      skip the check of directory presence for 'information_schema' name
      
      
      mysql-test/r/information_schema.result:
        test result
      mysql-test/t/information_schema.test:
        test case
      sql/sql_show.cc:
        skip the check of directory presence for 'information_schema' name
      fcc3be91
  31. 20 Sep, 2007 1 commit
    • unknown's avatar
      Bug#27747 database metadata doesn't return sufficient column default info · fac190a2
      unknown authored
      added get_field_default_value() function which obtains default value from the field
      (used in store_create_info() & get_schema_column_record() functions)
      
      
      mysql-test/r/alter_table.result:
        result fix
      mysql-test/r/create.result:
        result fix
      mysql-test/r/ctype_collate.result:
        result fix
      mysql-test/r/ctype_recoding.result:
        result fix
      mysql-test/r/default.result:
        result fix
      mysql-test/r/gis.result:
        result fix
      mysql-test/r/grant.result:
        result fix
      mysql-test/r/information_schema.result:
        result fix
      mysql-test/r/key.result:
        result fix
      mysql-test/r/mysql.result:
        result fix
      mysql-test/r/ps_1general.result:
        result fix
      mysql-test/r/show_check.result:
        result fix
      mysql-test/r/sp.result:
        result fix
      mysql-test/r/type_enum.result:
        result fix
      mysql-test/r/type_ranges.result:
        result fix
      mysql-test/t/information_schema.test:
        test case
      fac190a2
  32. 23 Aug, 2007 1 commit
    • unknown's avatar
      Bug#30593 No cipher list returned for "SHOW STATUS LIKE 'Ssl_cipher_list'" · 50911dec
      unknown authored
       - Move increment of "i" to "increment section" of for loop
       - Protect against writing after end of "buff"(backport from 5.1)
      
      
      sql/sql_show.cc:
        - Move the increment of i to "increment" section of for loop. Since "i"
        was initially 0 the for loop exited immediately
        - Add protection for writing after end of "buff"
      50911dec
  33. 21 Aug, 2007 1 commit