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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
65b3c21d
Commit
65b3c21d
authored
Aug 12, 2004
by
lenz@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/space/my/mysql-4.0
into mysql.com:/space/my/mysql-4.0-build
parents
46ddf8f7
259bce85
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
73 additions
and
16 deletions
+73
-16
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
include/my_global.h
include/my_global.h
+17
-11
mysql-test/r/heap.result
mysql-test/r/heap.result
+10
-0
mysql-test/r/type_uint.result
mysql-test/r/type_uint.result
+2
-0
mysql-test/t/heap.test
mysql-test/t/heap.test
+14
-0
mysql-test/t/type_uint.test
mysql-test/t/type_uint.test
+1
-0
sql/field.cc
sql/field.cc
+27
-2
sql/opt_sum.cc
sql/opt_sum.cc
+1
-0
sql/sql_analyse.cc
sql/sql_analyse.cc
+0
-3
No files found.
BitKeeper/etc/logging_ok
View file @
65b3c21d
...
...
@@ -5,6 +5,7 @@ Administrator@fred.
Greg@greg-laptop.
Miguel@light.local
Sinisa@sinisa.nasamreza.org
acurtis@pcgem.rdg.cyberkinetica.com
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com
antony@ltantony.dsl-verizon.net
...
...
include/my_global.h
View file @
65b3c21d
...
...
@@ -642,21 +642,27 @@ extern double my_atof(const char*);
#endif
/* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
#if SIZEOF_LONG == 4
#define INT_MIN32 (long) 0x80000000L
#define INT_MAX32 (long) 0x7FFFFFFFL
#define INT_MIN24 ((long) 0xff800000L)
#define INT_MAX24 0x007fffffL
#define INT_MIN32 ((long) 0x80000000L)
#define INT_MAX32 ((long) 0x7FFFFFFFL)
#define UINT_MAX32 ((long) 0xFFFFFFFFL)
#define INT_MIN24 ((long) 0xFF800000L)
#define INT_MAX24 0x007FFFFFL
#define UINT_MAX24 0x00FFFFFFL
#define INT_MIN16 ((short int) 0x8000)
#define INT_MAX16 0x7FFF
#define UINT_MAX16 0xFFFF
#define INT_MIN8 ((char) 0x80)
#define INT_MAX8 ((char) 0x7F)
#else
/* Probably Alpha */
#define INT_MIN32 ((long) (int) 0x80000000)
#define INT_MAX32 ((long) (int) 0x7FFFFFFF)
#define INT_MIN24 ((long) (int) 0xff800000)
#define INT_MAX24 ((long) (int) 0x007fffff)
#define INT_MIN16 ((short int) 0xffff8000)
#define UINT_MAX32 ((long) (int) 0xFFFFFFFF)
#define INT_MIN24 ((long) (int) 0xFF800000)
#define INT_MAX24 ((long) (int) 0x007FFFFF)
#define UINT_MAX24 ((long) (int) 0x00FFFFFF)
#define INT_MIN16 ((short int) 0xFFFF8000)
#define INT_MAX16 ((short int) 0x00007FFF)
#define UINT_MAX16 ((short int) 0x0000FFFF)
#endif
/* From limits.h instead */
...
...
mysql-test/r/heap.result
View file @
65b3c21d
...
...
@@ -217,3 +217,13 @@ DELETE from t1 where a < 100;
SELECT * from t1;
a
DROP TABLE t1;
CREATE TABLE `job_titles` (
`job_title_id` int(6) unsigned NOT NULL default '0',
`job_title` char(18) NOT NULL default '',
PRIMARY KEY (`job_title_id`),
UNIQUE KEY `job_title_id` (`job_title_id`,`job_title`)
) TYPE=HEAP;
SELECT MAX(job_title_id) FROM job_titles;
MAX(job_title_id)
NULL
DROP TABLE job_titles;
mysql-test/r/type_uint.result
View file @
65b3c21d
...
...
@@ -2,8 +2,10 @@ drop table if exists t1;
create table t1 (this int unsigned);
insert into t1 values (1);
insert into t1 values (-1);
insert into t1 values ('5000000000');
select * from t1;
this
1
0
4294967295
drop table t1;
mysql-test/t/heap.test
View file @
65b3c21d
...
...
@@ -147,3 +147,17 @@ INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11);
DELETE
from
t1
where
a
<
100
;
SELECT
*
from
t1
;
DROP
TABLE
t1
;
#
# Bug#4411 Server hangs when trying to SELECT MAX(id) from an empty HEAP table
#
CREATE
TABLE
`job_titles`
(
`job_title_id`
int
(
6
)
unsigned
NOT
NULL
default
'0'
,
`job_title`
char
(
18
)
NOT
NULL
default
''
,
PRIMARY
KEY
(
`job_title_id`
),
UNIQUE
KEY
`job_title_id`
(
`job_title_id`
,
`job_title`
)
)
TYPE
=
HEAP
;
SELECT
MAX
(
job_title_id
)
FROM
job_titles
;
DROP
TABLE
job_titles
;
mysql-test/t/type_uint.test
View file @
65b3c21d
...
...
@@ -6,5 +6,6 @@ drop table if exists t1;
create
table
t1
(
this
int
unsigned
);
insert
into
t1
values
(
1
);
insert
into
t1
values
(
-
1
);
insert
into
t1
values
(
'5000000000'
);
select
*
from
t1
;
drop
table
t1
;
sql/field.cc
View file @
65b3c21d
...
...
@@ -1504,7 +1504,7 @@ void Field_long::store(const char *from,uint len)
{
len
--
;
from
++
;
}
long
tmp
;
long
tmp
,
cuted_fields
=
0
;
String
tmp_str
(
from
,
len
);
from
=
tmp_str
.
c_ptr
();
// Add end null if needed
errno
=
0
;
...
...
@@ -1523,6 +1523,31 @@ void Field_long::store(const char *from,uint len)
if
(
errno
||
(
from
+
len
!=
end
&&
current_thd
->
count_cuted_fields
&&
!
test_if_int
(
from
,
len
)))
cuted_fields
=
1
;
#if SIZEOF_LONG > 4
if
(
unsigned_flag
)
{
if
(
tmp
>
UINT_MAX32
)
{
tmp
=
UINT_MAX32
;
cuted_fields
=
1
;
}
}
else
{
if
(
tmp
>
INT_MAX32
)
{
tmp
=
INT_MAX32
;
cuted_fields
=
1
;
}
else
if
(
tmp
<
INT_MIN32
)
{
tmp
=
INT_MIN32
;
cuted_fields
=
1
;
}
}
#endif
if
(
cuted_fields
)
current_thd
->
cuted_fields
++
;
#ifdef WORDS_BIGENDIAN
if
(
table
->
db_low_byte_first
)
...
...
sql/opt_sum.cc
View file @
65b3c21d
...
...
@@ -401,6 +401,7 @@ static bool find_range_key(TABLE_REF *ref, Field* field, COND *cond)
/* Can't use this key, for looking up min() or max(), end if last one */
if
(
key
==
1
)
return
0
;
key
>>=
1
;
idx
++
;
}
ref
->
key_length
=
0
;
ref
->
key
=
idx
;
...
...
sql/sql_analyse.cc
View file @
65b3c21d
...
...
@@ -34,9 +34,6 @@
#define MAX_TREEMEM 8192
#define MAX_TREE_ELEMENTS 256
#define UINT_MAX16 0xffff
#define UINT_MAX24 0xffffff
#define UINT_MAX32 0xffffffff
int
sortcmp2
(
void
*
cmp_arg
__attribute__
((
unused
)),
const
String
*
a
,
const
String
*
b
)
...
...
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