Mysql2 Versions Save

A modern, simple and very fast Mysql library for Ruby - binding to libmysql

0.4.7

6 years ago

New Features

  • Add Mysql2::Client#closed? (#796)
  • Adding support for MYSQL_ENABLE_CLEARTEXT_PLUGIN flag (#845)

Bugfixes

  • Avoid invalidating re-assigned socket fd by fixing connected check (#847)
  • Fix use after free of client field when closing with reconnect option (#846)
  • Fix segfault for Mysql2::Statement#fields on non-SELECT queries (#860)

Changes

  • Support for MariaDB 10.2 (#857 and others)
  • Close several unclosed clients in tests (#848)
  • Docs: Fix link in readme (#854)
  • Fix incorrect use of word "deprecated" (#855)
  • Fix leaky test that caused a re-assigned socket to be closed on GC. (#853)
  • Wait for close to be processed by server in test for Threads_connected (#850)
  • Fix flaky test that used Process.wait without specifying a pid (#849)

0.4.6

6 years ago

New Features

None.

Bugfixes

  • Mysql2::Error: This connection is still waiting for a result, try again once you have the result (#772)
  • Handle being terminated while reading query result (#811 )
  • Fix segfault on SIGINT race condition (#816, #813)
  • Better error messages when the connection options have errors (#831)

Changes

  • Use bool instead of my_bool which has been removed since MySQL 8.0.1 (#840, #838)
  • Reminder for Mac users to install xcode-select (#832)
  • Update Travis CI and AppVeyor matrix (#820, #819, #812)
  • Update Travis CI for MySQL 8.0 tests (#818, #817)

0.4.5

7 years ago

New Features

  • Add new connection argument :ssl_mode to Mysql2::Client#new
  • Prepared statements now support DateTime arguments

Bugfixes

  • Fix segfault when wrapper->result is used after it is freed
  • Raise an exception but don't crash on non-string encoding argument
  • Raise an exception but don't crash on nil argument to Mysql2::Client#new
  • Avoid RangeError on integers larger than LONG_LONG
  • Fix a BigDecimal value binding in Prepared Statements
  • Avoid type error when using connect_timeout, read_timeout and write_timeout in a DATABASE_URL env variable

Changes

  • Travis CI matrix now includes MySQL 8.0
  • Travis CI matrix defaults to MySQL 5.6
  • AppVeyor CI matrix switched to MySQL 5.7
  • Fix test that implicitly creates a passwordless user
  • Use RSpec expect output instead of StringIO
  • Move macro REQUIRE_CONNECTED to client.c
  • Add a note about casting boolean columns
  • Suppress rubocop's invalid UTF-8 literal warning

0.3.21

7 years ago

New Features

None

Bugfixes

  • Fix segfault when :cache_rows => false

Changes

  • Add Ruby 2.3.1 to the Travis CI matrix
  • Use Thread.handle_interrupt to protect Client#query against Timeout interrupts

0.4.4

8 years ago

New Features

  • None

Bugfixes

  • Fix segv when num of rows is zero
  • Fix failed to allocate memory for an empty result set
  • Fix :cache_rows => false on prepared statements
  • Fix results buffer allocation fails with prepared statements

Changes

  • Allow repeated each with :cache_rows => false
  • Fix some tests for non-default creds
  • Use the Travis Trusty image for Travis CI

0.4.3

8 years ago

New Features

  • Add method Client#ssl_cipher to expose mysql_get_ssl_cipher
  • Add method Result#free to immediately free a result set
  • Add connection flag automatic_close: true/false to determine whether to work around connections being closed by garbage collection in a child after a fork. Default is true, which restores behavior prior to 0.3.16.

Bugfixes

  • Fix to hold the GVL between mysql_stmt_execute and mysql_stmt_store_result to prevent commands hitting the wire out of sync (e.g. if a GC run occurs in the middle)
  • Fix BigDecimal arguments to Prepared Statements were ignored
  • Fix rake re-definition warning

Changes

  • Add Ruby 2.3 to the Travis CI matrix
  • Allow nil for timeouts instead of casting to 0 when creating a Client instance
  • Add connection flag automatic_close: true/false to determine whether to work around connections being closed by garbage collection in a child after a fork. Default is true, which restores behavior prior to 0.3.16.

0.4.2

8 years ago

New Features

  • Add Array and String parsing to the Mysql2::Client.new(:flags => ...) parameter to make it easier to pass flags from database.yml by name rather than magic numbers.
  • Add compile-time configure flag --with-sanitize[=address,cfi,integer,memory,thread,undefined] to enable Clang / GCC sanitizers.

Bug Fixes

  • Fix memory leak in Mysql2::Client#close
  • Don't enable Clang sanitizers on end-user CI systems where the mysql2 gem is not the thing under test.

Changes

  • Update Travis tests for MariaDB 5.5, 10.0, 10.1, and MySQL 5.7 GA.

0.4.1

8 years ago

New Features

  • Add methods Mysql2::Statement#last_id, Mysql2::Statement#affected_rows, Mysql2::Statement#close

Bug Fixes

  • Only check compile-time libmysql version on Win32 platform.
  • Also protect Mysql2::Statement#execute from Timeout.
  • Handle different versions of TimeoutError vs. Timeout::ExitException.

Changes

  • Send a COM_QUIT and shutdown() the socket for explicit Mysql2::Client#close calls.
  • New method for raising Mysql2::Error with error_number and sql_state arguments.
  • More cleanups for RuboCopy. Enforce RuboCop compliance on Travis.
  • Use pre-generated SSL certificates rather than generating on the fly on Travis (tests run faster by up to 1 minute).
  • Updates for RSpec 3.x preferred test style.
  • Attempt to run Clang sanitizers on Travis CI.
  • Move Mysql2::Client @@default_query_options into a class method.

0.4.0

8 years ago

New Features

  • Support for Prepared Statements!
  • Add connection option :sslverify
  • Use mariadb_config for MariaDB builds

Bugfixes

  • Fix Mysql2::Result#count always returns 0 when using stored procedures and MULTI_STATEMENTS

Changes

  • Prevent Timeout::timeout from interrupting query execution
  • Use Ruby's String#encode to remove unrecognized characters from error messages
  • Convert specs to RSpec 3 expect sytnax
  • Refactored the Travis CI test scripts
  • Misc cleanups with Rubocop
  • Stricter CFLAGS

0.3.20

8 years ago

Bugfixes

  • Check if O_CLOEXEC is defined before using it in open()
  • Fix an infinite loop while searching for libmysqlclient when mysql_config is not found

Changes

  • Call RakeCompilerDock.sh twice, once for 32-bit and once for 64-bit, when building Windows binary gems