kunnet / redis_udf Goto Github PK
View Code? Open in Web Editor NEWThis project forked from alexfok/redis_udf
Allows data synchronization from MySQL to Redis
This project forked from alexfok/redis_udf
Allows data synchronization from MySQL to Redis
** ** Allows data synchronization from MySQL to Redis ** Syntax for the new commands are: ** create function <function_name> returns {string|real|integer} ** soname <name_of_shared_library> ** drop function <function_name> ** ** Each defined function may have a xxxx_init function and a xxxx_deinit ** function. The init function should alloc memory for the function ** and tell the main function about the max length of the result ** (for string functions), number of decimals (for double functions) and ** if the result may be a null value. ** Compile: ** gcc -shared -o redis_udf.so redis_udf.c -I "/root/mysql-src/mysql-5.5.21/include" -I "/usr/include/mysql" -fPIC libhiredis.a ** copy the lib to MySQL plugin directory ** cp redis_udf.so /usr/lib64/mysql/plugin ** After the library is made one must notify mysqld about the new ** functions with the commands: ** CREATE FUNCTION redis_set RETURNS INTEGER SONAME 'redis_udf.so'; ** CREATE FUNCTION redis_servers_set RETURNS INTEGER SONAME 'redis_udf.so'; ** ** to drop the functions, do the following: ** DROP FUNCTION redis_set; ** DROP FUNCTION redis_servers_set; ** ** The CREATE FUNCTION and DROP FUNCTION update the func@mysql table. ** ** ** Usage examples: ** select redis_servers_set('192.168.60.10',6379,'password'); ** select redis_servers_set('192.168.60.10',6379); ** select redis_set('ro222','1121235'); ** select redis_sadd('ro222','1121235'); ** select redis_srem('ro222','1121235'); ** ** Thanks to Salvatore Sanfilippo <antirez at gmail dot com> and Pieter Noordhuis <pcnoordhuis at gmail dot com> for used hiredis C client **
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.