Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-28746 Wrong error code ER_BAD_DB_ERROR for long filenames
Add check for path length if CreateFile fails with ERROR_PATH_NOT_FOUND.
- Loading branch information
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| create table `...................................................`(i int); | ||
| ERROR HY000: Can't create table `test`.`...................................................` (errno: 38 "Filename too long") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --source include/windows.inc | ||
|
|
||
| # MDEV-28746 Wrong error code ER_BAD_DB_ERROR for long filenames | ||
|
|
||
| # There are 51 dots in the table name below, with every dot encoded with 5 | ||
| # bytes in "mysql file name encoding", making the filename length 255 byte. | ||
| # Adding drive and extension makes it exceed MAX_PATH= 260 bytes | ||
| let $t = `SELECT(REPEAT('.',51))`; | ||
| --error ER_CANT_CREATE_TABLE | ||
| eval create table `$t`(i int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters