Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mysql 8.0 support #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
parthasai wants to merge 5 commits into 2rebi:master
base: master
Choose a base branch
Loading
from parthasai:master
Open

Mysql 8.0 support #7

parthasai wants to merge 5 commits into 2rebi:master from parthasai:master

Conversation

Copy link

@parthasai parthasai commented Jun 21, 2023

  1. Instead of using the unsupported my_bool variable in MySQL 8, have replaced it with int.
  2. In the install.sh and uninstall.sh scripts, modified the mechanism for extracting the plugin_dir. Previously, it was outputting 'plugin_dir ', which caused issues in the subsequent steps. Now, the extraction correctly provides only plugin directory path.
  3. Updated readme file to include installation of libmysqlclient-dev golang-go packages

2rebi reacted with eyes emoji
@2rebi 2rebi linked an issue Jul 20, 2023 that may be closed by this pull request
Copy link

Hello, I installed this patch/branch from parthasai on MariaDB Database client version: libmysql - mysqlnd 8.2.8 and all works great. The unpatched version did not work.

As you probably know, MySQL does not allow data returns in insert triggers. I can call a procedure holding the http function from a trigger, but the http function still returns values, that in turn are automatically passed back to the calling insert trigger, thereby causing the trigger to fail.

I was hoping you could add an option flag to the http functions that would disable any returns. This might do the trick to using these functions in a trigger.

2rebi reacted with thumbs up emoji

Copy link

There is another possibility that causes an insert trigger to fail. It may be that the mySQL engine sees the "SELECT http_get()" in the called procedure as a true SELECT statement that would by definition, return some type of value, and thereby cause the insert trigger to fail. I imagine this could only be solved by doing something like using "CALL http_get()" Is there any way to restructure the way the http_get function is used/initiated?

Copy link

I also had to change the http.go file header to:

/*
#include <stdio.h>
#include <linux/types.h>
#include <linux/stat.h>
#include <stdlib.h>
#include <string.h>
#include <mysql/mysql.h>
#include <mysql/udf_registration_types.h>
*/

This seemed to do the trick to get it to compile.

Copy link

One final comment. I was able to get this to work using the following statement: INSERT INTO logtable SET log= http_get(TRIM(@my_URL2)), msg1=@my_message, msg2=@my_params;

I basically created a logtable, and then directed the return of the http_get() function into the "log" field, with msg1 and msg2 fields capturing passed parameters from the originating trigger. You should note on your info page that you can use the INSERT command to make the function work in a trigger. Thanks for the plugin....

BuxtonCalvin and 2rebi reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

It can't build on MySQL 8.X

AltStyle によって変換されたページ (->オリジナル) /