Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ce541b29
Commit
ce541b29
authored
Mar 27, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for unsigned FLOAT/DOUBLE
parent
2ac18e9b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
16 deletions
+67
-16
Docs/manual.texi
Docs/manual.texi
+31
-6
configure.in
configure.in
+2
-1
include/config-win.h
include/config-win.h
+1
-1
include/mysql_com.h
include/mysql_com.h
+2
-2
libmysql/libmysql.c
libmysql/libmysql.c
+1
-1
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+1
-2
mysys/array.c
mysys/array.c
+2
-1
mysys/thr_alarm.c
mysys/thr_alarm.c
+1
-0
sql/field.cc
sql/field.cc
+25
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+1
-2
No files found.
Docs/manual.texi
View file @
ce541b29
...
...
@@ -4532,7 +4532,7 @@ MySQL Server also supports
the following additional type attributes:
@itemize @bullet
@item
@code{UNSIGNED} option for integer columns.
@code{UNSIGNED} option for integer
and floating point
columns.
@item
@code{ZEROFILL} option for integer columns.
@item
...
...
@@ -8148,6 +8148,10 @@ version 4.0;
@itemize @bullet
@item
@code{DOUBLE} and @code{FLOAT} columns are now honoring the
@code{UNSIGNED} flag on storage (before @code{UNSIGNED} was ignored for
these columns).
@item
Use @code{ORDER BY column DESC} now always sorts @code{NULL} values
first; In 3.23 this was not always consistent.
@item
...
...
@@ -8177,6 +8181,9 @@ you need to rebuild them with @code{ALTER TABLE table_name TYPE=MyISAM},
@code{LOCATE()} and @code{INSTR()} are case sensitive if one of the
arguments is a binary string.
@item
@code{STRCMP()} now uses the current character set when doing comparison,
which means that the default comparison is case insensitive.
@item
@code{HEX(string)} now returns the characters in string converted to
hexadecimal. If you want to convert a number to hexadecimal, you should
ensure that you call @code{HEX()} with a numeric argument.
...
...
@@ -33467,8 +33474,6 @@ restrictions:
@itemize @bullet
@item
Only the last @code{SELECT} command can have @code{INTO OUTFILE}.
@item
Only the last @code{SELECT} command can have @code{ORDER BY}.
@end itemize
If you don't use the keyword @code{ALL} for the @code{UNION}, all
...
...
@@ -33476,6 +33481,13 @@ returned rows will be unique, like if you had done a @code{DISTINCT} for
the total result set. If you specify @code{ALL}, then you will get all
matching rows from all the used @code{SELECT} statements.
If you want to use an @code{ORDER BY} for the total @code{UNION} result,
you should use parentheses:
@example
(SELECT a FROM table_name WHERE a=10 AND B=1 ORDER BY a LIMIT 10) UNION
(SELECT a FROM table_name WHERE a=11 AND B=2 ORDER BY a LIMIT 10) ORDER BY a;
@end example
@findex HANDLER
@node HANDLER, INSERT, SELECT, Data Manipulation
...
...
@@ -41741,9 +41753,11 @@ set has been read.
If you acquire a result set from a successful call to
@code{mysql_store_result()}, the client receives the entire set in one
operation. In this case, a @code{NULL} return from @code{mysql_fetch_row()}
always means the end of the result set has been reached and it is
unnecessary to call @code{mysql_eof()}.
operation. In this case, a @code{NULL} return from
@code{mysql_fetch_row()} always means the end of the result set has been
reached and it is unnecessary to call @code{mysql_eof()}. When used
with @code{mysql_store_result()}, @code{mysql_eof()} will always return
true.
On the other hand, if you use @code{mysql_use_result()} to initiate a result
set retrieval, the rows of the set are obtained from the server one by one as
...
...
@@ -48730,6 +48744,11 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
A lot of fixes to @code{UNION}.
@item
@code{DOUBLE} and @code{FLOAT} columns are now honoring the
@code{UNSIGNED} flag on storage.
@item
Fixed bug with indexless boolean fulltext search.
@item
Fixed bug that sometimes appeared when fulltext search was used
...
...
@@ -48934,6 +48953,9 @@ now handle signed and unsigned @code{BIGINT} numbers correctly.
@item
New character set @code{latin_de} which provides correct German sorting.
@item
@code{STRCMP()} now uses the current character set when doing comparison,
which means that the default comparison is case insensitive.
@item
@code{TRUNCATE TABLE} and @code{DELETE FROM table_name} are now separate
functions. One bonus is that @code{DELETE FROM table_name} now returns
the number of deleted rows.
...
...
@@ -49118,6 +49140,9 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.50
@itemize @bullet
@item
Our Linux RPMS and binaries are now compiled with gcc 3.0.4, which should
make them a bit faster.
@item
Fixed problem with @code{SHOW CREATE TABLE} and @code{PRIMARY KEY} when using
32 indexes.
@item
configure.in
View file @
ce541b29
...
...
@@ -974,7 +974,8 @@ Reference Manual.])
if
test
-f
/usr/shlib/libpthread.so
-a
-f
/usr/lib/libmach.a
-a
-f
/usr/ccs/lib/cmplrs/cc/libexc.a
then
with_named_thread
=
"-lpthread -lmach -lexc"
#with_named_thread="-lpthread -lmach -lexc -lc"
CFLAGS
=
"
$CFLAGS
-D_REENTRANT"
CXXFLAGS
=
"
$CXXFLAGS
-D_REENTRANT"
AC_DEFINE
(
HAVE_DEC_THREADS
)
AC_MSG_RESULT
(
"yes"
)
else
...
...
include/config-win.h
View file @
ce541b29
...
...
@@ -31,7 +31,7 @@
#define SYSTEM_TYPE "Win95/Win98"
#endif
#if
def _WIN64
#if
defined(_WIN64) || defined(WIN64)
#define MACHINE_TYPE "ia64"
/* Define to machine type name */
#else
#define MACHINE_TYPE "i32"
/* Define to machine type name */
...
...
include/mysql_com.h
View file @
ce541b29
...
...
@@ -108,8 +108,8 @@ enum enum_server_command {COM_SLEEP,COM_QUIT,COM_INIT_DB,COM_QUERY,
struct
st_vio
;
/* Only C */
typedef
struct
st_vio
Vio
;
#define MAX_CHAR_WIDTH 255 /
/ Max length for a CHAR colum
#define MAX_BLOB_WIDTH 8192 /
/ Default width for blob
#define MAX_CHAR_WIDTH 255
/
* Max length for a CHAR colum */
#define MAX_BLOB_WIDTH 8192
/
* Default width for blob */
typedef
struct
st_net
{
Vio
*
vio
;
...
...
libmysql/libmysql.c
View file @
ce541b29
...
...
@@ -701,7 +701,7 @@ static const char *default_options[]=
"character-set-dir"
,
"default-character-set"
,
"interactive-timeout"
,
"connect-timeout"
,
"local-infile"
,
"disable-local-infile"
,
"replication-probe"
,
"enable-reads-from-master"
,
"repl-parse-query"
,
"ssl-c
hip
er"
,
"ssl-c
iph
er"
,
NullS
};
...
...
myisam/ft_boolean_search.c
View file @
ce541b29
...
...
@@ -412,7 +412,6 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
FTB_EXPR
*
ftbe
;
FT_SEG_ITERATOR
ftsi
;
const
byte
*
end
;
uint
i
;
my_off_t
docid
=
ftb
->
info
->
lastpos
;
if
(
docid
==
HA_POS_ERROR
)
...
...
@@ -420,7 +419,7 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
if
(
!
ftb
->
queue
.
elements
)
return
0
;
#if
0
#if
NOT_USED
if
(
ftb
->
state
==
READY
||
ftb
->
state
==
INDEX_DONE
)
ftb
->
state
=
SCAN
;
else
if
(
ftb
->
state
!=
SCAN
)
...
...
mysys/array.c
View file @
ce541b29
...
...
@@ -29,7 +29,8 @@
*/
my_bool
_init_dynamic_array
(
DYNAMIC_ARRAY
*
array
,
uint
element_size
,
uint
init_alloc
,
uint
alloc_increment
CALLER_INFO_PROTO
)
uint
init_alloc
,
uint
alloc_increment
CALLER_INFO_PROTO
)
{
DBUG_ENTER
(
"init_dynamic_array"
);
if
(
!
alloc_increment
)
...
...
mysys/thr_alarm.c
View file @
ce541b29
...
...
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* To avoid problems with alarms in debug code, we disable DBUG here */
#undef DBUG_OFF
#define DBUG_OFF
#include <my_global.h>
...
...
sql/field.cc
View file @
ce541b29
...
...
@@ -1713,6 +1713,11 @@ void Field_float::store(double nr)
float
j
;
if
(
dec
<
NOT_FIXED_DEC
)
nr
=
floor
(
nr
*
log_10
[
dec
]
+
0.5
)
/
log_10
[
dec
];
// To fixed point
if
(
unsigned_flag
&&
nr
<
0
)
{
current_thd
->
cuted_fields
++
;
nr
=
0
;
}
if
(
nr
<
-
FLT_MAX
)
{
j
=
-
FLT_MAX
;
...
...
@@ -1739,6 +1744,11 @@ void Field_float::store(double nr)
void
Field_float
::
store
(
longlong
nr
)
{
float
j
=
(
float
)
nr
;
if
(
unsigned_flag
&&
j
<
0
)
{
current_thd
->
cuted_fields
++
;
j
=
0
;
}
#ifdef WORDS_BIGENDIAN
if
(
table
->
db_low_byte_first
)
{
...
...
@@ -1945,6 +1955,11 @@ void Field_double::store(const char *from,uint len)
double
j
=
atof
(
tmp_str
.
c_ptr
());
if
(
errno
||
current_thd
->
count_cuted_fields
&&
!
test_if_real
(
from
,
len
))
current_thd
->
cuted_fields
++
;
if
(
unsigned_flag
&&
j
<
0
)
{
current_thd
->
cuted_fields
++
;
j
=
0
;
}
#ifdef WORDS_BIGENDIAN
if
(
table
->
db_low_byte_first
)
{
...
...
@@ -1960,6 +1975,11 @@ void Field_double::store(double nr)
{
if
(
dec
<
NOT_FIXED_DEC
)
nr
=
floor
(
nr
*
log_10
[
dec
]
+
0.5
)
/
log_10
[
dec
];
// To fixed point
if
(
unsigned_flag
&&
nr
<
0
)
{
current_thd
->
cuted_fields
++
;
nr
=
0
;
}
#ifdef WORDS_BIGENDIAN
if
(
table
->
db_low_byte_first
)
{
...
...
@@ -1974,6 +1994,11 @@ void Field_double::store(double nr)
void
Field_double
::
store
(
longlong
nr
)
{
double
j
=
(
double
)
nr
;
if
(
unsigned_flag
&&
j
<
0
)
{
current_thd
->
cuted_fields
++
;
j
=
0
;
}
#ifdef WORDS_BIGENDIAN
if
(
table
->
db_low_byte_first
)
{
...
...
sql/ha_innodb.cc
View file @
ce541b29
...
...
@@ -2408,7 +2408,7 @@ ha_innobase::rnd_pos(
int
error
;
uint
keynr
=
active_index
;
DBUG_ENTER
(
"rnd_pos"
);
DBUG_DUMP
(
"key"
,
pos
,
ref_stored_len
);
DBUG_DUMP
(
"key"
,
(
char
*
)
pos
,
ref_stored_len
);
statistic_increment
(
ha_read_rnd_count
,
&
LOCK_status
);
...
...
@@ -2633,7 +2633,6 @@ ha_innobase::create(
dict_table_t
*
innobase_table
;
trx_t
*
trx
;
int
primary_key_no
;
KEY
*
key
;
uint
i
;
char
name2
[
FN_REFLEN
];
char
norm_name
[
FN_REFLEN
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment