mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fixed bug with HEAP tables when using LIKE
Docs/manual.texi: Updated information about BDB tables. mysql-test/r/heap.result: Added test for HEAP bug mysql-test/t/heap.test: Added test for HEAP bug sql/field.cc: Fixed bug with HEAP tables sql/gen_lex_hash.cc: Smallare array
This commit is contained in:
@ -519,6 +519,7 @@ BDB or Berkeley_DB Tables
|
|||||||
* BDB start::
|
* BDB start::
|
||||||
* BDB characteristic::
|
* BDB characteristic::
|
||||||
* BDB TODO::
|
* BDB TODO::
|
||||||
|
* BDB portability::
|
||||||
* BDB errors::
|
* BDB errors::
|
||||||
|
|
||||||
GEMINI Tables
|
GEMINI Tables
|
||||||
@ -7467,11 +7468,6 @@ that you also probably need to raise the @code{core file size} by adding
|
|||||||
@code{ulimit -c 1000000} to @code{safe_mysqld} or starting @code{safe_mysqld}
|
@code{ulimit -c 1000000} to @code{safe_mysqld} or starting @code{safe_mysqld}
|
||||||
with @code{--core-file-sizes=1000000}. @xref{safe_mysqld}.
|
with @code{--core-file-sizes=1000000}. @xref{safe_mysqld}.
|
||||||
|
|
||||||
@c the stuff below is really out of date - hardly anybody uses it anymore
|
|
||||||
|
|
||||||
If you are using LinuxThreads and @code{mysqladmin shutdown} doesn't work,
|
|
||||||
you must upgrade to LinuxThreads Version 0.7.1 or newer.
|
|
||||||
|
|
||||||
To get a core dump on Linux if mysqld dies with a SIGSEGV signal, you can
|
To get a core dump on Linux if mysqld dies with a SIGSEGV signal, you can
|
||||||
start mysqld with the @code{--core-file} option. Note that you also probably
|
start mysqld with the @code{--core-file} option. Note that you also probably
|
||||||
need to raise the @code{core file size} by adding @code{ulimit -c 1000000} to
|
need to raise the @code{core file size} by adding @code{ulimit -c 1000000} to
|
||||||
@ -23905,6 +23901,7 @@ SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*) * 2)
|
|||||||
* BDB start::
|
* BDB start::
|
||||||
* BDB characteristic::
|
* BDB characteristic::
|
||||||
* BDB TODO::
|
* BDB TODO::
|
||||||
|
* BDB portability::
|
||||||
* BDB errors::
|
* BDB errors::
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
@ -23923,12 +23920,26 @@ distribution that has a couple of small patches to make it work more
|
|||||||
smoothly with @strong{MySQL}. You can't use a not-patched @code{BDB}
|
smoothly with @strong{MySQL}. You can't use a not-patched @code{BDB}
|
||||||
version with @strong{MySQL}.
|
version with @strong{MySQL}.
|
||||||
|
|
||||||
|
We at MySQL AB are working in close cooperating with Sleepycat to
|
||||||
|
keep the quality of the @strong{MySQL} - BDB interface high.
|
||||||
|
|
||||||
|
When it comes to supporting BDB tables, we are committed to help our
|
||||||
|
users to locate the problem and help creating a reproducable test case
|
||||||
|
for any problems involving BDB tables. Any such test case will be
|
||||||
|
forwarded to Sleepycat who in turn will help us find and fix the
|
||||||
|
problem. As this is a two stage operating, any problems with BDB tables
|
||||||
|
may take a little longer for us to fix than for other table handlers,
|
||||||
|
but as the Berkeley code itself has been used by many other applications
|
||||||
|
than @strong{MySQL} we don't envision any big problems with this.
|
||||||
|
@xref{Table handler support}.
|
||||||
|
|
||||||
@node BDB install, BDB start, BDB overview, BDB
|
@node BDB install, BDB start, BDB overview, BDB
|
||||||
@subsection Installing BDB
|
@subsection Installing BDB
|
||||||
|
|
||||||
If you have downloaded a binary version of @strong{MySQL} that includes
|
If you have downloaded a binary version of @strong{MySQL} that includes
|
||||||
support for Berkeley DB, simply follow the instructions for
|
support for Berkeley DB, simply follow the instructions for
|
||||||
installing a binary version of @strong{MySQL}. @xref{Installing binary}.
|
installing a binary version of @strong{MySQL}. @xref{Installing binary}.
|
||||||
|
@xref{mysqld-max}.
|
||||||
|
|
||||||
To compile @strong{MySQL} with Berkeley DB support, download @strong{MySQL}
|
To compile @strong{MySQL} with Berkeley DB support, download @strong{MySQL}
|
||||||
3.23.34 or newer and configure @code{MySQL} with the
|
3.23.34 or newer and configure @code{MySQL} with the
|
||||||
@ -24076,7 +24087,7 @@ contrast with @code{MyISAM} and @code{ISAM} tables where mysqld will
|
|||||||
wait for enough free disk before continuing.
|
wait for enough free disk before continuing.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node BDB TODO, BDB errors, BDB characteristic, BDB
|
@node BDB TODO, BDB portability, BDB characteristic, BDB
|
||||||
@subsection Some things we need to fix for BDB in the near future:
|
@subsection Some things we need to fix for BDB in the near future:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@ -24094,7 +24105,47 @@ Optimize performance.
|
|||||||
Change to not use page locks at all when we are scanning tables.
|
Change to not use page locks at all when we are scanning tables.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@node BDB errors, , BDB TODO, BDB
|
@node BDB portability, BDB errors, BDB TODO, BDB
|
||||||
|
@subsection Operating systems supported by @strong{BDB}
|
||||||
|
|
||||||
|
If you after having built @strong{MySQL} with support for BDB tables get
|
||||||
|
the following error in the log file when you start @code{mysqld}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
bdb: architecture lacks fast mutexes: applications cannot be threaded
|
||||||
|
Can't init dtabases
|
||||||
|
@end example
|
||||||
|
|
||||||
|
This means that @code{BDB} tables are not supported for your architecture.
|
||||||
|
In this case you have to rebuild @strong{MySQL} without BDB table support.
|
||||||
|
|
||||||
|
NOTE: The following list is not complete; We will update this as we get
|
||||||
|
more information about this.
|
||||||
|
|
||||||
|
Currently we know that BDB tables works with the following operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
@item
|
||||||
|
Linux 2.x intel
|
||||||
|
@item
|
||||||
|
Solaris sparc
|
||||||
|
@item
|
||||||
|
SCO OpenServer
|
||||||
|
@item
|
||||||
|
SCO UnixWare 7.0.1
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
It doesn't work with the following operating systems:
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
@item
|
||||||
|
Linux 2.x Alpha
|
||||||
|
@item
|
||||||
|
Max OS X
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
@node BDB errors, , BDB portability, BDB
|
||||||
@subsection Errors You May Get When Using BDB Tables
|
@subsection Errors You May Get When Using BDB Tables
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@ -42938,6 +42989,8 @@ not yet 100% confident in this code.
|
|||||||
@appendixsubsec Changes in release 3.23.37
|
@appendixsubsec Changes in release 3.23.37
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
Fixed a bug when using @code{HEAP} tables with @code{LIKE}.
|
||||||
|
@item
|
||||||
Added @code{--mysql-version} to @code{safe_mysqld}
|
Added @code{--mysql-version} to @code{safe_mysqld}
|
||||||
@item
|
@item
|
||||||
Changed @code{INNOBASE} to @code{INNODB} (because the @code{INNOBASE}
|
Changed @code{INNOBASE} to @code{INNODB} (because the @code{INNOBASE}
|
||||||
|
@ -78,3 +78,10 @@ f1 f2
|
|||||||
12 ted
|
12 ted
|
||||||
12 ted
|
12 ted
|
||||||
12 ted
|
12 ted
|
||||||
|
table type possible_keys key key_len ref rows Extra
|
||||||
|
t1 range btn btn 10 NULL 10 where used
|
||||||
|
btn
|
||||||
|
table type possible_keys key key_len ref rows Extra
|
||||||
|
t1 ALL btn NULL NULL NULL 14 where used
|
||||||
|
table type possible_keys key key_len ref rows Extra
|
||||||
|
t1 ref btn btn 11 const,const 10 where used
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# Test of heap tables.
|
# Test of heap tables.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
drop table if exists t1;
|
||||||
create table t1 (a int not null,b int not null, primary key (a)) type=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
|
create table t1 (a int not null,b int not null, primary key (a)) type=heap comment="testing heaps" avg_row_length=100 min_rows=1 max_rows=100;
|
||||||
insert into t1 values(1,1),(2,2),(3,3),(4,4);
|
insert into t1 values(1,1),(2,2),(3,3),(4,4);
|
||||||
delete from t1 where a=1 or a=0;
|
delete from t1 where a=1 or a=0;
|
||||||
@ -85,3 +86,17 @@ INSERT into t1 set f1=12,f2="ted";
|
|||||||
delete from t1 where f2="bill";
|
delete from t1 where f2="bill";
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test when using part key searches
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (btn char(10) not null, key(btn)) type=heap;
|
||||||
|
insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i");
|
||||||
|
explain select * from t1 where btn like "q%";
|
||||||
|
select * from t1 where btn like "q%";
|
||||||
|
alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn;
|
||||||
|
update t1 set new_col=btn;
|
||||||
|
explain select * from t1 where btn="a";
|
||||||
|
explain select * from t1 where btn="a" and new_col="a";
|
||||||
|
drop table t1;
|
||||||
|
@ -363,7 +363,7 @@ void Field::store_time(TIME *ltime,timestamp_type type)
|
|||||||
|
|
||||||
bool Field::optimize_range()
|
bool Field::optimize_range()
|
||||||
{
|
{
|
||||||
return test(table->file->option_flag() & HA_READ_NEXT);
|
return test(table->file->option_flag() & HA_ONLY_WHOLE_INDEX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -472,7 +472,7 @@ int main(int argc,char **argv)
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
start_value=6591595L; best_t1=6947666L; best_t2=6561864L; best_type=2; /* mode=4523 add=5 type: 0 */
|
start_value=2663113L; best_t1=1175350L; best_t2=7404531L; best_type=4; /* mode=4327 add=3 type: 0 */
|
||||||
if (get_options(argc,(char **) argv))
|
if (get_options(argc,(char **) argv))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user