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

type bit could have null as its default value #7594

Closed
jackysp opened this issue Sep 3, 2018 · 1 comment
Closed

type bit could have null as its default value #7594

jackysp opened this issue Sep 3, 2018 · 1 comment
Assignees

Comments

@jackysp
Copy link
Member

jackysp commented Sep 3, 2018

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
CREATE TABLE testAllTypes (
	field_1 BIT NULL DEFAULT NULL
	,field_2 TINYINT NULL DEFAULT NULL
	,field_3 TINYINT UNSIGNED NULL DEFAULT NULL
	,field_4 BIGINT NULL DEFAULT NULL
	,field_5 BIGINT UNSIGNED NULL DEFAULT NULL
	,field_6 MEDIUMBLOB NULL DEFAULT NULL
	,field_7 LONGBLOB NULL DEFAULT NULL
	,field_8 BLOB NULL DEFAULT NULL
	,field_9 TINYBLOB NULL DEFAULT NULL
	,field_10 VARBINARY(255) NULL DEFAULT NULL
	,field_11 BINARY(255) NULL DEFAULT NULL
	,field_12 MEDIUMTEXT NULL DEFAULT NULL
	,field_13 LONGTEXT NULL DEFAULT NULL
	,field_14 TEXT NULL DEFAULT NULL
	,field_15 TINYTEXT NULL DEFAULT NULL
	,field_16 CHAR(255) NULL DEFAULT NULL
	,field_17 NUMERIC NULL DEFAULT NULL
	,field_18 DECIMAL NULL DEFAULT NULL
	,field_19 INTEGER NULL DEFAULT NULL
	,field_20 INTEGER UNSIGNED NULL DEFAULT NULL
	,field_21 INT NULL DEFAULT NULL
	,field_22 INT UNSIGNED NULL DEFAULT NULL
	,field_23 MEDIUMINT NULL DEFAULT NULL
	,field_24 MEDIUMINT UNSIGNED NULL DEFAULT NULL
	,field_25 SMALLINT NULL DEFAULT NULL
	,field_26 SMALLINT UNSIGNED NULL DEFAULT NULL
	,field_27 FLOAT NULL DEFAULT NULL
	,field_28 DOUBLE NULL DEFAULT NULL
	,field_29 DOUBLE PRECISION NULL DEFAULT NULL
	,field_30 REAL NULL DEFAULT NULL
	,field_31 VARCHAR(255) NULL DEFAULT NULL
	,field_32 DATE NULL DEFAULT NULL
	,field_33 TIME NULL DEFAULT NULL
	,field_34 DATETIME NULL DEFAULT NULL
	,field_35 TIMESTAMP NULL DEFAULT NULL
);
  1. What did you expect to see?
    No error.

  2. What did you see instead?
    ERROR 1067 (42000): Invalid default value for 'field_1'

  3. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    e04f74b

@birdstorm
Copy link
Contributor

birdstorm commented Sep 4, 2018

+1 for TiSpark is failing corresponding tests because data cannot be loaded by TiDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants