diff options
author | unknown <monty@tramp.mysql.fi> | 2000-09-26 00:33:25 +0300 |
---|---|---|
committer | unknown <monty@tramp.mysql.fi> | 2000-09-26 00:33:25 +0300 |
commit | 7fe58c4f5bea627bb38bfbcb0cc5885e3f6129c6 (patch) | |
tree | 047c90e932cb7b90a58fe795b855351027725c29 /sql/sql_load.cc | |
parent | 5f12486229fb578f2e170238ab2cdd7c9bf42a82 (diff) | |
download | mariadb-git-7fe58c4f5bea627bb38bfbcb0cc5885e3f6129c6.tar.gz |
RIGHT JOIN, part of automatic repair of MyISAM tables, backup on repair,
reading from FIFO, fixes for FULLTEXT, @@IDENTITY
Docs/manual.texi:
Update of RIGHT JOIN
client/mysql.cc:
Faster HTML generation
extra/perror.c:
Added MyISAM error messages
include/my_base.h:
Update for automatic repair of MyISAM tables
include/my_sys.h:
Backup files and FIFO
include/myisam.h:
Automatic repair and backup files
include/mysqld_error.h:
New error message
myisam/mi_check.c:
Update for automatic repair of MyISAM tables
myisam/mi_locking.c:
Fixed comment
myisam/mi_open.c:
Update for automatic repair of MyISAM tables
myisam/myisamchk.c:
Update for automatic repair of MyISAM tables
myisam/myisamdef.h:
Update for automatic repair of MyISAM tables
mysys/mf_getdate.c:
Added new parameter option for backup files
mysys/my_open.c:
Added debug information
mysys/my_redel.c:
Backup file handling
sql/ha_berkeley.cc:
Updated interface
sql/ha_berkeley.h:
Updated interface
sql/ha_heap.cc:
Updated interface
sql/ha_heap.h:
Updated interface
sql/ha_isam.cc:
Updated interface
sql/ha_isam.h:
Updated interface
sql/ha_isammrg.cc:
Updated interface
sql/ha_isammrg.h:
Updated interface
sql/ha_myisam.cc:
Update for automatic repair of MyISAM tables
sql/ha_myisam.h:
Updated interface
sql/ha_myisammrg.cc:
Updated interface
sql/ha_myisammrg.h:
Updated interface
sql/handler.h:
Updated interface
sql/item.h:
Added @@identity
sql/item_func.cc:
Added @@identity
sql/lex.h:
Added RIGHT JOIN
sql/mf_iocache.cc:
Update for reading from FIFO
sql/mysqld.cc:
Update for automatic repair of MyISAM tables
sql/share/czech/errmsg.sys:
Added @@identity
sql/share/czech/errmsg.txt:
Added @@identity
sql/share/danish/errmsg.sys:
Added @@identity
sql/share/danish/errmsg.txt:
Added @@identity
sql/share/dutch/errmsg.sys:
Added @@identity
sql/share/dutch/errmsg.txt:
Added @@identity
sql/share/english/errmsg.sys:
Added @@identity
sql/share/english/errmsg.txt:
Added @@identity
sql/share/estonian/errmsg.sys:
Added @@identity
sql/share/estonian/errmsg.txt:
Added @@identity
sql/share/french/errmsg.sys:
Added @@identity
sql/share/french/errmsg.txt:
Added @@identity
sql/share/german/errmsg.sys:
Added @@identity
sql/share/german/errmsg.txt:
Added @@identity
sql/share/greek/errmsg.sys:
Added @@identity
sql/share/greek/errmsg.txt:
Added @@identity
sql/share/hungarian/errmsg.sys:
Added @@identity
sql/share/hungarian/errmsg.txt:
Added @@identity
sql/share/italian/errmsg.sys:
Added @@identity
sql/share/italian/errmsg.txt:
Added @@identity
sql/share/japanese/errmsg.sys:
Added @@identity
sql/share/japanese/errmsg.txt:
Added @@identity
sql/share/korean/errmsg.sys:
Added @@identity
sql/share/korean/errmsg.txt:
Added @@identity
sql/share/norwegian-ny/errmsg.txt:
Added @@identity
sql/share/norwegian/errmsg.txt:
Added @@identity
sql/share/polish/errmsg.sys:
Added @@identity
sql/share/polish/errmsg.txt:
Added @@identity
sql/share/portuguese/errmsg.sys:
Added @@identity
sql/share/portuguese/errmsg.txt:
Added @@identity
sql/share/romanian/errmsg.txt:
Added @@identity
sql/share/russian/errmsg.sys:
Added @@identity
sql/share/russian/errmsg.txt:
Added @@identity
sql/share/slovak/errmsg.sys:
Added @@identity
sql/share/slovak/errmsg.txt:
Added @@identity
sql/share/spanish/errmsg.sys:
Added @@identity
sql/share/spanish/errmsg.txt:
Added @@identity
sql/share/swedish/errmsg.OLD:
Added @@identity
sql/share/swedish/errmsg.sys:
Added @@identity
sql/share/swedish/errmsg.txt:
Added @@identity
sql/sql_base.cc:
Fix for RIGHT JOIN
sql/sql_db.cc:
Update for automatic repair of MyISAM tables
sql/sql_load.cc:
Added reading from FIFO
sql/sql_parse.cc:
Fix for RIGHT JOIN
sql/sql_select.cc:
Fix for RIGHT JOIN
sql/sql_table.cc:
cleanup
sql/sql_yacc.yy:
Added RIGHT JOIN
sql/table.cc:
Fix handling of FULLTEXT index
sql/table.h:
Added RIGHT JOIN
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index ef64b5e3bfa..633855a18fa 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -42,7 +42,7 @@ public: READ_INFO(File file,uint tot_length, String &field_term,String &line_start,String &line_term, - String &enclosed,int escape,bool get_it_from_net); + String &enclosed,int escape,bool get_it_from_net, bool is_fifo); ~READ_INFO(); int read_field(); int read_fixed_length(void); @@ -70,6 +70,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, uint save_skip_lines = ex->skip_lines; String *field_term=ex->field_term,*escaped=ex->escaped, *enclosed=ex->enclosed; + bool is_fifo=0; DBUG_ENTER("mysql_load"); if (escaped->length() > 1 || enclosed->length() > 1) @@ -161,22 +162,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, DBUG_RETURN(-1); // the file must be: - if (!( - (stat_info.st_mode & S_IROTH) == S_IROTH - && // readable by others - (stat_info.st_mode & S_IFLNK) != S_IFLNK - && // and not a symlink - ((stat_info.st_mode & S_IFREG) == S_IFREG - || - (stat_info.st_mode & S_IFIFO) == S_IFIFO - ) - // and either regular or a pipe - ) - ) + if (!((stat_info.st_mode & S_IROTH) == S_IROTH && // readable by others + (stat_info.st_mode & S_IFLNK) != S_IFLNK && // and not a symlink + ((stat_info.st_mode & S_IFREG) == S_IFREG || + (stat_info.st_mode & S_IFIFO) == S_IFIFO))) { my_error(ER_TEXTFILE_NOT_READABLE,MYF(0),name); DBUG_RETURN(-1); } + if ((stat_info.st_mode & S_IFIFO) == S_IFIFO) + is_fifo = 1; #endif } if ((file=my_open(name,O_RDONLY,MYF(MY_WME))) < 0) @@ -190,7 +185,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, READ_INFO read_info(file,tot_length,*field_term, *ex->line_start, *ex->line_term, *enclosed, - info.escape_char,read_file_from_client); + info.escape_char, read_file_from_client, is_fifo); if (read_info.error) { if (file >= 0) @@ -423,7 +418,8 @@ READ_INFO::unescape(char chr) READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term, String &line_start, String &line_term, - String &enclosed_par, int escape, bool get_it_from_net) + String &enclosed_par, int escape, bool get_it_from_net, + bool is_fifo) :file(file_par),escape_char(escape) { field_term_ptr=(char*) field_term.ptr(); @@ -467,7 +463,8 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term, { end_of_buff=buffer+buff_length; if (init_io_cache(&cache,(get_it_from_net) ? -1 : file, 0, - (get_it_from_net) ? READ_NET : READ_CACHE,0L,1, + (get_it_from_net) ? READ_NET : + (is_fifo ? READ_FIFO : READ_CACHE),0L,1, MYF(MY_WME))) { my_free((gptr) buffer,MYF(0)); /* purecov: inspected */ |