Update to mysql2 0.5.4

Drop local patches, no longer needed.
This commit is contained in:
jeremy 2022-06-03 22:55:42 +00:00
parent f42b298206
commit d8d79def5c
6 changed files with 4 additions and 58 deletions

View File

@ -1,7 +1,6 @@
COMMENT= modern, simple and very fast MySQL library for Ruby
DISTNAME= mysql2-0.5.3
REVISION= 1
DISTNAME= mysql2-0.5.4
CATEGORIES= databases
HOMEPAGE= https://github.com/brianmario/mysql2

View File

@ -1,2 +1,2 @@
SHA256 (mysql2-0.5.3.gem) = XKLZfZwl+ifcZ+ynfdjXPxJXbEzU9vbBixKSWjy7JDQ=
SIZE (mysql2-0.5.3.gem) = 74240
SHA256 (mysql2-0.5.4.gem) = AbuVo+oYzerm3M3VPCm0yXqHPDvOHTW1JAVd8io4Xnc=
SIZE (mysql2-0.5.4.gem) = 79360

View File

@ -1,15 +0,0 @@
Index: ext/mysql2/client.c
Don't use tainted string function.
--- ext/mysql2/client.c.orig
+++ ext/mysql2/client.c
@@ -175,7 +175,7 @@ static void rb_mysql_client_mark(void * wrapper) {
static VALUE rb_raise_mysql2_error(mysql_client_wrapper *wrapper) {
VALUE rb_error_msg = rb_str_new2(mysql_error(wrapper->client));
- VALUE rb_sql_state = rb_tainted_str_new2(mysql_sqlstate(wrapper->client));
+ VALUE rb_sql_state = rb_str_new2(mysql_sqlstate(wrapper->client));
VALUE e;
rb_enc_associate(rb_error_msg, rb_utf8_encoding());

View File

@ -1,14 +0,0 @@
Index: ext/mysql2/result.c
Undef Mysql2::Result alloc function to avoid warning on Ruby 3.2.
--- ext/mysql2/result.c.orig
+++ ext/mysql2/result.c
@@ -969,6 +969,7 @@ void init_mysql2_result() {
cDateTime = rb_const_get(rb_cObject, rb_intern("DateTime"));
cMysql2Result = rb_define_class_under(mMysql2, "Result", rb_cObject);
+ rb_undef_alloc_func(cMysql2Result);
rb_define_method(cMysql2Result, "each", rb_mysql_result_each, -1);
rb_define_method(cMysql2Result, "fields", rb_mysql_result_fetch_fields, 0);
rb_define_method(cMysql2Result, "free", rb_mysql_result_free_, 0);

View File

@ -1,25 +0,0 @@
Index: ext/mysql2/statement.c
Remove use of tainted string function.
Undef Mysql2::Statement alloc function to avoid warning on Ruby 3.2.
--- ext/mysql2/statement.c.orig
+++ ext/mysql2/statement.c
@@ -46,7 +46,7 @@ void rb_raise_mysql2_stmt_error(mysql_stmt_wrapper *st
VALUE e;
GET_CLIENT(stmt_wrapper->client);
VALUE rb_error_msg = rb_str_new2(mysql_stmt_error(stmt_wrapper->stmt));
- VALUE rb_sql_state = rb_tainted_str_new2(mysql_stmt_sqlstate(stmt_wrapper->stmt));
+ VALUE rb_sql_state = rb_str_new2(mysql_stmt_sqlstate(stmt_wrapper->stmt));
rb_encoding *conn_enc;
conn_enc = rb_to_encoding(wrapper->encoding);
@@ -576,6 +576,7 @@ void init_mysql2_statement() {
cBigDecimal = rb_const_get(rb_cObject, rb_intern("BigDecimal"));
cMysql2Statement = rb_define_class_under(mMysql2, "Statement", rb_cObject);
+ rb_undef_alloc_func(cMysql2Statement);
rb_define_method(cMysql2Statement, "param_count", rb_mysql_stmt_param_count, 0);
rb_define_method(cMysql2Statement, "field_count", rb_mysql_stmt_field_count, 0);
rb_define_method(cMysql2Statement, "_execute", rb_mysql_stmt_execute, -1);

View File

@ -16,6 +16,7 @@ ${GEM_LIB}/gems/${DISTNAME}/lib/mysql2/result.rb
${GEM_LIB}/gems/${DISTNAME}/lib/mysql2/statement.rb
${GEM_LIB}/gems/${DISTNAME}/lib/mysql2/version.rb
${GEM_LIB}/gems/${DISTNAME}/support/
${GEM_LIB}/gems/${DISTNAME}/support/3A79BD29.asc
${GEM_LIB}/gems/${DISTNAME}/support/5072E1F5.asc
${GEM_LIB}/gems/${DISTNAME}/support/libmysql.def
${GEM_LIB}/gems/${DISTNAME}/support/mysql_enc_to_ruby.rb