Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverted "Fixed #26140 -- Suppressed MySQL warning when inserting binary content" #7324

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions django/db/backends/base/operations.py
Expand Up @@ -581,13 +581,6 @@ def combine_expression(self, connector, sub_expressions):
def combine_duration_expression(self, connector, sub_expressions):
return self.combine_expression(connector, sub_expressions)

def binary_placeholder_sql(self, value):
"""
Some backends require special syntax to insert binary content (MySQL
for example uses '_binary %s').
"""
return '%s'

def modify_insert_params(self, placeholder, params):
"""Allow modification of insert parameters. Needed for Oracle Spatial
backend due to #10888.
Expand Down
3 changes: 0 additions & 3 deletions django/db/backends/mysql/operations.py
Expand Up @@ -235,9 +235,6 @@ def convert_uuidfield_value(self, value, expression, connection, context):
value = uuid.UUID(value)
return value

def binary_placeholder_sql(self, value):
return '_binary %s' if value is not None else '%s'

def subtract_temporals(self, internal_type, lhs, rhs):
lhs_sql, lhs_params = lhs
rhs_sql, rhs_params = rhs
Expand Down
3 changes: 0 additions & 3 deletions django/db/models/fields/__init__.py
Expand Up @@ -2320,9 +2320,6 @@ def deconstruct(self):
def get_internal_type(self):
return "BinaryField"

def get_placeholder(self, value, compiler, connection):
return connection.ops.binary_placeholder_sql(value)

def get_default(self):
if self.has_default() and not callable(self.default):
return self.default
Expand Down
3 changes: 3 additions & 0 deletions docs/releases/1.10.2.txt
Expand Up @@ -25,3 +25,6 @@ Bugfixes

* Fixed a crash in ``runserver`` logging during a "Broken pipe" error
(:ticket:`27271`).

* Fixed compatibility with binary content on mysqlclient 1.3.8+
(:ticket:`26140`).