Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3918

myisamchk bogus error for files larger than 4G

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.28, 5.5.28a, 5.3.11, 5.2.13, 5.1.66
    • 10.0.2, 5.5.29, 5.1.67, 5.2.14, 5.3.12
    • None
    • None
    • Windows, VS2010

    Description

      Was reported by SkySQL folks, in the upgrade context.

      What happens is that : my_copystat() function that is called near the end of myisamchk, calls stat(), which , on Windows, with Visual Studio 2010, returns an error on files larger than 4G (the struct stat is an ancient one , with 32bit st_size ).

      Ironically, returning an error instead of truncated size is a bugfix introduced in SDK from VS2010 upwards, and was not seen in earlier versions of C runtime library.

      There are variations of stat() (stat64, stati64) that can handle large files correctly. my_stat() behavior is correct, because it is using stat64.

      Attachments

        Activity

          wlad Vladislav Vaintroub created issue -
          wlad Vladislav Vaintroub made changes -
          Field Original Value New Value
          Description Was reported by SkySQL folks, in the upgrade context.

          What happens is that : my_copystat() function that is called near the end of myisamchk, calls stat(), which , on Windows, with Visual Studio 2010, returns an error on files larger than 4G (the struct stat is an ancient one, and there is only 4 st_size in it). Ironically, returning an error instead of truncated size is a bugfix introduced in SDK from VS2010 upwards, and was not seen in earlier versions of C runtime library.
          Was reported by SkySQL folks, in the upgrade context.

          What happens is that : my_copystat() function that is called near the end of myisamchk, calls stat(), which , on Windows, with Visual Studio 2010, returns an error on files larger than 4G (the struct stat is an ancient one, and there is only 4 st_size in it). Ironically, returning an error instead of truncated size is a bugfix introduced in SDK from VS2010 upwards, and was not seen in earlier versions of C runtime library.


          There are variations of stat() (stat64, stati64) that can handle large files correctly. my_stat() behavior is correct, because it is using stat64.
          wlad Vladislav Vaintroub made changes -
          Description Was reported by SkySQL folks, in the upgrade context.

          What happens is that : my_copystat() function that is called near the end of myisamchk, calls stat(), which , on Windows, with Visual Studio 2010, returns an error on files larger than 4G (the struct stat is an ancient one, and there is only 4 st_size in it). Ironically, returning an error instead of truncated size is a bugfix introduced in SDK from VS2010 upwards, and was not seen in earlier versions of C runtime library.


          There are variations of stat() (stat64, stati64) that can handle large files correctly. my_stat() behavior is correct, because it is using stat64.
          Was reported by SkySQL folks, in the upgrade context.

          What happens is that : my_copystat() function that is called near the end of myisamchk, calls stat(), which , on Windows, with Visual Studio 2010, returns an error on files larger than 4G (the struct stat is an ancient one , with 32bit st_size ).

          Ironically, returning an error instead of truncated size is a bugfix introduced in SDK from VS2010 upwards, and was not seen in earlier versions of C runtime library.


          There are variations of stat() (stat64, stati64) that can handle large files correctly. my_stat() behavior is correct, because it is using stat64.
          wlad Vladislav Vaintroub made changes -
          Assignee Vladislav Vaintroub [ wlad ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 25507 ] MariaDB v2 [ 45665 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 45665 ] MariaDB v3 [ 66358 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 66358 ] MariaDB v4 [ 146249 ]

          People

            wlad Vladislav Vaintroub
            wlad Vladislav Vaintroub
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.