Ubuntu Pastebin

Paste from Skuggen at Wed, 6 Apr 2016 16:36:56 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Description: Fixes test failures with MySQL 5.7
 Some tests are failing because of changes in MySQL 5.7:
 * The NO_DEFAULT_VALUE_FLAG has been added
 * The SECURE_AUTH option has been removed
Author: Lars Tangvald <lars.tangvald@oracle.com>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ruby-mysql/+bug/1566917
Forwarded: no
Last-Update: 2016-04-06

--- ruby-mysql-2.9.1.orig/ext/mysql_api/mysql.c
+++ ruby-mysql-2.9.1/ext/mysql_api/mysql.c
@@ -2213,6 +2213,7 @@ void Init_mysql_api(void)
     rb_define_const(cMysqlField, "TYPE_CHAR", INT2NUM(FIELD_TYPE_CHAR));

     /* Mysql::Field constant: FLAG */
+    rb_define_const(cMysqlField, "NO_DEFAULT_VALUE_FLAG", INT2NUM(NO_DEFAULT_VALUE_FLAG));
     rb_define_const(cMysqlField, "NOT_NULL_FLAG", INT2NUM(NOT_NULL_FLAG));
     rb_define_const(cMysqlField, "PRI_KEY_FLAG", INT2NUM(PRI_KEY_FLAG));
     rb_define_const(cMysqlField, "UNIQUE_KEY_FLAG", INT2NUM(UNIQUE_KEY_FLAG));
--- ruby-mysql-2.9.1.orig/test/test_mysql.rb
+++ ruby-mysql-2.9.1/test/test_mysql.rb
@@ -84,7 +84,6 @@ class TC_Mysql < Test::Unit::TestCase
     assert_equal(@m, @m.options(Mysql::OPT_WRITE_TIMEOUT, 10)) if defined? Mysql::OPT_WRITE_TIMEOUT
 #   assert_equal(@m, @m.options(Mysql::READ_DEFAULT_FILE, "/tmp/hoge"))
     assert_equal(@m, @m.options(Mysql::READ_DEFAULT_GROUP, "test"))
-    assert_equal(@m, @m.options(Mysql::SECURE_AUTH, true)) if defined? Mysql::SECURE_AUTH
 #   assert_equal(@m, @m.options(Mysql::SET_CHARSET_DIR, "??"))
     assert_equal(@m, @m.options(Mysql::SET_CHARSET_NAME, "latin1"))
     assert_equal(@m, @m.options(Mysql::SET_CLIENT_IP, "127.0.0.1")) if defined? Mysql::SET_CLIENT_IP
@@ -335,7 +334,7 @@ class TC_MysqlRes < Test::Unit::TestCase
     assert_equal(Mysql::Field::TYPE_LONG, f.type)
     assert_equal(11, f.length)
     assert_equal(1, f.max_length)
-    assert_equal(Mysql::Field::NUM_FLAG|Mysql::Field::PRI_KEY_FLAG|Mysql::Field::PART_KEY_FLAG|Mysql::Field::NOT_NULL_FLAG, f.flags)
+    assert_equal(Mysql::Field::NUM_FLAG|Mysql::Field::PRI_KEY_FLAG|Mysql::Field::PART_KEY_FLAG|Mysql::Field::NOT_NULL_FLAG|Mysql::Field::NO_DEFAULT_VALUE_FLAG, f.flags)
     assert_equal(0, f.decimals)
     f = @res.fetch_field
     assert_equal("str", f.name)
@@ -389,7 +388,7 @@ class TC_MysqlRes < Test::Unit::TestCase
       "type" => Mysql::Field::TYPE_LONG,
       "length" => 11,
       "max_length" => 1,
-      "flags" => Mysql::Field::NUM_FLAG|Mysql::Field::PRI_KEY_FLAG|Mysql::Field::PART_KEY_FLAG|Mysql::Field::NOT_NULL_FLAG,
+      "flags" => Mysql::Field::NUM_FLAG|Mysql::Field::PRI_KEY_FLAG|Mysql::Field::PART_KEY_FLAG|Mysql::Field::NOT_NULL_FLAG|Mysql::Field::NO_DEFAULT_VALUE_FLAG,
       "decimals" => 0,
     }
     assert_equal(h, f.hash)
Download as text