1. 10 Jul, 2008 4 commits
    • Marc Alff's avatar
      Fixed build warning on Windows (emb_qcache.cc) · 74f16bc2
      Marc Alff authored
      libmysqld/emb_qcache.cc:
        Fixed build warning on Windows:
        ported the fix from 6.0 in 5.1
      74f16bc2
    • Tatiana A. Nurnberg's avatar
      auto-merge · 21eb9fd0
      Tatiana A. Nurnberg authored
      21eb9fd0
    • Tatiana A. Nurnberg's avatar
      Bug#35848: UUID() returns UUIDs with the wrong time · b77ac4a0
      Tatiana A. Nurnberg authored
      offset for time part in UUIDs was 1/1000 of what it
      should be. In other words, offset was off.
      
      Also handle the case where we count into the future
      when several UUIDs are generated in one "tick", and
      then the next call is late enough for us to unwind
      some but not all of those borrowed ticks.
      
      Lastly, handle the case where we keep borrowing and
      borrowing until the tick-counter overflows by also
      changing into a new "numberspace" by creating a new
      random suffix.
      
      mysql-test/r/func_misc.result:
        Show that time-part of UUIDs is correct now.
      mysql-test/t/func_misc.test:
        Show that time-part of UUIDs is correct now
        by replicating the C-code's resultin SQL.
        Results also decode to expect date-data on
        command-line (external validation).
        
        No test for unwinding of borrowed ticks as
        this a) is a race and b) depends on what timer
        we get.
      sql/item_strfunc.cc:
        correct offset for date/time-part of UUID.
        also make sure that when we counted into
        the future earlier (several UUIDs generated
        in same tick), we only give back as many
        "borrowed" ticks as we can without duplicating
        past timestamps. If our tick-counter overflows
        before we can give back, or if the system-clock
        is set back (by user or Daylight Saving Time),
        we create a new random suffix to avoid
        collisions and clear the tick-counter.
      b77ac4a0
    • Tatiana A. Nurnberg's avatar
      Bug#35848: UUID() returns UUIDs with the wrong time · c054c744
      Tatiana A. Nurnberg authored
      offset for time part in UUIDs was 1/1000 of what it
      should be. In other words, offset was off.
      
      Also handle the case where we count into the future
      when several UUIDs are generated in one "tick", and
      then the next call is late enough for us to unwind
      some but not all of those borrowed ticks.
      
      Lastly, handle the case where we keep borrowing and
      borrowing until the tick-counter overflows by also
      changing into a new "numberspace" by creating a new
      random suffix.
      
      
      mysql-test/r/func_misc.result:
        Show that time-part of UUIDs is correct now.
      mysql-test/t/func_misc.test:
        Show that time-part of UUIDs is correct now
        by replicating the C-code's resultin SQL.
        Results also decode to expect date-data on
        command-line (external validation).
        
        No test for unwinding of borrowed ticks as
        this a) is a race and b) depends on what timer
        we get.
      sql/item_strfunc.cc:
        correct offset for date/time-part of UUID.
        also make sure that when we counted into
        the future earlier (several UUIDs generated
        in same tick), we only give back as many
        "borrowed" ticks as we can without duplicating
        past timestamps. If our tick-counter overflows
        before we can give back, or if the system-clock
        is set back (by user or Daylight Saving Time),
        we create a new random suffix to avoid
        collisions and clear the tick-counter.
      c054c744
  2. 09 Jul, 2008 8 commits
    • Gleb Shchepa's avatar
      null merge 5.0-bugteam --> 5.1-bugteam · d03b0d8e
      Gleb Shchepa authored
      d03b0d8e
    • Gleb Shchepa's avatar
      merge 5.1-main --> 5.1-bugteam · 8ac5d5a4
      Gleb Shchepa authored
      8ac5d5a4
    • Gleb Shchepa's avatar
      merge 5.0-main --> 5.0-bugteam · 075036fe
      Gleb Shchepa authored
      075036fe
    • Matthias Leich's avatar
      Upmerge 5.0 -> 5.1 · f7be79e8
      Matthias Leich authored
      f7be79e8
    • Mattias Jonsson's avatar
      merge · d7caae77
      Mattias Jonsson authored
      d7caae77
    • Matthias Leich's avatar
      1. Fix for Bug#37160 · d635f514
      Matthias Leich authored
         "funcs_2: The tests do not check if optional character
                     sets exist."
      2. Minor cleanup
      d635f514
    • Mattias Jonsson's avatar
      Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls' · 33c3e3b3
      Mattias Jonsson authored
      The problem is that relying on the output of the 'ls' command is not
      portable as its behavior is not the same between systems and it might
      even not be available at all in (Windows).
      
      So I added list_files that relies on the portable mysys library instead.
      (and also list_files_write_file and list_files_append_file,
      since the test was using '--exec ls' in that way.)
      
      client/mysqltest.c:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        To be able to replace the use of '--exec ls' I have added
        list_files, list_files_write_file and list_files_append_file.
        
        list_files <dirname> [<filename incl. wild-cards>]
        is equivalent to 'ls <dirname>/[<filename incl. wild-cards>]'
        
        list_files_write_file creates/overwrites a file with the content
        list_files_append_file creates/appends a file with the content
        list_files* return a sorted output.
      mysql-test/r/mysqltest.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        result file change, due to added test of the new list_files command.
      mysql-test/suite/parts/inc/partition_check_drop.inc:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Using the new list_files instead of 'ls'.
        
        Changed the use of local variables (ls_file, file_list)
        and server variable (@aux).
      mysql-test/suite/parts/inc/partition_layout.inc:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Using the new list_files instead of 'ls'.
      mysql-test/suite/parts/inc/partition_layout_check1.inc:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Using the new list_files instead of 'ls'.
      mysql-test/suite/parts/inc/partition_layout_check2.inc:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter2_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter3_innodb.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_alter3_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_basic_innodb.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_basic_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_engine_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/suite/parts/r/partition_syntax_myisam.result:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Replaces '--exec ls' with list_files.
        Removal of the directory part of file listing.
      mysql-test/t/mysqltest.test:
        Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls'
        
        Adding test for the new mysqltest commands list_files,
        list_files_write_file and list_files_append_file.
      33c3e3b3
    • unknown's avatar
      Raise version number after cloning 5.0.66 · 485e5ba2
      unknown authored
      485e5ba2
  3. 08 Jul, 2008 6 commits
  4. 07 Jul, 2008 8 commits
    • Mattias Jonsson's avatar
    • Marc Alff's avatar
      Manual merge of bug#26030 in mysql-5.1-bugteam · e59c5656
      Marc Alff authored
      e59c5656
    • Mattias Jonsson's avatar
      merge · dd5966a8
      Mattias Jonsson authored
      dd5966a8
    • Mattias Jonsson's avatar
      Bug#35745: SELECT COUNT(*) is not correct for some partitioned tables. · 19a48cdf
      Mattias Jonsson authored
      problem was that ha_partition::records was not implemented, thus
      using the default handler::records, which is not correct if the engine
      does not support HA_STATS_RECORDS_IS_EXACT.
      Solution was to implement ha_partition::records as a wrapper around
      the underlying partitions records.
      
      The rows column in explain partitions will now include the total
      number of records in the partitioned table.
      
      (recommit after removing out-commented code)
      19a48cdf
    • Marc Alff's avatar
      Merge · ce79abc1
      Marc Alff authored
      ce79abc1
    • Marc Alff's avatar
      Bug#26030 (Parsing fails for stored routine w/multi-statement execution · 2b285467
      Marc Alff authored
      enabled)
      
      Before this fix, the lexer and parser would treat the ';' character as a
      different token (either ';' or END_OF_INPUT), based on convoluted logic,
      which failed in simple cases where a stored procedure is implemented as a
      single statement, and used in a multi query.
      
      With this fix:
      - the character ';' is always parsed as a ';' token in the lexer,
      - parsing multi queries is implemented in the parser, in the 'query:' rules,
      - the value of thd->client_capabilities, which is the capabilities
        negotiated between the client and the server during bootstrap,
        is immutable and not arbitrarily modified during parsing (which was the
        root cause of the bug)
      
      2b285467
    • Georgi Kodinov's avatar
      Bug#37627: addendum : · 574eefeb
      Georgi Kodinov authored
       - moved the test into a separate file to check for presence of the test variable
      
      mysql-test/r/subselect.result:
        Bug#37627: moved the test to a separate file
      mysql-test/r/subselect_debug.result:
        Bug#37627: moved the test to a separate file
      mysql-test/t/subselect.test:
        Bug#37627: moved the test to a separate file
      mysql-test/t/subselect_debug.test:
        Bug#37627: moved the test to a separate file
      574eefeb
    • Mats Kindahl's avatar
      Bug #37150 Risk for crash in User_var_log_event::exec_event() · dd6537c1
      Mats Kindahl authored
      On certain kinds of errors (e.g., out of stack), a call to Item_func_
      set_user_var::fix_fields() might fail.  Since the return value of this
      call was not checked inside User_var_log_event::exec_event(), continuing
      execution after this will cause a crash inside Item_func_set_user_var::
      update_hash().
      
      The bug is fixed by aborting execution of the event with an error if
      fix_fields() fails, since it is not possible to continue execution anyway.
      
      
      sql/log_event.cc:
        Aborting execution of event if fix_fields() fails since execution
        of update_hash() might cause a crash.
      dd6537c1
  5. 04 Jul, 2008 5 commits
  6. 03 Jul, 2008 3 commits
    • Konstantin Osipov's avatar
      A fix for · 5fc65e78
      Konstantin Osipov authored
      Bug#12093 "SP not found on second PS execution if another thread 
      drops other SP in between" and
      Bug#21294 "executing a prepared statement that executes a stored 
      function which was recreat"
      
      Stored functions are resolved at prepared statement prepare only.
      If someone flushes the stored functions cache between prepare and
      execute, execution fails.
      
      The fix is to detect the situation of the cache flush and automatically
      reprepare the prepared statement after it.
      
      mysql-test/r/ps_ddl.result:
        Update results (Bug#12093 and Bug#21294, the test cases are already
        in the source tree).
      mysql-test/r/ps_ddl1.result:
        Update results (Bug#12093 and Bug#21294, the test cases are already
        in the source tree).
      mysql-test/r/sp-error.result:
        Update results (Bug#12093 and Bug#21294, the test cases are already
        in the source tree).
      mysql-test/t/ps_ddl.test:
        Modify the test to not expect an error where there is no error
        any more (Bug#12093, Bug#21294).
      mysql-test/t/ps_ddl1.test:
        Modify the test to not expect an error where there is no error
        any more (Bug#12093, Bug#21294).
      mysql-test/t/sp-error.test:
        Modify the test to not expect an error where there is no error
        any more (Bug#12093, Bug#21294).
      sql/sp_cache.cc:
        Implement sp_cache_version() -- returns the current version of 
        a stored routines cache.
      sql/sp_cache.h:
        Declare sp_cache_version().
      sql/sql_prepare.cc:
        Keep track of stored functions cache version, and invalidate
        the statement if it changed between prepared statement
        prepare and execute (and the statement actually uses stored routines).
      5fc65e78
    • Sven Sandberg's avatar
      merge · 291ebbae
      Sven Sandberg authored
      291ebbae
    • Sven Sandberg's avatar
      BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild · dccc55d5
      Sven Sandberg authored
      This bug has been fixed in two slightly different ways in
      6.0-rpl and {5.1,6.0}-bugteam. To avoid future merge
      problems, I'm now copying the 6.0-rpl fix to 5.1-bugteam.
      dccc55d5
  7. 02 Jul, 2008 3 commits
  8. 01 Jul, 2008 3 commits
    • Patrick Crews's avatar
      upmerge into 5.1 · 40e23984
      Patrick Crews authored
      40e23984
    • Patrick Crews's avatar
      Bug#37380 - Test funcs_1.is_columns_myisam_embedded fails on OS X · fbce395b
      Patrick Crews authored
      Test was failing due to the addition of a '\x05' character in result sets
      Latest builds of the server have shown this problem to have disappeared.
      Removing code within the test that disables the test on Mac OS X.
      
      Recommit due to tree error on earlier, approved patch.
      fbce395b
    • Mattias Jonsson's avatar
      Bug#36732: many disabled ndb tests in test suite parts · 01b7596c
      Mattias Jonsson authored
      REORGANIZE TEST parts WHERE ENGINE='NDB' ;)
      
      Updated tests for better matching NDB's limitations.
      
      Removed some duplicate tests.
      
      mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added variable for NDB (since it does not support
        DROP PARTITION)
      mysql-test/suite/parts/inc/partition_alter_11.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Assigning directly to variable without going
        through the server.
      mysql-test/suite/parts/inc/partition_bigint.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added --sorted_result for consistency
        lowered number of partitions for use with NDB
        (NDB can only do maximum of 8 partitions)
      mysql-test/suite/parts/inc/partition_int.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added --sorted_result for consistency
        lowered number of partitions for use with NDB
        (NDB can only do maximum of 8 partitions)
      mysql-test/suite/parts/inc/partition_mediumint.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added --sorted_result for consistency
        lowered number of partitions for use with NDB
        (NDB can only do maximum of 8 partitions)
      mysql-test/suite/parts/inc/partition_smallint.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added --sorted_result for consistency
        lowered number of partitions for use with NDB
        (NDB can only do maximum of 8 partitions)
      mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Made it work better with NDB
      mysql-test/suite/parts/inc/partition_tinyint.inc:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added --sorted_result for consistency
        lowered number of partitions for use with NDB
        (NDB can only do maximum of 8 partitions)
      mysql-test/suite/parts/r/ndb_blob_partition.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/r/ndb_dd_backuprestore.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/ndb_partition_error.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/r/ndb_partition_key.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/r/ndb_partition_list.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/r/ndb_partition_range.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/r/part_supported_sql_func_ndb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_alter1_1_innodb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_alter1_1_myisam.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_alter1_2_innodb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file.
        Diff bigger than necessary, due to bzr diff bug.
      mysql-test/suite/parts/r/partition_alter1_2_myisam.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_alter2_innodb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_alter2_myisam.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_engine_ndb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_int_innodb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_int_myisam.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/partition_int_ndb.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Updated result file
      mysql-test/suite/parts/r/rpl_ndb_dd_partitions.result:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/rpl_ndb
      mysql-test/suite/parts/t/disabled.def:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removed some duplicate tests, fixed some tests.
        Removed the 'runs too long on PB' test from
        disabled.def and made them to require 'big-test'.
      mysql-test/suite/parts/t/ndb_blob_partition.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/t/ndb_dd_backuprestore.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/ndb_partition_error.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/t/ndb_partition_key.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/t/ndb_partition_list.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/t/ndb_partition_range.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/ndb
      mysql-test/suite/parts/t/part_supported_sql_func_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
        Added ndb restriction variables.
      mysql-test/suite/parts/t/partition_alter1_1_2_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        requiring big-test instead of disable it.
      mysql-test/suite/parts/t/partition_alter1_1_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        requiring big-test instead of disable it.
      mysql-test/suite/parts/t/partition_alter1_2_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        requiring big-test instead of disable it.
      mysql-test/suite/parts/t/partition_alter2_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_basic_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_bit_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_engine_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_int_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_syntax_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/partition_value_ndb.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Added new=on for allowing test of
        hash/range and list partitioning.
      mysql-test/suite/parts/t/rpl_ndb_dd_partitions.test:
        Bug#36732: many disabled ndb tests in test suite parts
        
        Removing this duplicate test since it already
        exists (and updated) in suite/rpl_ndb
      01b7596c