mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for Bug #2075 - negative default values not accepted for integer columns
Allow numeric literals have a sign sql/sql_yacc.yy: Bug#2075 - Numeric literals need to handle sign. mysql-test/r/create.result: New test for Bug #2075 mysql-test/t/create.test: New test for Bug #2075
This commit is contained in:
@ -423,6 +423,17 @@ strnull varchar(10) YES NULL
|
||||
intg int(11) YES NULL
|
||||
rel double YES NULL
|
||||
drop table t1, t2;
|
||||
create table t1(name varchar(10), age smallint default -1);
|
||||
describe t1;
|
||||
Field Type Null Key Default Extra
|
||||
name varchar(10) YES NULL
|
||||
age smallint(6) YES -1
|
||||
create table t2(name varchar(10), age smallint default - 1);
|
||||
describe t2;
|
||||
Field Type Null Key Default Extra
|
||||
name varchar(10) YES NULL
|
||||
age smallint(6) YES -1
|
||||
drop table t1, t2;
|
||||
create database test_$1;
|
||||
use test_$1;
|
||||
select database();
|
||||
|
Reference in New Issue
Block a user