Skip to content

Commit 5d5456d

Browse files
committed
Update README.md
1 parent 7dc8444 commit 5d5456d

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ mysql-image-plugin
33

44
Build
55
-----
6-
gcc -O3 -g -I/usr/include/mysql -I/usr/include/sys -fPIC -shared -o image.so image.c
7-
sudo mv image.so /usr/lib/mysql/plugin/
6+
cmake .
7+
make && make install
8+
9+
or
10+
11+
gcc -O3 -g -I/usr/include/mysql -I/usr/include/sys -fPIC -shared -o libimage.so image.c
12+
sudo mv libimage.so /usr/lib/mysql/plugin/
813

914
Setup
1015
-----
11-
mysql> create function image_check returns string soname 'image.so';
16+
mysql> create function image_check returns string soname 'libimage.so';
1217
Query OK, 0 rows affected (0.44 sec)
1318

1419
Test
@@ -23,14 +28,16 @@ Plugin
2328
drop function image_crc32;
2429
drop function image_move;
2530

26-
create function image_check returns string soname 'image.so';
27-
create function image_remove returns string soname 'image.so';
28-
create function image_rename returns string soname 'image.so';
29-
create function image_crc32 returns string soname 'image.so';
30-
create function image_move returns string soname 'image.so';
31+
create function image_check returns string soname 'libimage.so';
32+
create function image_remove returns string soname 'libimage.so';
33+
create function image_rename returns string soname 'libimage.so';
34+
create function image_crc32 returns string soname 'libimage.so';
35+
create function image_move returns string soname 'libimage.so';
3136

37+
Example
38+
-------
3239
select image_check('/path/filename.ext');
3340
select image_remove('/path/filename.ext');
3441
select image_rename('/path/oldfile.ext','/path/newfile.ext');
3542
select image_crc32('/path/filename.ext');
36-
select image_move('/path/filename.ext','/path/to/newfile.ext');
43+
select image_move('/path/filename.ext','/path/to/newfile.ext');

0 commit comments

Comments
 (0)