-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Alter table with TEXT DEFAULT '' misbehaves #15363
Labels
Projects
Milestone
Comments
patsib
changed the title
Alter table with TEXT DEFAULT '' fails
Alter table with TEXT DEFAULT '' misbehaves
Jun 28, 2019
Just reproduced this and I was going to open an issue! |
Test table: CREATE TABLE `issue-15363` (
`id` int(11) DEFAULT NULL,
`empty text` text DEFAULT '',
`empty varchar` varchar(25) NOT NULL DEFAULT '',
`really empty string` varchar(25) NOT NULL DEFAULT '''''',
`really empty text` text NOT NULL DEFAULT '\'\'',
`l'eau dans un varchar` varchar(25) NOT NULL DEFAULT 'l''eau ',
`l'eau 2` text NOT NULL DEFAULT 'l\'eau',
`l'eau dans un texte` text NOT NULL DEFAULT 'l\'eau',
`l'eau` varchar(25) NOT NULL DEFAULT 'l''eau \\n \\n \\t l''eau',
`l'eau 3` text NOT NULL DEFAULT 'l\'eau \\n \\n \\t l\'eau'
) ENGINE=InnoDB; |
williamdes
added
the
has-pr
An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
label
Aug 20, 2019
williamdes
added a commit
that referenced
this issue
Aug 20, 2019
williamdes
added a commit
that referenced
this issue
Aug 20, 2019
williamdes
added a commit
that referenced
this issue
Aug 20, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes
added a commit
that referenced
this issue
Aug 22, 2019
Signed-off-by: William Desportes <williamdes@wdes.fr>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Changing the default value of a field with type TEXT to nothing (empty string), adds two quotes as a new default.
Given a table 'test' with a field 'content' as TEXT.
Reproduce v1:
Reproduce v2:
ALTER TABLE `test` CHANGE `content` `content` TEXT NOT NULL DEFAULT '';
Expected:
Environment:
Verified the problem with a completely different linux environment, but i don't have the specs right now.
The text was updated successfully, but these errors were encountered: