Loading Docs/manual.texi +37 −6 Original line number Diff line number Diff line Loading @@ -22747,6 +22747,10 @@ that can be used as one. You can only @code{SELECT}, @code{DELETE}, and @code{MERGE} table, you are only dropping the @code{MERGE} specification. Note that @code{DELETE FROM merge_table} used without a @code{WHERE} will only clear the mapping for the table, not delete everything in the mapped tables. (We plan to fix this in 4.0). With identical tables we mean that all tables are created with identical column information. You can't put a MERGE over tables where the columns are packed differently or doesn't have exactly the same columns. Loading Loading @@ -35114,6 +35118,17 @@ to the log file (by default named 'hostname.log'). This log can be very useful when you suspect an error in a client and want to know exactly what @code{mysqld} thought the client send to it. By default, the @code{mysql.server} script starts the @strong{MySQL} server with the @code{-l} option. If you need better performance when you start using @strong{MySQL} in a production environment, you can remove the @code{-l} option from @code{mysql.server} or change it to @code{--log-binary}. The entries in this log are written as @code{mysqld} receives the questions. This may be different than the order in which the statements is executed. This is in contrast to the update log and the binary log which is written after the query is executed, but before any locks are released. @cindex update log @cindex files, update log @node Update log, Binary log, Query log, Log files Loading Loading @@ -35149,17 +35164,15 @@ cp hostname-old.log to-backup-directory rm hostname-old.log @end example By default, the @code{mysql.server} script starts the @strong{MySQL} server with the @code{-l} option. If you need better performance when you start using @strong{MySQL} in a production environment, you can remove the @code{-l} option from @code{mysql.server} or change it to @code{--log-update}. Update logging is smart because it logs only statements that really update data. So an @code{UPDATE} or a @code{DELETE} with a @code{WHERE} that finds no rows is not written to the log. It even skips @code{UPDATE} statements that set a column to the value it already has. The update logging is done immediately after a query completes but before any locks are released or any commit is done. This ensures that the log will be logged in the execution order. If you want to update a database from update log files, you could do the following (assuming your update logs have names of the form @file{file_name.###}): Loading Loading @@ -35229,6 +35242,10 @@ this program! If you are using @code{BEGIN} or @code{SET AUTO_COMMIT=0}, you must use the @strong{MySQL} binary log for backups instead of the old update log. The binary logging is done immediately after a query completes but before any locks are released or any commit is done. This ensures that the log will be logged in the execution order. All updates (@code{UPDATE}, @code{DELETE} or @code{INSERT}) that changes a transactional table (like BDB tables) is cached until a @code{COMMIT}. Any updates to a not transactional table is stored in the binary log at Loading @@ -35250,6 +35267,10 @@ When started with the @code{--log-slow-queries[=file_name]} option, more than @code{long_query_time} to execute. The time to get the initial table locks are not counted as execution time. The slow query log is logged after the query is executed and after all locks has been released. This may be different than the order in which the statements is executed. If no file name is given, it defaults to the name of the host machine suffixed with @code{-slow.log}. If a filename is given, but doesn't contain a path, the file is written in the data directory. Loading Loading @@ -41421,6 +41442,12 @@ not yet 100 % confident in this code. @appendixsubsec Changes in release 3.23.34 @itemize @bullet @item @code{SHOW CREATE TABLE} now dumps the @code{UNION()} for @code{MERGE} tables. @item Fixed bug when replicating timestamps. @item Fixed bug in bi-directonal replication. @item Added the @code{INNOBASE} table handler and the @code{BDB} table handler to the @strong{MySQL} source distribution. @item Loading Loading @@ -46205,6 +46232,10 @@ For the moment @code{MATCH} only works with @code{SELECT} statements. When using @code{SET CHARACTER SET}, one can't use translated characters in database, table and column names. @item @code{DELETE FROM merge_table} used without a @code{WHERE} will only clear the mapping for the table, not delete everything in the mapped tables @item You cannot build in another directory when using MIT-pthreads. Because this requires changes to MIT-pthreads, we are not likely to fix this. myisam/myisamchk.c +1 −1 Original line number Diff line number Diff line Loading @@ -860,7 +860,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) filename)); if (check_param.testflag & (T_REP_BY_SORT | T_REP)) VOID(fprintf(stderr, "Try fixing it by using the --safe-recover (-o) option\n")); "Try fixing it by using the --safe-recover (-o) or the --force (-f) option\n")); } else if (!(param->error_printed & 2) && !(param->testflag & T_FORCE_CREATE)) Loading mysql-test/r/merge.result +6 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,12 @@ a 412 412 411 Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL default '0', `b` char(20) default NULL, KEY `a` (`a`) ) TYPE=MRG_MyISAM UNION=(t1,t2) c test1 test1 Loading scripts/safe_mysqld.sh +4 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,10 @@ then MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is DATADIR=$MY_BASEDIR_VERSION/data if test -z "defaults" then defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf" fi # Check if this is a 'moved install directory' elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \ -x ./libexec/mysqld Loading sql/ha_myisammrg.cc +17 −0 Original line number Diff line number Diff line Loading @@ -238,3 +238,20 @@ int ha_myisammrg::create(const char *name, register TABLE *form, DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16), (const char **) table_names, (my_bool) 0)); } void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; packet->append(" UNION=(",8); MYRG_TABLE *table,*first; for (first=table=file->open_tables ; table != file->end_table ; table++) { char *name=table->table->s->filename; fn_format(buff,name,"","",3); if (table != first) packet->append(','); packet->append(buff,(uint) strlen(buff)); } packet->append(')'); } Loading
Docs/manual.texi +37 −6 Original line number Diff line number Diff line Loading @@ -22747,6 +22747,10 @@ that can be used as one. You can only @code{SELECT}, @code{DELETE}, and @code{MERGE} table, you are only dropping the @code{MERGE} specification. Note that @code{DELETE FROM merge_table} used without a @code{WHERE} will only clear the mapping for the table, not delete everything in the mapped tables. (We plan to fix this in 4.0). With identical tables we mean that all tables are created with identical column information. You can't put a MERGE over tables where the columns are packed differently or doesn't have exactly the same columns. Loading Loading @@ -35114,6 +35118,17 @@ to the log file (by default named 'hostname.log'). This log can be very useful when you suspect an error in a client and want to know exactly what @code{mysqld} thought the client send to it. By default, the @code{mysql.server} script starts the @strong{MySQL} server with the @code{-l} option. If you need better performance when you start using @strong{MySQL} in a production environment, you can remove the @code{-l} option from @code{mysql.server} or change it to @code{--log-binary}. The entries in this log are written as @code{mysqld} receives the questions. This may be different than the order in which the statements is executed. This is in contrast to the update log and the binary log which is written after the query is executed, but before any locks are released. @cindex update log @cindex files, update log @node Update log, Binary log, Query log, Log files Loading Loading @@ -35149,17 +35164,15 @@ cp hostname-old.log to-backup-directory rm hostname-old.log @end example By default, the @code{mysql.server} script starts the @strong{MySQL} server with the @code{-l} option. If you need better performance when you start using @strong{MySQL} in a production environment, you can remove the @code{-l} option from @code{mysql.server} or change it to @code{--log-update}. Update logging is smart because it logs only statements that really update data. So an @code{UPDATE} or a @code{DELETE} with a @code{WHERE} that finds no rows is not written to the log. It even skips @code{UPDATE} statements that set a column to the value it already has. The update logging is done immediately after a query completes but before any locks are released or any commit is done. This ensures that the log will be logged in the execution order. If you want to update a database from update log files, you could do the following (assuming your update logs have names of the form @file{file_name.###}): Loading Loading @@ -35229,6 +35242,10 @@ this program! If you are using @code{BEGIN} or @code{SET AUTO_COMMIT=0}, you must use the @strong{MySQL} binary log for backups instead of the old update log. The binary logging is done immediately after a query completes but before any locks are released or any commit is done. This ensures that the log will be logged in the execution order. All updates (@code{UPDATE}, @code{DELETE} or @code{INSERT}) that changes a transactional table (like BDB tables) is cached until a @code{COMMIT}. Any updates to a not transactional table is stored in the binary log at Loading @@ -35250,6 +35267,10 @@ When started with the @code{--log-slow-queries[=file_name]} option, more than @code{long_query_time} to execute. The time to get the initial table locks are not counted as execution time. The slow query log is logged after the query is executed and after all locks has been released. This may be different than the order in which the statements is executed. If no file name is given, it defaults to the name of the host machine suffixed with @code{-slow.log}. If a filename is given, but doesn't contain a path, the file is written in the data directory. Loading Loading @@ -41421,6 +41442,12 @@ not yet 100 % confident in this code. @appendixsubsec Changes in release 3.23.34 @itemize @bullet @item @code{SHOW CREATE TABLE} now dumps the @code{UNION()} for @code{MERGE} tables. @item Fixed bug when replicating timestamps. @item Fixed bug in bi-directonal replication. @item Added the @code{INNOBASE} table handler and the @code{BDB} table handler to the @strong{MySQL} source distribution. @item Loading Loading @@ -46205,6 +46232,10 @@ For the moment @code{MATCH} only works with @code{SELECT} statements. When using @code{SET CHARACTER SET}, one can't use translated characters in database, table and column names. @item @code{DELETE FROM merge_table} used without a @code{WHERE} will only clear the mapping for the table, not delete everything in the mapped tables @item You cannot build in another directory when using MIT-pthreads. Because this requires changes to MIT-pthreads, we are not likely to fix this.
myisam/myisamchk.c +1 −1 Original line number Diff line number Diff line Loading @@ -860,7 +860,7 @@ static int myisamchk(MI_CHECK *param, my_string filename) filename)); if (check_param.testflag & (T_REP_BY_SORT | T_REP)) VOID(fprintf(stderr, "Try fixing it by using the --safe-recover (-o) option\n")); "Try fixing it by using the --safe-recover (-o) or the --force (-f) option\n")); } else if (!(param->error_printed & 2) && !(param->testflag & T_FORCE_CREATE)) Loading
mysql-test/r/merge.result +6 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,12 @@ a 412 412 411 Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL default '0', `b` char(20) default NULL, KEY `a` (`a`) ) TYPE=MRG_MyISAM UNION=(t1,t2) c test1 test1 Loading
scripts/safe_mysqld.sh +4 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,10 @@ then MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is DATADIR=$MY_BASEDIR_VERSION/data if test -z "defaults" then defaults="--defaults-extra-file=$MY_BASEDIR_VERSION/data/my.cnf" fi # Check if this is a 'moved install directory' elif test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a \ -x ./libexec/mysqld Loading
sql/ha_myisammrg.cc +17 −0 Original line number Diff line number Diff line Loading @@ -238,3 +238,20 @@ int ha_myisammrg::create(const char *name, register TABLE *form, DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16), (const char **) table_names, (my_bool) 0)); } void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; packet->append(" UNION=(",8); MYRG_TABLE *table,*first; for (first=table=file->open_tables ; table != file->end_table ; table++) { char *name=table->table->s->filename; fn_format(buff,name,"","",3); if (table != first) packet->append(','); packet->append(buff,(uint) strlen(buff)); } packet->append(')'); }