https://github.com/netkiller/mysql-image-plugin
MySQL 图片处理插件
https://github.com/netkiller/mysql-image-plugin
Last synced: about 1 year ago
JSON representation
MySQL 图片处理插件
- Host: GitHub
- URL: https://github.com/netkiller/mysql-image-plugin
- Owner: netkiller
- License: bsd-3-clause
- Created: 2013-11-29T06:17:56.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-03-17T02:30:59.000Z (over 9 years ago)
- Last Synced: 2025-04-18T15:17:04.765Z (about 1 year ago)
- Language: C
- Homepage: http://netkiller.github.io/
- Size: 8.79 KB
- Stars: 7
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mysql-image-plugin
==================
[](https://gitter.im/netkiller/mysql-image-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Build
-----
cd /usr/local/src/
git clone https://github.com/netkiller/mysql-image-plugin.git
cd mysql-image-plugin/
yum install cmake
cmake .
make && make install
or
gcc -O3 -g -I/usr/include/mysql -I/usr/include/sys -fPIC -shared -o libimage.so image.c
sudo mv libimage.so /usr/lib/mysql/plugin/
Setup
-----
mysql> create function image_check returns string soname 'libimage.so';
Query OK, 0 rows affected (0.44 sec)
Test
----
mysql> select image_check('/www/images/logo.png');
Plugin
------
### Install
create function image_check returns string soname 'libimage.so';
create function image_remove returns string soname 'libimage.so';
create function image_rename returns string soname 'libimage.so';
create function image_crc32 returns string soname 'libimage.so';
create function image_move returns string soname 'libimage.so';
### Uninstall
drop function image_check;
drop function image_remove;
drop function image_rename;
drop function image_crc32;
drop function image_move;
Example
-------
select image_check('/path/filename.ext');
select image_remove('/path/filename.ext');
select image_rename('/path/oldfile.ext','/path/newfile.ext');
select image_crc32('/path/filename.ext');
select image_move('/path/filename.ext','/path/to/newfile.ext');
# Donations
We accept PayPal through:
https://www.paypal.me/netkiller
Wechat (微信) / Alipay (支付宝) 打赏:
http://www.netkiller.cn/home/donations.html
[](https://bitdeli.com/free "Bitdeli Badge")