1. 26 Nov, 2007 4 commits
    • unknown's avatar
      Merge mysql.com:/misc/mysql/31752_/50-31752_ · 0fd01e6b
      unknown authored
      into  mysql.com:/misc/mysql/31752_/51-31752_
      
      
      client/mysql.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/repl_failsafe.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sp.cc:
        manual merge
      strings/strmake.c:
        SCCS merged
      sql/unireg.cc:
        SCCS merged
      0fd01e6b
    • unknown's avatar
      Bug#31752: check strmake() bounds · 5e6d906e
      unknown authored
      strmake() called with wrong parameters:
      5.0-specific fixes.
      
      
      client/mysql.cc:
        In debug-mode, strmake() fills unused part of buffer with
        a test-pattern. This overwrites our previous extra '\0'
        (from previous bzero()).
      sql/sp.cc:
        off-by-one buffer-size.
      5e6d906e
    • unknown's avatar
      Merge mysql.com:/misc/mysql/31752_/41-31752_ · 8c784b8c
      unknown authored
      into  mysql.com:/misc/mysql/31752_/50-31752_
      
      
      sql/log.cc:
        Auto merged
      sql/repl_failsafe.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      strings/strmake.c:
        Auto merged
      sql/sql_show.cc:
        manually merged
      sql/unireg.cc:
        manual merge
      8c784b8c
    • unknown's avatar
      Bug#31752: check strmake() bounds · f61a4c8c
      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.
      f61a4c8c
  2. 23 Nov, 2007 2 commits
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32080/my51-bug26215 · 2a2555f9
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
      
      
      mysql-test/lib/mtr_report.pl:
        Auto merged
      2a2555f9
    • unknown's avatar
      Fix for bug #32080: Excessive warnings on Solaris: setrlimit could not · 5e7765d3
      unknown authored
      change the size of core files.
      
      Suppress the 'setrlimit could not change the size of the core files'
      warning in mysql-test-run. We do not want core files on some of the
      PushBuild hosts, and PushBuild itself does not set --core-files, so
      that warning is expected.
      
      
      mysql-test/lib/mtr_report.pl:
        Suppress the 'setrlimit could not change the size of the core files'
        warning in mysql-test-run. We do not want core files on some of the
        PushBuild machines, and PushBuild itself does not set --core-files, so
        that warning is expected.
      5e7765d3
  3. 22 Nov, 2007 8 commits
  4. 21 Nov, 2007 4 commits
    • unknown's avatar
      Bug #31171: test alter_table, fulltext2, ps, sp fail, · a58cafa5
      unknown authored
       "Table is already up to date" vs. "OK"
      
      On MacOSX 10.5 when you cast something to "bool"
      (the built in C type) it takes values 0 or 1 
      instead of 0-255 as it seems to be on older compilers.
      Fixed by removing the typecast (not needed).
      No test case needed : there are tests that test it.
      
      
      storage/myisam/mi_open.c:
        Bug #31171: don't typecast when not needed
      a58cafa5
    • unknown's avatar
      merge of bug 30788 to 5.1-opt · 1d3df515
      unknown authored
      1d3df515
    • unknown's avatar
      Merge magare.gmz:/home/kgeorge/mysql/work/B30788-5.0-opt · 0fdbcc32
      unknown authored
      into  magare.gmz:/home/kgeorge/mysql/work/B30788-5.1-opt
      
      
      mysql-test/r/subselect3.result:
        Auto merged
      sql/item.h:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      mysql-test/r/subselect.result:
        merge of bug 30788 to 5.1-opt
      mysql-test/t/subselect.test:
        merge of bug 30788 to 5.1-opt
      0fdbcc32
    • unknown's avatar
      Bug #30788: Inconsistent retrieval of char/varchar · f3637af4
      unknown authored
      Index lookup does not always guarantee that we can
      simply remove the relevant conditions from the WHERE
      clause. Reasons can be e.g. conversion errors, 
      partial indexes etc. 
      The optimizer was removing these parts of the WHERE 
      condition without any further checking.
      This leads to "false positives" when using indexes.
      Fixed by checking the index reference conditions
      (using WHERE) when using indexes with sub-queries.
      
      
      mysql-test/r/subselect.result:
        Bug #30788: 
         - using where
         - test case
      mysql-test/r/subselect3.result:
        Bug #30788: using where
      mysql-test/t/subselect.test:
        Bug #30788: test case
      sql/item.h:
        Bug #30788: 
         - Declare eq() method of Item_cache descendants : this is used in
         test_if_ref()
         - preserve the field that is being cached for type comparisions
      sql/sql_select.cc:
        Bug #30788: Don't remove the WHERE when using index lookup 
        with subqueries.
      f3637af4
  5. 20 Nov, 2007 6 commits
    • unknown's avatar
      Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-opt · cf6ba9fc
      unknown authored
      into  mysql.com:/home/psergey/mysql-5.1-bug30573
      
      cf6ba9fc
    • unknown's avatar
      merging · bbc5db3a
      unknown authored
      bbc5db3a
    • unknown's avatar
      Merge mysql.com:/home/hf/work/32211/my51-32211 · 6b064134
      unknown authored
      into  mysql.com:/home/hf/work/31868/my51-31868
      
      6b064134
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31960/my51-31960 · 22cd8833
      unknown authored
      into  mysql.com:/home/hf/work/31868/my51-31868
      
      
      sql/sql_parse.cc:
        Auto merged
      sql/mysql_priv.h:
        merging
      22cd8833
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.1-opt · 048d3ec0
      unknown authored
      into  mysql.com:/home/hf/work/31868/my51-31868
      
      
      BitKeeper/etc/ignore:
        auto-union
      libmysqld/lib_sql.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      048d3ec0
    • unknown's avatar
      BUG#30573: Ordered range scan over partitioned tables returns some rows twice · 861a18b9
      unknown authored
      The problem: ha_partition::read_range_first() could return a record that is 
      outside of the scanned range. If that record happened to be in the next 
      subsequent range, it would satisfy the WHERE and appear in the output twice.
      (we would get it the second time when scanning the next subsequent range)
      
      Fix: 
      Made ha_partition::read_range_first() check if the returned recod is within
      the scanned range, like other read_range_first() implementations do.
      
      
      mysql-test/r/partition_range.result:
        BUG#30573: Ordered range scan over partitioned tables returns some rows twice
         - Testcase
      mysql-test/t/partition_range.test:
        BUG#30573: Ordered range scan over partitioned tables returns some rows twice
         - Testcase
      sql/ha_partition.cc:
        BUG#30573: Ordered range scan over partitioned tables returns some rows twice
        - Make ha_partition::read_range_first() check if the returned record is 
          within the range.
      861a18b9
  6. 19 Nov, 2007 7 commits
    • unknown's avatar
      Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and · 53dfb5a9
      unknown authored
      crashes.
      
      MySQL distributions contain a number of programs that are used only by
      the MySQL test suite internally, i.e. they are not indended to be
      invoked directly by a user. As a result, such programs are not
      documented, do not have any built-in help or proper error reporting,
      which may confuse users.
      
      This patch fixes the problem with the following changes:
      - mytest, libmysqltest and all references to them were removed from the
      distribution since they are not used anymore
      - bug25714 now displays an error message when run with incorrect
      arguments or with the --help option
      - mysql_client_test now does not call abort() in case of errors,
      instead it does a clean exit() with a proper error status.
      
      
      BitKeeper/deleted/.del-mytest.c:
        Delete: libmysql/mytest.c
      BitKeeper/deleted/.del-myTest-package.dsp:
        Delete: VC++Files/libmysqltest/myTest-package.dsp
      BitKeeper/deleted/.del-myTest-package_ia64.dsp:
        Delete: VC++Files/libmysqltest/myTest-package_ia64.dsp
      BitKeeper/deleted/.del-myTest.dsp~4a8c480769193952:
        Delete: VC++Files/libmysqltest/myTest.dsp
      BitKeeper/deleted/.del-myTest.vcproj:
        Delete: VC++Files/libmysqltest/myTest.vcproj
      BitKeeper/deleted/.del-myTest_ia64.dsp:
        Delete: VC++Files/libmysqltest/myTest_ia64.dsp
      BitKeeper/deleted/.del-mytest.c~9a99338689e5de8:
        Delete: VC++Files/libmysqltest/mytest.c
      BitKeeper/deleted/.del-mytest.dsw~2324698861155335:
        Delete: VC++Files/libmysqltest/mytest.dsw
      VC++Files/copy_mysql_files.bat:
        Removed references to libmysqltest.
      libmysql/CMakeLists.txt:
        Removed rules for myTest.
      libmysql/Makefile.am:
        Removed mytest.c from EXTRA_DIST.
      tests/bug25714.c:
        Display a meaningful error message when run incorrectly or with the --help option.
      tests/mysql_client_test.c:
        In case of error, don't cause abnormal program termination, do a clean exit() with an error status.
      53dfb5a9
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/mysql-5.0-opt · 8d1b43b1
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
      
      
      client/mysql.cc:
        Auto merged
      8d1b43b1
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32376/my51-bug26215 · 406e2e8b
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
      
      
      client/mysql.cc:
        Auto merged
      406e2e8b
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32376/my50-bug26215 · 9eb49c48
      unknown authored
      into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
      
      
      client/mysql.cc:
        Auto merged
      9eb49c48
    • unknown's avatar
      Merge polly.(none):/home/kaa/src/opt/bug32376/my50-bug26215 · 3f3d0c46
      unknown authored
      into  polly.(none):/home/kaa/src/opt/bug32376/my51-bug26215
      
      
      client/mysql.cc:
        Manual merge.
      3f3d0c46
    • unknown's avatar
      Changed the help text for --comments to make it clear which option · 6b080fa8
      unknown authored
      disables the option explicitely.
      Changed the option location in code so that --help will show it in
      lexical option order.
      
      This is for bug #26215: mysql command line client should not strip
      comments from SQL statements
      
      
      client/mysql.cc:
        Changed the help text for --comments to make it clear which option
        disables the option explicitely.
        Changed the option location in code so that --help will show it in
        lexical option order.
      6b080fa8
    • unknown's avatar
      Bug#32158 Crash in open_table_from_share, on mysql_unpack_partition errors · 59d7796e
      unknown authored
      added check for the result of mysql_unpack_partition()
      
      
      sql/table.cc:
        added check for the result of mysql_unpack_partition()
      59d7796e
  7. 18 Nov, 2007 2 commits
  8. 17 Nov, 2007 7 commits
    • unknown's avatar
      Bug #32211 Test 'windows' and 'windows_shm' failed for embedded server · 7765fc8f
      unknown authored
      failing 'INSTALL PLUGIN' statement doesn't work in embedded server
      as we disable library loading there.
      Fixed by enabling loading libraries (#define HAVE_DLOPEN), what also
      makes UDF working in the embedded server.
      
      
      include/mysql_embed.h:
        Bug #32211 Test 'windows' and 'windows_shm' failed for embedded server
        
        Let loading libraries in the embedded server
      libmysqld/CMakeLists.txt:
        Bug #32211 Test 'windows' and 'windows_shm' failed for embedded server
        
        let loading libraries in the embedded server
      mysql-test/t/windows.test:
        Bug #32211 Test 'windows' and 'windows_shm' failed for embedded server
        
        make sure proc_1() doesn't exists before we start
      7765fc8f
    • unknown's avatar
      Merge gleb.loc:/work/bk/5.0-opt-32335 · 179246eb
      unknown authored
      into  gleb.loc:/work/bk/5.0-opt
      
      179246eb
    • unknown's avatar
      Fixed bug #32335. · 8aa822ee
      unknown authored
      Comparison of a BIGINT NOT NULL column with a constant arithmetic
      expression that evaluates to NULL caused error 1048: "Column '...'
      cannot be null".
      
      Made convert_constant_item() check if the constant expression is NULL
      before attempting to store it in a field. Attempts to store NULL in a
      NOT NULL field caused query errors.
      
      
      sql/item_cmpfunc.cc:
        Fixed bug #32335.
        1. Made convert_constant_item() check if the constant expression is NULL
           before attempting to store it in a field. Attempts to store NULL in
           a NOT NULL field caused query errors.
        
        2. Also minor bug has been fixed: the thd->count_cuted_fields value
           was not restored in case of successful conversion.
      mysql-test/t/select.test:
        Added test case for bug #32335.
      mysql-test/r/select.result:
        Added test case for bug #32335.
      8aa822ee
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31158/my50-31158 · af2714c2
      unknown authored
      into  mysql.com:/home/hf/work/31158/my51-31158
      
      
      sql/field.cc:
        Auto merged
      af2714c2
    • unknown's avatar
      Merge mysql.com:/home/hf/work/31158/my41-31158 · da9d774f
      unknown authored
      into  mysql.com:/home/hf/work/31158/my50-31158
      
      da9d774f
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-4.1-opt · 895e939c
      unknown authored
      into  mysql.com:/home/hf/work/31158/my41-31158
      
      895e939c
    • unknown's avatar
      Merge bk@192.168.21.1:mysql-5.0-opt · 991c3971
      unknown authored
      into  mysql.com:/home/hf/work/31158/my50-31158
      
      
      sql/field.cc:
        Auto merged
      991c3971