summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/operations.py
Commit message (Collapse)AuthorAgeFilesLines
* Refs CVE-2022-34265 -- Unified DatabaseOperations._convert_*_to_tz() hook names.Mariusz Felisiak2022-07-091-7/+7
|
* Fixed #33718 -- Dropped support for MySQL 5.7.Mariusz Felisiak2022-07-081-6/+2
|
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-59/+58
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #33713 -- Dropped support for MariaDB 10.3.Mariusz Felisiak2022-05-181-3/+4
|
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-3/+8
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-118/+163
|
* Refs #33476 -- Refactored problematic code before reformatting by Black.Mariusz Felisiak2022-02-031-2/+3
| | | | | | | | | | | | | | | | | In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], )
* Fixed #31685 -- Added support for updating conflicts to QuerySet.bulk_create().sean_c_hsu2022-01-191-2/+29
| | | | | Thanks Florian Apolloner, Chris Jerdonek, Hannes Ljungberg, Nick Pope, and Mariusz Felisiak for reviews.
* Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol2021-11-121-5/+3
| | | | | | Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
* Fixed #32691 -- Made Exact lookup on BooleanFields compare directly to a ↵Roman2021-11-021-0/+12
| | | | | | | | | | boolean value on MySQL. Performance regression in 37e6c5b79bd0529a3c85b8c478e4002fd33a2a1d. Thanks Todor Velichkov for the report. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32793 -- Fixed loss of precision for temporal operations with ↵Mariusz Felisiak2021-06-011-0/+3
| | | | | | | DecimalFields on MySQL. Regression in 1e38f1191de21b6e96736f58df57dfb851a28c1f. Thanks Mohsen Tamiz for the report.
* Fixed #32699 -- Fixed comparing to TruncTime() with 0 microseconds on MySQL.Alex Hill2021-05-071-1/+1
|
* Refs #31369 -- Removed models.NullBooleanField per deprecation timeline.Mariusz Felisiak2021-01-141-1/+1
|
* Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a ↵David-Wobrock2020-10-141-3/+5
| | | | specific timezone.
* Fixed #32060 -- Added Random database function.Nick Pope2020-10-021-3/+0
|
* Fixed #31987 -- Fixed Cast() with DurationField on MySQL.Petr Čermák2020-09-091-0/+1
|
* Fixed #17653 -- Allowed using zero as AutoFields value on MySQL if ↵Mariusz Felisiak2020-07-201-2/+6
| | | | NO_AUTO_VALUE_ON_ZERO SQL mode is enabled.
* Fixed #28925 -- Fixed durations-only expressions crash on SQLite and MySQL.Sergey Fedoseev2020-06-301-4/+0
| | | | This removes also unused DatabaseOperations.date_interval_sql().
* Fixed #31578 -- Dropped support for MySQL 5.6.Mariusz Felisiak2020-05-191-4/+1
|
* Fixed #12990, Refs #27694 -- Added JSONField model field.sage2020-05-081-0/+10
| | | | | | | | | | | Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on ↵Jon Dufresne2020-04-171-20/+21
| | | | | | | | | | | | PostgreSQL. The sql_flush() positional argument sequences is replaced by the boolean keyword-only argument reset_sequences. This ensures that the old function signature can't be used by mistake when upgrading Django. When the new argument is True, the sequences of the truncated tables will reset. Using a single boolean value, rather than a list, allows making a binary yes/no choice as to whether to reset all sequences rather than a working on a completely different set.
* Fixed #31275 -- Optimized sql_flush() without resetting sequences on MySQL.c-bata2020-04-021-14/+33
| | | | Co-Authored-By: Simon Charette <charettes@users.noreply.github.com>
* Fixed #31403 -- Added support for returning fields from INSERT statements on ↵Adam Johnson2020-03-311-0/+20
| | | | MariaDB 10.5+.
* Fixed #31396 -- Added binary XOR operator to F expressions.Hannes Ljungberg2020-03-251-1/+2
|
* Fixed #31312 -- Properly ordered temporal subtraction params on MySQL.Simon Charette2020-02-271-1/+1
| | | | | | Regression in 9bcbcd599abac91ea853b2fe10b784ba32df043e. Thanks rick2ricks for the report.
* Fixed #31133 -- Fixed crash when subtracting against a subquery annotation.Simon Charette2020-01-031-4/+4
| | | | | | | | | The subtract_temporals() database operation was not handling expressions returning SQL params in mixed database types. Regression in 35431298226165986ad07e91f9d3aca721ff38ec. Thanks Reupen Shah for the report.
* Fixed #30987 -- Added models.PositiveBigIntegerField.Caio Ariede2019-11-191-0/+2
|
* Refs #30897 -- Added support for ANALYZE option to Queryset.explain() on ↵Nick Pope2019-10-241-3/+8
| | | | MariaDB and MySQL 8.0.18+.
* Refs #30897 -- Added support for TREE format to Queryset.explain() on MySQL ↵Nick Pope2019-10-241-0/+3
| | | | 8.0.16+.
* Fixed #30821 -- Added ExtractIsoWeekYear database function and iso_week_day ↵Anatol Ulrich2019-10-021-1/+3
| | | | lookup.
* Fixed #30661 -- Added models.SmallAutoField.Nick Pope2019-08-021-0/+1
|
* Fixed #30128 -- Fixed handling timedelta timezone in database functions.can2019-06-131-1/+12
|
* Refs #30380 -- Used cursor._executed in ↵Mariusz Felisiak2019-04-211-1/+1
| | | | | | | DatabaseOperations.last_executed_query() on MySQL. Regression in a41b09266dcdd01036d59d76fe926fe0386aaade. Thanks Tobias Krönke for the report.
* Fixed #30380 -- Handled bytes in MySQL backend for PyMySQL support.Mariusz Felisiak2019-04-191-4/+3
| | | This commit partly reverts efd8a82e268a82b3ad0be77bd5b4548c30bcb4d7.
* Fixed #28373 -- Used connection timezone instead of UTC when making dates ↵can2019-04-081-2/+2
| | | | | | | | timezone-aware on MySQL, SQLite, and Oracle. Thanks vtalpaert for the initial patch. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Removed uneeded generator expressions and list comprehensions.Sergey Fedoseev2019-02-091-1/+1
|
* Fixed #30013 -- Fixed DatabaseOperations.last_executed_query() with ↵Tim Graham2018-12-051-2/+2
| | | | mysqlclient 1.3.14+.
* Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField.Mariusz Felisiak2018-10-151-0/+1
|
* Simplified handling of DurationField values on MySQL/MariaDB.Sergey Fedoseev2018-10-091-8/+1
|
* Refs #27795 -- Removed force_bytes() usage in MySQL backend.Jon Dufresne2018-10-031-10/+5
| | | | | | | The mysqlclient cursor attribute `_last_executed` is always stored as bytes. Decode it. TextField values are already type str. No need to decode.
* Refs #29784 -- Switched to https:// links where available.Jon Dufresne2018-09-261-1/+1
|
* Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.Sigurd Ljødal2018-08-181-0/+4
|
* Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.Tom2018-08-031-0/+3
|
* Fixed #29569 -- Fixed Cast() with AutoField and BigAutoField.Mariusz Felisiak2018-07-251-0/+2
|
* Refs #29548 -- Fixed non-GIS test failures on MariaDB.Tom Forbes2018-07-091-0/+13
|
* Fixed #29544 -- Fixed regex lookup on MariaDB.Michal Čihař2018-07-051-2/+2
| | | Regression in 42490768441701bc02255b22df8e6894cbe487c7.
* Refs #29451 -- Fixed regex/iregex lookups on MySQL 8.Tom2018-06-201-0/+11
|
* Fixed #28574 -- Added QuerySet.explain().Tom2018-04-191-0/+13
|
* Fixed #29209 -- Fixed Cast() with TextField on MySQL and Oracle.Sergey Fedoseev2018-03-121-0/+1
|
* Refs #28459 -- Improved performance of time difference expressions on MySQL.Sergey Fedoseev2018-03-011-2/+2
|