1. 09 Oct, 2009 10 commits
    • Alexander Nozdrin's avatar
      Merge from mysql-next-mr. · 71563ed5
      Alexander Nozdrin authored
      71563ed5
    • Jon Olav Hauglid's avatar
      Bug #25863 No database selected error, but documentation · a7a161fa
      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.
      a7a161fa
    • Konstantin Osipov's avatar
      Backport the following revision from 6.0: · 956c8776
      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)
      956c8776
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · 477e59f2
      Alexander Nozdrin authored
      477e59f2
    • Alexander Nozdrin's avatar
      Change the version tag (to 5.5.0). · 5041ac75
      Alexander Nozdrin authored
      5041ac75
    • Konstantin Osipov's avatar
      Backport to 5.4 the following changesets: · a9d4ba84
      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.
      a9d4ba84
    • Dmitry Lenev's avatar
      Fix for bug #44738 "fill_schema_table_from_frm() opens tables without · 510318ad
      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.
      510318ad
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk. · 08759f58
      Alexander Nozdrin authored
      08759f58
    • Alexander Nozdrin's avatar
      Fix default.cof. · b61aec18
      Alexander Nozdrin authored
      b61aec18
    • Alexander Nozdrin's avatar
      Merge from mysql-trunk-bugfixing. · f558b85e
      Alexander Nozdrin authored
      f558b85e
  2. 08 Oct, 2009 4 commits
  3. 07 Oct, 2009 2 commits
  4. 05 Oct, 2009 2 commits
  5. 03 Oct, 2009 3 commits
  6. 02 Oct, 2009 4 commits
  7. 01 Oct, 2009 5 commits
  8. 30 Sep, 2009 10 commits
    • Joerg Bruehe's avatar
      Merge "trunk-build" up into "next-mr". · da58f0be
      Joerg Bruehe authored
      da58f0be
    • Vladislav Vaintroub's avatar
      backport of · f515c3f3
      Vladislav Vaintroub authored
      Revision: 
      2597.72.1 revid:sp1r-Reggie@core.-20080403153947-15243
      removed instances of __NT__ from code. We now only build "NT" binaries
      f515c3f3
    • Vladislav Vaintroub's avatar
      Backport of this changeset · bfd9ddde
      Vladislav Vaintroub authored
      http://lists.mysql.com/commits/59686
      
      Cleanup pthread_self(), pthread_create(), pthread_join() implementation on Windows.
      Prior implementation is was unnecessarily complicated and even differs in embedded
      and non-embedded case.
            
      Improvements in this patch:
      * pthread_t is now the unique thread ID, instead of HANDLE returned by beginthread
            
      This simplifies pthread_self() to be just straight GetCurrentThreadId().
      prior it was much  art involved in passing the beginthread() handle from the caller
      to the TLS structure in the child thread ( did not work for the main thread of
      course)
            
      * remove MySQL specific my_thread_init()/my_thread_end() from pthread_create.
      No automagic is done on Unix on pthread_create(). Having the same on Windows will 
      improve portability and avoid extra #ifdef's
            
      * remove redefinition of getpid() - it was defined as GetCurrentThreadId()
      bfd9ddde
    • Vladislav Vaintroub's avatar
      Backport http://lists.mysql.com/commits/57778 · 146a86b3
      Vladislav Vaintroub authored
      2677 Vladislav Vaintroub	2008-11-04
      CMakeLists.txt files cleanup
      - remove SAFEMALLOC and SAFE_MUTEX definitions that were 
      present in *each* CMakeLists.txt. Instead, put them into top level 
      CMakeLists.txt, but disable on Windows, because
      a) SAFEMALLOC does not add any functionality that is not already
      present in Debug C runtime ( and 2 safe malloc one on top of the other 
      only unnecessarily slows down the server) 
            
      b)SAFE_MUTEX does not work on Windows  and have been
      explicitely  disabled on Windows with #undef previously.  Fortunately,
      ntdll does  pretty good  job identifying l problems with 
      CRITICAL_SECTIONs.
      DebugBreak()s on using uninited critical section, unlocking unowned 
      critical section)
            
      -Also, remove occationally used -D_DEBUG (added by compiler 
      anyway)
      
      
      sql/udf_example.c:
        use unixish end of line
      146a86b3
    • Ingo Struewing's avatar
      auto-merge · ba750584
      Ingo Struewing authored
      ba750584
    • Ingo Struewing's avatar
      Bug#37267 - connect() EINPROGRESS failures mishandled in client library · bc9a7832
      Ingo Struewing authored
      We cann connect() in a non-blocking mode to be able to specify a
      non-standard timeout.
      
      The problem was that we did not fetch the status from the
      non-blocking connect(). We assumed that poll() would not return
      a POLLIN flag if the connect failed. But on some platforms this
      is not true.
      
      After a successful poll() we do now retrieve the status value
      from connect() with getsockopt(...SO_ERROR...). Now we do know
      if (and how) the connect failed.
      
      The test case for my investigation was rpl.rlp_ssl1 on an
      Ubuntu 9.04 x86_64 machine. Both, IPV4 and IPV6 were active.
      'localhost' resolved first for IPV6 and then for IPV4. The
      connection over IPV6 was blocked. rpl.rlp_ssl1 timed out
      as it did not notice the failed connect(). The first read()
      failed, which was interpreted as a master crash and the
      connection was tried to reestablish with the same result
      until the retry limit was reached.
      
      With the fix, the connect() problem is immediately recognized,
      and the connect() is retried on the second resolution for
      'localhost', which is successful.
      
      
      libmysqld/libmysqld.c:
        Bug#37267 - connect() EINPROGRESS failures mishandled in client library
        Changed a DBUG print string to distinguish the two mysql_real_connect()
        implementations in DBUG traces.
      mysql-test/include/wait_for_slave_param.inc:
        Bug#37267 - connect() EINPROGRESS failures mishandled in client library
        Made timeout value available in error message.
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
        Bug#37267 - connect() EINPROGRESS failures mishandled in client library
        Fixed test result. Connect error is now detected as CR_CONN_HOST_ERROR
        (2003) instead of CR_SERVER_LOST (2013).
      sql-common/client.c:
        Bug#37267 - connect() EINPROGRESS failures mishandled in client library
        Added retrieval of the error code from the non-blocking connect().
        Added DBUG.
        Added comment.
      bc9a7832
    • Guilhem Bichot's avatar
      Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP": · df434e28
      Guilhem Bichot authored
      DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
      It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
      developers will be notified).
      
      client/mysqldump.c:
        IS_NUM_FIELD(f) removed and replaced by its definition (f>flags & NUM_FLAG).
      include/mysql.h:
        - IS_NUM_FIELD() is removed because name is too close to IS_NUM() and it is not used a lot
        - INTERNAL_NUM_FIELD() is removed:
          * it forgets to test NEWDECIMAL (when IS_NUM() was updated for NEWDECIMAL we forgot
          to update INTERNAL_NUM_FIELD()), that's why client didn't mark NEWDECIMAL with NUM_FLAG (a bug).
          * it has an obsolete test for length of the TIMESTAMP field: test became accidentally wrong when length
          of TIMESTAMP was changed to always be 19 (when the format was changed from YYYYMMDDhhmmss to
          YYYY-MM-DD hh:mm:ss), never 8 or 14 anymore. That obsolete test caused TIMESTAMP to lose NUM_FLAG,
          which was an accidental but good change (see below).
          * IS_NUM() should be used instead
        - IS_NUM(f) is changed: TIMESTAMP used to be parsable as a number without quotes (when it was formatted as
        "YYYYMMDDhhmmss"); but it is not anymore (now that it is "YYYY-MM-DD hh:mm:ss"), so it should not have NUM_FLAG
        (mysqldump needs to quote TIMESTAMP values), so IS_NUM() should return false for it.
      libmysqld/lib_sql.cc:
        use IS_NUM() instead of INTERNAL_NUM_FIELD()
      mysql-test/r/bigint.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/metadata.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/mysqldump.result:
        DECIMAL columns are not quoted anymore by mysqldump. Which is ok, the parser does not need '' for them
      mysql-test/r/ps_2myisam.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_3innodb.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_4heap.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/r/ps_5merge.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/suite/ndb/r/ps_7ndb.result:
        result change: NEWDECIMAL fields now have NUM_FLAG (32768)
      mysql-test/t/metadata.test:
        test for BUG#42980
      sql-common/client.c:
        use IS_NUM() instead of INTERNAL_NUM_FIELD()
      df434e28
    • Alexander Barkov's avatar
      Backporting WL#3759 Optimize identifier conversion in client-server protocol · 0a9122ec
      Alexander Barkov authored
      This patch provides performance improvements:
      - send_fields() when character_set_results = latin1
        is now about twice faster for column/table/database
        names, consisting on ASCII characters.
      
      Changes:
      
      - Protocol doesn't use "convert" temporary buffer anymore,
        and converts strings directly to "packet".
      
      - General conversion optimization: quick conversion
        of ASCII strings was added.
      
      modified files:
      
      include/m_ctype.h
      - Adding a new flag.
      - Adding a new function prototype
      
      libmysqld/lib_sql.cc
      - Adding quick conversion method for embedded library:
        conversion is now done directly to result buffer,
        without using a temporary buffer.
      
      mysys/charset.c
      - Mark all dynamic ucs2 character sets as non-ASCII
      - Mark some dymamic 7bit and 8bit charsets as non-ASCII
        (for example swe7 is not fully ASCII compatible).
      
      sql/protocol.cc
      - Adding quick method to convert a string directly
        into protocol buffer, without using a temporary buffer.
      
      sql/protocol.h
      - Adding a new method prototype
      
      sql/sql_string.cc
        Optimization for conversion between two ASCII-compatible charsets:
      - quickly convert ASCII strings,
        switch to mc_wc->wc_mb method only when a non-ASCII character is met.
      - copy four ASCII characters at once on i386
      
      strings/conf_to_src.c
      - Marking non-ASCII character sets with a flag.
      
      strings/ctype-extra.c
      - Regenerating ctype-extra.c by running "conf_to_src".
      
      strings/ctype-uca.c
      - Marking UCS2 character set as non-ASCII.
      
      strings/ctype-ucs2.c
      - Marking UCS2 character set as non-ASCII.
      
      strings/ctype.c
      - A new function to detect if a 7bit or 8bit character set
        is ascii compatible.
      0a9122ec
    • Vladislav Vaintroub's avatar
      Backport of the patch · 7ee26037
      Vladislav Vaintroub authored
      http://lists.mysql.com/commits/57725
      
      Vladislav Vaintroub	2008-11-03
      Cleanup CMakeLists.txt(s) - remove winsock2 (ws2_32) from 
      TARGET_LINK_LIBRARIES. 
            
      Every exe or dll linked with mysys needs ws2_32, because
      mysys uses winsock function WSAStartup in my_init().
      However, there is no need to explicitely add ws2_32 to
      the list of TARGET_LINK_LIBRARIES multiple times. 
      Visual Studio comes with a handy pragma that tells linker
      to add library. So patch replaces bunch of ws2_32 in 
      CMakeLists with  single pragma comment(lib,"ws2_32")
      in my_init.c
            
      Additionally, reference to non-existing "debug" library
      has been removed from TARGET_LINK_LIBRARIES. The correct
      name of the library is "dbug".
      7ee26037
    • Vladislav Vaintroub's avatar
      Windows improvements : manual backport of · df01d3d3
      Vladislav Vaintroub authored
      htttp://lists.mysql.com/commits/50957?f=plain
            
      Always use TLS functions instead of __declspec(thread) to access 
      thread local storage variables.
      The change removes the necessity to recomplile the same source
      files twice -  with USE_TLS for DLLs and without USE_TLS for EXEs.
      Real benefit of this change is better readability and maintainability
      of TLS functions within MySQL.
                    
      There is a performance loss using TlsXXX functions compared to __declspec 
      but the difference is negligible in practice. In a sysbench-like benchmark 
      I ran with with TlsGetValue, pthread_[get|set]_specific was called 600000000 
      times and took 0.17sec of total 35min CPU time, or 0.008%.
      df01d3d3