1. 15 Oct, 2009 6 commits
    • Alexander Nozdrin's avatar
      A backporting patch for the following revision from 6.0: · 71757339
      Alexander Nozdrin authored
      revno: 2630.22.41
      committer: Alexander Nozdrin <alik@mysql.com>
      branch nick: 6.0-rt-bug39255
      timestamp: Thu 2008-10-16 16:39:30 +0400
      message:
        A patch for Bug#39255: Stored procedures: crash if function
        references nonexistent table.
        
        The problem is not reproduced in 6.0. Adding a test case.
      71757339
    • Alexander Nozdrin's avatar
      Adding funcs_1 into "make test" · 3b3955be
      Alexander Nozdrin authored
      3b3955be
    • Magne Mahre's avatar
      Bug #43054 Assertion `!table->auto_increment_field_not_null' failed when · a363c06e
      Magne Mahre authored
                 redefining trigger
            
      The 'table->auto_increment_field_not_null' flag is only valid within
      processing of a single row, and should be set to FALSE before
      navigating to the next row, or exiting the operation.
            
      This bug was caused by an SQL error occuring while executing a trigger
      after the flag had been set, so the normal resetting was bypassed.
      The table object was then returned to the table share's cache in
      a dirty condition.   When the table object was reused, an assert
      caught that the flag was set.
            
      This patch explicitly clears the flag on error/abort.
      
      
      Backported from mysql-6.0-codebase  revid: 2617.52.1
      a363c06e
    • Magne Mahre's avatar
      Bug #38124 (clean-up patch) · 7e895de8
      Magne Mahre authored
      The fix for Bug #38124 introuced a bug. If the value given 
      for a set_var exceeded the length of the temporary buffer,
      we would read behind the end of the buffer.  Using 
      c_ptr_safe(), instead of c_ptr(), ensures that we won't
      read beyond the buffer limit
      
      mysql-6.0-codebase revid: 2617.44.1
      7e895de8
    • Magne Mahre's avatar
      Bug #37433 Deadlock between open_table, close_open_tables, · 53d54948
      Magne Mahre authored
                      get_table_share, drop_open_table
                  
      In the partition handler code, LOCK_open and share->LOCK_ha_data
      are acquired in the wrong order in certain cases.  When doing a
      multi-row INSERT (i.e a INSERT..SELECT) in a table with auto-
      increment column(s). the increments must be in a monotonically
      continuous increasing sequence (i.e it can't have "holes"). To
      achieve this, a lock is held for the duration of the operation.
      share->LOCK_ha_data was used for this purpose.
                  
      Whenever there was a need to open a view _during_ the operation
      (views are not currently pre-opened the way tables are), and
      LOCK_open was grabbed, a deadlock could occur.  share->LOCK_ha_data
      is other places used _while_ holding LOCK_open.
                  
      A new mutex was introduced in the HA_DATA_PARTITION structure,
      for exclusive use of the autoincrement data fields, so we don't
      need to overload the use of LOCK_ha_data here.
                  
      A module test case has not been supplied, since the problem occurs
      as a result of a race condition, and testing for this condition 
      is thus not deterministic.   Testing for it could be done by
      setting up a test case as described in the bug report.
      53d54948
    • Magne Mahre's avatar
      Bug #38124 "general_log_file" variable silently unset when using expression · ffbe8512
      Magne Mahre authored
                        
      When assigning the new string value to the variable, the
      Item::str_value member was used.  This is not according to
      the protocol.  str_value is an internal member used for
      temporary assignments, and is not consistently set for all
      string operations.  It is set for constant strings, so it would
      work in these cases, but not for string functions (concat,
      substr, etc.)
                        
      The correct approach is to use Item::val_str(..) to evaluate
      and retrieve the string.
      
      Backport from 6.0-codebase
      
      6.0-codebase revno: 2617.31.17
      ffbe8512
  2. 14 Oct, 2009 6 commits
    • Konstantin Osipov's avatar
      Backport of: · 9b41c753
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2617.22.5
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Tue 2009-01-27 05:08:48 +0300
      message:
        Remove non-prefixed use of HASH.
        Always use my_hash_init(), my_hash_inited(), my_hash_search(),
        my_hash_element(), my_hash_delete(), my_hash_free() rather
        than non-prefixed counterparts (hash_init(), etc).
        Remove the backward-compatible defines.
      9b41c753
    • Konstantin Osipov's avatar
      Backport of: · 2b75d952
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.28.1
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Thu 2008-10-23 15:23:44 +0400
      message:
        Bug#32738 "mysqld: Two slow log option/variable descriptions are
        inaccurate"
        Update option description per suggestion from the documentation team.
      
      sql/mysqld.cc:
        Update options help texts (Bug#32738). Use - instead of _ in option
        names.
      2b75d952
    • Konstantin Osipov's avatar
      Backport of: · d5948e8d
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.22.39
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Wed 2008-10-08 23:44:34 +0400
      message:
        Bug #34481 A typo in HugeTLB error Message.
      
      mysys/my_largepage.c:
        Fix a typo.
      d5948e8d
    • Jon Olav Hauglid's avatar
      Backport of revno: 2617.81.4 · 3dce051c
      Jon Olav Hauglid authored
      Bug #47274 assert in open_table on CREATE TABLE <already existing>
      
      The problem was an assertion during execution of CREATE TABLES. 
      This assertion would occur if INSERT DELAYED or REPLACE DELAYED
      were used to update a table containing an AUTO_INCREMENT column
      and if the inserted row had a user-supplied value for that column.
      Any CREATE TABLE statement (including CREATE TABLE SELECT and
      CREATE TABLE LIKE) trying to create the same table and 
      which followed the INSERT/REPLACED would cause the assertion.
      
      The problem was only noticeable on debug builds of the server
      and not present in the mysql-5.1 tree.
      
      The cause of the problem was that the code for delayed insert did
      not properly reset the TABLE->auto_increment_if_null flag after 
      The flag is used to indicate that a non-null value of an auto_increment field
      has been provided by the user or retrieved from a current record.
      Open_tables() contains an assertion that tests this flag, and this
      was triggered by CREATE TABLE.
      
      This patch fixes the problem by resetting the auto_increment_if_null
      field to FALSE once INSERT/REPLACE DELAYED has updated the table, 
      similar to what is done already for regular INSERT statements.
      
      Test case added to delayed.test.
      3dce051c
    • Konstantin Osipov's avatar
      Backport of: · c0c7925c
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.22.31
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Thu 2008-10-02 19:08:09 +0400
      message:
        Bug #34818 --default-table-type option should be removed
        Remove the deprecated option.
      
      
      sql/mysqld.cc:
        Remove a deprecated option.
      c0c7925c
    • Konstantin Osipov's avatar
      Backport of: · 595b8f92
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.22.8
      committer: Konstantin Osipov <konstantin@mysql.com>
      branch nick: mysql-6.0-runtime
      timestamp: Sun 2008-08-10 18:49:52 +0400
      message:
        Get rid of typedef struct for the most commonly used types:
        TABLE, TABLE_SHARE, LEX. This simplifies use of tags
        and forward declarations.
      595b8f92
  3. 13 Oct, 2009 6 commits
    • Konstantin Osipov's avatar
      ---------------------------------------------------------- · c84a2389
      Konstantin Osipov authored
      revno: 2630.2.16
      committer: Konstantin Osipov <konstantin@mysql.com>
      branch nick: mysql-6.0-runtime
      timestamp: Fri 2008-06-27 13:26:03 +0400
      message:
        Fix max_user_connections_func failure on Solaris.
        A connection that failed to log in due to a resource limit could
        be returned to the thread pool with a dangling link to user_connect
        structure of an old user. Later on it could be authenticated
        to a user that doesn't have a resource limit, so this dangling
        link won't be reset. --pool-of-threads mode made the situation
        easy to reproduce, and thus highlighted a bug that has been
        around forever.
        Make sure there are no dangling links.
      
      sql/sql_connect.cc:
        Do not return a connection structure to the thread pool with a dangling link.
      c84a2389
    • Konstantin Osipov's avatar
      Backport of: · df39e6ab
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.7.1
      committer: Konstantin Osipov <konstantin@mysql.com>
      branch nick: mysql-6.0-lock-tables-new
      timestamp: Mon 2008-06-02 15:14:18 +0400
      message:
        Fix a test suite timeout in partition.test and partition_csv.test
      
      storage/csv/ha_tina.cc:
        Change the blobroot mem root life cycle and thus fix a memory hog
        in case of many csv handlers.
      df39e6ab
    • Konstantin Osipov's avatar
      Backport of: · e2400f18
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2630.2.6
      committer: Konstantin Osipov <konstantin@mysql.com>
      branch nick: mysql-6.0-27430
      timestamp: Mon 2008-05-26 16:12:28 +0400
      message:
        Cover four special cases of WL#4166 with tests:
        - when the query cache is disabled at the time of prepared statement
        reprepare
        - when long data parameters are used
        - when character_set_connection != character_set_client, and a parameter
        conversion takes place
        - when parameter data is out of acceptable range, e.g. year 10000 is
        supplied as part of MYSQL_TYPE_DATETIME value. The server is supposed
        to warn in such case.
      
      mysql-test/include/query_cache_sql_prepare.inc:
        Addditional test for Bug#27430
      mysql-test/r/query_cache_ps_no_prot.result:
        Update result file.
      mysql-test/r/query_cache_ps_ps_prot.result:
        Update result file.
      tests/mysql_client_test.c:
        Add more tests (Bug#27430 and WL#4166).
        Fix test_datetime_range() test to correctly assert for the number
        of warnings. Additionally, print these warnings out.
      e2400f18
    • Konstantin Osipov's avatar
      Backport of: · edebd2a2
      Konstantin Osipov authored
      -----------------------------------------------------------
      revno: 2630.2.4
      committer: Konstantin Osipov <konstantin@mysql.com>
      branch nick: mysql-6.0-runtime
      timestamp: Fri 2008-05-23 02:42:32 +0400
      message:
        Bug#27430 "Crash in subquery code when in PS and table DDL changed after
        PREPARE"
        Add a test case for the situation with small TDC and many merge children.
      
      from 6.0-codebase.
      
      mysql-test/r/merge.result:
        Update results (Bug#27430)
      mysql-test/t/merge.test:
        Add test case (Bug#27430)
      edebd2a2
    • Konstantin Osipov's avatar
      Backport of the following revision from 6.0-codebase: · 9a4a845a
      Konstantin Osipov authored
      ----------------------------------------------------------
      revno: 2617.1.12
      committer: kostja@bodhi.(none)
      timestamp: Sun 2008-04-20 11:18:52 +0400
      message:
        A fix for Bug#32771 "events_bugs.test fails randomly".
        In Event_scheduler::stop(), which may be called from destructor,
        wait synchronously for the parallel Event_scheduler::stop() to
        complete before returning. This fixes a race between
        MySQL shutdown thread and the scheduler thread who could call
        stop() in parallel.
      
      sql/event_scheduler.cc:
        There was a race condition between the shutdown thread and
        the scheduler thread: the shutdown thread could delete the scheduler
        mutex before the sheduler has stopped.
      9a4a845a
    • Konstantin Osipov's avatar
      Introduce thd->query_cache_tls (thread · 99420dd9
      Konstantin Osipov authored
      local storage for query cache). 
      We need more than one pointer in a thread to
      represent the query cache and net->query_cache_query can not be used
      any more (due to ABI compatibility issues and to different life
      time of NET and THD).
      This is a backport of the following patch from 6.0:
      ----------------------------------------------------------
      revno: 2476.1157.2
      committer: kostja@bodhi.(none)
      timestamp: Sat 2007-06-16 13:29:24 +0400
      
      
      include/mysql.h.pp:
        Update the ABI (NET::query_cache_query is now unused).
      include/mysql_com.h:
        NET::query_cache_query is now unused.
      sql/mysql_priv.h:
        Update signatures of ex-functios now member functions.
      sql/sql_cache.cc:
        Introduce THD::query_cache_tls.
      sql/sql_cache.h:
        Introduce THD::query_cache_tls.
      sql/sql_class.cc:
        Introduce THD::query_cache_tls.
      sql/sql_class.h:
        Introduce THD::query_cache_tls.
      sql/sql_parse.cc:
        Use THD::query_cache_tls.
      sql/sql_select.cc:
        Use THD::query_cache_tls.
      99420dd9
  4. 12 Oct, 2009 3 commits
    • Magne Mahre's avatar
      Bug #33693 general log name and location depend on PID file, · 9a65687b
      Magne Mahre authored
                 not on predefined values
      
      The default name of the PID file was constructed, as documented, 
      based on the hostname.  This name was subsequently used as the
      base for the general log file name.   If the name of the PID
      file was overridden in the configuration, and no explicit name
      was set for the general log file, the path location for the
      PID file was used also for the general log file.
                        
      A new variable, 'default_logfile_name', has been introduced.  This name
      is constructed based on the hostname, and is then used to
      construct both the PID file and the general log file.
                        
      The general log file will now, unless explicitly set, be
      located in the server data directory (as documentated in
      the server docs)
      
      
      mysql-test/t/log_state.test:
        run/mysqld.log was created as a consequence of this bug.
        After the fix it is no longer created, and will thus not
        be deleted.
      9a65687b
    • Jon Olav Hauglid's avatar
      Bug #35877 Update .. WHERE with function, constraint violation, crash · 16537b03
      Jon Olav Hauglid authored
      Unable to reproduce crash with current version of the 5.5.0 codebase.
      Test case for MyISAM/InnoDB based on the bug rapport added to 
      sp_trans.test.
      
      Backport of revno: 2617.65.9.
      16537b03
    • Jon Olav Hauglid's avatar
      Bug #34453 Can't change size of file (Errcode: 1224) · 1186f5ec
      Jon Olav Hauglid authored
           
      Unable to reproduce error on current version of the 5.5.0
      codebase. Test case based on the bug report added to trigger.test.
      
      Backport of revno: 2617.52.11.
      1186f5ec
  5. 10 Oct, 2009 3 commits
  6. 09 Oct, 2009 16 commits
    • Alexander Nozdrin's avatar
      Backporting another patch for WL#4300 (Define privileges for tablespaces). · f45aea29
      Alexander Nozdrin authored
      Original revision in 6.0:
      ------------------------------------------------------------
      revno: 2630.13.14
      committer: Alexander Nozdrin <alik@mysql.com>
      branch nick: 6.0-rt-fix
      timestamp: Fri 2008-07-25 22:44:20 +0400
      message:
        Fix test & result files (WL 4300).
      ------------------------------------------------------------
      f45aea29
    • Alexander Nozdrin's avatar
      A backporting patch for WL#4300 (Define privileges for tablespaces). · 13f09243
      Alexander Nozdrin authored
      Original revision in 6.0:
      ------------------------------------------------------------
      revno: 2630.13.11
      committer: Alexander Nozdrin <alik@mysql.com>
      branch nick: 6.0-rt-wl4300
      timestamp: Thu 2008-07-24 11:44:21 +0400
      message:
        A patch for WL#4300: Define privileges for tablespaces.
      ------------------------------------------------------------
      
      per-file messages:
        mysql-test/r/grant.result
          Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
        mysql-test/r/ps.result
          Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
        mysql-test/r/system_mysql_db.result
          Update result file: new columm 'Create_tablespace_priv' has been added to mysql.user.
        mysql-test/suite/falcon/r/falcon_tablespace_priv.result
          Test case for WL#4300.
        mysql-test/suite/falcon/t/falcon_tablespace_priv.test
          Test case for WL#4300.
        mysql-test/suite/ndb/r/ndb_dd_ddl.result
          Test case for WL#4300.
        mysql-test/suite/ndb/t/ndb_dd_ddl.test
          Test case for WL#4300.
        scripts/mysql_system_tables.sql
          New columm 'Create_tablespace_priv' has been added to mysql.user.
        scripts/mysql_system_tables_data.sql
          'CREATE TABLESPACE' is granted by default to the root user.
        scripts/mysql_system_tables_fix.sql
          Grant 'CREATE TABLESPACE' privilege during system table upgrade
          if a user had SUPER privilege.
        sql/sql_acl.cc
          Added CREATE TABLESPACE privilege.
        sql/sql_acl.h
          Added CREATE TABLESPACE privilege.
        sql/sql_parse.cc
          Check global 'CREATE TABLESPACE' privilege for the following SQL statements:
            - CREATE | ALTER | DROP TABLESPACE
            - CREATE | ALTER | DROP LOGFILE GROUP
        sql/sql_show.cc
          Added CREATE TABLESPACE privilege.
        sql/sql_yacc.yy
          Added CREATE TABLESPACE privilege.
      13f09243
    • Alexander Nozdrin's avatar
      Merge from mysql-next-bugfixing. · 153f5678
      Alexander Nozdrin authored
      153f5678
    • Alexander Nozdrin's avatar
      Merge from mysql-next-mr. · 10b08544
      Alexander Nozdrin authored
      10b08544
    • Alexander Nozdrin's avatar
      Merge from mysql-next-mr. · 4337c380
      Alexander Nozdrin authored
      4337c380
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · dea2a8da
      Alexander Nozdrin authored
      dea2a8da
    • Alexander Nozdrin's avatar
      Update version in default.conf. · eddd727a
      Alexander Nozdrin authored
      eddd727a
    • Jon Olav Hauglid's avatar
      Bug #34197 CREATE PROCEDURE fails when COMMENT truncated in non · 2464586b
      Jon Olav Hauglid authored
                 strict SQL mode
      
      The problem was that a COMMENT longer than 64 characters
      caused CREATE PROCEDURE to fail.
      
      This patch fixed the problem by changing the COMMENT field in 
      mysql.proc from char(64) to text. The corresponding ROUTINE_COMMENT
      field in INFORMATION_SCHEMA.ROUTINES is also changed from
      varchar(64) to longtext.
      
      mysql_system_tables.sql and mysql_system_tables_fix.sql updated.
      Test case added to sp.test and affected result-files updated.
      2464586b
    • Dmitry Lenev's avatar
      Fix for bug #39932 "create table fails if column for FK is in different · b8ffd1fb
      Dmitry Lenev authored
      case than in corr index".
      
      Server was unable to find existing or explicitly created supporting
      index for foreign key if corresponding statement clause used field
      names in case different than one used in key specification and created
      yet another supporting index.
      In cases when name of constraint (and thus name of generated index)
      was the same as name of existing/explicitly created index this led
      to duplicate key name error.
      
      The problem was that unlike all other code Key_part_spec::operator==()
      compared field names in case sensitive fashion. As result routines
      responsible for getting rid of redundant generated supporting indexes
      for foreign key were not working properly for versions of field names
      using different cases.
      
      mysql-test/r/innodb_mysql.result:
        Added test case for bug #39932 "create table fails if column for FK
        is in different case than in corr index".
      mysql-test/t/innodb_mysql.test:
        Added test case for bug #39932 "create table fails if column for FK
        is in different case than in corr index".
      sql/sql_class.cc:
        Make field name comparison case-insensitive like it is
        in the rest of server.
      b8ffd1fb
    • Alexander Nozdrin's avatar
      Backporting of Bug#40128 from 6.0 to next-mr. · be8e3974
      Alexander Nozdrin authored
      Original revision in 6.0:
      ------------------------------------------------------------
      revno: 2599.108.1
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: 6.0-rpl-bug40128
      timestamp: Wed 2009-01-21 15:33:42 +0300
      message:
        Fix for Bug#40128: drop-no_root fails under windows in 6.0-rpl.
        
        The problem was that directories with no permission (000) files
        are deleted differently on UNIX and on Windows.
        
        On UNIX, 000-permission file is deleted perfectly, but other files
        are left in the directory.
        
        On Windows, 000-permission file is not deleted, but other files
        are deleted.
        
        Also, the fix needed a change in mysqltest.c: 'chmod' directive
        should return a positive error code (in order to be handled).
        It's decided to return a constant '1' for all error codes
        just to be OS-independent.
      ------------------------------------------------------------
      be8e3974
    • Jon Olav Hauglid's avatar
      Bug #21099 MySQL 5.0.22 silently creates MyISAM tables even though · 05f88483
      Jon Olav Hauglid authored
                 InnoDB specified.
                  
      NO_ENGINE_SUBSTITUTION added to TRADITIONAL sql mode to prevent
      silent conversions from InnoDB to MyISAM in that sql mode.
      
      A number of test case results files updated to reflect this change.
      Test added to sql_mode.test that checks that TRADITIONAL really 
      includes NO_ENGINE_SUBSTITUION.
      
      
      mysql-test/t/ctype_utf8.test:
        This test lacked "--source include/have_innodb.inc" which meant that 
        a number of DDL statements with engine=innodb in reality were using 
        myisam. "--disable_warnings" around all such statements, meant that 
        these engine substitutions were not visible. Test case has been 
        updated to include have_innodb.inc and "--disable_warnings" have been 
        removed for the relevant DDL statements.
      05f88483
    • Dmitry Lenev's avatar
      This patch is prerequisite for the 2nd milestone of WL#148 "Foreign keys" · c0221b0e
      Dmitry Lenev authored
      storing and restoring information about foreign keys in the .FRM files and
      properly displaying it in SHOW CREATE TABLE output and I_S tables.
      
      The idea of this patch is to change type of Key_part_spec::field_name and
      Key::name to LEX_STRING in order to avoid extra strlen() calls during
      semantic analysis and statement execution, particularly, in code to be
      implemented on the 2nd milestone of WL#148.
      
      Note that since we are not using LEX_STRING everywhere yet (e.g. in
      Create_field and KEY) and we want to limit scope of our changes we
      have to do strlen() in places where we create Key and Key_part_spec
      instances from objects using plain (char*) for strings. These calls
      will go away during the process of further (char*) -> LEX_STRING
      refactoring.
      
      We have introduced these changes in 6.0 and backported them to 5.5
      tree to make people aware of these changes as early as possible and
      to simplify merges with mysql-fk and mysql-6.1-fk trees.
      
      No test case is needed since this patch does not introduce any
      user visible changes.
      
      sql/sql_class.cc:
        Key_part_spec::field_name is now LEX_STRING. Adjusted code accordingly.
      sql/sql_class.h:
        Changed type of Key_part_spec::field_name and Key::name to LEX_STRING in
        order to avoid extra strlen() calls in code responsible for semantic
        analysis and statement execution (e.g. in future code responsible for
        saving/restoring info about foreign keys).
      sql/sql_lex.cc:
        Moved null_lex_str from sql_yacc.yy to sql_lex.cc and added its
        declaration to sql_lex.h to make it accessible in other SQL-layer
        modules (e.g. sql_parse.cc).
      sql/sql_lex.h:
        Made null_lex_str accessible from outside of sql_lex.cc.
      sql/sql_parse.cc:
        Key_part_spec::field_name and Key::name are now LEX_STRING. Adjusted
        code accordingly.
      sql/sql_table.cc:
        Adjusted code to accomodate change of type to LEX_STRING for
        Key_part_spec::field_name and Key::name.
      sql/sql_yacc.yy:
        Now Key::name and Key_part_spec::field_name are LEX_STRINGs. Adjusted
        grammar to be able properly initialize them. This should allow us to
        save on some strlen() calls during later stages of statement execution.
      c0221b0e
    • Alexander Nozdrin's avatar
    • Jon Olav Hauglid's avatar
      Bug #44651 "have_community_features" variable should be renamed · 0da35764
      Jon Olav Hauglid authored
                 "have_profiling"
      
      1) Renamed have_community_features server system variable to
      have_profiling.
      2) Removed eable-community-features configure option and
      ENABLE_COMMUNITY_FEATURES macro.
      3) Removed COMMUNITY_SERVER macro and replaced its usage by 
      ENABLED_PROFILING.
      
      Only --enable-profiling is now needed to enable profiling.
      It was the only existing "community feature", so there was
      no need for both configure options.
      
      Using --enable-community-features will give a warning message
      since it no longer exists.
      0da35764
    • Staale Smedseng's avatar
      This is a backport of the two patches for Bug #28299: · 220d9b8c
      Staale Smedseng authored
      To-number conversion warnings work differenly with CHAR 
      and VARCHAR sp variables.
      
      The original revision-IDs are:
        staale.smedseng@sun.com-20081124095339-2qdvzkp0rn1ljs30
        staale.smedseng@sun.com-20081125104611-rtxic5d12e83ag2o
                                                      
      The patch provides ER_TRUNCATED_WRONG_VALUE warning messages
      for conversion of VARCHAR to numberic values, in line with
      messages provided for CHAR conversions. Conversions are
      checked for success, and the message is emitted in case
      failure.
                                                      
      The tests are amended to accept the added warning messages,
      and explicit conversion of ON/OFF values is added for
      statements checking system variables. In test
      rpl.rpl_switch_stm_row_mixed checking for warnings is
      temporarily disabled for one statement, as this generates
      warning messages for strings that vary between executions.
      
      
      sql/field.cc:
        The pushing of the truncation warning is now done in a
        separate static function, and used in various places.
      220d9b8c
    • Magne Mahre's avatar
      Bug #31031 ALTER TABLE regression in 5.0 · 5ca59914
      Magne Mahre authored
      An ALTER TABLE statement which added a column and added
      a non-partial index on it failed with:
                  
      "ERROR 1089 (HY000): Incorrect sub part key; the used
      key part isn't a string, the used length is longer than
      the key part, or the storage engine doesn't support unique
      sub keys"
                  
      In a check introduced to fix an earlier bug (no. 26794),
      to allow for indices on spatial type columns, the
      test expression was flawed (a logical OR was used instead
      of a logical AND), which led to this regression.
                  
      The code in question does a sanity check on the key, and
      the flawed code mistakenly classified any index created
      in the way specified above as a partial index.  Since
      many data types does not allow partial indices, the
      statement would fail.
      5ca59914