One function

MySQLQuery in kayak/pypika

The author described this change as fix: mysql create/drop tables. It counts as a record because the check below fails on the code as it stood at 920a4cdd9 and passes on 71ea7c39a, with nothing else changed between the two runs.

Fix saved2021-08-26
Sharing licenceApache-2.0 · LICENSE.txt
Change size+12 0

What the code was meant to do, written into the code itself as a docstring

Defines a query class for use with MySQL.

The change

1010 @classmethod
1111 def load(cls, fp: str) -> "MySQLLoadQueryBuilder":
1212 return MySQLLoadQueryBuilder().load(fp)
13+
14+ @classmethod
15+ def create_table(cls, table: Union[str, Table]) -> "MySQLCreateQueryBuilder":
16+ return MySQLCreateQueryBuilder().create_table(table)
17+
18+ @classmethod
19+ def create_table(cls, table: Union[str, Table]) -> "MySQLCreateQueryBuilder":
20+ return MySQLCreateQueryBuilder().create_table(table)
21+
22+ @classmethod
23+ def drop_table(cls, table: Union[str, Table]) -> "MySQLDropQueryBuilder":
24+ return MySQLDropQueryBuilder().drop_table(table)

The check that tells the two apart

failpass·pypika/tests/dialects/test_mysql.py::TableTests::test_create_table

Check file pypika/tests/dialects/test_mysql.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it920a4cdd99cbcd85d55af2d8d2c601d8bef8bfc2
Broken version dated2021-07-21
Modulepypika.dialects
Units changedMySQLQuery
Fingerprint68771ea302360a97
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in kayak/pypika