Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The following query:
select v |
from ( |
select ? v |
union all |
select ? v |
) t
|
silently trims the `v` column when the column is longer than 65536 bytes.
This is highly dangerous as UNION and bind value is basic SQL functionality frequently used.
In our usecase, such query was built by ORM and MySQL silently corrupted our data.
Full repro attached.
Please reproduce on your side and fix. There should be no artificial limit of the string length.
The current/wrong repro output:
expected:
|
Array
|
(
|
[0] => Array
|
(
|
[v] => xxx...65540*...xxx
|
)
|
|
|
[1] => Array
|
(
|
[v] => yxxx...65540*...xxx
|
)
|
|
|
)
|
|
|
actual using mysqli driver:
|
Array
|
(
|
[0] => Array
|
(
|
[v] => xxxx
|
)
|
|
|
[1] => Array
|
(
|
[v] => yxxxx
|
)
|
|
|
)
|
bool(false)
|
|
|
actual using PDO driver:
|
Array
|
(
|
[0] => Array
|
(
|
[v] => xxxx
|
)
|
|
|
[1] => Array
|
(
|
[v] => yxxxx
|
)
|
|
|
)
|
bool(false)
|