@@ -3,12 +3,17 @@ mysql-image-plugin
3
3
4
4
Build
5
5
-----
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/
8
13
9
14
Setup
10
15
-----
11
- mysql> create function image_check returns string soname 'image .so';
16
+ mysql> create function image_check returns string soname 'libimage .so';
12
17
Query OK, 0 rows affected (0.44 sec)
13
18
14
19
Test
@@ -23,14 +28,16 @@ Plugin
23
28
drop function image_crc32;
24
29
drop function image_move;
25
30
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';
31
36
37
+ Example
38
+ -------
32
39
select image_check('/path/filename.ext');
33
40
select image_remove('/path/filename.ext');
34
41
select image_rename('/path/oldfile.ext','/path/newfile.ext');
35
42
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