mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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();
|
||||
|
@ -330,6 +330,16 @@ create table t2 select default(str) as str, default(strnull) as strnull, default
|
||||
describe t2;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #2075
|
||||
#
|
||||
|
||||
create table t1(name varchar(10), age smallint default -1);
|
||||
describe t1;
|
||||
create table t2(name varchar(10), age smallint default - 1);
|
||||
describe t2;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #1209
|
||||
#
|
||||
|
Reference in New Issue
Block a user