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
CAST(0x AS BINARY) #16773
Comments
|
Hi @fleming42 $rowLength = mb_strlen((string) $row);
if (($rowLength > 0) && ($rowLength < 1000)) { |
|
Could you confirm @fleming42 that this is the test case you are talking about ? -- phpMyAdmin SQL Dump
-- version 5.1.1-dev
-- https://www.phpmyadmin.net/
--
-- Hôte : mysql803.williamdes.local:3306
-- Généré le : jeu. 01 avr. 2021 à 00:03
-- Version du serveur : 8.0.3-rc-log
-- Version de PHP : 7.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Base de données : `public`
--
-- --------------------------------------------------------
--
-- Structure de la table `textx`
--
CREATE TABLE `textx` (
`tex` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Déchargement des données de la table `textx`
--
INSERT INTO `textx` (`tex`) VALUES
('0'),
('');
--
-- Index pour les tables déchargées
--
--
-- Index pour la table `textx`
--
ALTER TABLE `textx`
ADD UNIQUE KEY `U` (`tex`(253));
COMMIT; |
williamdes
added a commit
that referenced
this issue
Apr 1, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
I made the fix a127061, you can apply it if you want and let me know if it works :) |
|
Yes, your test case is the same as mine, and yes fix a127061 works for me.
Thank you. :-)
David Fleming
www.flemingcomputer.com
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.

Found a bug where phpmyadmin 5.1.0 constructs an invalid query when selecting "edit" on a row with an empty string in a BLOB or TEXT column. The resultant query has "CAST(0x AS BINARY)" in it, but 0x by itself is invalid. Looks like phpmyadmin expects a nonempty $row to be appended to the '0x' in Util.php.
My fix for this is in Util.php, by changing the function getConditionValue from:
to
Works for me now, but please examine this and see if this is right. Thanks.
The text was updated successfully, but these errors were encountered: