Commit graph

83 commits

Author SHA1 Message Date
msvensson@pilot.blaudden
0b5c41acc7 Bug#25807 LOAD DATA INFILE does not work with Pipes
- Additional fix for io_cache_init being called on a closed file
2007-02-20 12:06:04 +01:00
cmiller@zippy.cornsilk.net
9e9dd4327c Bug#25807: LOAD DATA INFILE does not work with Pipes
Showstopper and regression against 5.0.24.

Previously, we ignored seek() errors (see Bug#22828) and let seek()s
against pipes fail.  Now, since we check that a seek didn't fail,
and return without reading, this bug popped up.

This restores the behavior for file-ish objects that could never be 
seek()ed.
2007-02-13 16:35:29 -05:00
thek@kpdesk.mysql.com
36fc42cb10 Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2007-01-11 15:23:34 +01:00
thek@kpdesk.mysql.com
965aa4c74f Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2007-01-11 15:21:06 +01:00
thek@kpdesk.mysql.com
75d91dedac Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.0-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
2007-01-11 15:16:33 +01:00
thek@kpdesk.mysql.com
1802d5aabb Merge kpettersson@bk-internal:/home/bk/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
2007-01-11 14:11:58 +01:00
thek@kpdesk.mysql.com
f7688d5f10 Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2007-01-11 14:08:12 +01:00
thek@kpdesk.mysql.com
0982a1d9b4 Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.0-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
2007-01-11 14:04:01 +01:00
Kristofer.Pettersson@naruto.
d9ad0cd0ba Merge naruto.:C:/cpp/bug24751/my50-bug24751
into  naruto.:C:/cpp/mysql-5.0-maint
2007-01-11 13:09:13 +01:00
Kristofer.Pettersson@naruto.
3adcf75e1d Merge naruto.:C:/cpp/bug24751/my41-bug24751
into  naruto.:C:/cpp/bug24751/my50-bug24751
2007-01-11 09:41:44 +01:00
Kristofer.Pettersson@naruto.
270752654e Bug#24751 - Possible infinit loop in init_io_cache() when insufficient memory
- When cache memory can't be allocated size is recaclulated using 3/4 of
  the requested memory. This number is rounded up to the nearest 
  min_cache step. 
  However with the previous implementation the new cache size might
  become bigger than requested because of this rounding and thus we get
  an infinit loop.
- This patch fixes this problem by ensuring that the new cache size
  always will be smaller on the second and subsequent iterations until
  we reach min_cache.
2007-01-11 09:40:17 +01:00
thek@kpdesk.mysql.com
0906993457 Cset exclude: thek@kpdesk.mysql.com|ChangeSet|20061106104152|07628 2007-01-09 12:28:46 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
thek@kpdesk.mysql.com
689a32385a Bug#23010 _my_b_read() passing illegal file handles to my_seek()
- The io cache flag seek_not_done was not set properly in the 
  reinit_io_cache function call and this led my_seek to be called
  desipite an invalid file handle.
- Added a test in reinit_io_cache to ensure we have a valid file 
  handle before setting seek_not_done flag.
2006-11-06 11:41:52 +01:00
cmiller@zippy.cornsilk.net
e235c8c421 Fix merge collision. 2006-11-02 18:27:52 -05:00
cmiller@zippy.cornsilk.net
c34f3219b3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-11-02 17:27:42 -05:00
thek@kpdesk.mysql.com
35b833eb86 Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.1-maint
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
2006-11-01 17:01:51 +01:00
thek@kpdesk.mysql.com
12d8f2bf31 Bug#22828 _my_b_read() ignores return values for my_seek() calls
- Because my_seek actually is capable of returning an error code we should
  exploit that in the best possible way.
- There might be kernel errors or other errors we can't predict and capturing
  the return value of all system calls gives us better understanding of
  possible errors.
2006-10-31 09:26:16 +01:00
tsmith/tim@siva.hindu.god
3af2089b13 Merge siva.hindu.god:/usr/home/tim/m/bk/g50
into  siva.hindu.god:/usr/home/tim/m/bk/50
2006-10-24 14:42:08 -06:00
Kristofer.Pettersson@naruto.
3b316569a7 Bug#23010 _my_b_read() passing illegal file handles to my_seek()
- The io cache flag seek_not_done was not set properly in the reinit_
io_chache function call and this led my_seek to be called despite an
invalid file handle.
- Added a test in reinit_io_cache to ensure we have a valid file handle
before setting seek_not_done flag.
2006-10-09 21:13:37 +02:00
istruewing@chilla.local
c299de14ee Merge chilla.local:/home/mydev/mysql-4.1-bug8283-one
into  chilla.local:/home/mydev/mysql-5.0-bug8283
2006-10-09 20:03:12 +02:00
istruewing@chilla.local
5f08a83186 Bug#8283 - OPTIMIZE TABLE causes data loss
OPTIMIZE TABLE with myisam_repair_threads > 1 performs a non-quick 
parallel repair. This means that it does not only rebuild all 
indexes, but also the data file.

Non-quick parallel repair works so that there is one thread per 
index. The first of the threads rebuilds also the new data file.

The problem was that all threads shared the read io cache on the
old data file. If there were holes (deleted records) in the table,
the first thread skipped them, writing only contiguous, non-deleted
records to the new data file. Then it built the new index so that
its entries pointed to the correct record positions. But the other
threads didn't know the new record positions, but put the positions
from the old data file into the index.

The new design is so that there is a shared io cache which is filled
by the first thread (the data file writer) with the new contiguous
records and read by the other threads. Now they know the new record
positions.

Another problem was that for the parallel repair of compressed
tables a common bit_buff and rec_buff was used. I changed it so
that thread specific buffers are used for parallel repair.

A similar problem existed for checksum calculation. I made this
multi-thread safe too.
2006-10-09 19:26:55 +02:00
ingo@mysql.com
c0fab8b7b2 Merge mysql.com:/home/mydev/mysql-4.1-bug11527
into  mysql.com:/home/mydev/mysql-5.0-bug11527
2006-02-16 19:51:09 +01:00
ingo@mysql.com
718ae78972 Bug#11527 - Setting myisam_repair_threads to >1 leads to corruption
A wrong cast led to numeric overflow for data files
greater than 4GB. The parallel repair assumed end of
file after reading the amount of data that the file
was bigger than 4GB. It truncated the data file and
noted the number of records it found so far in the
index file header as the number of rows in the table.
Removing the cast fixed the problem.
I added some cosmetic changes too.

The normal repair worked because it uses a different
function to read from the data file.
2006-02-16 19:45:57 +01:00
jani@a193-229-222-105.elisa-laajakaista.fi
acf218b708 Several fixes revelaled by Intel compiler. 2005-09-23 16:47:08 +03:00
georg@lmy002.wdf.sap.corp
b64e6db5a4 fixes for windows 64-bit compiler warnings 2005-06-13 12:41:15 +02:00
jimw@mysql.com
a33a283a49 Fix change to allow FIFO as log. (Bug #8271) 2005-05-19 14:43:10 -07:00
jimw@mysql.com
165f2abba5 Avoid doing a seek when first setting up the IO cache for a file,
which allows a FIFO to be used for the non-binary logs. (Bug #8271)
2005-05-13 07:18:41 -07:00
jani@ua141d10.elisa.omakaista.fi
8db4423b8c Fixed Bug#8922.
Reverted Jim's patch.
2005-03-08 18:12:12 +02:00
jimw@mysql.com
d22a4e70f9 Clean up merge 2005-03-07 13:26:27 -08:00
jimw@mysql.com
2ca5cec8c2 Avoid calls to my_seek() and my_tell() on log files so that
non-seekable files like FIFOs can be used for logs other
than the binlog. (Bug #8271)
2005-03-02 18:14:58 -08:00
monty@mysql.com
0a1076a25f Merge with 4.1 2005-01-15 14:09:45 +02:00
monty@mysql.com
a37e91e435 Changed interface for my_strntod() to make it more general and more portable 2005-01-15 12:28:38 +02:00
monty@mysql.com
7681e62422 Merge 2005-01-15 03:49:07 +02:00
monty@mysql.com
6d280ac161 Fixed possible access to unintialized memory in filesort when using many buffers 2005-01-15 03:47:06 +02:00
monty@mysql.com
309d691e65 Changed %lx -> 0x%lx (for easier comparison of debug files)
Cosmetic cleanups
Don't call 'delete_elements' on copy_funcs as this causes elements to be freed twice
2004-08-23 13:46:51 +03:00
konstantin@mysql.com
f08bbd1f12 assert.h needed for my_dbug.h now is included in my_dbug.h, where it for
some reason wasn't included before.
A lot of files cleaned up from #include <assert.h>
2004-06-10 23:58:39 +04:00
paul@kite-hub.kitebird.com
2f0ca1ce42 Fix skipp -> skip once and for all.
(Note: This affects only comments, not variable names.)
2004-06-03 11:52:54 -05:00
dlenev@jabberwock.localdomain
a80f46bfdf WL#775 "Add status variable identifying binlog_cache_size shortage"
Added two status variables: 
  binlog_cache_use - counts number of transactions that used somehow
    transaction temporary binary log.
  binlog_cache_disk_use - counts number of transactions that required
    disk I/O for storing info in this this binary log.
2004-04-02 00:47:20 +04:00
monty@mysql.com
e0e0314d60 Merge with 4.0 2004-03-25 23:29:45 +02:00
serg@serg.mylan
d8a9a8267b shared IO_CACHE: protection against remove_io_share in a wrong time
bug#3134
2004-03-25 11:22:01 +01:00
monty@mysql.com
350b433569 merge with 4.0 2004-03-16 22:41:30 +02:00
monty@mysql.com
4ee44751d9 Fixed memory leak in DROP DATABASE when using RAID tables (Bug #2882) 2004-03-10 13:46:11 +02:00
ram@gw.mysql.r18.ru
f231d9826b just tried to find all 'skipp' and replace it with 'skip'. 2004-02-02 20:25:39 +04:00
jani@rhols221.adsl.netsonic.fi
1cc08ed699 Fixed Bug#2123, mysqld segmentation faulted when it tried to
open a file that already existed. The problem was that end_io_cache()
was called even if init_io_cache() was not. This affected both
OUTFILE and DUMPFILE (both fixed). Sometimes wrongly aligned pointer was freed,
sometimes mysqld core dumped.

Other problem was that select_dump::send_error removed the dumpfile,
even if it was created by an earlier run, or by some other program, if
the file permissions just permitted it. Fixed it so that the file will
only be deleted, if an error occurred, but the file was created by mysqld
just a moment ago, in that thread.

On the other hand, select_export did not handle the corresponding garbage
file at all. Both fixed.

After these fixes, a big part of the select_export::prepare and select_dump::prepare
code became identical. Merged the code into a new function called create_file(),
which is now called by the two latter functions.

Regards,
Jani
2004-01-15 06:48:31 +02:00
monty@mysql.com
d08945498e Fixed memory leak with RAID tables
Fixed tests for RAID tables
Detect uninitialized mutexes on lock and destroy
2003-11-21 14:41:57 +02:00
guilhem@mysql.com
6e32e19047 Use my_b_append instead of my_b_write on a SEQ_READ_APPEND cache, when we write
the first 4 bytes of the relay log. Indeed comments in mysys/mf_iocache.c 
say we must always use my_b_append for such a cache.
This *could* avoid a very rare assertion failure which is: 
030524 19:32:38  Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay log '/
users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000001' position: 4
030524 19:32:38  next log '/users/gbichot/4.1.1/mysql-test/var/log/slave-relay-bin.000002' is currently active
mysqld: mf_iocache.c:701: _my_b_seq_read: Assertion `pos_in_file == info->end_of_file' failed.
and which seemed to happen always when the SQL thread and/or the I/O thread
were at position 4 in a relay log.
2003-08-19 17:00:36 +02:00
serg@serg.mysql.com
585185d7b8 do not "trust number of broadcasts" in shared IO_CACHE 2003-01-26 12:57:20 +01:00
serg@serg.mysql.com
f29224c6fe fixed bug in parallel repair 2003-01-26 12:27:29 +01:00