Remove tests stuff
[openstack-build/cinder-build.git] / xenial / debian / patches / temp-sql-fix.patch
1 --- /usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/api.py        2016-08-15 20:22:13.000000000 +0000
2 +++ b/cinder/db/sqlalchemy/api.py       2016-08-17 09:21:49.720954120 +0000
3 @@ -396,9 +396,10 @@
4              match_level = 'host'
5
6      # Mysql is not doing case sensitive filtering, so we force it
7 -    if CONF.database.connection.startswith('mysql:'):
8 +    conn_str = CONF.database.connection
9 +    if conn_str.startswith('mysql') and conn_str[5] in ['+', ':']:
10          cmp_value = func.binary(value)
11 -        like_op = 'LIKE_BINARY'
12 +        like_op = 'LIKE BINARY'
13      else:
14          cmp_value = value
15          like_op = 'LIKE'