1. 10 Oct, 2009 2 commits
  2. 09 Oct, 2009 31 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
    • Magne Mahre's avatar
      Bug #33831 mysql_real_connect() connects again if · c9248c64
      Magne Mahre authored
                 given an already connected MYSQL handle
      
      mysql_real_connect() did not check whether the MYSQL connection
      handler was already connected and connected again even if so. 
      Now a CR_ALREADY_CONNECTED error is returned.
      c9248c64
    • Alexander Nozdrin's avatar
      f0195faf
    • Alexander Nozdrin's avatar
      Merge from mysql-next-mr. · 90f434cf
      Alexander Nozdrin authored
      90f434cf
    • Jon Olav Hauglid's avatar
      Bug #25863 No database selected error, but documentation · 4dae0e03
      Jon Olav Hauglid authored
                 says * for global allowed
      
      The current behaviour of 'GRANT *' was changed as a part of the fix
      for Bug#19022, Bug#17199 and Bug#18444. To avoid regression, we keep
      the current behavior and update the documentation. 
      Test case added to grant.test.
      4dae0e03
    • Alexander Nozdrin's avatar
      Pull from mysql-next-mr. · 192faa57
      Alexander Nozdrin authored
      192faa57
    • Alexander Nozdrin's avatar
      Pull from mysql-next-mr. · c40a4cf4
      Alexander Nozdrin authored
      c40a4cf4
    • Konstantin Osipov's avatar
      Backport the following revision from 6.0: · df3265e2
      Konstantin Osipov authored
      ```-------------------------------------------------------
      revno: 2476.657.210
      committer: kostja@bodhi.(none)
      timestamp: Tue 2007-12-04 18:27:44 +0300
      message:
        Fix a potential linking error with libmysql and libmysqld on Windows:
        remove declarations of removed functions (Bug#31952)
      ```
      
      -------------------------------------------------------
      
      
      libmysql/libmysql.def:
        Remove declarations of removed functions (Bug#31952)
      libmysqld/libmysqld.def:
        Remove declarations of removed functions (Bug#31952)
      df3265e2
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · 798cbaa2
      Alexander Nozdrin authored
      798cbaa2
    • Alexander Nozdrin's avatar
      Change the version tag (to 5.5.0). · a8b2c058
      Alexander Nozdrin authored
      a8b2c058
    • Konstantin Osipov's avatar
      Backport to 5.4 the following changesets: · 9dff8434
      Konstantin Osipov authored
      revno: 2476.785.24
      committer: kostja@bodhi.(none)
      timestamp: Tue 2007-10-16 20:19:00 +0400
      message:
        Reflect a rename of a member in the client ABI (a compatible change).
      ----------------------------------------------------------
      revno: 2476.423.26
      committer: kostja@bodhi.(none)
      timestamp: Tue 2007-10-16 20:12:37 +0400
      message:
        Update the client ABI to reflect member rename
        (this is a backward-compatible change).
      ----------------------------------------------------------
      revno: 2476.785.22
      committer: kostja@bodhi.(none)
      timestamp: Tue 2007-10-16 19:37:25 +0400
      message:
        Remove some remains of support of 3.22 protocol. This was in fact dead code,
        since the option to talk 3.22 protocol was removed in 4.1 and there
        is no other protocol negotiation mechanism besides this option.
      
      include/mysql.h.pp:
        Update ABI.
      include/mysql_com.h:
        Remove an unused 3.22 protocol member.
      sql/field.cc:
        Remove an unused 3.22 protocol check.
      sql/mysqld.cc:
        Remove an unused 3.22 protocol check.
      sql/net_serv.cc:
        Remove an unused 3.22 protocol variable initialization.
      sql/protocol.cc:
        Remove an unused 3.22 protocol check.
      9dff8434
    • Alexander Nozdrin's avatar
      Merge from mysql-next-mr. · ac8f17ad
      Alexander Nozdrin authored
      ac8f17ad
    • Dmitry Lenev's avatar
      Fix for bug #44738 "fill_schema_table_from_frm() opens tables without · b20a4f01
      Dmitry Lenev authored
      lowercasing table name".
      
      In lower_case_table_names > 0 mode some queries to I_S left entries
      with incorrect key in table definition cache. This wasted memory and
      caused some of the further queries to I_S to produce stale results
      in cases when table definition was changed by a DDL statement.
      Also in combination with similar problem in CREATE TABLE (which also
      has peeked into table definition cache using non-normalized key) this
      issue led to to spurious ER_TABLE_EXISTS_ERROR errors when one tried
      to create a table with the same name as a previously existing but
      dropped table (assuming that table name contained characters in upper
      case).
      
      This problem occured due to fact that fill_schema_table_from_frm()
      was not properly normalizing (lowercasing) database and table names
      which it used for lookups in table definition cache.
      
      This fix adds proper normalization to this function. It also solves
      similar problem in CREATE TABLE's code by ensuring that it uses
      properly normalized version of table name when it peeks into table
      definition cache instead of non-normalized one.
      
      mysql-test/r/lowercase_table2.result:
        Added test for #44738 "fill_schema_table_from_frm() opens tables
        without lowercasing table name".
      mysql-test/t/lowercase_table2.test:
        Added test for #44738 "fill_schema_table_from_frm() opens tables
        without lowercasing table name".
      sql/sql_show.cc:
        Normalize database and table name before using them for looking
        up entry in table definition cache.
      sql/sql_table.cc:
        Ensure that CREATE TABLE uses properly normalized version of table
        name when it peeks into table definition cache.
      b20a4f01
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · 09cdd045
      Alexander Nozdrin authored
      09cdd045
    • Alexander Nozdrin's avatar
      Fix default.cof. · f6e3ec53
      Alexander Nozdrin authored
      f6e3ec53
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk-bugfixing. · a89855c5
      Alexander Nozdrin authored
      a89855c5
  3. 08 Oct, 2009 4 commits
  4. 07 Oct, 2009 3 commits
    • Alexander Nozdrin's avatar
      A backport of a patch for Bug#35297. · 63e50788
      Alexander Nozdrin authored
      Original revision in mysql-6.0-codebase is:
      
      revno: 2617.31.14
      committer: Konstantin Osipov <kostja@sun.com>
      branch nick: mysql-6.0-runtime
      timestamp: Sat 2009-03-28 11:42:55 +0300
      message:
        Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
        update test result after a merge from now.
      63e50788
    • Alexander Nozdrin's avatar
      A backport a patch of Bug#34828. · 5281fa36
      Alexander Nozdrin authored
      Original revision is from mysql-6.0-codebase:
      
      revno: 2617.23.13
      committer: Alexander Nozdrin <alik@sun.com>
      branch nick: 6.0-rt-bug34828
      timestamp: Tue 2009-02-24 14:25:46 +0300
      message:
        A patch for Bug#34828: OF is taken as OFF and a value of 0
        is set for variable SQL_notes.
        
        The problem was that partial match was allowed for keywords.
        
        A fix is to disable partial match and require full match.
      5281fa36
    • Alexander Nozdrin's avatar
      A backport of patch for Bug#26704. · 93848350
      Alexander Nozdrin authored
      Original revision is from mysql-6.0-codebase:
      
      revno: 2630.3.1
      committer: Alexander Nozdrin <alik@mysql.com>
      branch nick: 6.0-rt-bug26704
      timestamp: Thu 2008-05-29 21:04:06 +0400
      message:
        A fix for Bug#26704: Failing DROP DATABASE brings
        mysql-client out of sync.
      
        The problem was that we changed current database w/o caring
        whether it was dropped successfully or not.
      
        The fix is not to change current database if we failed to drop it.
      93848350