Commit 09eb3133 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.

Merged From:
  bb-10.3-MDEV-15692
parents 18e8d420 ff0bf451
...@@ -166,7 +166,9 @@ drop procedure if exists mysql.spider_fix_one_table; ...@@ -166,7 +166,9 @@ drop procedure if exists mysql.spider_fix_one_table;
drop procedure if exists mysql.spider_fix_system_tables; drop procedure if exists mysql.spider_fix_system_tables;
delimiter // delimiter //
create procedure mysql.spider_fix_one_table 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 begin
set @col_exists := 0; set @col_exists := 0;
select 1 into @col_exists from INFORMATION_SCHEMA.COLUMNS 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