1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Add information_schema.spider_wrapper_protocols for knowing available wrappers of Spider

This commit is contained in:
Kentoku SHIBA
2020-06-06 07:37:05 +09:00
parent c9f262ee0d
commit 0af1b0bd21
11 changed files with 262 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/* Copyright (C) 2010-2019 Kentoku Shiba
Copyright (C) 2019 MariaDB corp
/* Copyright (C) 2010-2020 Kentoku Shiba
Copyright (C) 2019-2020 MariaDB corp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -686,6 +686,31 @@ static LEX_STRING spider_init_queries[] = {
" install plugin spider_alloc_mem soname 'ha_spider.dll';"
" end if;"
" end if;"
/*
Install spider_wrapper_protocols plugin
*/
" set @have_spider_i_s_wrapper_protocols_plugin := 0;"
" select @have_spider_i_s_wrapper_protocols_plugin := 1"
" from INFORMATION_SCHEMA.plugins"
" where PLUGIN_NAME = 'SPIDER_WRAPPER_PROTOCOLS';"
" set @have_spider_wrapper_protocols_plugin := 0;"
" select @have_spider_wrapper_protocols_plugin := 1 from mysql.plugin"
" where name = 'spider_wrapper_protocols';"
" if @have_spider_i_s_wrapper_protocols_plugin = 0 then"
" if @have_spider_wrapper_protocols_plugin = 1 then"
" /*"
" spider_wrapper_protocols plugin is present in mysql.plugin but not in"
" information_schema.plugins. Remove spider_wrapper_protocols plugin entry"
" in mysql.plugin first."
" */"
" delete from mysql.plugin where name = 'spider_wrapper_protocols';"
" end if;"
" if @win_plugin = 0 then "
" install plugin spider_wrapper_protocols soname 'ha_spider.so';"
" else"
" install plugin spider_wrapper_protocols soname 'ha_spider.dll';"
" end if;"
" end if;"
" set @have_spider_direct_sql_udf := 0;"
" select @have_spider_direct_sql_udf := 1 from mysql.func"
" where name = 'spider_direct_sql';"