summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-01-15 12:28:38 +0200
committerunknown <monty@mysql.com>2005-01-15 12:28:38 +0200
commitb6f04ed5d62ecd8d1c81fd7defaad8636eca8108 (patch)
treee3a0da70f844473e00b8fb81958bb7d0607dc880 /mysql-test
parentc4a73274eafdc73d09b5381132a5af3bbd5bcd52 (diff)
downloadmariadb-git-b6f04ed5d62ecd8d1c81fd7defaad8636eca8108.tar.gz
Changed interface for my_strntod() to make it more general and more portable
BUILD/compile-solaris-sparc-purify: Cleanup (Changes from Kent) include/m_string.h: New interface for my_strtod() mysql-test/mysql-test-run.sh: Added option --use-old-data to allow one to run a test case on an existing table (Good for debugging) mysql-test/r/strict.result: Updated results mysql-test/r/type_float.result: More tests mysql-test/t/strict.test: Safety fix mysql-test/t/type_float.test: More tests mysys/mf_iocache.c: Change flush_io_cache() to my_b_flush_io_cache() More debugging mysys/thr_lock.c: Added comment sql/field.cc: Use new my_strntod() sql/filesort.cc: Indentation fixes sql/item.cc: Use new my_strntod() sql/item_strfunc.cc: Use new my_strntod() sql/item_sum.cc: Use new my_strntod() strings/ctype-cp932.c: strnncollsp was missing one argument strings/ctype-simple.c: Use new my_strntod() strings/ctype-ucs2.c: Use new my_strntod() strings/strtod.c: Changed interface: - Force user to supply pointer to end of string (eliminates the need for an end \0) - More strict error checking (depend less off if INF is set), which makes this more portable - Better handling of numbers of type 0.000000....E+... - Return pointer to + in case of '+.' The above should fix a that strict.test failed on Solaris-sparc.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh16
-rw-r--r--mysql-test/r/strict.result2
-rw-r--r--mysql-test/r/type_float.result5
-rw-r--r--mysql-test/t/strict.test2
-rw-r--r--mysql-test/t/type_float.test3
5 files changed, 19 insertions, 9 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 274f91550d4..ea41e847c2c 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -427,6 +427,9 @@ while test $# -gt 0; do
--fast)
FAST_START=1
;;
+ --use-old-data)
+ USE_OLD_DATA=1;
+ ;;
-- ) shift; break ;;
--* ) $ECHO "Unrecognized option: $1"; exit 1 ;;
* ) break ;;
@@ -768,12 +771,14 @@ report_stats () {
mysql_install_db () {
$ECHO "Removing Stale Files"
- $RM -rf $MASTER_MYDDIR $MASTER_MYDDIR"1" $SLAVE_MYDDIR $MY_LOG_DIR/*
- $ECHO "Installing Master Databases"
- $INSTALL_DB
- if [ $? != 0 ]; then
+ if [ -z "$USE_OLD_DATA" ]; then
+ $RM -rf $MASTER_MYDDIR $MASTER_MYDDIR"1"
+ $ECHO "Installing Master Databases"
+ $INSTALL_DB
+ if [ $? != 0 ]; then
error "Could not install master test DBs"
- exit 1
+ exit 1
+ fi
fi
if [ ! -z "$USE_NDBCLUSTER" ]
then
@@ -785,6 +790,7 @@ mysql_install_db () {
fi
fi
$ECHO "Installing Slave Databases"
+ $RM -rf $SLAVE_MYDDIR $MY_LOG_DIR/*
$INSTALL_DB -slave
if [ $? != 0 ]; then
error "Could not install slave test DBs"
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index fb228d37da3..f28317ce947 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -768,7 +768,7 @@ INSERT INTO t1 VALUES (-2.2E-307,0),(+1.7E+308,+1.7E+308);
INSERT INTO t1 VALUES ('-2.2E-307',0),('+1.7E+308','+1.7E+308');
INSERT INTO t1 (col1) VALUES (-2.2E-330);
INSERT INTO t1 (col1) VALUES (+1.7E+309);
-ERROR 22007: Illegal double '1.7E+309' value found during parsing
+Got one of the listed errors
INSERT INTO t1 (col2) VALUES (-1.1E-3);
ERROR 22003: Out of range value adjusted for column 'col2' at row 1
INSERT INTO t1 (col1) VALUES ('+1.8E+309');
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 62aae177f6a..26cfbdeffd0 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t2;
SELECT 10,10.0,10.,.1e+2,100.0e-1;
10 10.0 10. .1e+2 100.0e-1
10 10.0 10 10 10
@@ -8,6 +8,9 @@ SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000;
SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
1e1 1.e1 1.0e1 1e+1 1.e+1 1.0e+1 1e-1 1.e-1 1.0e-1
10 10 10 10 10 10 0.1 0.1 0.1
+SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01;
+0.001e+1 0.001e-1 -0.001e+01 -0.001e-01
+0.01 0.0001 -0.01 -0.0001
create table t1 (f1 float(24),f2 float(52));
show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test
index a0cfc0c60f4..2ccc3e672c7 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -531,7 +531,7 @@ INSERT INTO t1 VALUES (-2.2E-307,0),(+1.7E+308,+1.7E+308);
INSERT INTO t1 VALUES ('-2.2E-307',0),('+1.7E+308','+1.7E+308');
# We don't give warnings for underflow
INSERT INTO t1 (col1) VALUES (-2.2E-330);
---error 1367
+--error 1367,1264
INSERT INTO t1 (col1) VALUES (+1.7E+309);
--error 1264
INSERT INTO t1 (col2) VALUES (-1.1E-3);
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index 3fe3afa3fac..913034dac0e 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -3,7 +3,7 @@
# Numeric floating point.
--disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
--enable_warnings
--replace_result e-0 e- e+0 e+
@@ -11,6 +11,7 @@ SELECT 10,10.0,10.,.1e+2,100.0e-1;
--replace_result e-00 e-0
SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000;
SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1;
+SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01;
create table t1 (f1 float(24),f2 float(52));
show full columns from t1;