Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 8501191

Browse files
Wrap the output into a LEFT(..., 64) to avoid trying to return a longer string than the 64 characters in the new return type
1 parent e2ff830 commit 8501191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/extract_table_from_file_name.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CREATE DEFINER='root'@'localhost' FUNCTION extract_table_from_file_name (
5555
SQL SECURITY INVOKER
5656
DETERMINISTIC
5757
NO SQL
58-
RETURN SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -1), '@0024', '$'), '.', 1);
58+
RETURN LEFT(SUBSTRING_INDEX(REPLACE(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -1), '@0024', '$'), '.', 1), 64);
5959
$$
6060

6161
DELIMITER ;

0 commit comments

Comments
 (0)