Package: mysql-server-4.1
Version: 4.1.8a-1
Severity: normal

I compiled the udf_example.cc from the with libmysqlclient14-dev package
$ g++ -I /usr/include/mysql/ -shared -o udf_example.so udf_example.cc
and copied it into /usr/lib (as root):
$ udf_example.so /usr/lib/
In mysql I could load this function once and use it:

mysql> CREATE FUNCTION lookup RETURNS STRING SONAME "udf_example.so";
Query OK, 0 rows affected (0.02 sec)

mysql> select lookup("www.debian.org");
+--------------------------+
| lookup("www.debian.org") |
+--------------------------+
| 194.109.137.218          |
+--------------------------+
1 row in set (0.00 sec)

But after removing the function mysql's function table seems to be
broken:

mysql> DROP FUNCTION lookup;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE FUNCTION lookup RETURNS STRING SONAME "udf_example.so";
ERROR 1026 (HY000): Error writing file '[EMAIL PROTECTED]' (errno: 121)

I found only to ways to reload the function
1. purge mysql-server-4.1 and reinstall it
2. keep a backup of /var/lib/mysql/mysql/func.* files and copy them back
each time after the DROP FUNCTION

I don't know whether I did something wrong compiling the udf_example but
I didn't find any description how to compile it.
Searching for the ERROR above didn't help me either.

Thanks for bugfixing and maintaining mysql
Christian


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages mysql-server-4.1 depends on:
ii  adduser          3.59                    Add and remove users and groups
ii  debconf          1.4.30.11               Debian configuration management sy
ii  libc6            2.3.2.ds1-20            GNU C Library: Shared libraries an
ii  libdbi-perl      1.45-1                  The Perl5 Database Interface by Ti
ii  libmysqlclient14 4.1.8a-1                mysql database client library
ii  libncurses5      5.4-4                   Shared libraries for terminal hand
ii  libreadline4     4.3-11                  GNU readline and history libraries
ii  libstdc++5       1:3.3.5-5               The GNU Standard C++ Library v3
ii  libwrap0         7.6.dbs-6               Wietse Venema's TCP wrappers libra
ii  mailx            1:8.1.2-0.20040524cvs-4 A simple mail user agent
ii  mysql-client-4.1 4.1.8a-1                mysql database client binaries
ii  mysql-common-4.1 4.1.8a-1                mysql database common files (e.g. 
ii  passwd           1:4.0.3-30.7            Change and administer password and
ii  perl             5.8.4-5                 Larry Wall's Practical Extraction 
ii  psmisc           21.5-1                  Utilities that use the proc filesy
ii  zlib1g           1:1.2.2-3               compression library - runtime

-- debconf information:
* mysql-server-4.1/start_on_boot: false
  mysql-server-4.1/postrm_remove_databases: false
* mysql-server-4.1/mysql_install_db_notes:
  mysql-server-4.1/mysql_update_hints1:
  mysql-server-4.1/nis_warning:


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to