Skip to content
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

Updating the mysql2_mysql_enc_to_rb conversion table to 8.0 List #976

Merged
merged 7 commits into from
May 18, 2018

Conversation

QuantamHD
Copy link
Contributor

This commit fixes #975 what happened is that I used the collation utf8mb4_general_ci which is listed as charsetnr 254 in the C API our conversion table mysql2_mysql_enc_to_rb did not have entries that went past 245 previously. Thus, functions that used the result of this selection would be given an index into undefined memory and when they tried to read it they would blow past the end of the segment causing the issue in #975. I've added a check to return NULL if we see a charsetnr that is larger than the conversion table.

…ck to make sure we do not go out of bounds.
@QuantamHD
Copy link
Contributor Author

QuantamHD commented May 18, 2018

@sodabrew It looks like the Travis build is failing to download some dependencies.

@sodabrew
Copy link
Collaborator

Thanks for worrying on the MySQL 5.5 build - I'm OK merging this without fixing Travis for that version.

@sodabrew
Copy link
Collaborator

This PR looks good to me! Is there anything else you want to do on this branch before I merge it?

@sodabrew sodabrew added this to the 0.5.2 milestone May 18, 2018
@QuantamHD
Copy link
Contributor Author

@sodabrew nope it's all good from my side.

@sodabrew sodabrew merged commit 46d6851 into brianmario:master May 18, 2018
jeremy added a commit to jeremy/mysql2 that referenced this pull request Mar 5, 2019
* upstream/master:
  Expose windows client authentication (brianmario#1018)
  Fix code snippet (brianmario#1002)
  Add CentOS on Travis CI. (brianmario#989)
  Bump version to 0.5.2
  Travis apt-get update for MySQL 5.5 install
  Updating the mysql2_mysql_enc_to_rb conversion table to 8.0 List (brianmario#976)
  Add default-libmysqlclient-dev to the likely packages list
  Bump version to 0.5.1
  Use the prepared statement performance schema if available (brianmario#960)
  README mysql2 0.5.x works with Rails 5.0.7, 5.1.6, and higher
  README be sure to read about the known limitations of prepared statements
  Add missing FREE_BINDS to prepared statement streaming error case (brianmario#958)
  Fix with --with-mysql-dir (brianmario#952)
  Prevent command out of sync errors with Prepared Statements (brianmario#958)
hanachin added a commit to agileware-jp/redmine-plugin-orb that referenced this pull request Jul 23, 2019
mysql2 gem > 0.5.2 doesn't support MySQL 8.0
brianmario/mysql2#976
fkdkent pushed a commit to agileware-jp/redmine-plugin-orb that referenced this pull request Jul 25, 2019
* Move -ram suffix to the parameter

* Use MySQL 5.x for ruby >= 2.4

mysql2 gem > 0.5.2 doesn't support MySQL 8.0
brianmario/mysql2#976
kamibayashi pushed a commit to kamibayashi/mysql2 that referenced this pull request Mar 7, 2023
…anmario#976)

Also add a check to make sure we do not go out of bounds.
hkmaly pushed a commit to ipdgroup/mysql2 that referenced this pull request Oct 9, 2024
…anmario#976)

Also add a check to make sure we do not go out of bounds.
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.

Segfault Debian 9 with MySQL 8.0 using libmysqlclient21
2 participants