Change connection IP to server public IP in queries.c.
Compile and run client:
make
./client
Running the code
Client code:
make to compile
./client to run client
UDF:
make udf to compile and setup UDF code
Go through server setup to ensure updated function created and loaded into MySQL database
Keys:
make keys to compile generateKeys.c
./generateKeys to generate new Paillier keys
UDF problems
If the UDF isn't properly set, all queries with SUM will result in problems.
Make sure to go through proper server setup.
If you have an error (often #2013, #2006, or something similar:)
Log into mysql server on server side: mysql -u root -p
mysql> SELECT * FROM mysql.func
You'll see the SUM_HE function.
mysql> DELETE FROM project WHERE name='SUM_HE'
Recompile UDF. Redo server setup starting from step 6
Current known bugs
SELECT SUM on an empty database will result in a bad query.
SELECT [int] will result in a bad query
This is due to a hotfix in the else-if conditional on line 172 in queries.c. The current code no longer takes into account a query with 2 words without the SUM word.