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
c1402e2d
Commit
c1402e2d
authored
Mar 10, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in MAX() optimizing for BDB tables
parent
267c8760
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
82 additions
and
14 deletions
+82
-14
.bzrignore
.bzrignore
+1
-0
Docs/manual.texi
Docs/manual.texi
+16
-2
mysql-test/README
mysql-test/README
+4
-1
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+2
-0
mysql-test/r/innobase.result
mysql-test/r/innobase.result
+2
-0
mysql-test/t/bdb.test
mysql-test/t/bdb.test
+14
-0
mysql-test/t/innobase.test
mysql-test/t/innobase.test
+14
-0
sql-bench/server-cfg.sh
sql-bench/server-cfg.sh
+5
-0
sql/ha_berkeley.cc
sql/ha_berkeley.cc
+6
-1
sql/ha_innobase.h
sql/ha_innobase.h
+12
-10
sql/handler.h
sql/handler.h
+1
-0
sql/opt_sum.cc
sql/opt_sum.cc
+5
-0
No files found.
.bzrignore
View file @
c1402e2d
...
...
@@ -197,3 +197,4 @@ bdb/build_win32/db.h
bdb/dist/configure
bdb/dist/tags
bdb/build_unix/*
sql/.gdbinit
Docs/manual.texi
View file @
c1402e2d
...
...
@@ -5679,7 +5679,7 @@ To install the HP-UX tar.gz distribution, you must have a copy of GNU
@cindex installing, source distribution
@cindex source distrib
tu
ion, installing
@cindex source distrib
ut
ion, installing
@cindex installation overview
@node Installing source, Installing source tree, Installing binary, Installing
@section Installing a MySQL Source Distribution
...
...
@@ -40246,6 +40246,12 @@ If a test fails totally, you should check the logs file in the
@item
If you have compiled @strong{MySQL} with debugging you can try to debug this
with the @code{--gdb} and @code{--debug} options to @code{mysql-test-run}.
@xref{Making trace files}.
If you have not compiled @strong{MySQL} for debugging you should probably
do that. Just specify the @code{--with-debug} options to @code{configure}!
@xref{Installing source}.
@end itemize
@page
...
...
@@ -42125,6 +42131,8 @@ Fixed bug in bi-directonal replication.
Fixed bug in @code{BDB} tables when using index on multi-part key where a
key part may be @code{NULL}.
@item
Fixed @code{MAX()} optimization on sub-key for @code{BDB} tables.
@item
Fixed problem with 'garbage results' when using @code{BDB} tables and
@code{BLOB} or @code{TEXT} fields when joining many tables.
@item
...
...
@@ -47038,6 +47046,12 @@ in some cases the @code{PROCEDURE} will not transform the columns.
@item
Creation of a table of type @code{MERGE} doesn't check if the underlying
tables are of compatible types.
@item
@strong{MySQL} can't yet handle @code{NaN}, @code{-Inf} and @code{Inf}
values in double. Using these will cause problems when trying to export
and import data. We should as a intermediate solution change @code{NaN} to
@code{NULL} (if possible) and @code{-Inf} and @code{Inf} to the
Minimum respective maximum possible @code{double} value.
@end itemize
The following are known bugs in earlier versions of @strong{MySQL}:
...
...
@@ -47669,7 +47683,7 @@ send mail to @email{mysql@@lists.mysql.com} and ask for help. Please use the
If you can cause the @code{mysqld} server to crash quickly, you can try to
create a trace file of this:
Start the @code{mysqld} server with a trace log in @file{/tmp/mysql.trace}.
Start the @code{mysqld} server with a trace log in @file{/tmp/mysql
d
.trace}.
The log file will get very @emph{BIG}.
@code{mysqld --debug --log}
mysql-test/README
View file @
c1402e2d
...
...
@@ -6,7 +6,10 @@ actually have a co-existing MySQL installation - the tests will not
conflict with it.
All tests must pass. If one or more of them fail on your system, please
report the details to bugs@lists.mysql.com
read the following manual section of how to report the problem:
http://www.mysql.com/doc/M/y/MySQL_test_suite.html
You can create your own test cases. To create a test case:
...
...
mysql-test/r/bdb.result
View file @
c1402e2d
...
...
@@ -490,3 +490,5 @@ a 2
a b
a 1
a 2
MIN(B) MAX(b)
1 1
mysql-test/r/innobase.result
View file @
c1402e2d
...
...
@@ -443,3 +443,5 @@ i j
1 2
i j
1 2
MIN(B) MAX(b)
1 1
mysql-test/t/bdb.test
View file @
c1402e2d
...
...
@@ -664,3 +664,17 @@ SELECT * FROM t1 WHERE a='a' AND b=2;
SELECT
*
FROM
t1
WHERE
a
=
'a'
AND
b
in
(
2
);
SELECT
*
FROM
t1
WHERE
a
=
'a'
AND
b
in
(
1
,
2
);
drop
table
t1
;
#
# Test min-max optimization
#
CREATE
TABLE
t1
(
a
int3
unsigned
NOT
NULL
,
b
int1
unsigned
NOT
NULL
,
UNIQUE
(
a
,
b
)
)
TYPE
=
BDB
;
INSERT
INTO
t1
VALUES
(
1
,
1
);
SELECT
MIN
(
B
),
MAX
(
b
)
FROM
t1
WHERE
t1
.
a
=
1
;
drop
table
t1
;
mysql-test/t/innobase.test
View file @
c1402e2d
...
...
@@ -394,3 +394,17 @@ select * from t1 where i=1 and j=2;
create
index
ax1
on
t1
(
i
,
j
);
select
*
from
t1
where
i
=
1
and
j
=
2
;
drop
table
t1
;
#
# Test min-max optimization
#
CREATE
TABLE
t1
(
a
int3
unsigned
NOT
NULL
,
b
int1
unsigned
NOT
NULL
,
UNIQUE
(
a
,
b
)
)
TYPE
=
innobase
;
INSERT
INTO
t1
VALUES
(
1
,
1
);
SELECT
MIN
(
B
),
MAX
(
b
)
FROM
t1
WHERE
t1
.
a
=
1
;
drop
table
t1
;
sql-bench/server-cfg.sh
View file @
c1402e2d
...
...
@@ -194,6 +194,11 @@ sub new
{
$limits
{
'working_blobs'
}
=
0
;
# HEAP tables can't handle BLOB's
}
if
(
defined
(
$main
::opt_create_options
)
&&
$main
::opt_create_options
=
~ /type
=
innobase/i
)
{
$limits
{
'max_text_size'
}
=
8000
;
# Limit in Innobase
}
return
$self
;
}
...
...
sql/ha_berkeley.cc
View file @
c1402e2d
...
...
@@ -1429,7 +1429,12 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
pack_key
(
&
last_key
,
active_index
,
key_buff
,
key
,
key_len
);
/* Store for compare */
memcpy
(
key_buff2
,
key_buff
,
(
key_len
=
last_key
.
size
));
key_info
->
handler
.
bdb_return_if_eq
=
-
1
;
/*
If HA_READ_AFTER_KEY is set, return next key, else return first
matching key.
*/
key_info
->
handler
.
bdb_return_if_eq
=
(
find_flag
==
HA_READ_AFTER_KEY
?
1
:
-
1
);
error
=
read_row
(
cursor
->
c_get
(
cursor
,
&
last_key
,
&
row
,
DB_SET_RANGE
),
(
char
*
)
buf
,
active_index
,
&
row
,
(
DBT
*
)
0
,
0
);
key_info
->
handler
.
bdb_return_if_eq
=
0
;
...
...
sql/ha_innobase.h
View file @
c1402e2d
...
...
@@ -79,7 +79,9 @@ class ha_innobase: public handler
HA_LONGLONG_KEYS
|
HA_NULL_KEY
|
HA_NOT_EXACT_COUNT
|
HA_NO_WRITE_DELAYED
|
HA_PRIMARY_KEY_IN_READ_INDEX
|
HA_DROP_BEFORE_CREATE
),
HA_PRIMARY_KEY_IN_READ_INDEX
|
HA_DROP_BEFORE_CREATE
|
HA_NOT_READ_AFTER_KEY
),
last_dup_key
((
uint
)
-
1
),
start_of_scan
(
0
)
{
...
...
sql/handler.h
View file @
c1402e2d
...
...
@@ -70,6 +70,7 @@
#define HA_NO_WRITE_DELAYED (HA_NOT_EXACT_COUNT*2)
#define HA_PRIMARY_KEY_IN_READ_INDEX (HA_NO_WRITE_DELAYED*2)
#define HA_DROP_BEFORE_CREATE (HA_PRIMARY_KEY_IN_READ_INDEX*2)
#define HA_NOT_READ_AFTER_KEY (HA_DROP_BEFORE_CREATE*2)
/* Parameters for open() (in register form->filestat) */
/* HA_GET_INFO does a implicit HA_ABORT_IF_LOCKED */
...
...
sql/opt_sum.cc
View file @
c1402e2d
...
...
@@ -141,6 +141,11 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
break
;
}
TABLE
*
table
=
((
Item_field
*
)
expr
)
->
field
->
table
;
if
((
table
->
file
->
option_flag
()
&
HA_NOT_READ_AFTER_KEY
))
{
const_result
=
0
;
break
;
}
bool
error
=
table
->
file
->
index_init
((
uint
)
ref
.
key
);
if
(
!
ref
.
key_length
)
...
...
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