mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug #19498: Inconsistent support for DEFAULT in TEXT columns
When a default of '' was specified for TEXT/BLOB columns, the specification was silently ignored. This is presumably to be nice to applications (or people) who generate their column definitions in a not-very-clever fashion. For clarity, doing this now results in a warning, or an error in strict mode. mysql-test/r/federated.result: Update results mysql-test/r/fulltext_distinct.result: Update results mysql-test/r/fulltext_update.result: Update results mysql-test/r/gis-rtree.result: Update results mysql-test/r/gis.result: Update results mysql-test/r/join_outer.result: Update results mysql-test/r/order_by.result: Update results mysql-test/r/type_blob.result: Add new results mysql-test/r/type_ranges.result: Update results mysql-test/t/type_blob.test: Add new test sql/field.cc: Issue a warning when setting '' as the default on a BLOB/TEXT column, and make it an error in strict mode. Also, clarify comments about when NO_DEFAULT_VALUE_FLAG is set.
This commit is contained in:
@ -583,6 +583,8 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo`
|
||||
geometry NOT NULL default '') ENGINE=MyISAM ;
|
||||
Warnings:
|
||||
Warning 1101 BLOB/TEXT column 'geo' can't have a default value
|
||||
insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363
|
||||
36.305435,-114.992394 36.305202,-114.991219 36.305975,-114.991163
|
||||
36.306845,-114.989432 36.309452,-114.978275 36.312642,-114.977363
|
||||
|
Reference in New Issue
Block a user