Commit graph

128 commits

Author SHA1 Message Date
V Narayanan
af2e74f8cb Bug#39616: Missing quotes from .CSV crashes server
When a CSV file contained comma separated elements 
that were not enclosed in quotes, it was causing the
mysql server to crash.
      
The old algorithm that parsed the content of a row in
mysql 5.0 was assuming that the values of the fields
in a .CSV file will be enclosed in quotes and will be
separated by commas.

This was causing the old algorithm to fail when the 
content of the file resembled the following
3,"sans quotes"
The CSV engine that is part of mysql 5.0 was expecting
the above to be
"3","sans quotes"
      
The above is just one example of where the engine was
failing for what would be recognized as a valid .CSV 
file content otherwise.
      
The proposed fix changes the old algorithm being used
to parse rows from the .CSV file to handle two separate
cases

1) When the current field of the row is enclosed in quotes
2) When the current field of the row is not enclosed in 
   quotes
2008-11-18 11:31:03 +05:30
gkodinov/kgeorge@macbook.gmz
fd9993db87 fixed warnings from the fix of 26243 2008-03-29 17:50:46 +02:00
kaa@polly.(none)
6d1f3e8de5 Fix for bug #31207: Test "join_nested" shows different strategy on IA64
CPUs / Intel's ICC compile

The bug is a combination of two problems:

1. IA64/ICC MySQL binaries use glibc's qsort(), not the one in mysys.

2. The order relation implemented by join_tab_cmp() is not transitive,
i.e. it is possible to choose such a, b and c that (a < b) && (b < c)
but (c < a). This implies that result of a sort using the relation
implemented by join_tab_cmp() depends on the order in which
elements are compared, i.e. the result is implementation-specific. Since
choose_plan() uses qsort() to pre-sort the
join tables using join_tab_cmp() as a compare function, the results of
the sorting may vary depending on qsort() implementation.

It is neither possible nor important to implement a better ordering
algorithm in join_tab_cmp(). Therefore the only way to fix it is to
force our own qsort() to be used by renaming it to my_qsort(), so we don't depend
on linker to decide that.

This patch also "fixes" bug #20530: qsort redefinition violates the
standard.
2007-10-17 20:08:58 +04:00
bar@mysql.com/bar.myoffice.izhnet.ru
caf85332ba Bug#28862 Extended Latin1 characters get lost in CVS engine
Problem: Temporary buffer which is used for quoting and escaping
  was initialized to character set utf8, and thus didn't allow
  to store data in other character sets.
  Fix: changing character set of the buffer to be able to
  store any arbitrary sequence of bytes.
2007-06-15 11:19:35 +05:00
svoj@mysql.com/june.mysql.com
556de62f8d BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in
ARCHIVE table
ARCHIVE table was truncated by REPAIR TABLE ... USE_FRM statement.
The table handler returned its file name extensions in a wrong order.
REPAIR TABLE believed it has to use the meta file to create a new table
from it.

With the fixed order, REPAIR TABLE does now use the data file to create
a new table. So REPAIR TABLE ... USE_FRM works well with ARCHIVE engine
now.

This issue affects 5.0 only, since in 5.1 ARCHIVE engine stores meta
information and data in the same file.
2007-03-30 13:00:21 +05:00
istruewing@chilla.local
b444566412 After merge fix 2007-02-03 09:26:11 +01:00
istruewing@chilla.local
77e99fe2ce Merge chilla.local:/home/mydev/mysql-4.1-axmrg
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-02 23:05:46 +01:00
gluh@mysql.com/eagle.(none)
938de5eee4 another valgrind error fix for 4.1(backport from 5.0) 2007-02-02 17:18:42 +04:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
  Don't update the files from BitKeeper
Many files:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
Many files:
  Added GPL copyright text
Removed files:
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/xwf
2006-12-31 01:02:27 +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
stewart@willster.(none)
c1903d967a Merge willster.(none):/home/stewart/Documents/MySQL/4.1/bug19914-mk2
into  willster.(none):/home/stewart/Documents/MySQL/5.0/bug19914-mk2-merge
2006-10-16 17:39:38 +10:00
georg@lmy002.wdf.sap.corp
27636d9303 Additional files for cmake support 2006-08-31 19:52:42 +02:00
petr/cps@mysql.com/owlet
30ef47a93c Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
2006-08-18 16:48:32 +04:00
stewart@willster.(none)
9d2e6b8d23 BUG#19914 SELECT COUNT(*) sometimes returns MAX_INT on cluster tables
allow handler::info to return an error code (that will be returned to the user)
2006-08-10 22:55:20 +08:00
acurtis/antony@xiphis.org/ltantony.xiphis.org
a1936d28a6 Bug#15669
"Test case 'csv' produces incorrect result on OpenBSD"
  mmapped pages were not being invalidated when writes occurred to the
  file vi a fd i/o operation. 
  Force explicit invalidation and not rely on implicit invalidation.
2006-08-01 09:36:34 -07:00
petr/cps@mysql.com/owlet.
b176870cf6 Fix Bug#15205 "Select from CSV table without the datafile causes crash" 2006-07-11 15:54:52 +04:00
ramil@mysql.com
c583de95f8 Fix for bug #15558: truncate doesn't clear table on archive storage engine tables. 2006-05-18 17:10:58 +05:00
serg@serg.mylan
10df921c96 documenting HA_STATUS_xxx flags 2005-11-26 08:54:13 +01:00
serg@serg.mylan
e0abc22bfc BUG#13406 - incorrect amount of "records deleted" in CSV.
Fallback to row-wise delete if number or rows in the table is unknown
2005-11-17 22:52:31 +01:00
petr@mysql.com
0f373f9501 Merge mysql.com:/home/cps/mysql/trees/mysql-4.1
into  mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
2005-11-08 01:27:15 +03:00
petr@mysql.com
038b300753 Fix Bug#14672 Bug in deletion 2005-11-06 02:11:12 +03:00
petr@mysql.com
a1f56ea5a6 Fix Bug#13894 Server crashes on update of CSV table 2005-11-05 15:08:15 +03:00
brian@zim.(none)
2a42afd132 Final patch for 5.0 for simplifying storage engine code. We now have just one set of ifdefs. I may also remove the code for creating new handlers.
May changes were to simplify storage engine setup and support for legacy call to show storage engines.
2005-10-03 18:42:30 -07:00
brian@zim.(none)
0ba8ca2a17 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into  zim.(none):/home/brian/mysql/fix-5.0
2005-10-02 20:13:18 -07:00
brian@zim.(none)
54a958993c Next big patch for loadable storage engines!
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail.
2005-10-02 19:44:28 -07:00
eric@mysql.com
5008a5f208 Move handler specific options into handlerton flag check
BUG#13108
2005-09-30 16:26:48 -07:00
brian@zim.(none)
da101b3b5a Moving archive from example to sql. 2005-09-28 19:04:51 -07:00
serg@serg.mylan
40c43365c5 fixed a memory leak in ha_tina.cc 2005-09-22 16:05:05 +02:00
brian@zim.(none)
616c324436 Cleanup for handlerton structure to allow for loadable engine work. This is the first in a series of patches. 2005-09-19 12:06:23 -07:00
jimw@mysql.com
a60ed0b75d Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-09-12 17:00:50 -07:00
jimw@mysql.com
16e5f22162 Merge mysqldev@production.mysql.com:jimw/mysql-4.1-sco
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-09-12 10:19:56 -07:00
jimw@mysql.com
121678a72e When first creating the ARZ file for an archive table, use "wb" as the mode for
gzdopen() because the file itself was only opened for writing (and truncated),
and some libc implementations (like SCO) don't like to do a fdopen(..., "a") on
a fd that was not opened using O_APPEND.
2005-09-08 21:40:59 +02:00
brian@zim.(none)
d15e92dc98 Merge zim.(none):/home/brian/mysql/mysql-4.1
into  zim.(none):/home/brian/mysql/mysql-5.0
2005-09-07 10:43:22 -07:00
brian@zim.(none)
8a5c24536c Small tweak for random read performance (we shouldn't always tell the OS that we will be doing a linear scan). 2005-09-07 10:30:06 -07:00
msvensson@neptunus.(none)
211b78b6ee Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-01 09:05:45 +02:00
msvensson@neptunus.(none)
4b5ca92631 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2005-09-01 09:01:15 +02:00
jimw@mysql.com
d6db387aea Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-31 19:12:16 -07:00
jimw@mysql.com
c3f4ecb544 Merge mysql.com:/home/jimw/my/mysql-4.1-7156
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-08-31 18:34:16 -07:00
jimw@mysql.com
37bf8394ab Add test for madvise() being declared in C++ code, because it is not
on Solaris even though it is available, and declare it ourselves in
that case. (Bug #7156)
2005-08-31 10:08:55 -07:00
brian@zim.(none)
bd806f786e Fix for bad merge. 2005-08-30 11:04:23 -07:00
msvensson@neptunus.(none)
002eb51748 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug12527/my41-bug12527
2005-08-30 10:42:41 +02:00
msvensson@neptunus.(none)
bb54b30524 Merge neptunus.(none):/home/msvensson/mysql/bug12527/my41-bug12527
into  neptunus.(none):/home/msvensson/mysql/bug12527/my50-bug12527
2005-08-30 10:40:50 +02:00
brian@zim.(none)
b4208c569a Update for delete_all_rows() which will be used for TRUNCATE and DELETE support. 2005-08-29 15:26:05 -07:00
brian@zim.(none)
4e9931752e Added support for delete_all_rows() for archive. This fixes bug #12836. 2005-08-29 15:05:16 -07:00
msvensson@neptunus.(none)
5de2259263 Bug #12527 yassl causes errors in "repair" and "optimize"
- Use constant directly to check that enough number of bytes have been written as header of the archive.
2005-08-29 14:04:15 +02:00
joerg@mysql.com
fea0745ba8 Merge mysql.com:/M50/clone-5.0 into mysql.com:/M50/push-5.0 2005-08-25 11:46:17 +02:00
monty@mishka.local
f384e08277 Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0
2005-08-25 06:55:48 +03:00
kent@mysql.com
96dc373650 ha_tina.cc:
Some lack madvice()
2005-08-25 01:02:40 +02:00
kent@mysql.com
7933906325 mysqld.dsp:
Added archive and example storage engine to Windows build
ha_example.cc, ha_archive.cc:
  Windows fix, use relative include path to "mysql_priv.h"
ha_archive.h:
  Windows VC6 compile needed (char*) cast of byte var
mysqltest.dsp, mysql_test_run_new.dsp:
  Added /FD flag, to avoid include file warnings
2005-08-18 17:29:24 +02:00
konstantin@mysql.com
21957c423e Implement MySQL framework to support consistent read views in
cursors. This should fix Bug#11813 when InnoDB part is in 
(tested with a draft patch).
The idea of the patch is that if a storage engine supports
consistent read views, we open one when open a cursor,
set is as the active view when fetch from the cursor, and close
together with cursor close.
2005-07-20 20:02:36 +04:00