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

Commit 46085e3

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 8501191 commit 46085e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/extract_schema_from_file_name.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ CREATE DEFINER='root'@'localhost' FUNCTION extract_schema_from_file_name (
5959
SQL SECURITY INVOKER
6060
DETERMINISTIC
6161
NO SQL
62-
RETURN SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1)
62+
RETURN LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(path, '\\', '/'), '/', -2), '/', 1), 64);
6363
$$
6464

6565
DELIMITER ;

0 commit comments

Comments
 (0)