Add sql bin fix 47/25147/2
authorIgor Yozhikov <iyozhikov@mirantis.com>
Wed, 17 Aug 2016 10:03:04 +0000 (13:03 +0300)
committerIgor Yozhikov <iyozhikov@mirantis.com>
Wed, 17 Aug 2016 10:06:22 +0000 (13:06 +0300)
 * Workaround while waiting for https://review.openstack.org/#/c/355837

Change-Id: I144c2877413856a0a6871daabb49b624f24a3f7b
Closes-Bug: #1614013

xenial/debian/changelog
xenial/debian/patches/series
xenial/debian/patches/temp-sql-fix.patch [new file with mode: 0644]

index 9bf0277016ce3085b87ddb91f121f09823e1a78b..d879b1440d7dcb0e081c1620b02393a83464efbc 100644 (file)
@@ -1,3 +1,11 @@
+cinder (2:9.0.0~b2-2~u16.04+mos1) mos10.0; urgency=medium
+
+  * Add patch https://review.openstack.org/#/c/355837
+  * Patch must be deleted during next cinder package update if will be merged to
+    upstream source code!
+
+ -- Igor Yozhikov <iyozhikov@mirantis.com>  Wed, 17 Aug 2016 13:00:08 +0300
+
 cinder (2:9.0.0~b2-1~u16.04+mos1) mos10.0; urgency=medium
 
   * Update to 9.0.0~b2
@@ -508,8 +516,8 @@ cinder (2012.2~rc1~20120907.230-0ubuntu4) quantal; urgency=low
 
   [Chuck Short]
   * New upstream version.
-  * debian/cinder.conf: Fix path for cinder-rootwrap. (LP: #1045438) 
-  * debian/control: Add python-glanceclient as a dep. 
+  * debian/cinder.conf: Fix path for cinder-rootwrap. (LP: #1045438)
+  * debian/control: Add python-glanceclient as a dep.
   * debian/cinder-common.postinst: Fix chmod thinko.
   * debian/*.upstart: Specify the configuration files.
 
@@ -529,7 +537,7 @@ cinder (2012.2~f3-0ubuntu3) quantal; urgency=low
 cinder (2012.2~f3-0ubuntu2) quantal; urgency=low
 
   * debian/cinder.conf: Get rid of deprecated warnings.
-    (LP: #1036240) 
+    (LP: #1036240)
 
  -- Chuck Short <zulcss@ubuntu.com>  Sun, 19 Aug 2012 13:36:22 -0500
 
@@ -543,7 +551,7 @@ cinder (2012.2~f3-0ubuntu1) quantal; urgency=low
 
 cinder (2012.2~f3~20120809.102-0ubuntu2) quantal; urgency=low
 
-  * debian/cinder.conf, cinder-common.install: Use rootwrap.conf. (LP: #1036240) 
+  * debian/cinder.conf, cinder-common.install: Use rootwrap.conf. (LP: #1036240)
   * debian/control: Drop python-babel.
 
  -- Chuck Short <zulcss@ubuntu.com>  Mon, 13 Aug 2012 14:14:31 -0500
index 5ab81b52bb7deba835c6201e7692bc7a2c20dcf4..513c9fdfb8401734784ef15c1a250ba88845678d 100644 (file)
@@ -1 +1,2 @@
-install-missing-files.patch
\ No newline at end of file
+temp-sql-fix.patch
+install-missing-files.patch
diff --git a/xenial/debian/patches/temp-sql-fix.patch b/xenial/debian/patches/temp-sql-fix.patch
new file mode 100644 (file)
index 0000000..c540c42
--- /dev/null
@@ -0,0 +1,15 @@
+--- /usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/api.py       2016-08-15 20:22:13.000000000 +0000
++++ b/cinder/db/sqlalchemy/api.py      2016-08-17 09:21:49.720954120 +0000
+@@ -396,9 +396,10 @@
+             match_level = 'host'
+
+     # Mysql is not doing case sensitive filtering, so we force it
+-    if CONF.database.connection.startswith('mysql:'):
++    conn_str = CONF.database.connection
++    if conn_str.startswith('mysql') and conn_str[5] in ['+', ':']:
+         cmp_value = func.binary(value)
+-        like_op = 'LIKE_BINARY'
++        like_op = 'LIKE BINARY'
+     else:
+         cmp_value = value
+         like_op = 'LIKE'