[MDEV-3918] myisamchk bogus error for files larger than 4G Created: 2012-12-06 Updated: 2012-12-06 Resolved: 2012-12-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.28, 5.5.28a, 5.3.11, 5.2.13, 5.1.66 |
| Fix Version/s: | 10.0.2, 5.5.29, 5.1.67, 5.2.14, 5.3.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Vladislav Vaintroub | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
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. |