Loading Docs/manual.texi +41 −10 Original line number Diff line number Diff line Loading @@ -19017,7 +19017,7 @@ in MySQL < 4.0.2 whether index is @code{FULLTEXT} or not. Note that as the @code{Cardinality} is counted based on statistics stored as integers, it's not necessarily accurate for small tables. The @code{Null} and @code{Index_type} column was added in MySQL 4.0.2. The @code{Null} and @code{Index_type} columns were added in MySQL 4.0.2. @node SHOW TABLE STATUS, SHOW STATUS, SHOW DATABASE INFO, SHOW @subsubsection @code{SHOW TABLE STATUS} Loading Loading @@ -29836,6 +29836,32 @@ mysql> select 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL; -> 1 1 0 @end example @cindex ODBC compatibility @cindex compatibility, with ODBC To be able to work good with other programs, MySQL supports the following extra features when using @code{IS NULL}: @itemize @bullet @item You can find the last inserted row with: @example SELECT * FROM tbl_name WHERE auto_col IS NULL @end example This can be disabled by setting @code{SQL_AUTO_IS_NULL=0}. @xref{SET OPTION}. @item For @code{NOT NULL} @code{DATE} and @code{DATETIME} columns you can find the special date @code{0000-00-00} by using: @example SELECT * FROM tbl_name WHERE date_column IS NULL @end example This is needed to get some ODBC applications to work (as ODBC doesn't support a @code{0000-00-00} date) @end itemize @findex BETWEEN ... AND @item expr BETWEEN min AND max If @code{expr} is greater than or equal to @code{min} and @code{expr} is Loading Loading @@ -32000,7 +32026,7 @@ mysql> select CAST(1 AS UNSIGNED) -2.0 If you are using a string in an arithmetic operation, this is converted to a floating point number. The @code{CAST()} and @code{CONVERT()} function was added in MySQL 4.0.2. The @code{CAST()} and @code{CONVERT()} functions were added in MySQL 4.0.2. The handing of unsigned values was changed in MySQL 4.0 to be able to support @code{BIGINT} values properly. If you have some code that you Loading Loading @@ -48385,6 +48411,11 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Fixed a bug where @code{SQL_CALC_ROWS} returned a wrong value when used with one table and @code{ORDER BY} and with InnoDB tables. @item Fixed that @code{SELECT 0 LIMIT 0} doesn't hang thread. @item Fixed some problems with @code{USE KEYS} / @code{IGNORE KEYS} when using many keys with the same start column. @item Loading @@ -48393,7 +48424,7 @@ an index that covers the whole row. @item Optimized InnoDB sort-buffer handling to take less memory. @item Fixed bug in multi-table-delete and InnoDB tables. Fixed bug in multi table @code{DELETE} and InnoDB tables. @item Fixed problem with @code{TRUNCATE} and InnoDB that gave the error @code{Can't execute the given command because you have active locked Loading @@ -48414,24 +48445,24 @@ repair tables with @code{nan} in float or double columns. Fixed new bug in @code{myisamchk} where it didn't correctly update number of ``parts'' in the MyISAM index file. @item Changed to use autoconf 2.52 (from Autconf 2.13). Changed to use @code{autoconf} 2.52 (from @code{autoconf} 2.13). @item Fixed optimization problem where a MySQL was a long time in a ``preparing'' state when selecting from an empty table which had contained Fixed optimization problem where the MySQL Server was in ``preparing'' state for a long time when selecting from an empty table which had contained a lot of rows. @item Fixed bug in complicated join with @code{const} tables. This fix also improves performance a bit when referring to another table from a @code{const} table. @item First pre-version of multi table updates. First pre-version of multi table @code{UPDATE}s. @item Fixed bug in multi table delete. Fixed bug in multi table @code{DELETE}. @item Fixed bug in @code{SELECT CONCAT(argument-list) ... GROUP BY 1}. @item @code{SELECT ... INSERT} did a full rollback in case of an error. Fixed so that we only roll back the last statement. @code{INSERT ... SELECT} did a full rollback in case of an error. Fixed so that we only roll back the last statement in the current transaction. @item Fixed bug with empty expression for boolean fulltext search. @item client/mysqltest.c +39 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG, Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG, Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER, Q_WAIT_FOR_SLAVE_TO_STOP, Q_REQUIRE_VERSION, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Q_COMMENT_WITH_COMMAND Loading Loading @@ -228,6 +229,7 @@ const char *command_names[] = { "enable_result_log", "disable_result_log", "server_start", "server_stop", "require_manager", "wait_for_slave_to_stop", "require_version", 0 }; Loading Loading @@ -748,6 +750,42 @@ int do_server_op(struct st_query* q,const char* op) } #endif int do_require_version(struct st_query* q) { MYSQL* mysql = &cur_con->mysql; MYSQL_RES* res; MYSQL_ROW row; char* p=q->first_argument, *ver_arg; uint ver_arg_len,ver_len; LINT_INIT(res); if (!*p) die("Missing version argument in require_version\n"); ver_arg = p; while (*p && !isspace(*p)) p++; *p = 0; ver_arg_len = p - ver_arg; if (mysql_query(mysql, "select version()") || !(res=mysql_store_result(mysql))) die("Query failed while check server version: %s", mysql_error(mysql)); if (!(row=mysql_fetch_row(res)) || !row[0]) { mysql_free_result(res); die("Strange result from query while checking version"); } ver_len = strlen(row[0]); if (ver_len < ver_arg_len || memcmp(row[0],ver_arg,ver_arg_len)) { mysql_free_result(res); abort_not_supported_test(); } mysql_free_result(res); return 0; } int do_source(struct st_query* q) { char* p=q->first_argument, *name; Loading Loading @@ -2379,6 +2417,7 @@ int main(int argc, char** argv) case Q_DISABLE_RESULT_LOG: disable_result_log=1; break; case Q_SOURCE: do_source(q); break; case Q_SLEEP: do_sleep(q); break; case Q_REQUIRE_VERSION: do_require_version(q); break; case Q_WAIT_FOR_SLAVE_TO_STOP: do_wait_for_slave_to_stop(q); break; case Q_REQUIRE_MANAGER: do_require_manager(q); break; #ifndef EMBEDDED_LIBRARY Loading configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ AC_DEFINE(SPRINTF_RETURNS_INT) AC_MSG_RESULT("int"), # option, cache_name, variable, # code to execute if yes, code to exectute if fal # code to execute if yes, code to exectute if fail AC_DEFUN(AC_SYS_COMPILER_FLAG, [ AC_MSG_CHECKING($1) Loading include/my_getopt.h +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ struct my_option longlong sub_size; /* Subtract this from given value */ long block_size; /* Value should be a mult. of this */ int app_type; /* To be used by an application */ my_bool opt_is_var; /* If true, the option is a variable */ }; extern int handle_options (int *argc, char ***argv, Loading @@ -50,3 +49,5 @@ extern int handle_options (int *argc, char ***argv, my_bool (*get_one_option)(int, const struct my_option *, char *)); extern void my_print_help(const struct my_option *options); extern void my_print_variables(const struct my_option *options); myisam/myisamchk.c +269 −113 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
Docs/manual.texi +41 −10 Original line number Diff line number Diff line Loading @@ -19017,7 +19017,7 @@ in MySQL < 4.0.2 whether index is @code{FULLTEXT} or not. Note that as the @code{Cardinality} is counted based on statistics stored as integers, it's not necessarily accurate for small tables. The @code{Null} and @code{Index_type} column was added in MySQL 4.0.2. The @code{Null} and @code{Index_type} columns were added in MySQL 4.0.2. @node SHOW TABLE STATUS, SHOW STATUS, SHOW DATABASE INFO, SHOW @subsubsection @code{SHOW TABLE STATUS} Loading Loading @@ -29836,6 +29836,32 @@ mysql> select 1 IS NOT NULL, 0 IS NOT NULL, NULL IS NOT NULL; -> 1 1 0 @end example @cindex ODBC compatibility @cindex compatibility, with ODBC To be able to work good with other programs, MySQL supports the following extra features when using @code{IS NULL}: @itemize @bullet @item You can find the last inserted row with: @example SELECT * FROM tbl_name WHERE auto_col IS NULL @end example This can be disabled by setting @code{SQL_AUTO_IS_NULL=0}. @xref{SET OPTION}. @item For @code{NOT NULL} @code{DATE} and @code{DATETIME} columns you can find the special date @code{0000-00-00} by using: @example SELECT * FROM tbl_name WHERE date_column IS NULL @end example This is needed to get some ODBC applications to work (as ODBC doesn't support a @code{0000-00-00} date) @end itemize @findex BETWEEN ... AND @item expr BETWEEN min AND max If @code{expr} is greater than or equal to @code{min} and @code{expr} is Loading Loading @@ -32000,7 +32026,7 @@ mysql> select CAST(1 AS UNSIGNED) -2.0 If you are using a string in an arithmetic operation, this is converted to a floating point number. The @code{CAST()} and @code{CONVERT()} function was added in MySQL 4.0.2. The @code{CAST()} and @code{CONVERT()} functions were added in MySQL 4.0.2. The handing of unsigned values was changed in MySQL 4.0 to be able to support @code{BIGINT} values properly. If you have some code that you Loading Loading @@ -48385,6 +48411,11 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item Fixed a bug where @code{SQL_CALC_ROWS} returned a wrong value when used with one table and @code{ORDER BY} and with InnoDB tables. @item Fixed that @code{SELECT 0 LIMIT 0} doesn't hang thread. @item Fixed some problems with @code{USE KEYS} / @code{IGNORE KEYS} when using many keys with the same start column. @item Loading @@ -48393,7 +48424,7 @@ an index that covers the whole row. @item Optimized InnoDB sort-buffer handling to take less memory. @item Fixed bug in multi-table-delete and InnoDB tables. Fixed bug in multi table @code{DELETE} and InnoDB tables. @item Fixed problem with @code{TRUNCATE} and InnoDB that gave the error @code{Can't execute the given command because you have active locked Loading @@ -48414,24 +48445,24 @@ repair tables with @code{nan} in float or double columns. Fixed new bug in @code{myisamchk} where it didn't correctly update number of ``parts'' in the MyISAM index file. @item Changed to use autoconf 2.52 (from Autconf 2.13). Changed to use @code{autoconf} 2.52 (from @code{autoconf} 2.13). @item Fixed optimization problem where a MySQL was a long time in a ``preparing'' state when selecting from an empty table which had contained Fixed optimization problem where the MySQL Server was in ``preparing'' state for a long time when selecting from an empty table which had contained a lot of rows. @item Fixed bug in complicated join with @code{const} tables. This fix also improves performance a bit when referring to another table from a @code{const} table. @item First pre-version of multi table updates. First pre-version of multi table @code{UPDATE}s. @item Fixed bug in multi table delete. Fixed bug in multi table @code{DELETE}. @item Fixed bug in @code{SELECT CONCAT(argument-list) ... GROUP BY 1}. @item @code{SELECT ... INSERT} did a full rollback in case of an error. Fixed so that we only roll back the last statement. @code{INSERT ... SELECT} did a full rollback in case of an error. Fixed so that we only roll back the last statement in the current transaction. @item Fixed bug with empty expression for boolean fulltext search. @item
client/mysqltest.c +39 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,7 @@ Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG, Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG, Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER, Q_WAIT_FOR_SLAVE_TO_STOP, Q_REQUIRE_VERSION, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ Q_COMMENT_WITH_COMMAND Loading Loading @@ -228,6 +229,7 @@ const char *command_names[] = { "enable_result_log", "disable_result_log", "server_start", "server_stop", "require_manager", "wait_for_slave_to_stop", "require_version", 0 }; Loading Loading @@ -748,6 +750,42 @@ int do_server_op(struct st_query* q,const char* op) } #endif int do_require_version(struct st_query* q) { MYSQL* mysql = &cur_con->mysql; MYSQL_RES* res; MYSQL_ROW row; char* p=q->first_argument, *ver_arg; uint ver_arg_len,ver_len; LINT_INIT(res); if (!*p) die("Missing version argument in require_version\n"); ver_arg = p; while (*p && !isspace(*p)) p++; *p = 0; ver_arg_len = p - ver_arg; if (mysql_query(mysql, "select version()") || !(res=mysql_store_result(mysql))) die("Query failed while check server version: %s", mysql_error(mysql)); if (!(row=mysql_fetch_row(res)) || !row[0]) { mysql_free_result(res); die("Strange result from query while checking version"); } ver_len = strlen(row[0]); if (ver_len < ver_arg_len || memcmp(row[0],ver_arg,ver_arg_len)) { mysql_free_result(res); abort_not_supported_test(); } mysql_free_result(res); return 0; } int do_source(struct st_query* q) { char* p=q->first_argument, *name; Loading Loading @@ -2379,6 +2417,7 @@ int main(int argc, char** argv) case Q_DISABLE_RESULT_LOG: disable_result_log=1; break; case Q_SOURCE: do_source(q); break; case Q_SLEEP: do_sleep(q); break; case Q_REQUIRE_VERSION: do_require_version(q); break; case Q_WAIT_FOR_SLAVE_TO_STOP: do_wait_for_slave_to_stop(q); break; case Q_REQUIRE_MANAGER: do_require_manager(q); break; #ifndef EMBEDDED_LIBRARY Loading
configure.in +1 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ AC_DEFINE(SPRINTF_RETURNS_INT) AC_MSG_RESULT("int"), # option, cache_name, variable, # code to execute if yes, code to exectute if fal # code to execute if yes, code to exectute if fail AC_DEFUN(AC_SYS_COMPILER_FLAG, [ AC_MSG_CHECKING($1) Loading
include/my_getopt.h +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,6 @@ struct my_option longlong sub_size; /* Subtract this from given value */ long block_size; /* Value should be a mult. of this */ int app_type; /* To be used by an application */ my_bool opt_is_var; /* If true, the option is a variable */ }; extern int handle_options (int *argc, char ***argv, Loading @@ -50,3 +49,5 @@ extern int handle_options (int *argc, char ***argv, my_bool (*get_one_option)(int, const struct my_option *, char *)); extern void my_print_help(const struct my_option *options); extern void my_print_variables(const struct my_option *options);
myisam/myisamchk.c +269 −113 File changed.Preview size limit exceeded, changes collapsed. Show changes