1. 21 May, 2018 31 commits
  2. 20 May, 2018 3 commits
  3. 19 May, 2018 6 commits
    • Vladislav Vaintroub's avatar
      update C/C · 798ba1ed
      Vladislav Vaintroub authored
      798ba1ed
    • Sergei Golubchik's avatar
      bugfix: EE_OPEN_WARNING could be statistically wrong · 8f47c658
      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.
      8f47c658
    • Daniel Black's avatar
      MDEV-15635 mysys: THR_LOCK_open reduce usage · 0322ced7
      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
      0322ced7
    • Daniel Black's avatar
      MDEV-8743: use mkostemp when available with O_CLOEXEC · 6ed6a045
      Daniel Black authored
      Closes #639
      6ed6a045
    • Sergei Golubchik's avatar
      cleanup: report_error() in sql_plugin.cc · d9747268
      Sergei Golubchik authored
      it's redundant. remove it, use my_error() directly.
      d9747268
    • Sergei Golubchik's avatar
      cleanup: create_temp_file() · ff1ec6e9
      Sergei Golubchik authored
      simplify. move common code inside, specify common flags inside,
      rewrite dead code (`if (mode & O_TEMPORARY)` on Linux, where
      `O_TEMPORARY` is always 0) to actually do something.
      ff1ec6e9