Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

StirlingMarketingGroup/mysql-c-get-bid2s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MySQL C_GET_BID2S

A c variant of my get_bid2s function for collecting bid2s from text and returning them hex encoded for use in full text indexes. https://github.com/StirlingMarketingGroup/mysql-get-bid2s

Returns the possibly b64u and hex encoded bid2s separated by spaces in the given text.

Usage

`c_get_bid2s` ( string `Text` )
  • `Text`
    • The haystack to search.

Dependencies

Debian / Ubuntu

sudo apt update
sudo apt install libmysqlclient-dev

Installing

You can find your MySQL plugin directory by running this MySQL query

select @@plugin_dir;

then replace /usr/lib/mysql/plugin below with your MySQL plugin directory.

git clone https://github.com/StirlingMarketingGroup/mysql-c-get-bid2s.git
cd mysql-c-get-bid2s
gcc -O3 -I/usr/include/mysql -o c_get_bid2s.so -shared c_get_bid2s.c -fPIC
sudo cp c_get_bid2s.so /usr/lib/mysql/plugin/c_get_bid2s.so

Enable the function in MySQL by running this MySQL query

create function`c_get_bid2s`returns string soname'c_get_bid2s.so';

About

extract bid2s from text and return them hex encoded

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages