)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"86077340b54e01a3b64f18ffb282aa1f79a2f5b8","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create class TestInnoDB with function, which search tables"},{"line_number":10,"context_line":"where ENGINE!\u003d\u0027InnoDB\u0027 and returns numbers of these tables."},{"line_number":11,"context_line":"Wrote tests for this function."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I22889e23b025fc32fe76e4086cd3cd3d5bd0b771"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baada198_13bfdbac","line":11,"updated":"2014-08-05 14:45:29.000000000","message":"Why do we need it? Do we close some bugs with it or implement some feature. I expected for blueprint, bug id or at least description of situation when we really need it.","commit_id":"1c2db7466f8919c7e1670ec3151715da632bde50"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"a3702908dd932ecab96b22a3d3c0dcd11b94b891","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create class TestInnoDB with function, which search tables"},{"line_number":10,"context_line":"where ENGINE!\u003d\u0027InnoDB\u0027 and returns numbers of these tables."},{"line_number":11,"context_line":"Wrote tests for this function."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I22889e23b025fc32fe76e4086cd3cd3d5bd0b771"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"baada198_8a4630a6","line":11,"updated":"2014-08-06 09:04:44.000000000","message":"My previous comment was ignored. There is still lack of information.","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vlad Okhrimenko \u003cvokhrimenko@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-08-08 17:17:15 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Create class TestInnoDB"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We use InnoDB engine tables in our project, so we have to"},{"line_number":10,"context_line":"check that all tables in this engine."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"baada198_033b8d9b","line":7,"updated":"2014-08-08 14:29:59.000000000","message":"please update the commit message :)","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"}],"oslo/db/sqlalchemy/test_migrations.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"09d7203f6ed49196581e30a74b6eba6abfdb6672","unresolved":false,"context_lines":[{"line_number":31,"context_line":"import sqlalchemy.types as types"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from oslo.db.sqlalchemy import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from oslo.db import exception as exc"},{"line_number":36,"context_line":"from oslo.db.openstack.common.gettextutils import _LE"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_e32dce46","line":34,"updated":"2014-07-24 10:19:32.000000000","message":"redudant empty line","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"58d42476cdfc4714827dc0175100b87af8a7f974","unresolved":false,"context_lines":[{"line_number":31,"context_line":"import sqlalchemy.types as types"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from oslo.db.sqlalchemy import utils"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from oslo.db import exception as exc"},{"line_number":36,"context_line":"from oslo.db.openstack.common.gettextutils import _LE"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_29b028db","line":34,"in_reply_to":"baada198_e32dce46","updated":"2014-07-28 08:17:59.000000000","message":"Done","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6e11041304eb1c42624c3262affaf771063a0a11","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":428,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":429,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":430,"context_line":"        connection \u003d engine.connect()"},{"line_number":431,"context_line":"        noninnodb \u003d connection.execute(\"SELECT count(*) \""},{"line_number":432,"context_line":"                                       \"from information_schema.TABLES \""},{"line_number":433,"context_line":"                                       \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_06b2f448","line":430,"updated":"2014-07-23 13:59:01.000000000","message":"can we get rid of creation connect and execute query directly from engine?","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"58d42476cdfc4714827dc0175100b87af8a7f974","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":428,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":429,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":430,"context_line":"        connection \u003d engine.connect()"},{"line_number":431,"context_line":"        noninnodb \u003d connection.execute(\"SELECT count(*) \""},{"line_number":432,"context_line":"                                       \"from information_schema.TABLES \""},{"line_number":433,"context_line":"                                       \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_4972bc7c","line":430,"in_reply_to":"baada198_06b2f448","updated":"2014-07-28 08:17:59.000000000","message":"Engine execute do the same things","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"44c4ea0750914755b496ff42b405a6aca4ea769e","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                    \"Models and migration scripts aren\u0027t in sync:\\n%s\" % msg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"class TestInnoDB(object):"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    def _number_innodb(self, BACKEND\u003d\"mysql+mysqldb\", DATABASE\u003dNone,"},{"line_number":425,"context_line":"                       USER\u003dNone, PASSWD\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_9f2b227b","line":422,"updated":"2014-07-28 08:44:35.000000000","message":"Hmm, I was thinking about where to put this test case and IMO, the best place for it is https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/test_migrations.py#L40\n\nPlease move it there and make it a test case, e.g. test_all_tables_use_innodb() and do assertion right here.","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f5e044b25fe8e1bcd93d47f01c1a924724283281","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                    \"Models and migration scripts aren\u0027t in sync:\\n%s\" % msg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"class TestInnoDB(object):"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    def _number_innodb(self, BACKEND\u003d\"mysql+mysqldb\", DATABASE\u003dNone,"},{"line_number":425,"context_line":"                       USER\u003dNone, PASSWD\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_4341fe08","line":422,"in_reply_to":"baada198_9f2b227b","updated":"2014-08-01 08:55:03.000000000","message":"Ok, so making this a test case might actually not be a good idea, as it will be skipped on all backends except mysql. How about we make this a helper util accepting an Engine instance? It could return a list of non-innodb tables and consuming projects would implement assertions based on that.","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"44c4ea0750914755b496ff42b405a6aca4ea769e","unresolved":false,"context_lines":[{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    def _number_innodb(self, BACKEND\u003d\"mysql+mysqldb\", DATABASE\u003dNone,"},{"line_number":425,"context_line":"                       USER\u003dNone, PASSWD\u003dNone):"},{"line_number":426,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":427,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":428,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":429,"context_line":"        connection \u003d engine.connect()"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_7f8c8e80","line":426,"updated":"2014-07-28 08:44:35.000000000","message":"If you put this test case to WalkVersionsMixin class, you can use migrate_engine property to get an Engine instance. You won\u0027t need any args here.","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f5e044b25fe8e1bcd93d47f01c1a924724283281","unresolved":false,"context_lines":[{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    def _number_innodb(self, BACKEND\u003d\"mysql+mysqldb\", DATABASE\u003dNone,"},{"line_number":425,"context_line":"                       USER\u003dNone, PASSWD\u003dNone):"},{"line_number":426,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":427,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":428,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":429,"context_line":"        connection \u003d engine.connect()"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8346b61f","line":426,"in_reply_to":"baada198_7f8c8e80","updated":"2014-08-01 08:55:03.000000000","message":"not needed anymore :)","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"44c4ea0750914755b496ff42b405a6aca4ea769e","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":427,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":428,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":429,"context_line":"        connection \u003d engine.connect()"},{"line_number":430,"context_line":"        noninnodb \u003d connection.execute(\"SELECT count(*) \""},{"line_number":431,"context_line":"                                       \"from information_schema.TABLES \""},{"line_number":432,"context_line":"                                       \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ffefbe1a","line":429,"updated":"2014-07-28 08:44:35.000000000","message":"nit:\n\n   with engine.connect() as connection:\n       ...","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f5e044b25fe8e1bcd93d47f01c1a924724283281","unresolved":false,"context_lines":[{"line_number":426,"context_line":"        connect_string \u003d utils.get_connect_string("},{"line_number":427,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":428,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":429,"context_line":"        connection \u003d engine.connect()"},{"line_number":430,"context_line":"        noninnodb \u003d connection.execute(\"SELECT count(*) \""},{"line_number":431,"context_line":"                                       \"from information_schema.TABLES \""},{"line_number":432,"context_line":"                                       \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_a34f3a34","line":429,"in_reply_to":"baada198_ffefbe1a","updated":"2014-08-01 08:55:03.000000000","message":"ditto","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"44c4ea0750914755b496ff42b405a6aca4ea769e","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            BACKEND, DATABASE, USER, PASSWD)"},{"line_number":428,"context_line":"        engine \u003d sqlalchemy.create_engine(connect_string)"},{"line_number":429,"context_line":"        connection \u003d engine.connect()"},{"line_number":430,"context_line":"        noninnodb \u003d connection.execute(\"SELECT count(*) \""},{"line_number":431,"context_line":"                                       \"from information_schema.TABLES \""},{"line_number":432,"context_line":"                                       \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""},{"line_number":433,"context_line":"                                       \"and ENGINE!\u003d\u0027InnoDB\u0027 \""}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_dfa4baba","line":430,"updated":"2014-07-28 08:44:35.000000000","message":"I understand that you are re-implementing the test found in one of OS projects here, but let\u0027s improve it. IMO, we should print the *names* of tables which don\u0027t use InnoDB.","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"803feee7191c9ada6d4fdb2cd194d5ae102c0add","unresolved":false,"context_lines":[{"line_number":434,"context_line":"                                           \"and TABLE_NAME!\u003d\u0027migrate_version\u0027\" %"},{"line_number":435,"context_line":"                                           {\u0027database\u0027: self.engine.url.database})"},{"line_number":436,"context_line":"        fetch \u003d noninnodb.fetchall()"},{"line_number":437,"context_line":"        self.assertEqual(0, len(fetch), "},{"line_number":438,"context_line":"            \"The following tables not contain InnoDB engine: %s\" % fetch)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_3f5db648","line":437,"updated":"2014-08-04 12:54:19.000000000","message":"nit: trailing whitespace","commit_id":"bc86b952053ca4e5efcf8ededdb4c46eff1b608e"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"86077340b54e01a3b64f18ffb282aa1f79a2f5b8","unresolved":false,"context_lines":[{"line_number":418,"context_line":"                self.fail("},{"line_number":419,"context_line":"                    \"Models and migration scripts aren\u0027t in sync:\\n%s\" % msg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"class TestInnoDB(object):"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @abc.abstractproperty"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b3a54f05","line":421,"updated":"2014-08-05 14:45:29.000000000","message":"Missing ABCMeta metaclass","commit_id":"1c2db7466f8919c7e1670ec3151715da632bde50"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"86077340b54e01a3b64f18ffb282aa1f79a2f5b8","unresolved":false,"context_lines":[{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"class TestInnoDB(object):"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    @abc.abstractproperty"},{"line_number":425,"context_line":"    def migrate_engine(self):"},{"line_number":426,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_f369878e","line":423,"updated":"2014-08-05 14:45:29.000000000","message":"Please, add docstring for this mixin?","commit_id":"1c2db7466f8919c7e1670ec3151715da632bde50"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"cafa2543ee3b48651504f457faabd2654c282774","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from oslo.db import exception as exc"},{"line_number":34,"context_line":"from oslo.db.openstack.common.gettextutils import _LE"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_4fbc2a08","line":36,"updated":"2014-08-06 09:10:36.000000000","message":"nit: unrelated change","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"a3702908dd932ecab96b22a3d3c0dcd11b94b891","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                    \"Models and migration scripts aren\u0027t in sync:\\n%s\" % msg)"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":423,"context_line":"class TestInnoDB(object):"},{"line_number":424,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027"},{"line_number":425,"context_line":"    and generate error if they were found."}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8a18f0ce","line":422,"updated":"2014-08-06 09:04:44.000000000","message":"That was my problem too. Press \"done\" if you have no objections or post a comment below the reviewer\u0027s comment. That will help you to control of your fixing workflow.","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"cafa2543ee3b48651504f457faabd2654c282774","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def test_all_tables_use_innodb(self):"},{"line_number":433,"context_line":"        with self.migrate_engine.connect() as connection:"},{"line_number":434,"context_line":"            data \u003d {\u0027database\u0027: self.engine.url.database}"},{"line_number":435,"context_line":"            noninnodb \u003d connection.execute(\"SELECT TABLE_NAME \""},{"line_number":436,"context_line":"                                           \"from information_schema.TABLES \""},{"line_number":437,"context_line":"                                           \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ef3fbedd","line":434,"updated":"2014-08-06 09:10:36.000000000","message":"why aren\u0027t you using self.migrate_engine here?","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"cafa2543ee3b48651504f457faabd2654c282774","unresolved":false,"context_lines":[{"line_number":434,"context_line":"            data \u003d {\u0027database\u0027: self.engine.url.database}"},{"line_number":435,"context_line":"            noninnodb \u003d connection.execute(\"SELECT TABLE_NAME \""},{"line_number":436,"context_line":"                                           \"from information_schema.TABLES \""},{"line_number":437,"context_line":"                                           \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""},{"line_number":438,"context_line":"                                           \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":439,"context_line":"                                           \"and TABLE_NAME!\u003d\u0027migrate_version\u0027\""},{"line_number":440,"context_line":"                                           % data)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_8a4d503e","line":437,"updated":"2014-08-06 09:10:36.000000000","message":"This particular case is harmless, but you should always use bound parameters to prevent SQL injections (there are a few corner cases when you can\u0027t use bound parameters, but this is not it).\n\nPlease do something like:\n\n  self.migrate_engine.execute(\"select table_name from information_schema.tables where table_schema \u003d %(database)s and engine !\u003d \u0027InnoDB\u0027 and table_name !\u003d \u0027migrate_version\u0027\", data)\n\n(note, that I\u0027m not using string formatting (%) here)","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"cafa2543ee3b48651504f457faabd2654c282774","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                                           \"from information_schema.TABLES \""},{"line_number":437,"context_line":"                                           \"where TABLE_SCHEMA\u003d\u0027%(database)s\u0027 \""},{"line_number":438,"context_line":"                                           \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":439,"context_line":"                                           \"and TABLE_NAME!\u003d\u0027migrate_version\u0027\""},{"line_number":440,"context_line":"                                           % data)"},{"line_number":441,"context_line":"        fetch \u003d noninnodb.fetchall()"},{"line_number":442,"context_line":"        self.assertEqual(0, len(fetch),"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_6a671cb9","line":439,"updated":"2014-08-06 09:10:36.000000000","message":"How about we make this a bit more generic and provide a way to  skip more tables here?\n\nWe could change the SQL query a bit and do something like:\n\n   ... and table_name not in (%(skip)s)\n\nand provide a property:\n\n   @property\n   def skip_tables(self):\n       return [\u0027migrate_version\u0027]\n\nso that subclasses could override it and skip additional table names.","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"cafa2543ee3b48651504f457faabd2654c282774","unresolved":false,"context_lines":[{"line_number":438,"context_line":"                                           \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":439,"context_line":"                                           \"and TABLE_NAME!\u003d\u0027migrate_version\u0027\""},{"line_number":440,"context_line":"                                           % data)"},{"line_number":441,"context_line":"        fetch \u003d noninnodb.fetchall()"},{"line_number":442,"context_line":"        self.assertEqual(0, len(fetch),"},{"line_number":443,"context_line":"            \"The following tables not contain InnoDB engine: %s\" % fetch)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_6a5d5c16","line":441,"updated":"2014-08-06 09:10:36.000000000","message":"Heh, I\u0027m surprised this works. It\u0027s better to put fetchall() call within with block (you could even do self.migrate_engine.execute(...).fetchall() so that you wouldn\u0027t have to create a connection explicitly at all)\n\nAdditionally, we could process the result, so that we print the list of table names rather than a list of 1-element tuples containing table names.","commit_id":"8151b022a6809ff32b0b67e1807f2fb478d31452"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8cd6ee7fba0fbbd2dce6a514b9046707031ad1a1","unresolved":false,"context_lines":[{"line_number":433,"context_line":"    def skip_tables(self):"},{"line_number":434,"context_line":"        return [\u0027migrate_version\u0027]"},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"    def test_all_tables_use_innodb(self):"},{"line_number":437,"context_line":"        with self.migrate_engine.connect() as connection:"},{"line_number":438,"context_line":"            data \u003d {\u0027database\u0027: self.migrate_engine.url.database,"},{"line_number":439,"context_line":"                    \u0027skip\u0027: self.skip_tables}"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_58c1042f","line":436,"updated":"2014-08-08 05:08:30.000000000","message":"The more I look at this, the more I think, it\u0027d be more useful as a helper util, rather than a test case. Can we consider my comment to the 2nd patch set: make this a helper function get_non_innodb_tables(engine, skip_tables\u003d(\u0027migrate_version\u0027,)) living in https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/utils.py , so that consuming projects could import the utils module and call the helper in their migrations tests?\n\nLeft as is, it\u0027d require overriding test_all_tables_use_innodb() in subclasses to actually run the migration scrips (as it\u0027s not particularly useful to run this test on an empty database :P), and super() call of the implementation we provide.","commit_id":"fb1e6d058884c9ec3c4dfbe71a887b4c401e6ea2"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from oslo.db import exception as exc"},{"line_number":34,"context_line":"from oslo.db.openstack.common.gettextutils import _LE"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c3e6f549","line":36,"updated":"2014-08-08 14:29:59.000000000","message":"nit: unrelated change","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"}],"oslo/db/sqlalchemy/utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":779,"context_line":"def get_non_innodb_tables(connectable, skip_tables\u003d(\u0027migrate_version\u0027,)):"},{"line_number":780,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027 and return list of them."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"     :param connectable: a SQLAlcheny Engine or a Connection instance"},{"line_number":783,"context_line":"     :param skip_tables: name-list of tables which may be missed"},{"line_number":784,"context_line":"     \"\"\""},{"line_number":785,"context_line":"    data \u003d {\u0027database\u0027: connectable.url.database,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_a3dd816f","line":782,"updated":"2014-08-08 14:29:59.000000000","message":"typo: SQLAlchemy","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":780,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027 and return list of them."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"     :param connectable: a SQLAlcheny Engine or a Connection instance"},{"line_number":783,"context_line":"     :param skip_tables: name-list of tables which may be missed"},{"line_number":784,"context_line":"     \"\"\""},{"line_number":785,"context_line":"    data \u003d {\u0027database\u0027: connectable.url.database,"},{"line_number":786,"context_line":"            \u0027skip\u0027: skip_tables}"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_83131d01","line":783,"updated":"2014-08-08 14:29:59.000000000","message":"nit: a list of tables which might have a different storage engine","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":782,"context_line":"     :param connectable: a SQLAlcheny Engine or a Connection instance"},{"line_number":783,"context_line":"     :param skip_tables: name-list of tables which may be missed"},{"line_number":784,"context_line":"     \"\"\""},{"line_number":785,"context_line":"    data \u003d {\u0027database\u0027: connectable.url.database,"},{"line_number":786,"context_line":"            \u0027skip\u0027: skip_tables}"},{"line_number":787,"context_line":"    noninnodb \u003d connectable.execute(\"SELECT TABLE_NAME \""},{"line_number":788,"context_line":"                                    \"from information_schema.TABLES \""}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_83987d77","line":785,"updated":"2014-08-08 14:29:59.000000000","message":"This should be connectable.engine.url.database to make it possible to pass a Connection instance. We could even add a test case for this :)","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"690cf38a616436b7e888fd0b787c8d13dc43391b","unresolved":false,"context_lines":[{"line_number":776,"context_line":"    return column in t.c"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def get_non_innodb_tables(connectable, skip_tables\u003d(\u0027migrate_version\u0027,)):"},{"line_number":780,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027 and return list of them."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"     :param connectable: a SQLAlchemy Engine or a Connection instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ab29df4_1a4a9983","line":779,"updated":"2014-08-13 19:26:00.000000000","message":"typically, someone will say, get_non_innodb_tables(.., skip_tables\u003d(\u0027x\u0027, \u0027y\u0027, \u0027z\u0027)), wouldn\u0027t they also want to skip \u0027migrate_version\u0027 ?  should that be implicitly added always?  what about \u0027alembic_version\u0027?","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8dab86950e988113b30b00023a4a7a232e424ef6","unresolved":false,"context_lines":[{"line_number":776,"context_line":"    return column in t.c"},{"line_number":777,"context_line":""},{"line_number":778,"context_line":""},{"line_number":779,"context_line":"def get_non_innodb_tables(connectable, skip_tables\u003d(\u0027migrate_version\u0027,)):"},{"line_number":780,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027 and return list of them."},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"     :param connectable: a SQLAlchemy Engine or a Connection instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"7ac7a964_2d5553c6","line":779,"in_reply_to":"9ab29df4_1a4a9983","updated":"2014-08-14 08:16:32.000000000","message":"I\u0027d go for skipping (\u0027migrate_version\u0027, \u0027alembic_version\u0027) by default, but not skipping them implictly","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"690cf38a616436b7e888fd0b787c8d13dc43391b","unresolved":false,"context_lines":[{"line_number":787,"context_line":"            \u0027skip\u0027: skip_tables}"},{"line_number":788,"context_line":"    noninnodb \u003d connectable.execute(\"SELECT TABLE_NAME \""},{"line_number":789,"context_line":"                                    \"from information_schema.TABLES \""},{"line_number":790,"context_line":"                                    \"where TABLE_SCHEMA\u003d%(database)s \""},{"line_number":791,"context_line":"                                    \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":792,"context_line":"                                    \"and TABLE_NAME not in (%(skip)s)\","},{"line_number":793,"context_line":"                                    data)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ab29df4_baac4d37","line":790,"updated":"2014-08-13 19:26:00.000000000","message":"the paramstyle here is not necessarily supported by all backends.  if you are going to use bindparams, then this should be `text()`, and use `:param` for each parameter.","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"690cf38a616436b7e888fd0b787c8d13dc43391b","unresolved":false,"context_lines":[{"line_number":789,"context_line":"                                    \"from information_schema.TABLES \""},{"line_number":790,"context_line":"                                    \"where TABLE_SCHEMA\u003d%(database)s \""},{"line_number":791,"context_line":"                                    \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":792,"context_line":"                                    \"and TABLE_NAME not in (%(skip)s)\","},{"line_number":793,"context_line":"                                    data)"},{"line_number":794,"context_line":"    return [i[0] for i in noninnodb]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ab29df4_ba736de6","line":792,"updated":"2014-08-13 19:26:00.000000000","message":"There\u0027s a tiny chance this isn\u0027t the case on some drivers, but the `IN ()` construct typically requires individual parameters for each entry, that is, there\u0027s no implicit \"array\" type.    Have we confirmed this does the right thing with multiple entries? (or zero entries)?\n\nedit: nope:\n\n\t\u003e\u003e\u003e from sqlalchemy import create_engine\n\t\u003e\u003e\u003e e \u003d create_engine(\"mysql://scott:tiger@localhost/test\", echo\u003d\"debug\")\n\t\u003e\u003e\u003e result \u003d e.execute(\"select 1 in (%(params)s)\", {\"params\": (1, 2, 3)})\n        ...\n\tsqlalchemy.exc.OperationalError: (OperationalError) (1241, \n\u0027Operand should contain 1 column(s)\u0027) \u0027select 1 in (%(params)s)\u0027 \n{\u0027params\u0027: (1, 2, 3)}","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8dab86950e988113b30b00023a4a7a232e424ef6","unresolved":false,"context_lines":[{"line_number":789,"context_line":"                                    \"from information_schema.TABLES \""},{"line_number":790,"context_line":"                                    \"where TABLE_SCHEMA\u003d%(database)s \""},{"line_number":791,"context_line":"                                    \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":792,"context_line":"                                    \"and TABLE_NAME not in (%(skip)s)\","},{"line_number":793,"context_line":"                                    data)"},{"line_number":794,"context_line":"    return [i[0] for i in noninnodb]"}],"source_content_type":"text/x-python","patch_set":11,"id":"7ac7a964_4d528fde","line":792,"in_reply_to":"9ab29df4_ba736de6","updated":"2014-08-14 08:16:32.000000000","message":"Oh, good catch! I tested this on 1 param and it worked fine...","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"9371cf96ac09669e09411f7185fbb34cab8aac83","unresolved":false,"context_lines":[{"line_number":795,"context_line":"                 \"from information_schema.TABLES \""},{"line_number":796,"context_line":"                 \"where TABLE_SCHEMA\u003d:database \""},{"line_number":797,"context_line":"                 \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":798,"context_line":"                 \"and TABLE_NAME not in :skip\")"},{"line_number":799,"context_line":"    noninnodb \u003d connectable.execute(query,"},{"line_number":800,"context_line":"                                    database\u003dconnectable.engine.url.database,"},{"line_number":801,"context_line":"                                    skip\u003dskip_tables,)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7ac7a964_884e206e","line":798,"updated":"2014-08-15 09:47:33.000000000","message":"Mike raised a very good point in one of the previous reviews: only a limited set of DB API drivers will actually process this correctly and render the correct SQL. Curiously this work with MySQLdb version 1.2.5 (the one we use in the gate) and fails with 1.2.3 I have locally. Moreover, this fails with mysql-connector:\n\n  In [43]: eng \u003d sa.create_engine(\u0027mysql+mysqlconnector://root:devel@localhost/devel\u0027, echo\u003dTrue)\n\n  In [44]: q  \u003d sa.text(\"select table_name from from information_schema.TABLES where TABLE_SCHEMA\u003d:database and ENGINE!\u003d\u0027InnoDB\u0027 and TABLE_NAME not in :skip\")\n\n  In [45]: eng.execute(q, database\u003d\u0027devel\u0027, skip\u003d(\u0027a\u0027, ))\n\n  ProgrammingError: (ProgrammingError) Failed processing pyformat-parameters; Python \u0027tuple\u0027 cannot be converted to a MySQL type \"select table_name from from information_schema.TABLES where TABLE_SCHEMA\u003d%(database)s and ENGINE!\u003d\u0027InnoDB\u0027 and TABLE_NAME not in %(skip)s\" {\u0027skip\u0027: (\u0027a\u0027,), \u0027database\u0027: \u0027devel\u0027}\n\nSo yeah, it seems that we\u0027ll need to generate an individual parameter place holder for each entry in skip tables.","commit_id":"be5e4604dc87fe8185c8322c1887c8cae93d3ad5"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"08d1583b5f51a5fee3d331d098b5d36650e6d6b1","unresolved":false,"context_lines":[{"line_number":795,"context_line":"                 \"from information_schema.TABLES \""},{"line_number":796,"context_line":"                 \"where TABLE_SCHEMA\u003d:database \""},{"line_number":797,"context_line":"                 \"and ENGINE!\u003d\u0027InnoDB\u0027 \""},{"line_number":798,"context_line":"                 \"and TABLE_NAME not in :skip\")"},{"line_number":799,"context_line":"    noninnodb \u003d connectable.execute(query,"},{"line_number":800,"context_line":"                                    database\u003dconnectable.engine.url.database,"},{"line_number":801,"context_line":"                                    skip\u003dskip_tables,)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7ac7a964_e2d87d81","line":798,"in_reply_to":"7ac7a964_884e206e","updated":"2014-08-15 19:20:52.000000000","message":"I wonder how even MySQL-python would be doing that.   Is it actually creating multiple parameters out of the one we send it and rewriting the SQL?  The reason a feature like that can\u0027t scale is that it can\u0027t work with prepared statements, e.g. if you send a different length list to the prepared statement, now it\u0027s broke.","commit_id":"be5e4604dc87fe8185c8322c1887c8cae93d3ad5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fbaa75caccb3f40c79c376850f9553f43e73352a","unresolved":false,"context_lines":[{"line_number":789,"context_line":"     :param skip_tables: a list of tables which might have a"},{"line_number":790,"context_line":"                            different storage engine"},{"line_number":791,"context_line":"     \"\"\""},{"line_number":792,"context_line":"    query_str \u003d \"\"\"SELECT TABLE_NAME from information_schema.TABLES where"},{"line_number":793,"context_line":"                    TABLE_SCHEMA\u003d:database and ENGINE!\u003d\u0027InnoDB\u0027\"\"\""},{"line_number":794,"context_line":"    dictionary \u003d {}"},{"line_number":795,"context_line":"    if skip_tables:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_935baa2d","line":792,"updated":"2014-08-19 14:16:41.000000000","message":"nit: SQL query would be more readable, if we used the upper case for reserved identifiers (SELECT, FROM, WHERE, etc) and lower case for names of schema elements (table_name, tables, table_schema, engine)","commit_id":"91fe5a4bc7f6515c019cbd7e3ab6a0b24d01652e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fbaa75caccb3f40c79c376850f9553f43e73352a","unresolved":false,"context_lines":[{"line_number":791,"context_line":"     \"\"\""},{"line_number":792,"context_line":"    query_str \u003d \"\"\"SELECT TABLE_NAME from information_schema.TABLES where"},{"line_number":793,"context_line":"                    TABLE_SCHEMA\u003d:database and ENGINE!\u003d\u0027InnoDB\u0027\"\"\""},{"line_number":794,"context_line":"    dictionary \u003d {}"},{"line_number":795,"context_line":"    if skip_tables:"},{"line_number":796,"context_line":"        keys_list \u003d [\u0027skip_\u0027 + str(p) for p in range(len(skip_tables))]"},{"line_number":797,"context_line":"        placeholder \u003d \u0027, \u0027.join(\u0027:\u0027 + p for p in keys_list)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_539f52b4","line":794,"updated":"2014-08-19 14:16:41.000000000","message":"nit: can we find a better name for this variable? maybe \u0027params\u0027? :P","commit_id":"91fe5a4bc7f6515c019cbd7e3ab6a0b24d01652e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"fbaa75caccb3f40c79c376850f9553f43e73352a","unresolved":false,"context_lines":[{"line_number":793,"context_line":"                    TABLE_SCHEMA\u003d:database and ENGINE!\u003d\u0027InnoDB\u0027\"\"\""},{"line_number":794,"context_line":"    dictionary \u003d {}"},{"line_number":795,"context_line":"    if skip_tables:"},{"line_number":796,"context_line":"        keys_list \u003d [\u0027skip_\u0027 + str(p) for p in range(len(skip_tables))]"},{"line_number":797,"context_line":"        placeholder \u003d \u0027, \u0027.join(\u0027:\u0027 + p for p in keys_list)"},{"line_number":798,"context_line":"        dictionary \u003d dict(zip(keys_list, skip_tables))"},{"line_number":799,"context_line":"        query_str \u003d query_str + \" and TABLE_NAME not in (\" + placeholder + \")\""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_53ed9224","line":796,"updated":"2014-08-19 14:16:41.000000000","message":"nit: I think we could do something like this:\n \n params \u003d dict(\n     (\u0027skip_%s\u0027 % i, table_name)\n     for i, table_name in enumerate(skip_tables)\n )\n placeholders \u003d \u0027, \u0027.join(\u0027:\u0027 + p for p in params)\n\n query_str +\u003d \u0027 AND table_name not in (%s)\u0027 % placeholders\n\n(to avoid building a few temporary lists and strings we are going to throw away)","commit_id":"91fe5a4bc7f6515c019cbd7e3ab6a0b24d01652e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":989,"context_line":""},{"line_number":990,"context_line":"def get_non_innodb_tables(connectable, skip_tables\u003d(\u0027migrate_version\u0027,"},{"line_number":991,"context_line":"                                                    \u0027alembic_version\u0027)):"},{"line_number":992,"context_line":"    \"\"\"Search tables where ENGINE!\u003d\u0027InnoDB\u0027 and return list of them."},{"line_number":993,"context_line":""},{"line_number":994,"context_line":"     :param connectable: a SQLAlchemy Engine or a Connection instance"},{"line_number":995,"context_line":"     :param skip_tables: a list of tables which might have a"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_102f3e89","line":992,"updated":"2014-08-21 08:31:11.000000000","message":"nit: let\u0027s make it say\n\nGet a list of tables which don\u0027t use InnoDB storage engine.","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":993,"context_line":""},{"line_number":994,"context_line":"     :param connectable: a SQLAlchemy Engine or a Connection instance"},{"line_number":995,"context_line":"     :param skip_tables: a list of tables which might have a"},{"line_number":996,"context_line":"                            different storage engine"},{"line_number":997,"context_line":"     \"\"\""},{"line_number":998,"context_line":"    query_str \u003d \"\"\""},{"line_number":999,"context_line":"        SELECT table_name"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_105d7e15","line":996,"updated":"2014-08-21 08:31:11.000000000","message":"nit: the word \u0027different\u0027 should be right under \u0027a list\u0027 in the previous line","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":994,"context_line":"     :param connectable: a SQLAlchemy Engine or a Connection instance"},{"line_number":995,"context_line":"     :param skip_tables: a list of tables which might have a"},{"line_number":996,"context_line":"                            different storage engine"},{"line_number":997,"context_line":"     \"\"\""},{"line_number":998,"context_line":"    query_str \u003d \"\"\""},{"line_number":999,"context_line":"        SELECT table_name"},{"line_number":1000,"context_line":"        FROM information_schema.tables"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_cd7531cc","line":997,"updated":"2014-08-21 08:31:11.000000000","message":"nit: please add an empty line after a docstring","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":1000,"context_line":"        FROM information_schema.tables"},{"line_number":1001,"context_line":"        WHERE table_schema\u003d:database"},{"line_number":1002,"context_line":"        AND engine!\u003d\u0027InnoDB\u0027"},{"line_number":1003,"context_line":"        \"\"\""},{"line_number":1004,"context_line":""},{"line_number":1005,"context_line":"    params \u003d {}"},{"line_number":1006,"context_line":"    if skip_tables:"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_6d6b3df1","line":1003,"updated":"2014-08-21 08:31:11.000000000","message":"nit: can we format this like http://paste.openstack.org/show/98082/ ?","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"        )"},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"        placeholders \u003d \u0027, \u0027.join(\u0027:\u0027 + p for p in params)"},{"line_number":1013,"context_line":"        query_str +\u003d \u0027 AND table_name not in (%s)\u0027 % placeholders"},{"line_number":1014,"context_line":""},{"line_number":1015,"context_line":"    params[\u0027database\u0027] \u003d connectable.engine.url.database"},{"line_number":1016,"context_line":"    query \u003d text(query_str)"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_2d4ce59d","line":1013,"updated":"2014-08-21 08:31:11.000000000","message":"nit: please capitalize NOT IN","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"1ec5d458ce2ceba0267530b0f7e71504e32c6e45","unresolved":false,"context_lines":[{"line_number":1014,"context_line":""},{"line_number":1015,"context_line":"    params[\u0027database\u0027] \u003d connectable.engine.url.database"},{"line_number":1016,"context_line":"    query \u003d text(query_str)"},{"line_number":1017,"context_line":"    noninnodb \u003d connectable.execute(query,"},{"line_number":1018,"context_line":"                                    **params)"},{"line_number":1019,"context_line":"    return [i[0] for i in noninnodb]"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_b014ca44","line":1017,"updated":"2014-08-21 08:31:11.000000000","message":"nit: this function call easily fits into one line","commit_id":"f0462a4adc86c89374373d9f7f8a800f9d05ddea"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"39343ac584cf8ab4c090f3d31e3731251e3a84a1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from sqlalchemy.sql.expression import literal_column"},{"line_number":38,"context_line":"from sqlalchemy.sql.expression import UpdateBase"},{"line_number":39,"context_line":"from sqlalchemy.sql import text"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"from sqlalchemy import String"},{"line_number":42,"context_line":"from sqlalchemy import Table"},{"line_number":43,"context_line":"from sqlalchemy.types import NullType"}],"source_content_type":"text/x-python","patch_set":21,"id":"1abeadc6_d3c5cb5c","line":40,"updated":"2014-08-21 11:44:05.000000000","message":"nit: this empty line is redundant","commit_id":"126dd020cdee3b847fc63335cd15538a6789c326"}],"tests/sqlalchemy/test_migrations.py":[{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"6464b7c67dbfda1a61572ca67ed5c35c426ae5df","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self.connection.execute(\"USE openstack_citest\")"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def test_innodb_true(self):"},{"line_number":280,"context_line":"        self.connection.execute(\"CREATE TABLE customers \""},{"line_number":281,"context_line":"                           \"(a INT, b CHAR (20), INDEX (a)) ENGINE\u003dInnoDB\")"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        test \u003d migrate.TestInnoDB()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_a1da1277","line":280,"updated":"2014-07-23 14:22:53.000000000","message":"seems that if you already have table customers this throw an exception","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"58d42476cdfc4714827dc0175100b87af8a7f974","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self.connection.execute(\"USE openstack_citest\")"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def test_innodb_true(self):"},{"line_number":280,"context_line":"        self.connection.execute(\"CREATE TABLE customers \""},{"line_number":281,"context_line":"                           \"(a INT, b CHAR (20), INDEX (a)) ENGINE\u003dInnoDB\")"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        test \u003d migrate.TestInnoDB()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_49cabc4f","line":280,"in_reply_to":"baada198_a1da1277","updated":"2014-07-28 08:17:59.000000000","message":"Done","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"9c5437fa65b74aad37a2ee14b4975e51f572258c","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(count, 0)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_innodb_false(self):"},{"line_number":292,"context_line":"        self.connection.execute(\"CREATE TABLE employee \""},{"line_number":293,"context_line":"                           \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        test \u003d migrate.TestInnoDB()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_63a8ded9","line":292,"updated":"2014-07-24 10:16:24.000000000","message":"seems that if you already have table employee this throw an exception","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12355,"name":"Vlad Okhrimenko","email":"vokhrimenko@mirantis.com","username":"vokhrimenko"},"change_message_id":"58d42476cdfc4714827dc0175100b87af8a7f974","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(count, 0)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_innodb_false(self):"},{"line_number":292,"context_line":"        self.connection.execute(\"CREATE TABLE employee \""},{"line_number":293,"context_line":"                           \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        test \u003d migrate.TestInnoDB()"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_69c5c03b","line":292,"in_reply_to":"baada198_63a8ded9","updated":"2014-07-28 08:17:59.000000000","message":"Done","commit_id":"df1ee67c24d9255a744443ef4b43f243184b413a"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"dfb01560390c2a64765c7f6f353f75af2c4f0762","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        count \u003d test._number_innodb(BACKEND\u003d\"mysql+mysqldb\","},{"line_number":280,"context_line":"                                    DATABASE\u003dself.engine.url.database,"},{"line_number":281,"context_line":"                                    USER\u003d\"openstack_citest\","},{"line_number":282,"context_line":"                                    PASSWD\u003d\"openstack_citest\")"},{"line_number":283,"context_line":"        self.assertEqual(count, 0)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_innodb_false(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_24449746","line":282,"updated":"2014-07-29 11:08:24.000000000","message":"Can we use there self.engine.url.user and  self.engine.url.password?","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"dfb01560390c2a64765c7f6f353f75af2c4f0762","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        test \u003d migrate.TestInnoDB()"},{"line_number":290,"context_line":"        count \u003d test._number_innodb(BACKEND\u003d\"mysql+mysqldb\","},{"line_number":291,"context_line":"                                    DATABASE\u003dself.engine.url.database,"},{"line_number":292,"context_line":"                                    USER\u003d\"openstack_citest\","},{"line_number":293,"context_line":"                                    PASSWD\u003d\"openstack_citest\")"},{"line_number":294,"context_line":"        self.assertEqual(count, 1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_6475af96","line":292,"updated":"2014-07-29 11:08:24.000000000","message":"The same as above","commit_id":"22233b6ff74e405d360ce60ffd699b086cfd5d41"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"803feee7191c9ada6d4fdb2cd194d5ae102c0add","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from oslo.db.sqlalchemy import test_base"},{"line_number":26,"context_line":"from oslo.db.sqlalchemy import test_migrations as migrate"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from testtools.matchers import MismatchError"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class TestWalkVersions(test.BaseTestCase, migrate.WalkVersionsMixin):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_0205f90e","line":28,"updated":"2014-08-04 12:54:19.000000000","message":"this should be in the second group of imports.","commit_id":"bc86b952053ca4e5efcf8ededdb4c46eff1b608e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"803feee7191c9ada6d4fdb2cd194d5ae102c0add","unresolved":false,"context_lines":[{"line_number":285,"context_line":"    def test_all_tables_use_innodb_false(self):"},{"line_number":286,"context_line":"        self.engine.execute(\"CREATE TABLE employee \""},{"line_number":287,"context_line":"                            \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":288,"context_line":"        ass \u003d self.assertRaises(MismatchError, "},{"line_number":289,"context_line":"            super(TestInnoDBFunc, self).test_all_tables_use_innodb)"},{"line_number":290,"context_line":"        self.assertEqual(ass.mismatch.annotation,"},{"line_number":291,"context_line":"              \"The following tables not contain InnoDB engine: [(\u0027employee\u0027,)]\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_221f5d5b","line":288,"updated":"2014-08-04 12:54:19.000000000","message":"nit: trailing whitspace","commit_id":"bc86b952053ca4e5efcf8ededdb4c46eff1b608e"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"86077340b54e01a3b64f18ffb282aa1f79a2f5b8","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def test_all_tables_use_innodb_false(self):"},{"line_number":285,"context_line":"        self.engine.execute(\"CREATE TABLE employee \""},{"line_number":286,"context_line":"                            \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":287,"context_line":"        ass \u003d self.assertRaises(matchers.MismatchError,"},{"line_number":288,"context_line":"            super(TestInnoDBFunc, self).test_all_tables_use_innodb)"},{"line_number":289,"context_line":"        self.assertEqual(ass.mismatch.annotation,"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_93076b70","line":286,"updated":"2014-08-05 14:45:29.000000000","message":"ass, really? \u003d)","commit_id":"1c2db7466f8919c7e1670ec3151715da632bde50"}],"tests/sqlalchemy/test_utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e72bcee7614e2406914ea1beda8f92689d7d10f5","unresolved":false,"context_lines":[{"line_number":860,"context_line":"    def test_all_tables_use_innodb_false(self):"},{"line_number":861,"context_line":"        self.engine.execute(\"CREATE TABLE employee \""},{"line_number":862,"context_line":"                            \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":863,"context_line":"        self.assertEqual([\u0027employee\u0027, ],"},{"line_number":864,"context_line":"            utils.get_non_innodb_tables(self.engine))"},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"    def test_skip_tables_use_default_value(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_032f0df6","line":863,"updated":"2014-08-08 14:29:59.000000000","message":"nit: (,) is needed only to represent 1-element tuple literals","commit_id":"e5164bd9cbf1ba83477f7674dcf91b5ce296ce5a"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"690cf38a616436b7e888fd0b787c8d13dc43391b","unresolved":false,"context_lines":[{"line_number":874,"context_line":"                            \"(i INT) ENGINE\u003dMEMORY\")"},{"line_number":875,"context_line":"        self.assertEqual([],"},{"line_number":876,"context_line":"                         utils.get_non_innodb_tables("},{"line_number":877,"context_line":"                             self.engine, skip_tables\u003d(\u0027some_table\u0027,)))"}],"source_content_type":"text/x-python","patch_set":11,"id":"9ab29df4_3d2bd783","line":877,"updated":"2014-08-13 19:26:00.000000000","message":"add a test that includes skipping multiple tables, as well as a test that includes skipping no tables","commit_id":"8628723c132a31646d5e0b0ee53b8b7eb84d7148"}]}
