1. 25 May, 2018 3 commits
    • Andrei Elkin's avatar
      MDEV-13727 top-level query timestamp reset at stored func/trigger internal statements · 3bbc30c7
      Andrei Elkin authored
      Being executed under slow_log is ON the test revealed a "side-effect"
      in MDEV-8305 implementation which inadvertently made the trigger or
      stored function statements to reset the top-level query's
      THD::start_time et al. (Details of the test failure analysis are footnoted).
      Unlike the SP case the SF and Trigger's internal statement should not
      do that.
      
      Fixed with revising the MDEV-8305 decision to backup/reset/restore
      the session timestamp inside sp_instr_stmt::execute(). The timestamp
      actually remains reset in the SP case by its caller per statement basis by ever
      existing logics.
      
      Timestamps related tests are extended to cover the trigger and stored function case.
      
      Note, commit 3395ab73 is reverted as its struct QUERY_START_TIME_INFO
      declaration is not in use anymore after this patch.
      
      Footnote:
      --------
      Specifically to the failing test, a query on the master was logged
      okay with a timestamp of the query's top-level statement but its post
      update trigger managed to compute one more (later) timestamp which got
      inserted into another table. The latter table master-vs-slave
      no fractional part timestamp discrepancy became evident
      thanks to different execution time of the trigger combined with the
      fact of the logged with micro-second fractional part master timestamp
      was truncated on the slave. On master when the fractional part was
      close to 1 the trigger execution added up its own latency to overflow
      to next second value. That's how the master timestamp surprisingly
      turned out to bigger than the slave's one.
      3bbc30c7
    • Marko Mäkelä's avatar
      Make a test independent of VERSION · 83ec8c88
      Marko Mäkelä authored
      83ec8c88
    • Daniel Bartholomew's avatar
      bump the VERSION · c86ea540
      Daniel Bartholomew authored
      c86ea540
  2. 24 May, 2018 8 commits
  3. 23 May, 2018 6 commits
    • Elena Stepanova's avatar
      List of unstable tests for 10.3.7 release · 4a49f7f8
      Elena Stepanova authored
      The list was created based on 10.2.15 list, with the addition
      of failures and modifications which happened during the last week
      before the tentative 10.3.7 release commit
      4a49f7f8
    • Sergey Vojtovich's avatar
      Use std::isfinite in C++ code · 54999f4e
      Sergey Vojtovich authored
      This is addition to parent revision fixing build failures.
      54999f4e
    • Howard Su's avatar
      remove check for finite/isfinite · 031fa6d4
      Howard Su authored
      finite is not used anymore in code base. isfinite is part of C99 and we
      assume we only support compilers that support C99.
      031fa6d4
    • Eugene Kosov's avatar
      cleanup TABLE_LIST · c13e3c37
      Eugene Kosov authored
      c13e3c37
    • Sergei Petrunia's avatar
      MDEV-16262: rocksdb.issue255 test sometimes fails in buildbot · fdb8d018
      Sergei Petrunia authored
      Fix an obvious typo: replace_column should be applied to SHOW TABLE STATUS,
      not to SELECT * FROM t1.
      fdb8d018
    • Alexander Barkov's avatar
      MDEV-16244 sql_mode=ORACLE: Some keywords do not work in variable declarations · 611488e3
      Alexander Barkov authored
      1. Adding LEX::make_item_sysvar() and reusing it
         in sql_yacc.yy and sql_yacc_ora.yy.
         Removing the "opt_component" rule.
      
      2. Renaming rules to better reflect their purpose:
         - keyword to keyword_ident
         - keyword_sp to keyword_label
         - keyword_sp_not_data_type to keyword_sp_var_and_label
      
         Also renaming:
         - sp_decl_ident_keyword to keyword_sp_decl for naming consistency
         - keyword_alias to keyword_table_alias,
           for consistency with ident_table_alias
         - keyword_sp_data_type to keyword_data_type,
           as it has nothing SP-specific.
      
      3. Moving GLOBAL_SYM, LOCAL_SYM, SESSION_SYM from
         keyword_sp_var_and_label to a separate rule keyword_sysvar_type.
         We don't have system variables with these names anyway.
         Adding ident_sysvar_name and using it in the grammar that needs
         a system variable name instead of ident_or_text.
         This removed a number of shift/reduce conflicts
         between GLOBAL_SYM/LOCAL_SYM/SESSION_SYM as a variable scope and
         as a variable name.
      
      4. Moving keywords BEGIN_SYM, END (in both *.yy fiels)
         and EXCEPTION_SYM (in sql_yacc_ora.yy) into a separate
         rule keyword_sp_block_section, because in Oracle verb keywords
         (COMMIT, DO, HANDLER, OPEN, REPAIR, ROLLBACK, SAVEPOINT, SHUTDOWN, TRUNCATE)
         are good variables names and can appear in e.g. DECLARE,
         while block keywords (BEGIN, END, EXCEPTION) are not good variable names
         and cannot appear in DECLARE.
      
      5. Further splitting keyword_directly_not_assignable in sql_yacc_ora.yy:
         moving keyword_sp_verb_clause out. Renaming the rest of
         keyword_directly_not_assignable to keyword_sp_head,
         which represents keywords that can appear in optional
         clauses in CREATE PROCEDURE/FUNCTION/TRIGGER.
      
      6. Renaming keyword_sp_verb_clause to keyword_verb_clause,
         as now it does not contains anything SP-specific.
      
         As a result or #4,#5,#6, the rule keyword_directly_not_assignable
         was replaced to three separate rules:
         - keyword_sp_block
         - keyword_sp_head
         - keyword_verb_clause
         Adding the same rules in sql_yacc.yy, for unification.
      
      6. Adding keyword_sp_head and keyword_verb_clause into keyword_sp_decl.
         This fixes MDEV-16244.
      
      7. Reorganizing the rest of keyword related rules into two groups:
        a. Rules defining a list of keywords and consisting of only terminal symbols:
          - keyword_sp_var_not_label
          - keyword_sp_head
          - keyword_sp_verb_clause
          - keyword_sp_block_section
          - keyword_sysvar_type
      
        b. Rules that combine the above lists into keyword places:
          - keyword_table_alias
          - keyword_ident
          - keyword_label
          - keyword_sysvar_name
          - keyword_sp_decl
        Rules from the group "b" use on the right side only rules
        from the group "a" (with optional terminal symbols added).
        Rules from the group "b" DO NOT mutually use each other any more.
        This makes them easier to read (and see the difference between them).
      
        Sorting the right sides of the group "b" keyword rules alphabetically,
        for yet better readability.
      611488e3
  4. 22 May, 2018 14 commits
  5. 21 May, 2018 9 commits
    • Vladislav Vaintroub's avatar
      Merge branch '10.3' into bb-10.3-cc · ff1af15f
      Vladislav Vaintroub authored
      ff1af15f
    • Alexander Barkov's avatar
      Addressing Monty's review suggestions for MDEV-11952 Oracle-style packages (partial) · 1e69d3f1
      Alexander Barkov authored
      - Using array_elements() instead of a constant to iterate through an array
      - Adding some comments
      - Adding new-line function comments
      - Using STRING_WITH_LEN instead of C_STRING_WITH_LEN
      1e69d3f1
    • Alexander Barkov's avatar
      A cleanup for 2a33d248 · 7d91d98a
      Alexander Barkov authored
      - Removing the unused "THD*" paramer from Lex_ident_sys_st::to_size_number()
      - Removing redundant #include for "sql_tvc.h" and "vers_utils.h"
      7d91d98a
    • Alexander Barkov's avatar
    • Sergey Vojtovich's avatar
      OS X warnings fixes · 508373d5
      Sergey Vojtovich authored
      508373d5
    • Sergey Vojtovich's avatar
      Better crash reports on OS X · 8c55277d
      Sergey Vojtovich authored
      Symlink core from default location (/cores/core.%P), so that lldb can
      handle it.
      8c55277d
    • Sergey Vojtovich's avatar
      9692f37d
    • Sergei Golubchik's avatar
      bugfix: EE_OPEN_WARNING could be statistically wrong · a1d57ca1
      Sergei Golubchik authored
      don't rely on imprecise my_file_opened | my_stream_opened,
      scan the array for open handles instead.
      
      also, remove my_print_open_files() and embed it in my_end()
      to have one array scan instead of two.
      a1d57ca1
    • Daniel Black's avatar
      MDEV-15635 mysys: THR_LOCK_open reduce usage · 5c81cb88
      Daniel Black authored
      Change the following to statistic counters:
      * my_file_opened
      * my_file_total_opened
      * my_stream_opened
      * my_tmp_file_created
      
      There is one non-statistics use of my_file_opened/my_stream_opened
      in my_end which prints a warning if we shutdown and its still open.
      It seems excessive to hold locks to prevent this warning.
      
      A file descriptor is already a unique element per process - in Windows,
      protection occurs at fd allocation using THR_LOCK_open in my_win_{,f}open
      and in other OSes, a unique fd to file map exists at the OS level.
      So accesses to my_file_info[fd] don't need to be protected by the
      THR_LOCK_open.
      
      my_close/my_fclose where restructured to clear out the my_file_info
      before the close/my_win_close/my_win_fclose. After these calls another
      thread could gain the same file descriptor. So for Windows this
      the file_info elements available to the my_win_{,f}_open are released
      during the invalidate_fd call within my_win_close. No locking is needed
      as the my_win_{,f}open is searching for a invalidate entry which is
      determined by a single value change.
      
      my_fclose also changed for non-Windows to retry closing if EINTR was
      returned, same as my_close.
      
      Closes #657
      5c81cb88