Commit 12e2d039 authored by Jacob Mathew's avatar Jacob Mathew

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.

Cherry-Picked:
  Commit ff0bf451 on bb-10.3-MDEV-15692
parent 36c01167
......@@ -132,7 +132,9 @@ drop procedure if exists mysql.spider_fix_one_table;
drop procedure if exists mysql.spider_fix_system_tables;
delimiter //
create procedure mysql.spider_fix_one_table
(tab_name char(255), test_col_name char(255), _sql text)
(tab_name char(255) charset utf8 collate utf8_bin,
test_col_name char(255) charset utf8 collate utf8_bin,
_sql text charset utf8 collate utf8_bin)
begin
set @col_exists := 0;
select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment