diff options
author | serg@serg.mysql.com <> | 2001-10-23 11:20:01 +0200 |
---|---|---|
committer | serg@serg.mysql.com <> | 2001-10-23 11:20:01 +0200 |
commit | cab9ea3462c440f203ab190ad31b0455f8fb0347 (patch) | |
tree | fba4b9c9b1268d8b0cc99f5faea0594efeedaa76 | |
parent | ed2a54193a5ec7611d6f39ac3642136e6f510e74 (diff) | |
parent | 565fe1805b5746a845888bd61033b064f7b1286f (diff) | |
download | mariadb-git-cab9ea3462c440f203ab190ad31b0455f8fb0347.tar.gz |
merged
30 files changed, 62 insertions, 39 deletions
diff --git a/include/mysqld_error.h b/include/mysqld_error.h index a4e7066d483..5ac14c1155b 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -222,4 +222,5 @@ #define ER_CANT_UPDATE_WITH_READLOCK 1219 #define ER_MIXING_NOT_ALLOWED 1220 #define ER_DUP_ARGUMENT 1221 -#define ER_ERROR_MESSAGES 222 +#define ER_TABLE_CANT_HANDLE_FULLTEXT 1222 +#define ER_ERROR_MESSAGES 223 diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h index cc193aba485..561e06229fa 100644 --- a/sql/ha_berkeley.h +++ b/sql/ha_berkeley.h @@ -90,7 +90,7 @@ class ha_berkeley: public handler HA_REC_NOT_IN_SEQ | HA_KEYPOS_TO_RNDPOS | HA_READ_ORDER | HA_LASTKEY_ORDER | HA_LONGLONG_KEYS | HA_NULL_KEY | HA_HAVE_KEY_READ_ONLY | - HA_BLOB_KEY | HA_NOT_EXACT_COUNT | + HA_BLOB_KEY | HA_NOT_EXACT_COUNT | HA_NO_FULLTEXT_KEY | HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE | HA_AUTO_PART_KEY), changed_rows(0),last_dup_key((uint) -1),version(0),using_ignore(0) diff --git a/sql/ha_heap.h b/sql/ha_heap.h index 1a6e8d9393c..6b7e9c6c626 100644 --- a/sql/ha_heap.h +++ b/sql/ha_heap.h @@ -33,9 +33,9 @@ class ha_heap: public handler const char *table_type() const { return "HEAP"; } const char **bas_ext() const; ulong option_flag() const - { return (HA_READ_RND_SAME | HA_NO_INDEX | HA_ONLY_WHOLE_INDEX | + { return (HA_READ_RND_SAME | HA_NO_INDEX | HA_ONLY_WHOLE_INDEX | HA_WRONG_ASCII_ORDER | HA_KEYPOS_TO_RNDPOS | HA_NO_BLOBS | - HA_REC_NOT_IN_SEQ); } + HA_REC_NOT_IN_SEQ | HA_NO_FULLTEXT_KEY); } uint max_record_length() const { return HA_MAX_REC_LENGTH; } uint max_keys() const { return MAX_KEY; } uint max_key_parts() const { return MAX_REF_PARTS; } diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index 3b0144a4fca..404b20edbac 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -79,7 +79,7 @@ class ha_innobase: public handler HA_KEYPOS_TO_RNDPOS | HA_LASTKEY_ORDER | HA_HAVE_KEY_READ_ONLY | HA_READ_NOT_EXACT_KEY | HA_LONGLONG_KEYS | HA_NULL_KEY | - HA_NOT_EXACT_COUNT | + HA_NOT_EXACT_COUNT | HA_NO_FULLTEXT_KEY | HA_NO_WRITE_DELAYED | HA_PRIMARY_KEY_IN_READ_INDEX | HA_DROP_BEFORE_CREATE | diff --git a/sql/ha_isam.h b/sql/ha_isam.h index b255e8ba87f..5e01edcf889 100644 --- a/sql/ha_isam.h +++ b/sql/ha_isam.h @@ -30,11 +30,11 @@ class ha_isam: public handler public: ha_isam(TABLE *table): handler(table), file(0), - int_option_flag(HA_READ_NEXT+HA_READ_PREV+HA_READ_RND_SAME+ - HA_KEYPOS_TO_RNDPOS+ HA_READ_ORDER+ HA_LASTKEY_ORDER+ - HA_HAVE_KEY_READ_ONLY+HA_READ_NOT_EXACT_KEY+ - HA_LONGLONG_KEYS+HA_KEY_READ_WRONG_STR + HA_DUPP_POS + - HA_NOT_DELETE_WITH_CACHE) + int_option_flag(HA_READ_NEXT | HA_READ_PREV | HA_READ_RND_SAME | + HA_KEYPOS_TO_RNDPOS | HA_READ_ORDER | HA_LASTKEY_ORDER | + HA_HAVE_KEY_READ_ONLY | HA_READ_NOT_EXACT_KEY | + HA_LONGLONG_KEYS | HA_KEY_READ_WRONG_STR | HA_DUPP_POS | + HA_NOT_DELETE_WITH_CACHE | HA_NO_FULLTEXT_KEY) {} ~ha_isam() {} const char *table_type() const { return "ISAM"; } diff --git a/sql/ha_isammrg.h b/sql/ha_isammrg.h index edced83d85d..c8eb7dd9f69 100644 --- a/sql/ha_isammrg.h +++ b/sql/ha_isammrg.h @@ -32,7 +32,8 @@ class ha_isammrg: public handler ~ha_isammrg() {} const char *table_type() const { return "MRG_ISAM"; } const char **bas_ext() const; - ulong option_flag() const { return HA_READ_RND_SAME+HA_KEYPOS_TO_RNDPOS+HA_REC_NOT_IN_SEQ;} + ulong option_flag() const { return HA_READ_RND_SAME | HA_KEYPOS_TO_RNDPOS + | HA_REC_NOT_IN_SEQ | HA_NO_FULLTEXT_KEY;} uint max_record_length() const { return HA_MAX_REC_LENGTH; } uint max_keys() const { return 0; } uint max_key_parts() const { return 0; } diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index 089d9ca5107..b97baa0703c 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -33,11 +33,11 @@ class ha_myisammrg: public handler const char *table_type() const { return "MRG_MyISAM"; } const char **bas_ext() const; ulong option_flag() const - { return (HA_REC_NOT_IN_SEQ | HA_READ_NEXT | - HA_READ_PREV | HA_READ_RND_SAME | - HA_HAVE_KEY_READ_ONLY | - HA_KEYPOS_TO_RNDPOS | HA_READ_ORDER | - HA_LASTKEY_ORDER | HA_READ_NOT_EXACT_KEY | + { return (HA_REC_NOT_IN_SEQ | HA_READ_NEXT | + HA_READ_PREV | HA_READ_RND_SAME | + HA_HAVE_KEY_READ_ONLY | HA_NO_FULLTEXT_KEY | + HA_KEYPOS_TO_RNDPOS | HA_READ_ORDER | + HA_LASTKEY_ORDER | HA_READ_NOT_EXACT_KEY | HA_LONGLONG_KEYS | HA_NULL_KEY | HA_BLOB_KEY); } uint max_record_length() const { return HA_MAX_REC_LENGTH; } uint max_keys() const { return MI_MAX_KEY; } diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 8d9fda437a5..bd941e9368e 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -232,3 +232,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 81d44de6a87..d4db2409d45 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -226,3 +226,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 68e20deb257..cd37e9c9937 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -229,3 +229,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 5d057c30a0e..e8ca6fa5f57 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 3f9d15c2e4d..c46234a987f 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -227,3 +227,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 7d9c6202c5f..a88e4dc0f1e 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 14bd0f8a042..a0aa5804959 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -226,3 +226,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"Der verwendete Tabellentyp unterstЭtzt keine FULLTEXT-Indexe", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index ab1103a56b4..62c9fb1b010 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 33d51cb0e60..c170ae172ff 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -225,3 +225,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 127a33bbb28..131d4a5e25c 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index e345f462f2a..ba355c03e13 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -225,3 +225,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index dd1d92adf64..39176b1fa13 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index bbdf23e4056..d491c138acf 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -225,3 +225,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 6139b1bb700..84e146a78c2 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -225,3 +225,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 39ff72acba1..2eb601c1673 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -227,3 +227,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index a522e792750..c0154648b5e 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -223,3 +223,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 0177ff942a0..f50009f3ad2 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -227,3 +227,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index c6b5c324cad..7d6ac176906 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -208,21 +208,22 @@ "Не получилось инициализировать структуру master info, проверте persmissions на файле master.info", "Не могу создать процесс SLAVE, проверьте системные ресурсы", "User %-.64s has already more than 'max_user_connections' active connections", -"You may only use constant expressions with SET", +"В SET могут использоваться только константные выражения", "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", -"Wrong arguments to %s", -"%-.32s@%-.64s is not allowed to create new users", -"Incorrect table definition; All MERGE tables must be in the same database", +"Неверный аргумент для %s", +"%-.32s@%-.64s не имеет права создавать пользователей", +"Неверное определение таблицы; Все таблицы в MERGE должнв быть из одной базы", "Deadlock found when trying to get lock; Try restarting transaction", "Error connecting to master: %-.128s", "Error running query on master: %-.128s", -"Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", -"The used SELECT statements have a different number of columns", +"Ошибка во время выполнения %s: %-.128s", +"Неверное использование %s и %s", +"Использованные SELECT'ы имеюь разное количество столбцов", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"Таблица данного типа не может иметь FULLTEXT индекса", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 26ca2881212..d01e2db7165 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -231,3 +231,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 8bbf04c9a3d..6e2b238b91a 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -224,3 +224,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index b4303de8619..ee504036d8a 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -223,3 +223,4 @@ "Kan inte utfЖra kommandot emedan du har ett READ lЕs", "Blandning av transaktionella och icke-transaktionella tabeller Дr inaktiverat", "Option '%s' anvДndes tvЕ gЕnger", +"The used table type doesn't support FULLTEXT indexes", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 80c2bcc06fb..2bd3d656ed3 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -228,3 +228,4 @@ "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", +"Використаний тип таблиц╕ не п╕дтриму╓ FULLTEXT ╕ндекс╕в", diff --git a/sql/sql_table.cc b/sql/sql_table.cc index d76c6bbd627..9b718bb9179 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -424,6 +424,15 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, key_info->key_parts=(uint8) key->columns.elements; key_info->key_part=key_part_info; + if (key->type == Key::FULLTEXT) + { + if (file->option_flag() & HA_NO_FULLTEXT_KEY) + { + my_error(ER_TABLE_CANT_HANDLE_FULLTEXT, MYF(0)); + DBUG_RETURN(-1); + } + } + List_iterator<key_part_spec> cols(key->columns); for (uint column_nr=0 ; (column=cols++) ; column_nr++) { @@ -439,13 +448,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, column->field_name); DBUG_RETURN(-1); } - if (key->type == Key::FULLTEXT && - (file->option_flag() & HA_NO_FULLTEXT_KEY)) - { - my_printf_error(ER_WRONG_KEY_COLUMN, ER(ER_WRONG_KEY_COLUMN), MYF(0), - column->field_name); - DBUG_RETURN(-1); - } + if (key->type == Key::FULLTEXT) + column->length=1; /* ft-code ignores it anyway :-) */ if (f_is_blob(sql_field->pack_flag)) { if (!(file->option_flag() & HA_BLOB_KEY)) @@ -456,15 +460,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, } if (!column->length) { - if (key->type == Key::FULLTEXT) - column->length=1; /* ft-code ignores it anyway :-) */ - else - { - my_printf_error(ER_BLOB_KEY_WITHOUT_LENGTH, - ER(ER_BLOB_KEY_WITHOUT_LENGTH),MYF(0), - column->field_name); - DBUG_RETURN(-1); - } + my_printf_error(ER_BLOB_KEY_WITHOUT_LENGTH, + ER(ER_BLOB_KEY_WITHOUT_LENGTH),MYF(0), + column->field_name); + DBUG_RETURN(-1); } } if (!(sql_field->flags & NOT_NULL_FLAG)) |