1. 17 Jul, 2008 1 commit
  2. 24 Jul, 2008 1 commit
  3. 17 Jul, 2008 5 commits
  4. 16 Jul, 2008 4 commits
    • Marc Alff's avatar
      Bug#30087 Set query_cache_size, if the value is too small, get a unclear warning · 95ca2c6d
      Marc Alff authored
      Reverting the previous patch
      95ca2c6d
    • Kristofer Pettersson's avatar
      Auto merged · 76bd3a55
      Kristofer Pettersson authored
      76bd3a55
    • Kristofer Pettersson's avatar
      merge · 51ef885c
      Kristofer Pettersson authored
      51ef885c
    • Georgi Kodinov's avatar
      Bug#37830 : ORDER BY ASC/DESC - no difference · 340134ac
      Georgi Kodinov authored
                  
      Range scan in descending order for c <= <col> <= c type of
      ranges was ignoring the DESC flag.
      However some engines like InnoDB have the primary key parts 
      as a suffix for every secondary key.
      When such primary key suffix is used for ordering ignoring 
      the DESC is not valid.
      But we generally would like to do this because it's faster.
            
      Fixed by performing only reverse scan if the primary key is used.
      Removed some dead code in the process.
      
      mysql-test/r/innodb_mysql.result:
        Bug#37830 : test case
      mysql-test/t/innodb_mysql.test:
        Bug#37830 : test case
      sql/opt_range.cc:
        Bug#37830 : 
         - preserve and use used_key_parts to
           distinguish when a primary key suffix is used
         - removed some dead code
      sql/opt_range.h:
        Bug#37830 : 
          - preserve used_key_parts
          - dead code removed
      sql/sql_select.cc:
        Bug#37830 : Do only reverse order traversal
            if the primary key suffix is used.
      340134ac
  5. 15 Jul, 2008 6 commits
    • Sergey Petrunia's avatar
      Merge · 7315a700
      Sergey Petrunia authored
      7315a700
    • Kristofer Pettersson's avatar
      auto merge · f81c2f07
      Kristofer Pettersson authored
      f81c2f07
    • Sergey Petrunia's avatar
      BUG#35478: sort_union() returns bad data when sort_buffer_size is hit · 62513bb1
      Sergey Petrunia authored
      - In QUICK_INDEX_MERGE_SELECT::read_keys_and_merge: when we got table->sort from Unique,
        tell init_read_record() not to use rr_from_cache() because a) rowids are already sorted
        and b) it might be that the the data is used by filesort(), which will need record rowids
        (which rr_from_cache() cannot provide).
      - Fully de-initialize the table->sort read in QUICK_INDEX_MERGE_SELECT::get_next(). This fixes BUG#35477.
      (bk trigger: file as fix for BUG#35478).
      
      sql/filesort.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - make find_all_keys() use quick->get_next() instead of init_read_record(r)/r.read_record() calls
        - added dbug printout
      sql/mysql_priv.h:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/opt_range.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - In QUICK_INDEX_MERGE_SELECT::read_keys_and_merge: when we got table->sort from Unique,
          tell init_read_record() not to use rr_from_cache() because a) rowids are already sorted
          and b) it might be that the the data is used by filesort(), which will need record rowids
          (which rr_from_cache() cannot provide).
        - Fully de-initialize the table->sort read in QUICK_INDEX_MERGE_SELECT::get_next().
      sql/records.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added disable_rr_cache parameter to init_read_record
        - Added comment
      sql/sql_acl.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_delete.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_help.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_select.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_table.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_udf.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      sql/sql_update.cc:
        BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
        - Added parameter to init_read_record
      62513bb1
    • Gleb Shchepa's avatar
      merge from local tree to 5.1-bugteam · d56f9ab7
      Gleb Shchepa authored
      d56f9ab7
    • Gleb Shchepa's avatar
      after-push patch: partial rollback of bug #37761 fix. · 56861c2d
      Gleb Shchepa authored
      Note: item->null_value is not updated before a call to
      item->store(), item->is_null() is not too (in common case).
      56861c2d
    • Marc Alff's avatar
  6. 14 Jul, 2008 4 commits
    • Marc Alff's avatar
      Merge · 5f9f35e2
      Marc Alff authored
      5f9f35e2
    • Marc Alff's avatar
      Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on · e73e7bb9
      Marc Alff authored
      build)
      
      The crash was caused by freeing the internal parser stack during the parser
      execution.
      This occured only for complex stored procedures, after reallocating the parser
      stack using my_yyoverflow(), with the following C call stack:
      - MYSQLparse()
      - any rule calling sp_head::restore_lex()
      - lex_end()
      - x_free(lex->yacc_yyss), xfree(lex->yacc_yyvs)
      
      The root cause is the implementation of stored procedures, which breaks the
      assumption from 4.1 that there is only one LEX structure per parser call.
      
      The solution is to separate the LEX structure into:
      - attributes that represent a statement (the current LEX structure),
      - attributes that relate to the syntax parser itself (Yacc_state),
      so that parsing multiple statements in stored programs can create multiple
      LEX structures while not changing the unique Yacc_state.
      
      Now, Yacc_state and the existing Lex_input_stream are aggregated into
      Parser_state, a structure that represent the complete state of the (Lexical +
      Syntax) parser.
      
      
      mysql-test/r/parser_stack.result:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      mysql-test/t/parser_stack.test:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sp.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sp_head.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_class.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_class.h:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_lex.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_lex.h:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_parse.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_prepare.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_trigger.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_view.cc:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      sql/sql_yacc.yy:
        Bug#35577 (CREATE PROCEDURE causes either crash or syntax error depending on
        build)
      e73e7bb9
    • Ramil Kalimullin's avatar
      auto-merge · a3619d2e
      Ramil Kalimullin authored
      a3619d2e
    • Gleb Shchepa's avatar
      Bug #37761: IN handles NULL differently for table-subquery · e000e4a2
      Gleb Shchepa authored
                  and value-list
      
      The server returns unexpected results if a right side of the 
      NOT IN clause consists of NULL value and some constants of
      the same type, for example:
      
        SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2) 
        
      may return 3, 4, 5 etc if a table contains these values.
      
      
      The Item_func_in::val_int method has been modified:
      unnecessary resets of an Item_func_case::has_null field 
      value has been moved outside of an argument comparison
      loop. (Also unnecessary re-initialization of the null_value
      field has been moved).
      
      
      mysql-test/r/func_in.result:
        Added test case for bug #37761.
      mysql-test/t/func_in.test:
        Added test case for bug #37761.
      sql/item_cmpfunc.cc:
        Bug #37761: IN handles NULL differently for table-subquery 
                    and value-list
        
        The Item_func_in::val_int method has been modified:
        unnecessary resets of an Item_func_case::has_null field 
        value has been moved outside of an argument comparison
        loop. (Also unnecessary re-initialization of the null_value
        field has been moved).
      e000e4a2
  7. 11 Jul, 2008 1 commit
  8. 10 Jul, 2008 9 commits
    • Gleb Shchepa's avatar
      merge 5.0-bugteam --> 5.1-bugteam · b7ae75b5
      Gleb Shchepa authored
      b7ae75b5
    • Gleb Shchepa's avatar
      warning elimination · d5077086
      Gleb Shchepa authored
      d5077086
    • Gleb Shchepa's avatar
      merge 5.0-bugteam -> 5.1-bugteam · cb201518
      Gleb Shchepa authored
      cb201518
    • Gleb Shchepa's avatar
      warning elimination · 547ca139
      Gleb Shchepa authored
      547ca139
    • Marc Alff's avatar
      Fixed build warning on Windows (emb_qcache.cc) · 678f1a86
      Marc Alff authored
      libmysqld/emb_qcache.cc:
        Fixed build warning on Windows:
        ported the fix from 6.0 in 5.1
      678f1a86
    • Tatiana A. Nurnberg's avatar
      auto-merge · 7c5d3047
      Tatiana A. Nurnberg authored
      7c5d3047
    • Tatiana A. Nurnberg's avatar
      auto-merge · 0617cf0f
      Tatiana A. Nurnberg authored
      0617cf0f
    • Tatiana A. Nurnberg's avatar
      Bug#35848: UUID() returns UUIDs with the wrong time · 730f53f0
      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.
      730f53f0
    • Tatiana A. Nurnberg's avatar
      Bug#35848: UUID() returns UUIDs with the wrong time · 0833d668
      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.
      0833d668
  9. 09 Jul, 2008 9 commits
    • Gleb Shchepa's avatar
      null merge 5.0-bugteam --> 5.1-bugteam · 05dd3abe
      Gleb Shchepa authored
      05dd3abe
    • Gleb Shchepa's avatar
      merge 5.1-main --> 5.1-bugteam · 2334691f
      Gleb Shchepa authored
      2334691f
    • Gleb Shchepa's avatar
      merge 5.0-main --> 5.0-bugteam · fa00dfe6
      Gleb Shchepa authored
      fa00dfe6
    • Matthias Leich's avatar
      Upmerge 5.0 -> 5.1 · 1d9fab7f
      Matthias Leich authored
      1d9fab7f
    • Mattias Jonsson's avatar
      merge · c4b408f9
      Mattias Jonsson authored
      c4b408f9
    • Ramil Kalimullin's avatar
      Fix for bug#37669: Server crash by setting "@@session.innodb_table_locks" · d59b3713
      Ramil Kalimullin authored
      Problem: reading/writing data from/to an address without proper
      alignment leads to SIGBUS on some platforms.
      
      Fix: use the correct data type when dereferencing variable values.
      
      
      sql/sql_plugin.cc:
        Fix for bug#37669: Server crash by setting "@@session.innodb_table_locks"
        
        Use *(my_bool *) typecast to avoid misaligned reading/writing and 
        to get/set proper boolean values.
      d59b3713
    • Matthias Leich's avatar
      1. Fix for Bug#37160 · a81572bc
      Matthias Leich authored
         "funcs_2: The tests do not check if optional character
                     sets exist."
      2. Minor cleanup
      a81572bc
    • Mattias Jonsson's avatar
      Bug#35736 Test 'parts.partition_basic_symlink_myisam' depends on output of 'ls' · d4b0fcc9
      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.
      d4b0fcc9
    • unknown's avatar
      Raise version number after cloning 5.0.66 · 55ab1ef6
      unknown authored
      55ab1ef6