1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug in CREATE ... DECIMAL(-1,1). Bug #432

mysql-test/mysql-test-run.sh:
  Ensure that tests are sorted
mysql-test/r/type_decimal.result:
  Test for bug with decimal()
mysql-test/t/type_decimal.test:
  Test for bug with decimal()
sql/sql_parse.cc:
  Fixed bug in CREATE ... DECIMAL(-1,1)
This commit is contained in:
unknown
2003-05-14 22:12:55 +03:00
parent 7297502a7b
commit ac316cfdb3
4 changed files with 27 additions and 8 deletions

View File

@ -114,6 +114,7 @@ if test $? != 0; then exit 1; fi
TR=tr
XARGS=`which xargs`
if test $? != 0; then exit 1; fi
SORT=sort
# Are we using a source or a binary distribution?
@ -1363,7 +1364,7 @@ then
if [ x$RECORD = x1 ]; then
$ECHO "Will not run in record mode without a specific test case."
else
for tf in $TESTDIR/*.$TESTSUFFIX
for tf in `ls -1 $TESTDIR/*.$TESTSUFFIX | $SORT`
do
run_testcase $tf
done

View File

@ -357,3 +357,9 @@ select * from t1;
a
99999999999
drop table t1;
CREATE TABLE t1 (a_dec DECIMAL(-1,0));
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
Too big column length for column 'a_dec' (max = 255). Use BLOB instead
CREATE TABLE t1 (a_dec DECIMAL(-1,1));
Too big column length for column 'a_dec' (max = 255). Use BLOB instead

View File

@ -230,3 +230,13 @@ insert into t1 values("1e4294967297");
select * from t1;
drop table t1;
#
# Test of wrong decimal type
#
--error 1074
CREATE TABLE t1 (a_dec DECIMAL(-1,0));
--error 1074
CREATE TABLE t1 (a_dec DECIMAL(-2,1));
--error 1074
CREATE TABLE t1 (a_dec DECIMAL(-1,1));