Commit graph

151 commits

Author SHA1 Message Date
Murthy Narkedimilli
d20a70fb55 Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
Murthy Narkedimilli
69d8812a61 Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Kent Boortz
79535de206 Updated/added copyright headers 2012-02-15 17:21:38 +01:00
Ashish Agarwal
8862a5b5e9 BUG#11748748 - 37280: CHECK AND REPAIR TABLE REPORT TABLE
CORRUPTED WHEN RUN CONCURRENTLY WITH

ISSUE: Table corruption due to concurrent queries.
       Different threads running check, repair query
       along with insert. Locks not properly acquired
       in repair query. Rows are inserted inbetween
       repair query.

SOLUTION: Mutex lock is acquired before the
          repair call. Concurrent queries wont
          effect the call to repair.
2012-02-03 19:37:00 +05:30
Ashish Agarwal
75c08c7935 BUG#11751793 - 42784: ARCHIVE TABLES CAUSE 100% CPU USAGE
AND HANG IN SHOW TABLE STATUS.

ISSUE: Table corruption due to concurrent queries.
       Different threads running insert and check
       query leads to table corruption. Not properly locked,
       rows are inserted in between check query.

SOLUTION: In check query mutex lock is acquired
          for a longer time to handle concurrent
          insert and check query.

NOTE: Additionally we backported the fix for CHECKSUM
      issue(bug#11758979).
2011-11-23 18:33:29 +05:30
Kent Boortz
b6e6097c95 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Sergey Vojtovich
33a9d9fa65 BUG#12402794 - 60976: CRASH, VALGRIND WARNING AND MEMORY
LEAK WITH PARTITIONED ARCHIVE TABLES

CHECK TABLE against archive table, when file descriptors
are exhausted, caused server crash.

Archive didn't handle errors when opening data file for
CHECK TABLE.
2011-05-18 14:01:43 +04:00
Karen Langford
74afcca8f2 Merge from mysql-5.1.57-release 2011-05-06 10:03:02 +02:00
Luis Soares
ed6aae83c3 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Sergey Vojtovich
929d13ca49 BUG#11764339 - valgrind errors, random data when returning
ordered data from archive tables

Archive was using wrong memory address to check if field
is NULL (after filesort, when reading record again).
2011-03-03 11:43:07 +03:00
Davi Arnaut
4f59204b49 Bug#53445: Build with -Wall and fix warnings that it generates
Introduce a MySQL maintainer/developer mode that enables
a set of warning options for the C/C++ compiler. This mode
is intended to help improve the overall quality of the code.

The warning options are:

C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Werror"
CXX_WARNINGS="$C_WARNINGS -Wno-unused-parameter"

Since -Wall is essentially a moving target, autoconf checks
are not run with warning options enabled, in particualr -Werror.
This decision might be revisited in the future. The patch also
fixes a mistake in the makefiles, where automake CXXFLAGS would
be set to CFLAGS.
2010-07-09 08:37:51 -03:00
Davi Arnaut
bb036c93b4 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
2010-06-10 17:16:43 -03:00
Sergey Vojtovich
bb3f75bdbc BUG#46565 - repair of partition fail for archive engine
There was no way to repair corrupt ARCHIVE data file,
when unrecoverable data loss is inevitable.

With this fix REPAIR ... EXTENDED attempts to restore
as much rows as possible, ignoring unrecoverable data.

Normal REPAIR is still able to repair meta-data file
only.
2010-03-25 23:57:06 +04:00
Sergey Vojtovich
d605ba0306 BUG#48757 - missing .ARZ file causes server crash
Server crashes when accessing ARCHIVE table with missing
.ARZ file.

When opening a table, ARCHIVE didn't properly pass through
error code from lower level azopen() to higher level open()
method.
2010-02-12 16:33:03 +04:00
Davi Arnaut
cdcf2ae9f9 Apply patch on behalf of Magnus:
3325 Magnus Blåudd    2010-01-05
     Bug #49860 new compiler warning ha_archive
      - fix compiler warning by casting to ulong
2010-01-20 22:22:20 -02:00
Anurag Shekhar
3d682d3558 fix for pb2 failure after bug#47012 push. 2009-11-17 17:44:27 +05:30
Christopher Powers
edfd29ddf2 Merge 2009-11-11 11:01:16 -06:00
Anurag Shekhar
862c422c4c Bug #47012 archive tables are not upgradeable, and server crashes
on any access

Archive engine for 5.1 (and latter) version uses a modified 
version of zlib (azlib). These two version are incompatible
so a proper upgrade is needed before tables created in 5.0 
can be used reliable.

This upgrade can be performed using repair. But due to lack 
of test its risky to allow upgrade for now. This patch addresses
only the crashing issue. Any attempt to repair will be blocked.

Eventually repair can be allowed to run through (which will also
cause an upgrade from older version to newer) but only after a 
thorough testing.
2009-11-11 13:33:29 +05:30
Christopher Powers
9bb40dc10b Bug#47382 'mysqladmin debug' crash on 64-bit Windows
The crash occurs because SAFEMALLOC is defined for the MySQL server
but not for the Archive or Federated engines, resulting in a 
parameter mismatch between the function prototype and definition
for functions using the CALLER_INFO macro.
2009-11-10 13:41:43 -06:00
Staale Smedseng
8b9843408d Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Cleaning up warnings not present in 5.0.
2009-09-23 15:21:29 +02:00
Sergey Vojtovich
3e68a1c545 Local merge. 2009-09-10 11:58:13 +05:00
Sergey Vojtovich
f22baa9a1e BUG#29203 - archive tables have weird values in show table status
Archive engine returns wrong values for average record length
and max data length.

With this fix they're calculated as following:
- max data length is 2 ^ 63 where large files are supported
  and INT_MAX32 where this is not supported;
- average record length is data length / records in data file.
2009-09-09 14:42:12 +05:00
Sergey Vojtovich
8a9a633e4b BUG#46961 - archive engine loses rows during self joining select!
SELECT with join (not only self-join) from archive table may
return incomplete result set, when result set size exceeds
join buffer size.

The problem was that archive row counter was initialzed too
early, when ha_archive::info() method was called. Later,
when optimizer exceeds join buffer, it attempts to reuse
handler without calling ha_archive::info() again (which is
correct).

Fixed by moving row counter initialization from
ha_archive::info() to ha_archive::rnd_init().
2009-09-04 12:29:18 +05:00
Vladislav Vaintroub
31b79618e3 Backport WL#3653 to 5.1 to enable bundled innodb plugin.
Remove custom DLL loader code from innodb plugin code, use 
symbols exported from mysqld.
2009-06-10 10:59:49 +02:00
Anurag Shekhar
8c73cafc4c Bug #39802 On Windows, 32-bit time_t should be enforced
This patch fixes compilation warning, "conversion from 'time_t' to 'ulong', 
possible loss of data". 
The fix is to typecast time_t to ulong before assigning it to ulong. 
Backported this from 6.0-bugteam tree.
2009-05-13 15:41:24 +05:30
Sergey Glukhov
99369b1027 fixed archive test. It might be OOM error on boxes with low amount of memory.
It leads to crash because there is no OOM check in ha_archive::unpack_row().
The fix:
added OOM error check
2009-03-26 18:27:34 +04:00
Ignacio Galarza
22b919cc50 auto-merge 2009-03-19 09:59:10 -04:00
Satya B
bbd694a3b0 Fix for BUG#32880 - Repairing Archive table fails with internal error 144
Any statement reading corrupt archive data file
(CHECK/REPAIR/SELECT/UPDATE/DELETE) may cause assertion
failure in debug builds. This assertion has been removed
and an error is returned instead.

Also fixed that CHECK/REPAIR returns vague error message
when it mets corruption in archive data file. This is
fixed by returning proper error code.
2009-03-18 11:16:21 +05:30
Ignacio Galarza
2d9421c3bb Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
timothy.smith@sun.com
abd8574914 Merge from mysql-5.1.30-release 2008-11-27 00:02:10 +01:00
Build Team
d2c4816716 mysql-test/r/partition.result
mysql-test/t/partition.test
sql/ha_partition.cc
  Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
  Problem was usage of read_range_first with an empty key.
  Solution was to not to give a key if it was empty. (real author Mattias Jonsson)

storage/archive/archive_reader.c
client/mysqlslap.c
  Aligned the copyright texts output from "--version" of tools, to
  let internal tools be able to change them if needed.

storage/ndb/test/tools/connect.cpp
storage/ndb/test/run-test/atrt.hpp
  Corrected a few GPL headers not restricted to GPL version 2

Makefile.am
  Added missing --report-features to the 'test-bt-fast' target

support-files/mysql.spec.sh
  Reversed the removal of the "%define license GPL" in as internal
  tools depended on it
2008-11-25 03:04:58 +01:00
kent.boortz@sun.com
906e12124c Changes of copyright output from "--version" and similar.
Changes of copyright in RPM spec file.
2008-11-14 17:29:38 +01:00
Mattias Jonsson
2ae79e4fca Bug#37719: Crash if rename Archive table to same name with different
case and then select

Problem was that the archive share was using a case insensitive
charset when comparing table names

Solution was to use a case sensitive char set when the table
names are case sensitive
2008-10-03 20:08:40 +02:00
joerg@trift2.
e7e5311ce4 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2008-03-27 12:45:16 +01:00
antony@pcg5ppc.xiphis.org
820068f1b7 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
2008-03-07 13:46:29 -08:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
2ebdd5ea2f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  chorlton.adsl.perkin.org.uk:/Users/jonathan/mysql/bk/build/5.1
2008-03-06 15:13:14 +00:00
iggy@alf.(none)
a54f3995ec Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  alf.(none):/src/mysql-5.1-build_31929
2008-02-21 19:53:37 -05:00
iggy@alf.(none)
18aba8a82c Bug#31929 Windows build fails with >=4 Parallel build threads.
- Add GenError Dependency to storage engines that include 
mysqld_error.h
2008-01-29 21:58:57 -05:00
svoj@june.mysql.com
fba9513cfc Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26978/mysql-5.1-engines
2008-01-29 11:23:07 +04:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
e286ac998c Use pkglibdir to simplify pkgplugindir, and fix the path in a
couple of Makefiles.  Continuation of the fix for bug#31736.
2008-01-02 13:00:46 +00:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
f988a7e600 Add new pkgplugindir handling to seperate plugins from libraries,
and allow override for binary distributions.  Extend mysql_config
to print compiled-in plugin location for third-party plugins to
use.  Resolves bug#31736.
2007-12-19 13:24:43 +00:00
gluh@eagle.(none)
4f5868114a Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-12-13 15:56:04 +04:00
svoj@mysql.com/june.mysql.com
62fb86207a BUG#26978 - s->z_err not assigned a value?
azio didn't handle situation when my_read() returns error.

Added handling of situation when my_read() returns error.

No test case for this fix.
2007-12-12 17:16:59 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
dc01dba255 Bug #32247 Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table).
ha_partition::update_create_info() just calls update_create_info
of a first partition, so only get the autoincrement maximum
of the first partition, so SHOW CREATE TABLE can show
small AUTO_INCREMENT parameters.
Fixed by implementing ha_partition::update_create_info() in a way
other handlers work.
HA_ARCHIVE:stats.auto_increment handling made consistent with other engines
2007-12-06 16:39:42 +04:00
svoj@mysql.com/june.mysql.com
876f49710e BUG#31833 - ORDER BY leads to wrong result when ARCHIVE, BLOB and
table cache is full

After reading last record from freshly opened archive table
(e.g. after flush table, or if there is no room in table cache),
the table is reported as crashed.

The problem was that azio wrongly invalidated azio_stream when it
meets EOF.
2007-11-23 17:51:12 +04:00
gshchepa/uchum@gleb.loc
3cc449465c ha_archive.cc:
Post-merge fix.
2007-10-28 02:33:18 +05:00
gshchepa/uchum@gleb.loc
c6429f7990 Merge gleb.loc:/home/uchum/work/bk/PA/5.1-opt-31036-v
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-10-28 01:27:47 +05:00
gshchepa/uchum@gleb.loc
5eb3b270d3 Fixed bug #31036: Using order by with archive table crashes server.
1. Memory overrun have been fixed.
2. Server failure on assertion has been fixed.
2007-10-26 21:26:06 +05:00
kent/mysqldev@mysql.com/production.mysql.com
76c99a074c azio.c, azlib.h:
Don't use typedef 'voidpc' as later addition and not needed
2007-09-07 13:27:52 +02:00