mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix when using --without-server --with-thread-safe-client
Added prototype for my_thread_end New error message for MATCH Give error when using myisamchk --force --readonly BitKeeper/deleted/.del-fulltext_join.test~e347c8f04405c916: Delete: mysql-test/t/fulltext_join.test Docs/manual.texi: Added node to fulltext configure.in: Fix when using --without-server --with-thread-safe-client include/mysql_com.h: Added prototype for my_thread_end include/mysqld_error.h: New error message for MATCH myisam/myisamchk.c: Give error when using --force --readonly mysql-test/t/fulltext.test: Added test for error conditons with fulltext sql/item_func.cc: Fixed error messages when using MATCH ... AGAINST sql/mysqld.cc: Portability fix sql/share/czech/errmsg.txt: New error message when using MATCH sql/share/danish/errmsg.txt: New error message when using MATCH sql/share/dutch/errmsg.txt: New error message when using MATCH sql/share/english/errmsg.txt: New error message when using MATCH sql/share/estonian/errmsg.txt: New error message when using MATCH sql/share/french/errmsg.txt: New error message when using MATCH sql/share/german/errmsg.txt: New error message when using MATCH sql/share/greek/errmsg.txt: New error message when using MATCH sql/share/hungarian/errmsg.txt: New error message when using MATCH sql/share/italian/errmsg.txt: New error message when using MATCH sql/share/japanese/errmsg.txt: New error message when using MATCH sql/share/korean/errmsg.txt: New error message when using MATCH sql/share/norwegian-ny/errmsg.txt: New error message when using MATCH sql/share/norwegian/errmsg.txt: New error message when using MATCH sql/share/polish/errmsg.txt: New error message when using MATCH sql/share/portuguese/errmsg.txt: New error message when using MATCH sql/share/romanian/errmsg.txt: New error message when using MATCH sql/share/russian/errmsg.txt: New error message when using MATCH sql/share/slovak/errmsg.txt: New error message when using MATCH sql/share/spanish/errmsg.txt: New error message when using MATCH sql/share/swedish/errmsg.OLD: New error message when using MATCH sql/share/swedish/errmsg.txt: New error message when using MATCH
This commit is contained in:
@ -21610,6 +21610,15 @@ mysql> select * from bar;
|
||||
For each row in table @code{foo}, a row is inserted in @code{bar} with
|
||||
the values from @code{foo} and default values for the new columns.
|
||||
|
||||
@code{CREATE TABLE ... SELECT} will not automaticly create any indexes
|
||||
for you. This is done intentionally to make the command as flexible as
|
||||
possible. If you want to have indexes in the created table, you should
|
||||
specify these before the @code{SELECT} statement:
|
||||
|
||||
@example
|
||||
mysql> create table bar (unique (n)) select n from foo;
|
||||
@end example
|
||||
|
||||
If any errors occur while copying the data to the table, it will
|
||||
automatically be deleted.
|
||||
|
||||
@ -29928,12 +29937,23 @@ the Internet with a search engine. It is with this reasoning that such rows
|
||||
have been assigned a low semantical value in @strong{this particular dataset}.
|
||||
|
||||
@menu
|
||||
* Fulltext restrictions::
|
||||
* Fulltext Fine-tuning::
|
||||
* Fulltext Features to Appear in MySQL 4.0::
|
||||
* Fulltext TODO::
|
||||
@end menu
|
||||
|
||||
@node Fulltext Fine-tuning, Fulltext Features to Appear in MySQL 4.0, Fulltext Search, Fulltext Search
|
||||
@node Fulltext restrictions, Fulltext Fine-tuning, Fulltext Search, Fulltext Search
|
||||
@section Fulltext restrictions
|
||||
@itemize @bullet
|
||||
@item
|
||||
All parameters to the @code{MATCH} function must be columns from the
|
||||
same table that is part of the same fulltext index.
|
||||
@item
|
||||
The argument to @code{AGAINST} must be a constant string.
|
||||
@end itemize
|
||||
|
||||
@node Fulltext Fine-tuning, Fulltext Features to Appear in MySQL 4.0, Fulltext restrictions, Fulltext Search
|
||||
@section Fine-tuning MySQL Full-text Search
|
||||
|
||||
Unfortunately, full-text search has no user-tunable parameters yet,
|
||||
@ -29990,7 +30010,7 @@ implemented in the 4.0 tree. It explains
|
||||
@code{OPTIMIZE TABLE} with @code{FULLTEXT} indexes are now
|
||||
up to 100 times faster.
|
||||
|
||||
@item @code{MATCH ... AGAINST} now supports the following
|
||||
@item @code{MATCH ... AGAINST} is going to support the following
|
||||
@strong{boolean operators}:
|
||||
|
||||
@itemize @bullet
|
||||
|
11
configure.in
11
configure.in
@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(sql/mysqld.cc)
|
||||
AC_CANONICAL_SYSTEM
|
||||
# The Docs Makefile.am parses this line!
|
||||
AM_INIT_AUTOMAKE(mysql, 3.23.40)
|
||||
AM_INIT_AUTOMAKE(mysql, 3.23.41)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
PROTOCOL_VERSION=10
|
||||
@ -1946,9 +1946,13 @@ AC_SUBST(CLIENT_LIBS)
|
||||
AC_SUBST(sql_client_dirs)
|
||||
AC_SUBST(linked_client_targets)
|
||||
|
||||
if test "$with_server" = "yes"
|
||||
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
|
||||
then
|
||||
AC_DEFINE(THREAD)
|
||||
fi
|
||||
|
||||
if test "$with_server" = "yes"
|
||||
then
|
||||
# Avoid _PROGRAMS names
|
||||
THREAD_LPROGRAMS="test_thr_alarm test_thr_lock"
|
||||
AC_SUBST(THREAD_LPROGRAMS)
|
||||
@ -2044,7 +2048,10 @@ EOF
|
||||
|
||||
AC_DEFINE(HAVE_GEMINI_DB)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
|
||||
then
|
||||
if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
|
||||
then
|
||||
# MIT user level threads
|
||||
|
@ -227,6 +227,7 @@ void hash_password(unsigned long *result, const char *password);
|
||||
void my_init(void);
|
||||
void load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv);
|
||||
void my_thread_end(void);
|
||||
|
||||
#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
|
||||
|
||||
|
@ -210,4 +210,5 @@
|
||||
#define ER_READ_ONLY_TRANSACTION 1207
|
||||
#define ER_DROP_DB_WITH_READ_LOCK 1208
|
||||
#define ER_CREATE_DB_WITH_READ_LOCK 1209
|
||||
#define ER_ERROR_MESSAGES 210
|
||||
#define ER_WRONG_ARGUMENTS 1210
|
||||
#define ER_ERROR_MESSAGES 211
|
||||
|
@ -201,7 +201,7 @@ static struct option long_options[] =
|
||||
|
||||
static void print_version(void)
|
||||
{
|
||||
printf("%s Ver 1.48 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||
printf("%s Ver 1.49 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||
MACHINE_TYPE);
|
||||
}
|
||||
|
||||
@ -468,7 +468,7 @@ static void get_options(register int *argc,register char ***argv)
|
||||
if ((check_param.testflag & T_READONLY) &&
|
||||
(check_param.testflag &
|
||||
(T_REP_BY_SORT | T_REP | T_STATISTICS | T_AUTO_INC |
|
||||
T_SORT_RECORDS | T_SORT_INDEX)))
|
||||
T_SORT_RECORDS | T_SORT_INDEX | T_FORCE_CREATE)))
|
||||
{
|
||||
VOID(fprintf(stderr,
|
||||
"%s: Can't use --readonly when repairing or sorting\n",
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Test of fulltext index
|
||||
#
|
||||
|
||||
drop table if exists t1,t2;
|
||||
drop table if exists t1,t2,t3;
|
||||
|
||||
CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b));
|
||||
INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'),('Full-text indexes', 'are called collections'),('Only MyISAM tables','support collections'),('Function MATCH ... AGAINST()','is used to do a search'),('Full-text search in MySQL', 'implements vector space model');
|
||||
@ -61,4 +61,23 @@ select * from t2 where MATCH inhalt AGAINST (NULL);
|
||||
select * from t2 where MATCH inhalt AGAINST ('foobar');
|
||||
select * from t2 having MATCH inhalt AGAINST ('foobar');
|
||||
|
||||
drop table t1,t2;
|
||||
#
|
||||
# check of fulltext errors
|
||||
#
|
||||
|
||||
CREATE TABLE t3 (
|
||||
ticket int(11),
|
||||
inhalt text,
|
||||
KEY tig (ticket),
|
||||
fulltext index tix (inhalt)
|
||||
);
|
||||
|
||||
--error 1210
|
||||
select * from t2 having MATCH inhalt AGAINST (t1.id);
|
||||
--error 1210
|
||||
select * from t2 having MATCH ticket AGAINST ('foobar');
|
||||
--error 1210
|
||||
select * from t2,t3 having MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar');
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
|
@ -1,38 +0,0 @@
|
||||
DROP TABLE IF EXISTS stories;
|
||||
CREATE TABLE stories (
|
||||
sid char(16) NOT NULL,
|
||||
tid smallint UNSIGNED NOT NULL,
|
||||
uid mediumint UNSIGNED NOT NULL,
|
||||
title varchar(100) DEFAULT '' NOT NULL,
|
||||
dept varchar(100),
|
||||
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
||||
hits mediumint UNSIGNED DEFAULT '0' NOT NULL,
|
||||
section varchar(30) DEFAULT '' NOT NULL,
|
||||
displaystatus tinyint DEFAULT '0' NOT NULL,
|
||||
commentstatus tinyint,
|
||||
discussion mediumint UNSIGNED,
|
||||
submitter mediumint UNSIGNED NOT NULL,
|
||||
flags set("delete_me","data_dirty") DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (sid),
|
||||
FOREIGN KEY (uid) REFERENCES users(uid),
|
||||
FOREIGN KEY (tid) REFERENCES tid(topic),
|
||||
FOREIGN KEY (section) REFERENCES sections(section),
|
||||
KEY time (time),
|
||||
KEY searchform (displaystatus,time)
|
||||
) TYPE = myisam;
|
||||
DROP TABLE IF EXISTS story_text;
|
||||
CREATE TABLE story_text (
|
||||
sid char(16) NOT NULL,
|
||||
introtext text,
|
||||
bodytext text,
|
||||
relatedtext text,
|
||||
FOREIGN KEY (sid) REFERENCES stories(sid),
|
||||
PRIMARY KEY (sid)
|
||||
) TYPE = myisam;
|
||||
ALTER TABLE stories add fulltext (title);
|
||||
ALTER TABLE story_text add fulltext (introtext,bodytext);
|
||||
|
||||
SELECT stories.sid,title, TRUNCATE((MATCH (title,introtext,bodytext)
|
||||
AGAINST('install')), 1) as score FROM stories,story_text WHERE
|
||||
stories.sid = story_text.sid AND MATCH (title,introtext,bodytext)
|
||||
AGAINST ('install');
|
@ -1954,13 +1954,17 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
|
||||
maybe_null=1;
|
||||
join_key=0;
|
||||
|
||||
/* Why testing for const_item ? Monty */
|
||||
/* I'll remove it later, but this should include modifications to
|
||||
find_best and auto_close as complement to auto_init code above. SerG */
|
||||
/* I'd rather say now that const_item is assumed in quite a bit of
|
||||
places, so it would be difficult to remove. SerG */
|
||||
/* Serg:
|
||||
I'd rather say now that const_item is assumed in quite a bit of
|
||||
places, so it would be difficult to remove; If it would ever to be
|
||||
removed, this should include modifications to find_best and auto_close
|
||||
as complement to auto_init code above.
|
||||
*/
|
||||
if (Item_func::fix_fields(thd,tlist) || !const_item())
|
||||
{
|
||||
my_error(ER_WRONG_ARGUMENTS,MYF(0),"AGAINST");
|
||||
return 1;
|
||||
}
|
||||
|
||||
while ((item=li++))
|
||||
{
|
||||
@ -1969,12 +1973,18 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
|
||||
if (item->type() == Item::REF_ITEM)
|
||||
li.replace(item= *((Item_ref *)item)->ref);
|
||||
if (item->type() != Item::FIELD_ITEM || !item->used_tables())
|
||||
{
|
||||
my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH");
|
||||
return 1;
|
||||
}
|
||||
used_tables_cache|=item->used_tables();
|
||||
}
|
||||
/* check that all columns come from the same table */
|
||||
if (count_bits(used_tables_cache) != 1)
|
||||
{
|
||||
my_error(ER_WRONG_ARGUMENTS,MYF(0),"MATCH");
|
||||
return 1;
|
||||
}
|
||||
const_item_cache=0;
|
||||
table=((Item_field *)fields.head())->field->table;
|
||||
return 0;
|
||||
|
@ -1481,7 +1481,7 @@ static void open_log(MYSQL_LOG *log, const char *hostname,
|
||||
// get rid of extention if the log is binary to avoid problems
|
||||
if (type == LOG_BIN)
|
||||
{
|
||||
char* p = strrchr(opt_name, FN_EXTCHAR);
|
||||
char* p = strrchr((char*) opt_name, FN_EXTCHAR);
|
||||
if (p)
|
||||
*p = 0;
|
||||
}
|
||||
|
@ -220,3 +220,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -214,3 +214,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -215,3 +215,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -214,3 +214,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -213,3 +213,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -213,3 +213,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -213,3 +213,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -213,3 +213,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -215,3 +215,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Travamentos de atualiza<7A><61>o n<>o podem ser obtidos durante um READ UNCOMMITTED na transa<73><61>o",
|
||||
"DROP DATABASE n<>o permitido enquanto uma 'thread' est<73> assegurando um travamento global de leitura",
|
||||
"CREATE DATABASE n<>o permitido enquanto uma 'thread' est<73> assegurando um travamento global de leitura",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -215,3 +215,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -214,3 +214,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -219,3 +219,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -212,3 +212,4 @@
|
||||
"Bloqueos de actualizaci<63>n no pueden ser adqueridos durante una transici<63>n READ UNCOMMITTED",
|
||||
"DROP DATABASE no permitido mientras un thread est<73> ejerciendo un bloqueo de lectura global",
|
||||
"CREATE DATABASE no permitido mientras un thread est<73> ejerciendo un bloqueo de lectura global",
|
||||
"Wrong arguments to %s",
|
||||
|
@ -209,3 +209,7 @@
|
||||
"Lock wait timeout exceeded",
|
||||
"The total number of locks exceeds the lock table size",
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
#ER_WRONG_ARGUMENTS
|
||||
"Felaktiga argument till %s",
|
||||
|
@ -211,3 +211,4 @@
|
||||
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
|
||||
"DROP DATABASE not allowed while thread is holding global read lock",
|
||||
"CREATE DATABASE not allowed while thread is holding global read lock",
|
||||
"Felaktiga argument till %s",
|
||||
|
Reference in New Issue
Block a user