Commit a36d59bc authored by unknown's avatar unknown

Merge paul@work.mysql.com:/home/bk/mysql-4.0

into teton.kitebird.com:/home/paul/mysql-4.0


Docs/manual.texi:
  Auto merged
parents 5f98914d e578a2e2
......@@ -121,20 +121,20 @@ for that version.
* Tutorial:: MySQL Tutorial
* MySQL Database Administration:: MySQL Database Administration
* MySQL Optimisation:: MySQL Optimisation
* Reference:: MySQL language reference
* Table types:: MySQL table types
* Clients:: MySQL client tools and APIs
* Reference:: MySQL Language Reference
* Table types:: MySQL Table Types
* Clients:: MySQL Client Tools and APIs
* Extending MySQL:: Extending MySQL
* Problems:: Problems
* Contrib:: Contributed programs
* Contrib:: Contributed Programs
* Credits:: Contributors to MySQL
* News:: MySQL change history
* Porting:: Comments on porting to other systems
* News:: MySQL Change History
* Porting:: Porting to Other Systems
* Environment variables:: MySQL environment variables
* Regexp:: Description of MySQL regular expression syntax
* Regexp:: MySQL Regular Expression Syntax
* GPL license:: GNU General Public License
* LGPL license:: GNU Lesser General Public License
* Function Index:: SQL command, type and function index
* Function Index:: SQL Command, Type and Function Index
* Concept Index:: Concept Index
@end menu
......@@ -11453,7 +11453,7 @@ perl} indicates the command to use.
@node Tutorial, MySQL Database Administration, Installing, Top
@chapter Introduction to MySQL: A MySQL Tutorial
@chapter Tutorial Introduction to MySQL
@cindex tutorial
@cindex terminal monitor, defined
......@@ -23430,7 +23430,7 @@ check @code{Slave_open_temp_tables} variable to see if it is 0, then issue
with @code{SLAVE START} and see
if you have better luck next time. There will be a cleaner solution, but it
has to wait until version 4.0.
In earlier versions temporary tables are not being replicated properly - we
In earlier versions temporary tables are not replicated properly - we
recommend that you either upgrade, or execute @code{SET SQL_LOG_BIN=0} on
your clients before all queries with temp tables.
@item
......@@ -23503,11 +23503,6 @@ and @code{FLUSH SLAVE} commands. In Version 3.23.26 we have renamed them to
what they do. The old @code{FLUSH} variants still work, though, for
compatibility.
@item
Starting in Version 3.23.21, you can use @code{LOAD TABLE FROM MASTER} for
network backup and to set up replication initially. We have recently
received a number of bug reports concerning it that we are investigating, so
we recommend that you use it only in testing until we make it more stable.
@item
Starting in Version 3.23.23, you can change masters and adjust log position
with @code{CHANGE MASTER TO}.
......@@ -23521,6 +23516,39 @@ with a different name on the slave.
@item
Starting in Version 3.23.28, you can use @code{PURGE MASTER LOGS TO 'log-name'}
to get rid of old logs while the slave is running.
@item
Due to the non-transactional nature of MyISAM tables, it is possible to have
a query that will only partially update a table and return an error code. This
can happen, for example, on a multi-row insert that has one row violating a
key constraint, or if a long update query is killed after updating some of the
rows. If that happens on the master, the slave thread will exit and wait for
the DBA to decide what to do about it unless the error code is legitimate and
the query execution results in the same error code. If this error code
validation behaviour is not desirable, some ( or all) errors could be masked
out with @code{slave-skip-errors} option starting in Version 3.23.47.
@item
While individual tables can be excluded from replication with
@code{replicate-do-table}/@code{replicate-ignore-table} or
@code{replicate-wild-do-table}/@code{replicate-wild-ignore-table}, there
are currently some design deficiencies that in some rather rare cases
produce unexpected results. The replication protocol does not inform the
slave explicitly which tables are going to be modified by the query - so
the slave has to parse the query to know this. To avoid redundant
parsing for queries that will end up actually being executed, table
exclusion is currently implemented by sending the query to the standard
MySQL parser, which will short-circuit the query and report success if
it detects that the table should be ignored. In addition to several
inefficiencies, this approach is also more bug prone, and there are two
known bugs as of Version 3.23.49 - because the parser automatically opens
the table when parsing some queries the ignored table has to exist on
the slave. The other bug is that if the ignored table gets partially
updated, the slave thread will not notice that the table actually should
have been ignored and will suspend the replication process. While the
above bugs are conceptually very simple to fix, we have not yet found a way
to do this without a sigficant code change that would compromize the stability
status of 3.23 branch. There exists a workaround for both if in the rare case
it happens to affect your application - use @code{slave-skip-errors}.
@end itemize
......@@ -45552,7 +45580,7 @@ return a big result row!
@node Can not connect to server, Blocked host, Gone away, Common errors
@appendixsubsec @code{Can't connect to [local] MySQL server} error
@appendixsubsec @code{Can't connect to [local] MySQL server} Error
A MySQL client on Unix can connect to the @code{mysqld} server in two
different ways: Unix sockets, which connect through a file in the file
......@@ -46636,7 +46664,7 @@ the original table.
@node Problems with mysql.sock, Timezone problems, Temporary files, Administration Issues
@appendixsubsec How to Protect or change the MySQL socket file @file{/tmp/mysql.sock}
@appendixsubsec How to Protect or Change the MySQL Socket File @file{/tmp/mysql.sock}
@cindex @code{mysql.sock}, protection
@cindex deletion, @code{mysql.sock}
......@@ -47011,7 +47039,7 @@ Post the test file using @code{mysqlbug} to @email{mysql@@lists.mysql.com}.
@end enumerate
@node Problems with float, , No matching rows, Query Issues
@appendixsubsec Problems with floating point comparison
@appendixsubsec Problems with Floating Point Comparison
Floating point numbers cause confusion sometimes, because these numbers
are not stored as exact values inside computer architecture. What one
......@@ -48590,7 +48618,7 @@ Development on the embedded @code{mysqld} version.
@node News, Porting, Credits, Top
@appendix MySQL change history
@appendix MySQL Change History
@cindex ChangeLog
@cindex changes, log
......@@ -54666,7 +54694,7 @@ Fixed @code{DISTINCT} with calculated columns.
@node Porting, Environment variables, News, Top
@appendix Comments on Porting to Other Systems
@appendix Porting to Other Systems
@cindex porting, to other systems
......@@ -54746,8 +54774,8 @@ will ensure that your thread installation has even a remote chance to work!
@menu
* Debugging server:: Debugging a MySQL server
* Debugging client:: Debugging a MySQL client
* The DBUG package:: The DBUG package
* Locking methods:: Locking methods
* The DBUG package:: The DBUG Package
* Locking methods:: Locking ethods
* RTS-threads:: Comments about RTS threads
* Thread packages:: Differences between different thread packages
@end menu
......@@ -54802,7 +54830,7 @@ problems that may be unique to your environment.
@node Compiling for debugging, Making trace files, Debugging server, Debugging server
@appendixsubsec Compiling MYSQL for debugging
@appendixsubsec Compiling MYSQL for Debugging
If you have some very specific problem, you can always try to debug
MySQL. To do this you must configure MySQL with the
......@@ -54856,7 +54884,7 @@ default compiled with support for trace files.
@node Making trace files, Using gdb on mysqld, Compiling for debugging, Debugging server
@appendixsubsec Creating trace files
@appendixsubsec Creating Trace Files
If the @code{mysqld} server doesn't start or if you can cause the
@code{mysqld} server to crash quickly, you can try to create a trace
......@@ -54990,7 +55018,7 @@ setting the @code{DBI_TRACE} environment variable.
@node Using stack trace, Using log files, Using gdb on mysqld, Debugging server
@appendixsubsec Using a stack trace
@appendixsubsec Using a Stack Trace
On some operating systems, the error log will contain a stack trace if
@code{mysqld} dies unexpectedly. You can use this to find out where (and
......@@ -55059,7 +55087,7 @@ repeat the problem! @xref{Bug reports}.
@node Using log files, Reproduceable test case, Using stack trace, Debugging server
@appendixsubsec Using log files to find cause of errors in mysqld
@appendixsubsec Using Log Files to Find Cause of Errors in mysqld
Note that before starting @code{mysqld} with @code{--log} you should
check all your tables with @code{myisamchk}.
......@@ -55110,7 +55138,7 @@ messages but instead try to find out why @code{mysqld} died.
@node Reproduceable test case, , Using log files, Debugging server
@appendixsubsec Making a test case when you experience table corruption
@appendixsubsec Making a Test Case When You Experience Table Corruption
If you get corrupted tables or if @code{mysqld} always fails after some
update commands, you can test if this bug is reproducible by doing the
......@@ -55199,7 +55227,7 @@ MySQL installation with new MySQL library.
@node The DBUG package, Locking methods, Debugging client, Porting
@appendixsec The DBUG package.
@appendixsec The DBUG Package
@cindex DBUG package
......@@ -55622,7 +55650,7 @@ variables to modify the behavior of MySQL. @xref{Option files}.
@node Regexp, GPL license, Environment variables, Top
@appendix Description of MySQL regular expression syntax
@appendix MySQL Regular Expression Syntax
@cindex regex
@cindex regular expression syntax, described
......@@ -56213,8 +56241,10 @@ Public License instead of this License.
@node LGPL license, Function Index, GPL license, Top
@appendix GNU LESSER GENERAL PUBLIC LICENSE
@cindex LGPL, Lesser General Public License
@cindex LGPL, Library General Public License
@cindex LGPL, GNU Library General Public License
@cindex LGPL, Lesser General Public License
@cindex LGPL, GNU Lesser General Public License
@center Version 2.1, February 1999
......@@ -23,6 +23,12 @@ int heap_rnext(HP_INFO *info, byte *record)
byte *pos;
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rnext");
if (!(info->s->records))
{
my_errno=HA_ERR_END_OF_FILE;
DBUG_RETURN(my_errno);
}
if (info->lastinx < 0)
DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);
......
......@@ -730,6 +730,7 @@ start_master()
--server-id=1 \
--basedir=$MY_BASEDIR \
--port=$MASTER_MYPORT \
--local-infile \
--exit-info=256 \
--core \
--datadir=$MASTER_MYDDIR \
......@@ -749,6 +750,7 @@ start_master()
--server-id=1 --rpl-recovery-rank=1 \
--basedir=$MY_BASEDIR --init-rpl-role=master \
--port=$MASTER_MYPORT \
--local-infile \
--datadir=$MASTER_MYDDIR \
--pid-file=$MASTER_MYPID \
--socket=$MASTER_MYSOCK \
......
......@@ -20,6 +20,12 @@ a b
select found_rows();
FOUND_ROWS()
8
select SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS * from t1 limit 1;
a b
1 2
select found_rows();
FOUND_ROWS()
8
select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1;
a b
8 9
......
......@@ -9,6 +9,8 @@ select SQL_CALC_FOUND_ROWS * from t1;
select found_rows();
select SQL_CALC_FOUND_ROWS * from t1 limit 1;
select found_rows();
select SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS * from t1 limit 1;
select found_rows();
select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1;
select found_rows();
select SQL_CALC_FOUND_ROWS distinct b from t1 limit 1;
......
......@@ -4,7 +4,7 @@ use Getopt::Long;
use POSIX qw(strftime);
$|=1;
$VER="2.2";
$VER="2.3";
$opt_config_file = undef();
$opt_example = 0;
......@@ -183,7 +183,7 @@ sub report_mysqlds
sub start_mysqlds()
{
my (@groups, $com, $i, @options, $j);
my (@groups, $com, $tmp, $i, @options, $j);
if (!$opt_no_log)
{
......@@ -202,11 +202,20 @@ sub start_mysqlds()
@options = `$com`;
chop @options;
$com = "$mysqld";
for ($j = 0; defined($options[$j]); $j++)
$com= "$mysqld";
for ($j = 0, $tmp= ""; defined($options[$j]); $j++)
{
$com.= " $options[$j]";
if ("--mysqld=" eq substr($options[$j], 0, 9))
{
$options[$j]=~ s/\-\-mysqld\=//;
$com= $options[$j];
}
else
{
$tmp.= " $options[$j]";
}
}
$com.= $tmp;
$com.= " >> $opt_log 2>&1" if (!$opt_no_log);
$com.= " &";
system($com);
......@@ -595,6 +604,11 @@ Options:
to this option also. The options are passed to mysqld. Just
make sure you have mysqld in your PATH or fix mysqld_safe.
Using: $mysqld
Please note: Since mysqld_multi version 2.3 you can also
give this option in groups [mysqld#]! This will be
recognized as a special option and will not be passed
to the mysqld. This will allow one to start different
mysqld versions with mysqld_multi.
--no-log Print to stdout instead of the log file. By default the log
file is turned on.
--password=... Password for user for mysqladmin.
......
......@@ -187,7 +187,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
TABLE *tmp_table;
int error, tmp_error;
bool need_tmp,hidden_group_fields;
bool simple_order,simple_group,no_order, skip_sort_order;
bool simple_order,simple_group,no_order, skip_sort_order, buffer_result;
Item::cond_result cond_value;
SQL_SELECT *select;
DYNAMIC_ARRAY keyuse;
......@@ -201,6 +201,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
/* Check that all tables, fields, conds and order are ok */
select_distinct=test(select_options & SELECT_DISTINCT);
buffer_result=test(select_options & OPTION_BUFFER_RESULT) && !test(select_options & OPTION_FOUND_ROWS);
tmp_table=0;
select=0;
no_order=skip_sort_order=0;
......@@ -546,8 +547,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
need_tmp= (join.const_tables != join.tables &&
((select_distinct || !simple_order || !simple_group) ||
(group && order) ||
test(select_options & OPTION_BUFFER_RESULT)));
(group && order) || buffer_result));
// No cache for MATCH
make_join_readinfo(&join,
......
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