Skip to content

Implement Read/Write Split directly on PHP / Fixed statistics->graphs page #2642

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

Merged
merged 5 commits into from
Dec 10, 2017

Conversation

tperalta82
Copy link
Contributor

The statistics->graphs page was not working because smarty was escaping html chars, thus breaking javascript.

Since the mysqlnd_ms extension does not work on php7, only php5, I implemented a simple Read/Write query splitting.

Tested while monitoring both master/slave instances.

@TheSerapher
Copy link
Contributor

Thanks for reopening the PR :-)

The MySQL change will allow MPOS to run on PHP 7? What’s the idea behind that change?

@TheSerapher
Copy link
Contributor

Lerts merge this into develeopment and let people test it out.

So anyone able to give this a whirl, feel free to do so!

@TheSerapher TheSerapher merged commit 777f167 into MPOS:development Dec 10, 2017
@tperalta82
Copy link
Contributor Author

Thanks for the add, well i'm running it on php7.0 with no issues so far, but it works out of the box.
The only thing that was not working was the read/write splitting because the extension mentioned in the wiki has no support for PHP7, hence I made it in PHP by extending mysqli and implementing it in a way ProxySQL works, but with prepared statements , that ProxySQL doesn't support.

Am running it in a production environment for days now, no issues.
I might add some more code in the future.

Awesome project man.

@tperalta82
Copy link
Contributor Author

Found a small bug (lack of validation) in the code, doesn't affect anything, just throws some warnings that 'll fix today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants