Commit fc1f426e authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/kostja/mysql/mysql-4.0-1993

parents f195cf9d 02cf765f
...@@ -745,7 +745,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ ...@@ -745,7 +745,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [
for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \ for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \
/usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib /usr/local/lib/ ; do /usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib /usr/local/lib/ ; do
if test -f $d/libssl.a ; then if test -f $d/libssl.a || test -f $d/libssl.so || test -f $d/libssl.dylib ; then
OPENSSL_LIB=$d OPENSSL_LIB=$d
fi fi
done done
...@@ -757,7 +757,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ ...@@ -757,7 +757,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [
if test -f $incs/openssl/ssl.h ; then if test -f $incs/openssl/ssl.h ; then
OPENSSL_INCLUDE=-I$incs OPENSSL_INCLUDE=-I$incs
fi fi
if test -f $libs/libssl.a ; then if test -f $libs/libssl.a || test -f $libs/libssl.so || test -f $libs/libssl.dylib ; then
OPENSSL_LIB=$libs OPENSSL_LIB=$libs
fi fi
;; ;;
......
...@@ -1067,10 +1067,22 @@ static void dumpTable(uint numFields, char *table) ...@@ -1067,10 +1067,22 @@ static void dumpTable(uint numFields, char *table)
} }
else else
{ {
/* change any strings ("inf","nan",..) into NULL */ /* change any strings ("inf", "-inf", "nan") into NULL */
char *ptr = row[i]; char *ptr = row[i];
dynstr_append(&extended_row, if (isalpha(*ptr) || (*ptr == '-' && *(ptr+1) == 'i'))
(!isalpha(*ptr)) ? ptr : "NULL"); dynstr_append(&extended_row, "NULL");
else
{
if (field->type == FIELD_TYPE_DECIMAL)
{
/* add " signs around */
dynstr_append(&extended_row, "\"");
dynstr_append(&extended_row, ptr);
dynstr_append(&extended_row, "\"");
}
else
dynstr_append(&extended_row, ptr);
}
} }
} }
else else
...@@ -1098,13 +1110,25 @@ static void dumpTable(uint numFields, char *table) ...@@ -1098,13 +1110,25 @@ static void dumpTable(uint numFields, char *table)
} }
else else
{ {
/* change any strings ("inf","nan",..) into NULL */ /* change any strings ("inf", "-inf", "nan") into NULL */
char *ptr = row[i]; char *ptr = row[i];
if (opt_xml) if (opt_xml)
fprintf(md_result_file, "\t\t<field name=\"%s\">%s</field>\n", fprintf(md_result_file, "\t\t<field name=\"%s\">%s</field>\n",
field->name,!isalpha(*ptr) ?ptr: "NULL"); field->name,!isalpha(*ptr) ?ptr: "NULL");
else if (isalpha(*ptr) || (*ptr == '-' && *(ptr+1) == 'i'))
fputs("NULL", md_result_file);
else
{
if (field->type == FIELD_TYPE_DECIMAL)
{
/* add " signs around */
fputs("\"", md_result_file);
fputs(ptr, md_result_file);
fputs("\"", md_result_file);
}
else else
fputs((!isalpha(*ptr)) ? ptr : "NULL", md_result_file); fputs(ptr, md_result_file);
}
} }
} }
else else
......
...@@ -15,3 +15,51 @@ INSERT INTO t1 VALUES (1), (2); ...@@ -15,3 +15,51 @@ INSERT INTO t1 VALUES (1), (2);
</database> </database>
</mysqldump> </mysqldump>
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a decimal(240, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
-- MySQL dump 9.09
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 4.0.17-debug-log
--
-- Table structure for table `t1`
--
CREATE TABLE t1 (
a decimal(240,20) default NULL
) TYPE=MyISAM;
--
-- Dumping data for table `t1`
--
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890.00000000000000000000");
INSERT INTO t1 VALUES ("0987654321098765432109876543210987654321.00000000000000000000");
DROP TABLE t1;
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES (-9e999999);
-- MySQL dump 9.09
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 4.0.17-debug-log
--
-- Table structure for table `t1`
--
CREATE TABLE t1 (
a double default NULL
) TYPE=MyISAM;
--
-- Dumping data for table `t1`
--
INSERT INTO t1 VALUES (NULL);
DROP TABLE t1;
...@@ -8,3 +8,22 @@ CREATE TABLE t1(a int); ...@@ -8,3 +8,22 @@ CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2); INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP -X test t1 --exec $MYSQL_DUMP -X test t1
DROP TABLE t1; DROP TABLE t1;
#
# Bug #2005
#
CREATE TABLE t1 (a decimal(240, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
("0987654321098765432109876543210987654321");
--exec $MYSQL_DUMP test t1
DROP TABLE t1;
#
# Bug #2055
#
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES (-9e999999);
--exec $MYSQL_DUMP test t1
DROP TABLE t1;
...@@ -157,6 +157,9 @@ my_bool my_thread_init(void) ...@@ -157,6 +157,9 @@ my_bool my_thread_init(void)
tmp= &THR_KEY_mysys; tmp= &THR_KEY_mysys;
#endif #endif
tmp->id= ++thread_id; tmp->id= ++thread_id;
#if defined(__WIN__) && defined(EMBEDDED_LIBRARY)
tmp->thread_self= (pthread_t)getpid();
#endif
pthread_mutex_init(&tmp->mutex,MY_MUTEX_INIT_FAST); pthread_mutex_init(&tmp->mutex,MY_MUTEX_INIT_FAST);
pthread_cond_init(&tmp->suspend, NULL); pthread_cond_init(&tmp->suspend, NULL);
tmp->init= 1; tmp->init= 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment