Open strongduanmu opened 2 months ago
Hi @fernando-valdez, thank you for your attention to this issue. This is a simple example of writing a MySQL UDF using GraalVM. Hopefully it will help you reproduce the issue——https://github.com/strongduanmu/graalvm-lecture/tree/main/mysql-udf.
This example currently uses serial gc. You need to modify the GraalVM build parameters to specify G1 gc, then execute the following script to compile the so file and deploy it to the MySQL Server plugin directory.
Looking forward to your feedback, and if there is anything you need my help with, you can ping me. Thank you very much!!!
./mvnw -Pnative clean package -f mysql-udf
gcc -I/opt/homebrew/opt/mysql/include/mysql -I./mysql-udf/target -L./mysql-udf/target -lsm4_udf -fPIC -g -shared -o ./mysql-udf/target/sm4_encrypt_udf.so ./mysql-udf/src/main/native/sm4_encrypt_udf.c
Dear GraalVM community, I am trying to use GraalVM to build a shared library, then call the so file through C language and package it as a MySQL UDF function. After I deployed UDF to MySQL Server, an exception occurred when executing the following SQL.
But unfortunately, an exception occurred:
Does the exception
G1 doesn't support multiple isolates at the moment
mean that the G1 garbage collector cannot be used at present, or that some specifications need to be followed? If any developer familiar with this problem could help me out, I'd be very grateful.