Skip to content

Commit ff0bf45

Browse files
author
Jacob Mathew
committed
MDEV-15692: install_spider.sql can fail with some collations
The error occurs because of how the character set and collation are chosen for stored procedure parameters that have a character data type. If the character set and collation are not explicitly stated in the declaration, the server chooses the database character set and collation in effect at routine creation time. To fix the problem, I added explicit character set and collation attributes for the stored procedure parameters in the install_spider.sql script. Author: Jacob Mathew. Reviewer: Kentoku Shiba.
1 parent 2b0c6b7 commit ff0bf45

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage/spider/scripts/install_spider.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ drop procedure if exists mysql.spider_fix_one_table;
166166
drop procedure if exists mysql.spider_fix_system_tables;
167167
delimiter //
168168
create procedure mysql.spider_fix_one_table
169-
(tab_name char(255), test_col_name char(255), _sql text)
169+
(tab_name char(255) charset utf8 collate utf8_bin,
170+
test_col_name char(255) charset utf8 collate utf8_bin,
171+
_sql text charset utf8 collate utf8_bin)
170172
begin
171173
set @col_exists := 0;
172174
select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS

0 commit comments

Comments
 (0)