summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2018-04-05 14:23:31 -0700
committerJacob Mathew <jacob.mathew@mariadb.com>2018-04-05 14:39:42 -0700
commitff0bf451dbfcdef18e2d470aee0b8709f0d580a5 (patch)
tree9bcc432aa2ffc4f776801caa9a9cc686091e1927
parent2b0c6b7aa14857bdfffad6a2a0fb27e8d1f9bb31 (diff)
downloadmariadb-git-ff0bf451dbfcdef18e2d470aee0b8709f0d580a5.tar.gz
MDEV-15692: install_spider.sql can fail with some collationsbb-10.3-MDEV-15692
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.
-rw-r--r--storage/spider/scripts/install_spider.sql4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/spider/scripts/install_spider.sql b/storage/spider/scripts/install_spider.sql
index 3fd9a6c8a37..c6581d331f3 100644
--- a/storage/spider/scripts/install_spider.sql
+++ b/storage/spider/scripts/install_spider.sql
@@ -166,7 +166,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