Commit graph

457 commits

Author SHA1 Message Date
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
unknown
255c04aed8 Compiler warning about assigned but not used variables fixed. 2011-10-18 13:44:12 +03:00
Jon Olav Hauglid
c01c37a7ef Bug#13030056 62533: UNITTEST/MYSYS/MY_ATOMIC-T.C DOES NOT
COMPILE ON MACOSX LION

The problem was that on optimized builds, the wrong code was generated
for my_atomic_add64 if a variable argument was optimized away as a
constant.

This patch fixes the problem by making the variable volatile.

Another workaround is to specify architecture explicitly using e.g.
CFLAGS/CXXFLAGS= "-m64".

No test case added.
2011-10-03 09:31:55 +02:00
Sergei Golubchik
3b31fbb5a9 portability fix: avoid anonymous structs and unions in C 2011-09-22 11:04:00 +02:00
Sergei Golubchik
2853f6bfbb unit test fixes for ctest 2011-07-16 09:09:01 +02:00
Davi Arnaut
71e0ff64f0 Bug#12727287: Maintainer mode compilation fails with gcc 4.6
GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled
by -Wall, that causes GCC to emit a warning whenever a local variable
is assigned to, but otherwise unused (aside from its declaration).

Since the maintainer mode uses -Wall and -Werror, source code which
triggers these warnings will be rejected. That is, these warnings
become hard errors.

The solution is to fix the code which triggers these specific warnings.
In most of the cases, this is a welcome cleanup as code which triggers
this warning is probably dead anyway.

dbug/dbug.c:
  Unused but set.
libmysqld/lib_sql.cc:
  Length is not necessary as the converted error message is always
  null-terminated.
sql/item_func.cc:
  Make get_var_with_binlog private to this compilation unit.
  If a error was raised, do not attempt to evaluate the user
  variable as the statement execution will be interrupted
  anyway.
sql/mysqld.cc:
  Use a void expression to silence the warning. Avoids the use of
  macros that would make the code more unreadable than it already is.
sql/protocol.cc:
  Length is not necessary as the converted error message is always
  null-terminated. Remove unnecessary casts and assignment.
sql/sql_class.h:
  Function is only used in a single compilation unit.
sql/sql_load.cc:
  Only use the variable outside of EMBEDDED_LIBRARY.
storage/innobase/btr/btr0cur.c:
  Do not retrieve field, only the record length is being used.
storage/perfschema/pfs.cc:
  Use a void expression to silence the warning.
tests/mysql_client_test.c:
  Unused but set.
unittest/mysys/lf-t.c:
  Unused but set.
2011-07-07 08:22:43 -03:00
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Kent Boortz
789aa8c485 Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Michael Widenius
f458e198c0 Merge with 5.2 2011-05-16 14:05:45 +03:00
Marc Alff
d343f5e372 Bug#12552516 LF_HASH REQUIRES MY_THREAD_INIT()
Before this fix, a thread instrumented for the performance schema,
that would perform file io operations, could crash inside the LF_HASH
implementation, in cases when my_thread_init is not called.

The crash itself has not been reported in 5.5 but similar crashes have
been found in 5.6-based development branches, using LF_HASH for
more instrumentation.

The possibility of a crash in 5.5 is confirmed by code analysis.

The problem is that, when my_thread_init() is not called,
which can happen for threads in storage engines or thirs party code,
my_thread_var is NULL.

Using my_thread_var->stacks_ends_here in mysys/lf_alloc-pin.c is unsafe.

Given that my_thread_var is used:
- only for stacks_ends_here
- only on platform with HAVE_ALLOCA
- only when there is enough room on the stack
and given that the LF_HASH implementation has a fallback
algorythm implemented already when using alloca is not possible,
using my_thread_var->stacks_ends_here is in fact not a strict requirement,
and can be relaxed.

The fix is to:
- test explicitly if my_thread_var is NULL, to account for cases
  when my_thread_init() is not used by the calling thread.
- not use alloca in this case, and rely on the fall back code already in place.
  so that the LF_HASH can be supported even without my_thread_init().

The implementation of mysys/lf_alloc-pin.c has been fixed to support this new usage.
The units tests in unittest/mysys/lf-t.c have been adjusted accordingly.
2011-05-13 18:04:49 +02:00
Michael Widenius
5933619ceb Made test-unit run in parlallel. This was achived by having all aria tests that uses temporary files to create the temporary file in an unique tempdirectory.
aria_chk now returns 1 if one got any warnings during check and 2 if one got errors.
lp:728919 maria_chk should fail on all detected corruptions

mysql-test/lib/My/SafeProcess.pm:
  Removed ^M lines from the file
storage/maria/ma_check.c:
  Fixed indentation
storage/maria/maria_chk.c:
  aria_chk now returns 1 if one got any warnings during check and 2 if one got errors.
storage/maria/unittest/ma_control_file-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_maria_log_cleanup.c:
  Added help function create_tmpdir()
storage/maria/unittest/ma_pagecache_consist.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_pagecache_rwconsist.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_pagecache_rwconsist2.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_pagecache_single.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_all-t:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Use unique sub directory for test results
  remove delete of files that are already deleted by maria_log_remove()
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Use unique sub directory for test results
  remove delete of files that are already deleted by maria_log_remove()
storage/maria/unittest/ma_test_loghandler_nologs-t.c:
  Use unique sub directory for test results
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Use unique sub directory for test results
  remove delete of files that are already deleted by maria_log_remove()
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Use unique sub directory for test results
support-files/compiler_warnings.supp:
  Supress some warnings
unittest/unit.pl:
  Run 4 unittests in parallel
2011-05-13 16:22:05 +03:00
Michael Widenius
f09f1c7c7d Merge with dynamic column code 2011-05-12 14:30:34 +03:00
Michael Widenius
5ab92b1f85 Adding support for Dynamic columns (WL#34):
- COLUMN_CREATE(column_nr, value, [column_nr,value]...)
- COLUMN_ADD(blob,column_nr, value, column_nr,value]...)
- COLUMN_DELETE(blob, column_nr, column_nr...)
- COLUMN_EXISTS(blob, column_nr)
- COLUMN_LIST(blob, column_nr)
- COLUMN_GET(string, column_nr AS type)

Added cast(X as DOUBLE) and cast(x as INT)
Better warning and error messages for wrong cast's
Created some sub functions to simplify and reuse code.
Added a lot of conversation functions with error/warnings for what went wrong.
Fixed some issues when casting time to datetime.
Added functions to dynamic strings and Strings to allow one to move a string buffer from dynamic strings to String (to save malloc+ copy)
Added dynamic columns library to libmysqlclient


include/Makefile.am:
  Added ma_dyncol.h
include/decimal.h:
  Added 'const' to arguments for some functions.
include/my_sys.h:
  Added dynstr_reassociate()
include/my_time.h:
  Added TIME_SUBSECOND_RANGE
  Added double_to_datetime()
  Added flag argument to str_to_time()
libmysql/CMakeLists.txt:
  Added mysys/ma_dyncol.c
libmysql/Makefile.shared:
  Added ma_dyncol
libmysql/libmysql.c:
  Added argument to str_to_time()
mysql-test/r/bigint.result:
  Better error messages
mysql-test/r/cast.result:
  Better warning and error messages
  A lot of new cast() tests
mysql-test/r/func_math.result:
  Better warning messages
mysql-test/r/func_str.result:
  Better warning messages
mysql-test/r/func_time.result:
  Better warning messages
mysql-test/r/sp-vars.result:
  Better warning messages
mysql-test/r/strict.result:
  Better warning messages
  New test result
mysql-test/r/type_newdecimal.result:
  Better warning messages
mysql-test/r/warnings.result:
  Better warning messages
mysql-test/suite/funcs_1/r/innodb_func_view.result:
  Updated results after better cast warnings
mysql-test/suite/funcs_1/r/memory_func_view.result:
  Updated results after better cast warnings
mysql-test/suite/funcs_1/r/myisam_func_view.result:
  Updated results after better cast warnings
mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test:
  Added begin...commit to speed up test.
mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc:
  Added begin...commit to speed up test.
mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc:
  Added begin...commit to speed up test.
mysql-test/suite/parts/r/part_supported_sql_func_innodb.result:
  Added begin...commit to speed up test.
mysql-test/suite/parts/r/part_supported_sql_func_myisam.result:
  Added begin...commit to speed up test.
mysql-test/suite/parts/r/rpl_partition.result:
  Added begin...commit to speed up test.
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
  Removed duplicated --big_test
mysql-test/suite/parts/t/rpl_partition.test:
  Added begin...commit to speed up test.
mysql-test/suite/pbxt/r/cast.result:
  Updated results after better cast warnings
mysql-test/suite/pbxt/r/func_str.result:
  Updated results after better cast warnings
mysql-test/suite/pbxt/r/type_newdecimal.result:
  Updated results after better cast warnings
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Added begin...commit to speed up test.
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  Added begin...commit to speed up test.
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_innodb.result:
  More warnings
mysql-test/suite/vcol/r/vcol_supported_sql_funcs_myisam.result:
  More warnings
mysql-test/t/cast.test:
  A lot of new cast() tests
mysql-test/t/strict.test:
  Added new test
mysys/CMakeLists.txt:
  Added ma_dyncol.c
mysys/Makefile.am:
  Added ma_dyncol.c
mysys/string.c:
  Added dynstr_reassociate() to move a buffer from dynamic_strings to some other allocator
sql-common/my_time.c:
  Added 'fuzzydate' flag to str_to_time()
  Added support for microseconds to my_time_to_str() and my_datetime_to_str()
  Reset second_parts in number_to_datetime()
  Added double_to_datetime()
sql/field.cc:
  Added double_to_longlong() and truncate_double() to simplify and reuse code
sql/field.h:
  New prototypes
sql/item.cc:
  Changed Item::get_date(MYSQL_TIME *ltime,uint fuzzydate) to be aware of type of argument.
  (Needed to make it microsecond safe and get better warnings).
  Updated call to str_to_time_with_warn()
sql/item.h:
  Added struct st_dyncall_create_def used by dynamic columns
  Added virtual bool dynamic_result() to tell if type of argument may change over calls.
sql/item_cmpfunc.cc:
  Added Item_func_dyncol_exists()
sql/item_cmpfunc.h:
  Added class Item_func_dyncol_exists
sql/item_create.cc:
  Added get_length_and_scale() to simplify other functions
  Simplified and extended create_func_cast()
  Added support for cast(X as double(X,Y))
  Added functions to create dynamic column functions.
sql/item_create.h:
  Added prototypes
sql/item_func.cc:
  Extended cast functions Item_func_signed() and Item_func_unsigned() to work with dynamic types
  Added Item_double_typecast()
sql/item_func.h:
  Added class Item_double_typecast()
sql/item_strfunc.cc:
  Added functions for COLUMN_CREATE(), COLUMN_ADD(), COLUMN_GET() and COLUMN_LIST()
sql/item_strfunc.h:
  Added classes for COLUMN_CREATE(), COLUMN_ADD(), COLUMN_GET() and COLUMN_LIST()
sql/item_timefunc.cc:
  Added flag argument to str_to_time_with_warn()
  Updated Item_char_typecast() to handle result type that may change between calls (for dynamic columns)
  Added Item_time_typecast::get_date() to ensure that we cast a datetime to time properly.
sql/item_timefunc.h:
  Added get_date() to Item_time_typecast() to allow proper results for casting time to datetime
sql/lex.h:
  Added new SQL function names
sql/my_decimal.cc:
  Added 'const' to some arguments.
  Better error message in case of errors (we now print out the wrong value)
  Added my_decimal2int()
sql/my_decimal.h:
  Moved some constants to my_decimal_limits.h
  Updated prototypes.
  Made my_decimal2int() a function as it's rather long (no reason to have it inline)
  Added decimal2my_decimal() function.
sql/mysql_priv.h:
  Prototypes for new functions
sql/share/errmsg.txt:
  New error messages for wrong casts and dynamic columns
sql/sql_acl.cc:
  Fixed indentation
sql/sql_base.cc:
  Added dynamic_column_error_message()
sql/sql_string.h:
  Added reassociate() to move a buffer to be owned by String object.
sql/sql_yacc.yy:
  Added syntax for COLUMN_ functions.
sql/time.cc:
  Updated str_to_datetime_with_warn() flag argument to same type as other functions
  Added conversion flag to str_to_time_with_warn() (Similar to all datetime functions)
  Added conversion functions with warnings: double_to_datetime_with_warn() and decimal_to_datetime_with_warn()
strings/decimal.c:
  Added 'const' to arguments for some functions.
unittest/mysys/Makefile.am:
  Added test for dynamic columns code
2011-05-08 13:24:06 +03:00
Michael Widenius
28f708e1e3 Automatic merge with 5.1 2011-05-08 12:37:38 +03:00
Michael Widenius
6b8788e425 Reverted unittest/unit.pl back to Test::Harness as some of our build machines didn't support the new recommended TAP::Harness module
unittest/mytap/tap.c:
  Fixed output for some tests that didn't call plan()
2011-05-06 14:01:51 +03:00
Michael Widenius
d5caa00161 Improved 'make test-unit' time slightly
storage/maria/unittest/ma_test_loghandler-t.c:
  Don't sync during test
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Don't sync during test
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Don't sync during test
unittest/mysys/bitmap-t.c:
  Don't test all bit combinations (not needed)
unittest/mysys/thr_template.c:
  Remove sleep as old bug should be fixed nowadays
unittest/mysys/waiting_threads-t.c:
  Only run test with --big
unittest/mytap/tap.c:
  Print total time at end of test.
unittest/unit.pl:
  Use TAP::Harness instead of Test::Harness (recommended according to manual)
  Add times to tests.
2011-05-05 14:51:01 +03:00
Michael Widenius
547ef66609 Automatic merge with MariaDB 5.1 2011-05-03 19:11:39 +03:00
Michael Widenius
1be5462d59 Merge with MariaDB 5.1 2011-05-03 19:10:10 +03:00
Vladislav Vaintroub
e6926b06da Fix compile errors:
- from xtradb merge
- portability error in bitmap-t.c ( variable size  array in non-portable)
2011-05-02 23:03:26 +02:00
Michael Widenius
e415ba0fb2 Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
2011-05-02 20:58:45 +03:00
Bjorn Munch
7956313711 Fix non-portable test of %p in unit test my_vsnprintf 2011-03-02 10:16:34 +01:00
Michael Widenius
3358cdd504 Merge with 5.1 to get in changes from MySQL 5.1.55 2011-02-28 19:39:30 +02:00
Jon Olav Hauglid
0c9dde5c70 Bug #11752069 (former bug 43152)
Assertion `bitmap_is_set_all(&table->s->all_set)' failed in
handler::ha_reset

Post-push fix for unit test compilation error on Windows.
2011-02-23 14:50:59 +01:00
Jon Olav Hauglid
16e8d18206 Merge from mysql-5.1 to mysql-5.5
No conflicts
2011-02-16 18:24:38 +01:00
Jon Olav Hauglid
0e28aa2f1c Followup to Bug #11752069 (former bug 43152)
Assertion `bitmap_is_set_all(&table->s->all_set)' failed in
handler::ha_reset

This followup fixes the compilation warning
  'test_bit' may be used uninitialized in this function
introduced by the previous patch.
2011-02-16 18:19:10 +01:00
Jon Olav Hauglid
f65f016aee Merge from mysql-5.1 to mysql-5.5
Text conflict in include/my_bit.h
Text conflict in include/my_bitmap.h
Text conflict in mysys/my_bitmap.c
2011-02-16 16:33:02 +01:00
Jon Olav Hauglid
6ad0c9b16d Bug #11752069 (former bug 43152)
Assertion `bitmap_is_set_all(&table->s->all_set)' failed in
handler::ha_reset

This assertion could be triggered if two connections simultaneously
executed two bitmap test functions on the same bitmap. For example,
the assertion could be triggered if one connection executed UPDATE
while a second connection executed SELECT on the same table.

Even if bitmap test functions have read-only semantics and have
const bitmaps as parameter, several of them modified the internal
state of the bitmap. With interleaved execution of two such functions
it was possible for one function to modify the state of the same
bitmap that the other function had just modified. This lead to an
inconsistent state and could trigger the assert.

Internally the bitmap uses 32 bit words for storage. Since bitmaps
can contain any number of bits, the last word in the bitmap may
not be fully used. A 32 bit mask is maintained where a bit is set
if the corresponding bit in the last bitmap word is unused.
The problem was that several test functions applied this mask to
the last word. Sometimes the mask was negated and used to zero out
the remainder of the last word and sometimes the mask was used as-is
to fill the remainder of the last word with 1's. This meant that if
a function first used the negated mask and another function then
used the mask as-is (or vice-versa), the first function would then
get the wrong result.

This patch fixes the problem by changing the implementation of
9 bitmap functions that modified the bitmap state even if the 
bitmap was declared const. These functions now preserve the
internal state of the bitmap. This makes it possible for
two connections to concurrently execute two of these functions
on the same bitmap without issues.

The patch also removes dead testing code from my_bitmap.c.
These tests have already been moved to unittest/mysys/bitmap-t.c.
Existing test coverage of my_bitmap has been extended.

No MTR test case added as this would require adding several sync
points to the bitmap functions. The patch has been tested with
a non-deterministic test case posted on the bug report.


include/my_bit.h:
  Removed my_count_bits_ushort() which is not needed anymore.
  Added my_count_bits_uint32().
unittest/mysys/bitmap-t.c:
  Extended test coverage of my_bitmap.
2011-02-16 16:26:19 +01:00
Michael Widenius
9c10b73b76 Enhanced tap to write out a message at which stage it was killed if it got a signal.
Added 'SIGINT' to list of tracked signals.
2011-02-12 14:09:44 +02:00
Vladislav Vaintroub
bfcc62c748 merge 2010-12-06 13:16:49 +01:00
Vladislav Vaintroub
0eae06c430 Bug#473914: mysql_client_test fail with in debug compilaton on windows x64
Reason: inconsistent compilation, federatedx is compiled without SAFEMALLOC
flag, while anything else is compiled with SAFEMALLOC.

As a consequence, my_hash_init used inside federatedx initialization does not
provide correct caller info parameters (file, line) , so they are initialized with 
whatever is on stack. When info about allocated memory is output in
COM_DEBUG command, the server crashes trying to output string starting at
0xcccccccccccccccc.

The fix is to remove SAFEMALLOC  preprocessor flags 
from every CMakeLists.txt, except the top-level one.

Also, SAFEMALLOC is not defined by default now, instead
there is WITH_DEBUG_FULL CMake option which adds 
-DSAFEMALLOC to C and C++ flags in debug compilation. 
This option is off by  default, because 
1) Debug C runtime already has heap debugging builtin with 
 overwrite and leak detection
2)safemalloc considerably slows down the tests.


Note also  that 
- SAFEMALLOC is gone  in MySQL5.5
- On Windows, heap related overflows can also be found using free pageheap utility
(that is also part of application verifier). This is even more efficient if there are no other layers 
on top of Windows heap allocator, e.g  it is most efficient with release version.
2010-12-06 12:52:06 +01:00
Michael Widenius
1e5061fe3b merge with 5.1 2010-11-30 23:11:03 +02:00
Michael Widenius
e68ff46653 Fixed compiler and gmake warnings
- Removed SCCS rule from Makefile.am
- Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)

config/ac-macros/maintainer.m4:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
  Force initialization of variables when using -Werror (To get rid of compiler warnings)
configure.in:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
sql/sql_yacc.yy:
  Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
2010-11-29 11:27:52 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Michael Widenius
1a6373e8e2 Merge with MySQL 5.1.53
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
 - Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255 
- Werror is disabled;  Should be enabled after merge with xtradb.
2010-11-25 00:57:34 +02:00
Davi Arnaut
8664de2230 WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
2010-11-20 12:47:50 -02:00
unknown
95b37a254b Merge MariaDB 5.1->5.2 2010-11-19 22:33:47 +01:00
Bjorn Munch
dfca5156c3 merge from 5.5-mtr 2010-11-19 11:26:43 +01:00
unknown
0de9a4abab MWL#74: Shared libmysqld.so library.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.

The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.

All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.

The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.

The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).

This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):

 - In libmysql_r/, we should be able to just link libmysys.la etc, instead of
   symlinking and re-compiling sources into the directory.

 - In libmysql/, we can similarly avoid symlinking and recompiling sources if
   we instead build a libmysys_nothread.la library with appropriate CFLAGS and
   link that.

 - In sql/, we can build a separate target libmysql_int.la with appropriate
   CFLAGS for embedded and use that in libmysqld/ instead of symlinking
   sources.

 - libmysys.a, libmyisam.a and similar libraries could be installed as .so
   also to save on code size; or alternatively could be not installed at all.


client/Makefile.am:
  Updated for using libtool
config/ac-macros/plugins.m4:
  Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
  to specify alternate object for embedded.
configure.in:
  Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
  Updated for using libtool
extra/Makefile.am:
  Fix relative paths.
libmysqld/Makefile.am:
  Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
  Updated to use libtool
mysys/Makefile.am:
  Updated to use libtool.
  Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
  Fix conflicting global mutex name by making it static.
regex/Makefile.am:
  Updated to use libtool
sql/Makefile.am:
  Updated to use libtool
sql/item_func.cc:
  Fix conflicting mutex name.
sql/mysql_priv.h:
  Fix conflicting mutex name
sql/mysqld.cc:
  Fix conflicting mutex name.
  Add missing call of my_uuid_end().
storage/archive/Makefile.am:
  Updated to use libtool
storage/archive/plug.in:
  Updated to use libtool
storage/blackhole/Makefile.am:
  Updated to use libtool
storage/blackhole/plug.in:
  Updated to use libtool
storage/csv/Makefile.am:
  Updated to use libtool
storage/csv/plug.in:
  Updated to use libtool
storage/example/Makefile.am:
  Updated to use libtool
storage/federated/Makefile.am:
  Updated to use libtool
storage/federated/plug.in:
  Updated to use libtool
storage/federatedx/Makefile.am:
  Updated to use libtool
storage/federatedx/plug.in:
  Updated to use libtool
storage/heap/Makefile.am:
  Updated to use libtool
storage/heap/plug.in:
  Updated to use libtool
storage/innobase/Makefile.am:
  Updated to use libtool
storage/innobase/plug.in.disabled:
  Updated to use libtool
storage/innodb_plugin/Makefile.am:
  Updated to use libtool
storage/maria/CMakeLists.txt:
  Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
  Updated to use libtool
  Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
  Updated to use libtool
storage/myisam/Makefile.am:
  Updated to use libtool
storage/myisam/plug.in:
  Updated to use libtool
storage/myisammrg/Makefile.am:
  Updated to use libtool
storage/myisammrg/plug.in:
  Updated to use libtool
storage/pbxt/plug.in:
  Updated to use libtool
storage/pbxt/src/Makefile.am:
  Updated to use libtool
storage/xtradb/Makefile.am:
  Updated to use libtool
storage/xtradb/plug.in:
  Updated to use libtool
strings/Makefile.am:
  Updated to use libtool
unittest/unit.pl:
  Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
  Updated to use libtool
2010-11-17 13:24:20 +01:00
Davi Arnaut
785bcc173d Merge of mysql-5.1-bugteam into mysql-5.5-bugteam. 2010-10-20 12:48:19 -02:00
Davi Arnaut
b5bb13ec03 Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted compiler warnings.

include/my_pthread.h:
  Like for pthread_cond_timedwait, the abstime is constant.
mysys/my_gethwaddr.c:
  Instead of using a manual copy that introduce warnings due to
  type mismatch, copy the buffer using memcpy and use memcmp to
  check whether all bytes of the buffer are zeroed.
mysys/thr_mutex.c:
  Like for pthread_cond_timedwait, the abstime is constant.
unittest/mytap/tap.h:
  Introduce a ok() variant that does not take a format argument.
  Since ok() is tagged with a printf attribute, GCC complains if
  the fmt argument is NULL.
2010-10-20 11:40:04 -02:00
Jonathan Perkin
6ce340789a Pull in fix from bug#47526 to solve bug#50047. 2010-10-14 19:29:14 +01:00
Georgi Kodinov
8789c79723 merge 2010-10-04 15:42:16 +03:00
Olav Sandstaa
77844bd10b Fix for Bug#54478 "mysqld crashes during boot when running mtr with --debug option"
The crash during boot was caused by a DBUG_PRINT statement in fill_schema_schemata() (in
sql_show.cc). This DBUG_PRINT statement contained several instances of %s in the format 
string and for one of these we gave a NULL pointer as the argument. This caused the
call to vsnprintf() to crash when running on Solaris.
      
The fix for this problem is to replace the call to vsnprintf() with my_vsnprintf()
which handles that a NULL pointer is passed as argumens for %s.

This patch also extends my_vsnprintf() to support %i in the format string.

dbug/dbug.c:
  Replace the use of vsnprintf() with my_vsnprintf(). On some platforms
  vsnprintf() did not handle that a NULL pointer was given as an argument
  for a %s in the format string.
include/mysql/service_my_snprintf.h:
  Add support for %i in format string to my_vsnprintf().
strings/my_vsnprintf.c:
  Add support for %i in format string to my_vsnprintf().
unittest/mysys/my_vsnprintf-t.c:
  Add unit tests for %i in format string to my_vsnprintf().
2010-09-15 13:33:22 +02:00
Sergei Golubchik
a3d80d952d merge with 5.1 2010-09-11 20:43:48 +02:00
Michael Widenius
7b91240bba Fixed build & test failures in buildbot
mysql-test/t/bug46080-master.opt:
  Lower limits to be able to run tests
regex/main.c:
  Fixed compiler warnings
storage/maria/ma_key_recover.c:
  Fixed compiler warnings
storage/maria/ma_recovery.c:
  Fixed compiler warnings
storage/maria/ma_unique.c:
  Fixed compiler warnings
strings/ctype-uca.c:
  Added comment
strings/xml.c:
  Fixed compiler warnings
support-files/compiler_warnings.supp:
  Added suppressions for windows
unittest/strings/strings-t.c:
  Added ifdef to fix compilation failure when compiling without UCA
2010-08-28 16:51:09 +03:00
Michael Widenius
ad6d95d3cb Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue
  - Faster for short unaligneed strings than memcmp()
  - Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
2010-08-27 17:12:44 +03:00
Michael Widenius
58a75bb18b Automerge with 5.1 2010-08-25 01:44:50 +03:00
Georgi Kodinov
5564e0837f merged mysql-5.5 into WL1054-5.5 2010-08-16 18:16:07 +03:00
Alexander Nozdrin
8b645bed97 Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect).
Fixing copyright text.
2010-08-12 19:19:57 +04:00
Michael Widenius
236478cef7 Fixed compiler warnings from Windows compiler
client/mysqlcheck.c:
  Added missing casts
client/mysqldump.c:
  Added missing casts
client/mysqlimport.c:
  Added missing casts
extra/my_print_defaults.c:
  Added missing casts
mysql-test/mysql-test-run.pl:
  Added suppression for non-critical warning on windows
storage/maria/maria_pack.c:
  Added missing casts
storage/xtradb/buf/buf0lru.c:
  Added missing casts
storage/xtradb/fil/fil0fil.c:
  Added missing casts
storage/xtradb/handler/i_s.cc:
  Added extra argument to call store() function for longlong.
storage/xtradb/srv/srv0srv.c:
  Added cast to suppress compiler warning
support-files/compiler_warnings.supp:
  Added suppression for some non critical compiler warnings on Windows
unittest/mytap/tap.h:
  Fixed prototypes to be same as the actual functions
2010-08-11 13:55:54 +03:00
Georgi Kodinov
fa21e84f03 Fixed a build error on solaris sparc in the mysql-5.5-wl1054 tree 2010-08-10 15:00:17 +03:00
Michael Widenius
d042146e5b Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
2010-08-05 22:56:11 +03:00
Michael Widenius
e0a6b02c5d Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
2010-08-02 12:01:24 +03:00
Alexander Nozdrin
32f3ab7933 Auto-merge from mysql-trunk-merge. 2010-07-29 16:32:11 +04:00
Vasil Dimov
d07c0afec9 Merge mysql-5.1-bugteam -> mysql-trunk-merge 2010-07-29 12:06:54 +03:00
Alexander Barkov
6f6a3e5293 Postfix for BUG#45012.
Problem: The original patch didn't compile on debug_werror
due to wrong format in printf("%d") for size_t variables.

Fix: Adding cast to (int).
2010-07-29 10:12:44 +04:00
Alexander Barkov
fc74792a6b Merging from mysql-5.1-bugteam 2010-07-26 10:47:03 +04:00
Alexander Barkov
e57a9d6fe0 Bug#45012 my_like_range_cp932 generates invalid string
Problem: The functions my_like_range_xxx() returned
badly formed maximum strings for Asian character sets,
which made problems for storage engines.

Fix: 
- Removed a number my_like_range_xxx() implementations,
  which were in fact dumplicate code pieces.
- Using generic my_like_range_mb() instead.
- Setting max_sort_char member properly for Asian character sets
- Adding unittest/strings/strings-t.c, 
  to test that my_like_range_xxx() return well-formed 
  min and max strings.

Notes:

- No additional tests in mysql/t/ available.
  Old tests cover the affected code well enough.
2010-07-26 09:06:18 +04:00
Davi Arnaut
e7dd11f0be WL#5498: Remove dead and unused source code
Remove Windows related files which aren't used anymore.
2010-07-23 17:14:04 -03:00
Davi Arnaut
93e38e8a3e Bug#22320: my_atomic-t unit test fails
Bug#52261: 64 bit atomic operations do not work on Solaris i386
           gcc in debug compilation

One of the various problems was that the source operand to
CMPXCHG8b was marked as a input/output operand, causing GCC
to use the EBX register as the destination register for the
CMPXCHG8b instruction. This could lead to crashes as the EBX
register is also implicitly used by the instruction, causing
the value to be potentially garbaged and a protection fault
once the value is used to access a position in memory.

Another problem was the lack of proper clobbers for the atomic
operations and, also, a discrepancy between the implementations
for the Compare and Set operation. The specific problems are
described and fixed by Kristian Nielsen patches:

Patch: 1

Fix bugs in my_atomic_cas*(val,cmp,new) that *cmp is accessed
after CAS succeds.

In the gcc builtin implementation, problem was that *cmp was
read again after atomic CAS to check if old *val == *cmp;
this fails if CAS is successful and another thread modifies
*cmp in-between.

In the x86-gcc implementation, problem was that *cmp was set
also in the case of successful CAS; this means there is a
window where it can clobber a value written by another thread
after successful CAS.

Patch 2:

Add a GCC asm "memory" clobber to primitives that imply a
memory barrier.

This signifies to GCC that any potentially aliased memory
must be flushed before the operation, and re-read after the
operation, so that read or modification in other threads of
such memory values will work as intended.

In effect, it makes these primitives work as memory barriers
for the compiler as well as the CPU. This is better and more
correct than adding "volatile" to variables.

include/atomic/gcc_builtins.h:
  Do not read from *cmp after the operation as it might be
  already gone if the operation was successful.
include/atomic/nolock.h:
  Prefer system provided atomics over the broken x86 asm.
include/atomic/x86-gcc.h:
  Do not mark source operands as input/output operands.
  Add proper memory clobbers.
include/my_atomic.h:
  Add notes about my_atomic_add and my_atomic_cas behaviors.
unittest/mysys/my_atomic-t.c:
  Remove work around, if it fails, there is either a problem
  with the atomic operations code or the specific compiler
  version should be black-listed.
2010-07-23 09:37:10 -03:00
Davi Arnaut
f56dd32bf7 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.

client/mysqldump.c:
  Pass my_free directly as its signature is compatible with the
  callback type -- which wasn't the case for free_table_ent.
2010-07-08 18:20:08 -03:00
Davi Arnaut
cd41cd953d Bug#22320: my_atomic-t unit test fails
The atomic operations implementation on 5.1 has a few problems,
which might cause tests to abort randomly. Since no code in 5.1
uses atomic operations, simply remove the code.
2010-07-05 09:00:39 -03:00
Tor Didriksen
ce5927dc89 Merge fix for Bug#53303 from 5.1-bugteam
text conflict: unittest/examples/Makefile.am
2010-06-10 13:21:35 +02:00
Tor Didriksen
a24df71e95 Backport of Bug#53303 mytap tests should always have a plan()
The bug was caused by buffered output. Flushing resolved it.
We still recommend to allways call plan().
  
Also fix some compile warnings (formal parameter different from declaration)


unittest/examples/Makefile.am:
  Omit core-t, since it will always fail.
unittest/examples/no_plan-t.c:
  Comment that we recommend calling plan(NO_PLAN)
unittest/mytap/tap.c:
  Use the named constant NO_PLAN
  Flush all output.
unittest/mytap/tap.h:
  Change documentation for the plan() function.
2010-06-10 13:15:35 +02:00
Alexander Nozdrin
759d5bc535 Another incarnation of the patch for Bug#30708
(make relies GNU extentions). The patch was partially
backport from 6.0.

Original comment:
bug#30708: make relies GNU extensions.  Now that we no longer use
BitKeeper we can safely remove the SCCS handling with no loss of
functionality.
2010-05-19 17:00:23 +04:00
Michael Widenius
1aafea91e5 Merge with 5.1
Fixed valgrind warnings found from running main.connect under valgrind


sql/sp_head.cc:
  Ensure that vcol_info is reset
sql/sql_acl.cc:
  Fixed usage of wrong memroot for password
sql/sql_yacc.yy:
  Ensure that vcol_info is reset
2010-04-01 12:04:26 +03:00
Michael Widenius
d904739cc1 Removed compiler warning
Disable pbxt for test cases not using pbxt (speeds up test suite)

extra/comp_err.c:
  Added cast to get rid of compiler warning
extra/libevent/kqueue.c:
  Added cast to get rid of compiler warning
mysql-test/lib/mtr_cases.pm:
  Use --skip-pbxt for test cases that doesn't need pbxt
  Collect default-storage-engine from suite.opt file (should actually be my.cnf file, but that wasn't easy to do)
mysql-test/suite/pbxt/t/suite.opt:
  Added marker for mysql-test-run.pl that this suite require pbxt
mysys/mf_keycache.c:
  Use LINT_INIT() to remove compiler warnings
mysys/my_gethostbyname.c:
  Remove compiler warnings
sql/handler.cc:
  Reset variable that may be used uninitialized
sql/item.h:
  Remove compiler warning
sql/mysqld.cc:
  Use LINT_INIT() to remove compiler warnings
sql/sql_class.h:
  Remove compiler warning
sql/sql_table.cc:
  Ensure variable is always set (to remove compiler warning)
sql/sql_view.cc:
  Use LINT_INIT() to remove compiler warnings
storage/maria/ma_loghandler.c:
  Use LINT_INIT() to remove compiler warnings
storage/myisammrg/ha_myisammrg.cc:
  Fixed wrong type to printf
storage/myisammrg/myrg_open.c:
  Use LINT_INIT() to remove compiler warnings
storage/xtradb/include/ut0lst.h:
  Trivial change of macro to remove compiler warning
strings/ctype-ucs2.c:
  Use LINT_INIT() to remove compiler warnings
strings/ctype-utf8.c:
  Use LINT_INIT() to remove compiler warnings
support-files/compiler_warnings.supp:
  Suppress some not relevant warnings
unittest/mysys/waiting_threads-t.c:
  Don't use ftruncate() as this gives warning about ignored return value
2010-03-30 15:36:49 +03:00
Sergei Golubchik
2ceaffc467 mwl:98 - libservices 2010-03-03 15:44:14 +01:00
Michael Widenius
a041747567 Fixed compiler warnings & failing test cases
When compiling with debug, don't clear buffer in 'net_clear()'
- This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap

client/mysqltest.cc:
  Fixed compiler warning
mysql-test/t/partition_innodb_semi_consistent.test:
  Added missing --reap (fixes random failure)
sql/net_serv.cc:
  When compiling with debug, don't clear buffer in 'net_clear()'
  - This allows us to easier find bugs in the protocol and also get repeatable test failures in test cases where someone forgot to do --reap
storage/myisam/ft_boolean_search.c:
  Fixed compiler warnings
storage/myisam/ft_parser.c:
  Fixed compiler warnings
storage/myisam/ft_stopwords.c:
  Fixed compiler warnings
support-files/compiler_warnings.supp:
  Added a lot of new suppression of not relevant warnings and warnings in systems we are not in charge of
unittest/mysys/waiting_threads-t.c:
  Fixed compiler warnings
2010-01-28 16:49:14 +02:00
Magnus Blåudd
20b4e1390c Bug#47526 unit.pl fails to execute binaries when using Test::Harness 3.10
- Rewrite unit.pl so it prefers to use TAP::Harness directly.
  - Also add support for --verbose --noverbose
2010-01-04 12:17:58 +01:00
Vladislav Vaintroub
541edcc2e4 merge 2009-12-25 16:49:21 +01:00
Alexey Kopytov
6c716007d1 Manual merge of WL#4738 from mysql-next-mr:
- backported code that handles %f/%g arguments in 
my_vsnprintf.c from 6.0 
- backported %f/%g tests in unittest/mysys/my_vsnprintf-t.c 
from 6.0 
- replaced snprintf("%g") in sql/set_var.cc with my_gcvt() 
- removed unnecessary "--replace-result"s for Windows in 
mysql-test/suite/sys_vars/t/long_query_time_basic.test 
- some test results adjustments
2009-12-28 15:54:16 +03:00
Sergei Golubchik
1ad5bb1a69 WL#4738 streamline/simplify @@variable creation process
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs  
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations 
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies


CMakeLists.txt:
  Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
client/mysql.cc:
  don't crash with --show-warnings when mysqld dies
config/ac-macros/plugins.m4:
  Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
include/my_getopt.h:
  comments
include/my_pthread.h:
  fix double #define
mysql-test/mysql-test-run.pl:
  run sys_vars suite by default
  properly recognize envirinment variables (e.g. MTR_MAX_SAVE_CORE) set to 0
  escape gdb command line arguments
mysql-test/suite/sys_vars/r/rpl_init_slave_func.result:
  init_slave+utf8 bug
mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
  init_slave+utf8 bug
mysys/my_getopt.c:
  Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
  Bug#46586 When using the plugin interface the type "set" for options caused a crash.
  Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
mysys/typelib.c:
  support for flagset
sql/ha_ndbcluster.cc:
  backport from telco tree
sql/item_func.cc:
  Bug#49644 init_connect and \0
  Bug#49645 init_slave and multi-byte characters
sql/sql_builtin.cc.in:
  Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
sql/sql_plugin.cc:
  Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
  Bug#32902 plugin variables don't know their names
  Bug#44797 plugins w/o command-line options have no disabling option in --help
sql/sys_vars.cc:
  all server variables are defined here
storage/myisam/ft_parser.c:
  remove unnecessary updates of param->quot
storage/myisam/ha_myisam.cc:
  myisam_* variables belong here
strings/my_vsnprintf.c:
  %o and %llx
unittest/mysys/my_vsnprintf-t.c:
  %o and %llx tests
vio/viosocket.c:
  bugfix: fix @@wait_timeout to work with socket timeouts (vs. alarm thread)
2009-12-22 10:35:56 +01:00
Vladislav Vaintroub
106bb1652e merge 2009-12-19 03:21:49 +01:00
Michael Widenius
82e910d146 Merge with maria-5.1-federatedx; A patch to fix bugs in federatedx and enable federated_server.test
Author: Antony Curtis
License: BSD


client/mysql.cc:
  Reset variable if CTRL-C was used to kill running query, so that the user can do it again
client/mysqlcheck.c:
  Indentation fix
client/mysqlslap.c:
  Indentation fixes
client/mysqltest.cc:
  Make testing of commands safer by also testing length
  Removed not used variable
  Fixed indentation to be as it was before last patch
mysql-test/lib/mtr_report.pm:
  Fixed typo
mysql-test/mysql-test-run.pl:
  Merge (Align code with default mysql-tes-run.pl)
mysql-test/suite/federated/disabled.def:
  Removed test case
storage/federatedx/ha_federatedx.cc:
  Removed my changes and applied Antony's instead
2009-12-03 13:19:05 +02:00
Vladislav Vaintroub
43770e8f3f merge 2009-11-30 01:49:26 +00:00
Mikael Ronstrom
566bcab328 Merge WL#5138 to mysql-next-mr 2009-11-27 18:11:05 +01:00
unknown
d44270afe7 After-merge fix for MySQL 5.1.41 merge into MariaDB: Fix incorrect merge breaking the build. 2009-11-26 09:44:38 +01:00
Vladislav Vaintroub
23cd3cec41 Remove STATIC from ADD_CONVENIENCE_LIBRARY on 2 places 2009-11-25 02:11:01 +01:00
Vladislav Vaintroub
9ce3dae667 merge 2009-11-25 01:50:10 +01:00
Marc Alff
e2a34cbf70 WL#2373 Use cycle counter for timing 2009-11-24 16:36:31 -07:00
Mikael Ronstrom
b6c1ecb37f WL#5138 merged to mysql-next-mr 2009-11-20 16:23:32 +01:00
Marc Alff
48ea0b83a0 Port the unit test framework to windows
Backport from 6.0.14 to 5.6.0

Original code from Guilhem Bichot
2009-11-17 21:29:26 -07:00
Marc Alff
244eced1a7 WL#3230 concurrent hash
Backport from 6.0.14 to 5.6.0

Original code from Sergei Golubchik
2009-11-17 19:31:40 -07:00
Marc Alff
382ae22290 WL#2595 kernel-independent atomic operations
Backport from 6.0.14 to 5.6.0

Original code from Sergei Golubchik
2009-11-17 17:11:32 -07:00
unknown
a962160eec Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

This is a re-commit of Monty's merge to eliminate an extra commit from
MySQL-5.1.42 that was accidentally included in the merge.

This is a merge of the MySQL 5.1.41 clone-off (clone-5.1.41-build). In
case there are any extra changes done before final MySQL 5.1.41
release, these will need to be merged later before MariaDB 5.1.41
release.
2009-11-16 21:49:51 +01:00
Michael Widenius
edd792fe12 Merge with MySQL 5.1, with following additions:
- Moved some code from innodb_plugin to xtradb, to ensure that all tests runs
- Did changes in pbxt and maria storage engines becasue of changes in thd->query
- Reverted wrong code in sql_table.cc for how ROW_FORMAT is used.

Todo before joining with main 5.1 tree:
- Join test fails (Igor to investigate)
- mysql-test-run shows warnings from tests; Some suppression rule is not working (Kristian to investiage)
- Run through all buildbots



sql/sql_table.cc:
  Reverted code for ROW_FORMAT is used. We must set the HA_CREATE_USED_ROW_FORMAT flag in alter table
  to signal the handler that it should not change row_type in update_create_info() (as happens for SHOW CREATE).
storage/maria/ha_maria.cc:
  Update for change in defintion of thd->query
storage/myisam/mi_check.c:
  Simplify code
storage/pbxt/src/discover_xt.cc:
  Update for change in defintion of thd->query
storage/xtradb/dict/dict0dict.c:
  Update for change in defintion of thd->query
storage/xtradb/handler/ha_innodb.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/ha_innodb.h:
  Copy some critical changes from innodb_plugin to get tests to pass
storage/xtradb/handler/handler0alter.cc:
  Copy some critical changes from innodb_plugin to get tests to pass
2009-11-11 13:17:49 +02:00
Vladislav Vaintroub
bc76ad8f6b WL#5161 : Cross-platform build with CMake
BUILD-CMAKE:
  WL#5161 : Documentation on how to build with CMake on Unix/Windows
BUILD/Makefile.am:
  Add new file
BUILD/autorun.sh:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
BUILD/choose_configure.sh:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
CMakeLists.txt:
  WL#5161 : Rewrite top-level CMakeLists.txt. 
  Remove  Windows specifics
  - compiler flags handling moved to configure.cmake
  - storage engine/plugin stuff moved into cmake/plugin.cmake
  - copy docs
Makefile.am:
  Added new files
client/CMakeLists.txt:
  WL#5161 : Rewrite CMakeLists.txt to be platform-independent
  Handle packagng (add INSTALL commands)
cmake/Makefile.am:
  WL#5161 : use choose_configure instead of autotools configure script
  (choose configure will call cmake if cmake is available)
cmake/abi_check.cmake:
  Custom targets for abi_check (for cmake)
cmake/bison.cmake:
  - Check bison availability
  - Add RUN_BISON macro (used to create sql_yacc.cc and sql_yacc.h)
cmake/cat.cmake:
  Add helper script to concatenate files.
cmake/character_sets.cmake:
  Handle configuration parameters WITH_EXTRA_CHARSETS
cmake/check_minimal_version.cmake:
  Helper script to check the minimum required version of cmake
cmake/configure.pl:
  Add perl script to convert ./configure parameters for cmake
cmake/create_initial_db.cmake.in:
  Add script helper to create initial database. 
  (on Windows, we pack initial db with the redistribution
  package)
cmake/do_abi_check.cmake:
  Perform abi check
cmake/dtrace.cmake:
  Handle dtrace in CMake Build.
  Check for dtrace availablility,
  run dtrace -G on solaris in prelink step
cmake/dtrace_prelink.cmake:
  Run dtrace -G on Solaris in pre-link step,
  link the object it creates together with library or
  executable
cmake/install_macros.cmake:
  Helper macros for packaging
  (install pdb on Windows, install symlinks on Unix)
cmake/make_dist.cmake.in:
  "make dist" - 
  - pack autotools ./configure script with the source
  (renamed to configure.am)
  - pack bison output
cmake/merge_archives_unix.cmake.in:
  script to merge static libraries on Unix
cmake/misc.cmake:
  Build helper macros
  - MERGE_STATIC_LIBS 
  We use it when building client library and embedded
  (avoid recompilation)
  
  - Convert source file paths to absolute names.
  We use it in  to locate files of a different project,
  when the files need to be recompiled (e.g in embedded
  several storage engines are recompiled with 
  -DEMBEDDED_LIBRARY)
cmake/mysql_version.cmake:
  Extract version info from configure.in
  Handle package names.
cmake/plugin.cmake:
  Rewrote storage/mysql_storage_engine.cmake to handle 
  other types of plugins and do it in OS-independent manner.
cmake/readline.cmake:
  Macros to handle WITH_READLINE/WITH_LIBEDIT parameters
cmake/ssl.cmake:
  Add macros to handle WITH_SSL parameter.
cmake/stack_direction.c:
  Helper to check stack direction.
cmake/zlib.cmake:
  Add macros to handle WITH_ZLIB parameter
cmd-line-utils/libedit/CMakeLists.txt:
  Build libedit with cmake.
cmd-line-utils/libedit/Makefile.am:
  Add new file
cmd-line-utils/readline/CMakeLists.txt:
  Build readline with CMake.
cmd-line-utils/readline/Makefile.am:
  Add new file
config.h.cmake:
  WL#5161 : Add config.h template for cmake
configure.cmake:
  WL#5161 : Add platform tests ( for cmake)
configure.in:
  Added new subdirectories
dbug/CMakeLists.txt:
  WL#5161
extra/CMakeLists.txt:
  WL#5161
extra/yassl/CMakeLists.txt:
  WL#5161
extra/yassl/taocrypt/CMakeLists.txt:
  WL#5161
include/Makefile.am:
  Add new file
include/keycache.h:
  remove configure-win.h and remove HUGE_PTR defined there.
include/my_global.h:
  use my_config.h for Windows, not config-win.h anymore
include/my_pthread.h:
  - Move thread_safe_increment from config-win.h to other headers
  (config-win.h is not used anymore)
  - Declare pthread_cancel on Windows (it is used in daemon_example)
include/my_sys.h:
  Add malloc.h on Windows (we use -D_WIN32_LEAN_AND_MEAN now, and 
  with this define malloc.h is not included automatically via windows.h)
include/mysql/plugin.h:
  Handle pure-C plugins with Microsoft compiler.
include/thr_alarm.h:
  remove rf_SetTimer that used to be defined in config-win.h
  Replace with UINT_PTR (we do not use config-win.h anymore
  and typedef was needed in this single place only)
libmysql/CMakeLists.txt:
  Avoid pointless recompilation of source files 
  in client library if possible. Merge static 
  libs (dbug, mysys) to create static client 
  library.
libmysqld/CMakeLists.txt:
  Avoid pointless recompilation of source files 
  when building embedded. Instead, merge dbug and 
  mysys (and some other static libs) into embedded.
libmysqld/examples/CMakeLists.txt:
  Embedded compilation on Unix
libmysqld/lib_sql.cc:
  Do not define THD::clear_error() in lib_sql.cc
  for embedded. Instead, use the same inline 
  definition from sql_class.h as in none-embedded 
  case (fixes duplicate symbol errors on Windows
  and removes pointless #ifdef EMBEDDED)
man/CMakeLists.txt:
  Install man files.
man/Makefile.am:
  Add new file.
mysql-test/CMakeLists.txt:
  Install mysql-test files
mysql-test/Makefile.am:
  Add new files
mysql-test/lib/My/ConfigFactory.pm:
  Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/Find.pm:
  the build configurations are now also available on Unix
  Xcode on Mac uses the Release, RelwithDebinfo and Debug 
  subdirectories for executables. Earlier, build configurations 
  were available only on Windows.
mysql-test/lib/My/SafeProcess.pm:
  Allow testing with mtr in out-of-source builds.
mysql-test/lib/My/SafeProcess/CMakeLists.txt:
  Port CMakeLists.txt to Unix
mysql-test/lib/My/SafeProcess/safe_kill_win.cc:
  add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
mysql-test/lib/My/SafeProcess/safe_process_win.cc:
  Add stdlib.h (to be able to compile with -DWIN32_LEAN_AND_MEAN)
  define JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if not defined 
  (can happen using MinGW compiler that comes with old SDK)
mysql-test/mtr.out-of-source:
  Allow testing with mtr in out-of-source builds.
mysql-test/mysql-test-run.pl:
  Allow testing with mtr in out-of-source builds.
  Use common find_plugin macro for Windows and unix.
mysql-test/t/fulltext_plugin.test:
  This test can now run on Windows as well.
mysys/CMakeLists.txt:
  Port CMakeLists.txt to Unix
mysys/my_create.c:
  config-win.h is dead => NO_OPEN_3 is never defined.
mysys/my_getsystime.c:
  config-win.h is dead => define OFFSET_TO_EPOCH where it is used.
mysys/my_winthread.c:
  Add  win32 pthread_cancel - used by daemon_example
mysys/mysys_priv.h:
  config-win.h is dead => include <sys/stat.h> where it is used
  fix prototype of my_win_(f)stat
plugin/daemon_example/CMakeLists.txt:
  Compile daemon_example with CMake
plugin/daemon_example/Makefile.am:
  Add new file
plugin/fulltext/CMakeLists.txt:
  Compile full-text example with CMake
plugin/fulltext/Makefile.am:
  Add new file.
plugin/semisync/CMakeLists.txt:
  Fix semisync to use common  macro for plugins.
regex/CMakeLists.txt:
  Use absolute filenames, when adding regex library 
  (we recompile files in embedded, and want to locate 
  sources via GET_TARGET_PROPERTY( ... SOURCES ..))
regex/regex2.h:
  Remove pointless typedef (produces error with MinGW compiler)
scripts/CMakeLists.txt:
  Add configure/install for scripts
sql-bench/CMakeLists.txt:
  install sql-bench files
sql-bench/Makefile.am:
  Add new file
sql/CMakeLists.txt:
  Port CmakeLists.txt to Unix
sql/nt_servc.cc:
  compile server with -DWIN32_LEAN_AND_MEAN
sql/share/CMakeLists.txt:
  Install charsets
sql/share/Makefile.am:
  Add new file
sql/sql_builtin.cc.in:
  Handle pure-C plugins on Windows.
sql/sql_class.h:
  Use the same clear_error macro in embedded and not embedded.
  Fixes pointless #ifdef and avoids duplicate symbols when linking
  on Windows.
storage/Makefile.am:
  storage/mysql_storage_engine.cmake => cmake/plugin.cmake
storage/archive/CMakeLists.txt:
  Add names for static and dynamic plugin libraries.
  Link archive with zlib
storage/blackhole/CMakeLists.txt:
  Add names for static and dynamic storage 
  engine libraries
storage/csv/CMakeLists.txt:
  Add names for static and dynamic storage engine
  libraries
storage/example/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/federated/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/heap/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/ibmdb2i/CMakeLists.txt:
  Better port for ibmdb2i plugin
storage/innobase/CMakeLists.txt:
  Run system checks.
  
  Add names for static and dynamic storage engine 
  libraries.
storage/innobase/include/page0page.ic:
  Fix compile error on OpenSolaris.
storage/myisam/CMakeLists.txt:
  Port CmakeLists.txt to Unix
storage/myisammrg/CMakeLists.txt:
  Add names for static and dynamic storage engine 
  libraries
storage/mysql_storage_engine.cmake:
  storage/mysql_storage_engine.cmake => cmake/plugin.cmake
support-files/CMakeLists.txt:
  Configure and install some files from support-files.
support-files/Makefile.am:
  Add new file
tests/CMakeLists.txt:
  In general case, mysqlclient library can be dependent
  on C++ runtime(if it includes yassl and is not compiled
  with gcc or MSVC)
unittest/mysys/CMakeLists.txt:
  Add unit tests
unittest/mysys/Makefile.am:
  Add new file
unittest/mytap/CMakeLists.txt:
  Add library for unit tests
unittest/mytap/Makefile.am:
  Add new file
unittest/mytap/tap.c:
  fix function definitions to match declarations
win/create_def_file.js:
  Fix link error with intel compiler (icl 
  defines of special label for exception handler)
2009-11-09 12:32:48 +01:00
Sergei Golubchik
1a8f08b006 unit tests for my_vsnprintf,
bug fixes for my_vsnprintf

include/mysql/service_my_snprintf.h:
  typo fixed
strings/my_vsnprintf.c:
  bugfixes:
  correct handling of %08p (%p with zero-padding)
  assert crash on .*$n (positional argument as precision)
2009-11-04 00:15:16 +01:00
Michael Widenius
5bddbc44c6 Fixed compiler warning message
- Added checking of return value for system(), freopen(), fgets() and chown()
- Ensure that calls that require a format strings gets a format string
- Other trivial things
Updated test suite results (especially for pbxt and embedded server)
Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests
Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts"
Added mysqld startup option '--debug-flush'
Create maria_recovery.trace in data directory instead of current directory

client/mysql.cc:
  Check return value from system()
client/mysql_upgrade.c:
  Check return value from fgets()
client/mysqladmin.cc:
  Check return value from fgets()
client/mysqlslap.c:
  Check return value from system() (but ignore it, as it's not critical)
extra/yassl/src/crypto_wrapper.cpp:
  Check return value from fgets() (but ignore it, as it's internal file)
extra/yassl/taocrypt/src/aes.cpp:
  Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/blowfish.cpp:
  Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/misc.cpp:
  Ifdef not used code
include/mysys_err.h:
  Added error message for failing chown()
mysql-test/mysql-test-run.pl:
  Don't give warning for skipping ndbcluster (never enabled in MariaDB)
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
  Update with new information schema information
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
  New test
mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result:
  Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result:
  Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/t/is_tables_is.test:
  Don't run with embedded server (as results differ)
  I added a new test for embedded server
mysql-test/suite/funcs_1/t/is_tables_is_embedded.test:
  New test
mysql-test/suite/pbxt/my.cnf:
  Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt
mysql-test/suite/pbxt/t/count_distinct3.test:
  Speed up test by inserting begin; ... commit;
mysql-test/suite/pbxt/t/subselect.test:
  Speed up test by inserting begin; ... commit;
mysys/errors.c:
  Added error message for failing chown()
mysys/my_copy.c:
  Added error message for failing chown()
mysys/my_redel.c:
  Added error message for failing chown()
mysys/safemalloc.c:
  Added cast to get rid of compiler warning
sql/ha_partition.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/log.cc:
  Test return value of freopen()
sql/mysqld.cc:
  Test return value of freopen()
  Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC)
sql/rpl_rli.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/set_var.cc:
  Added {} to get rid of compiler warnings
sql/slave.cc:
  Fixed wrong argument to mi->report() and sql_print...() (they require a format string)
sql/sql_cache.cc:
  Fixed wrong argument to sql_printinformation() (it requires a format string)
sql/sql_parse.cc:
  Test return value of fgets()
sql/sql_plugin.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/sql_select.cc:
  Use unique table name for internal temp tables instead of full path
  (Simple speed & space optimization)
sql/udf_example.c:
  Removed compiler warning about not used variable
storage/maria/ha_maria.cc:
  Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string)
storage/maria/ma_recovery.c:
  Create maria_recovery.trace in data directory instead of current directory
storage/maria/unittest/ma_test_loghandler-t.c:
  Fixed wrong argument to ok();  Requires a format string
storage/pbxt/src/strutil_xt.cc:
  Detect temporary tables by checking if that path for the table is in the mysql data directory.
  The database for temporary tables is after this patch, from PBXT point of view, ""
  This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused
  ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite.
tests/mysql_client_test.c:
  Fixed compiler warnings
unittest/mysys/base64-t.c:
  Fixed wrong argument to diag() (it requires a format string)
  Added a comment that the current 'print' of differing buffers doesn't print the right thing,
  but didn't fix this as it's not important (unless we find a bug in the real code)
2009-10-26 13:35:42 +02:00
Mikael Ronstrom
73f9d9c371 Bug fixes to my_atomic infrastructure 2009-10-15 15:03:43 +02:00
Mikael Ronstrom
bae553cfcd Backported my_atomic from 6.0-codebase and added support for 64-bit atomics to enable removal of LOCK_thread_count from every query, removed LOCK_thread_count from use in dispatch_command and close of query which is used in every query, now uses atomic increments/decrements instead 2009-10-12 11:00:39 +02:00
Georgi Kodinov
370acc8b56 automerge 2009-10-04 12:15:05 +03:00
Staale Smedseng
6a89842e36 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
Joerg Bruehe
db89051656 Fix bug#46980
Option "--without-server" still not working in 5.1

The general approach is to make sure that source files
which require thread support are only compiled if the build
really needs thread support,
which means when the server is built or a thread-safe client
library.

This required several changes:
- Make sure the subdirectories "storage/" and "plugin/" are
  only processed if the server is built, not ifclient-only.
- Make the compilation of some modules which inherently
  require threading depend on thread supportin the build.
- Separate the handling of threading in "configure.in" from
  that of server issues, threading is also needed in a
  non-server build of a thread-safe client library.

Also, "libdbug" must get built even in a client-only build,
so "dbug/" must be in the list of client directories.

In addition, calls to thread functions in source files which
can be built without thread support must use the wrapper
functions which handle the non-threaded build.
So the modules "client/mysqlimport.c" and "client/mysqlslap.c"
must call "my_thread_end()" only via "mysql_thread_end()".


Makefile.am:
  The directories "storage/" and "plugin/" contain files
  which are needed for the server only, so their contents
  is to be built only if a server is built.
  
  They must not be named unconditionally, because building
  their contents will fail unless threads are enabled.
  
  These directories are now listed in the "configure"
  variable "sql_server_dirs" which becomes part of
  "sql_union_dirs" if the server is to be built.
client/mysqlimport.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
client/mysqlslap.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
configure.in:
  Various changes to support builds "--without-server":
  
  1) For the unit tests, we need "libdbug".
  
  2) Separate the treatment of the server from that of the
     thread-safe client library.
  
  3) Introduce an "automake conditional" "NEED_THREAD"
     which can be checked in some "Makefile.am".
  
  4) Include "storage/" and "plugin/" in the list of
     "sql_server_dirs" so that they are handled in the
     top "Makefile.am" only if the server is to be built
     (see the change in that file).
mysys/Makefile.am:
  The code of "mf_keycache.c" in 5.1 is no longer safe
  to be built without thread support.
  (In 5.0, this was possible.)
  
  Rather than fix these issues, which is tedious and risky,
  avoid the need to ever build it without thread support:
  It is needed in the server only, which needs thread support.
  
  The only case where we build a "libmysys" without thread
  support is for a non-threaded client, where "mf_keycache"
  is not neded.
  So its inclusion in the list of source files can depend
  on the new conditional "NEED_THREAD".
unittest/mysys/Makefile.am:
  Test program "my_atomic-t" is to verify the correct handling
  of threads only, it cannot be built without thread support
  and is not needed in such cases either.
  
  Let its build depend on the new conditional "NEED_THREAD".
2009-09-17 18:34:24 +02:00
Sergey Petrunya
d841ea23ef Trivial fixes for windows compile failures
- Add strmov_overlapp.c where it's needed
- Add libevent where it is required
- Fix typo in unittest/mysys/waiting_threads-t.c
- fix xtradb C language source so that they have variable declarations before
  any operators, as it is (or was?) required in C.

libmysql/CMakeLists.txt:
  - Add strmov_overlapp.c where it's needed
sql/CMakeLists.txt:
  - Add strmov_overlapp.c where it's needed
  - Add libevent where it is required
storage/xtradb/btr/btr0cur.c:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
storage/xtradb/buf/buf0buddy.c:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
storage/xtradb/buf/buf0flu.c:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
storage/xtradb/fil/fil0fil.c:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
storage/xtradb/handler/i_s.cc:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
storage/xtradb/srv/srv0srv.c:
  - fix xtradb C language source so that they have variable declarations before
    any operators, as it is (or was?) required in C.
strings/CMakeLists.txt:
  - Add strmov_overlapp.c where it's needed
unittest/mysys/waiting_threads-t.c:
  - Fix typo in unittest/mysys/waiting_threads-t.c
2009-09-01 15:59:54 +04:00
Michael Widenius
4dc093cee4 Avoid compiler warnings on windows
include/config-win.h:
  Added missing typedef ssize_t
  Added some other useful defines from MySQL 6.0
unittest/mysys/waiting_threads-t.c:
  Fixed link failure for 'ftruncate' on Windows
2009-03-20 13:41:30 +02:00
Sergei Golubchik
ce8f55fe3b Bug#41092 Maria: timeout in waiting_threads-t
it was bug in a test program, changed WT_THD's initialization to ensure they have no garbage from the previous run.
2009-02-12 11:06:03 +01:00
Sergei Golubchik
9aa2ada9d0 compilation fixes 2009-01-19 16:27:49 +01:00
Sergei Golubchik
9c96fde120 post-review fixes
include/atomic/generic-msvc.h:
  prevent possible compiler warnings
include/lf.h:
  comments, better definition for LF_HASH_OVERHEAD
include/maria.h:
  define MARIA_CANNOT_ROLLBACK here
include/my_pthread.h:
  avoid possible name clash
include/waiting_threads.h:
  comments, const, move WT_RESOURCE to waiting_threads.c
mysql-test/suite/maria/r/maria_notembedded.result:
  new test
mysql-test/suite/maria/t/maria_notembedded.test:
  new test - 5-way deadlock
mysys/lf_hash.c:
  better definition for LF_HASH_OVERHEAD
mysys/my_static.c:
  comment
mysys/my_thr_init.c:
  casts
mysys/waiting_threads.c:
  comments, asserts, etc
server-tools/instance-manager/parse.cc:
  fix my_init_dynamic_array() to follow new calling conventions
sql/mysqld.cc:
  call wt_init after set_proper_floating_point_mode
sql/sql_class.h:
  comment
storage/maria/ha_maria.cc:
  move MARIA_CANNOT_ROLLBACK to a common header
storage/maria/ma_commit.c:
  comment
storage/maria/ma_write.c:
  comments, check for HA_ERR_FOUND_DUPP_KEY
storage/maria/trnman.c:
  comments, assert
storage/maria/trnman.h:
  comments
storage/maria/unittest/trnman-t.c:
  be paranoid
unittest/mysys/lf-t.c:
  comments
unittest/mysys/waiting_threads-t.c:
  comments, safety, memory leak
2009-01-15 22:27:36 +01:00
Sergei Golubchik
9fb894540e unittest: don't run big tests by default 2008-10-22 11:17:26 +02:00
Sergei Golubchik
f8fc47f062 warnings on windows 2008-10-21 17:13:24 +02:00
Sergei Golubchik
c0157e8aea compiler warnings on winx86 2008-10-07 20:14:50 +02:00
Sergei Golubchik
27dadbd895 wt: don't support a key as a union { ulonglong, void* }. Although convenient,
it forces the user to bzero a key before setting it as a pointer, otherwise
it'll have random content on architectures where
sizeof(void*) < sizeof(ulonglong).

Declaring a key as ulonglong only (not a union) makes this user mistake
impossible.

include/waiting_threads.h:
  WT_RESOURCE_ID::value is an ulonglong, not a union
mysys/waiting_threads.c:
  WT_RESOURCE_ID::value is an ulonglong, not a union
storage/maria/ma_write.c:
  WT_RESOURCE_ID::value is an ulonglong, not a union
storage/maria/trnman.c:
  WT_RESOURCE_ID::value is an ulonglong, not a union
unittest/mysys/waiting_threads-t.c:
  WT_RESOURCE_ID::value is an ulonglong, not a union
2008-09-01 21:43:11 +02:00
Sergei Golubchik
533deb0ac4 build lf-t and waiting_threads-t on windows 2008-09-01 19:27:49 +02:00
Sergei Golubchik
8ba0216128 compiler warnings/errors 2008-08-30 21:34:41 +02:00
Sergei Golubchik
2b917502c1 added __attribute__((unused)) 2008-08-29 21:50:04 +02:00
Sergei Golubchik
49aa944ffb fixes for make distcheck 2008-08-29 20:51:02 +02:00
Sergei Golubchik
942651ea6c wt: comments, OOM checks, test case for deadlock detection
include/waiting_threads.h:
  make wt_thd_dontwait private
mysql-test/r/maria.result:
  deadlock example
mysql-test/t/maria.test:
  deadlock example
mysys/waiting_threads.c:
  comments, OOM checks
sql/mysqld.cc:
  fix variables
sql/sql_class.cc:
  move wt_lazy_init to THD constructor
sql/sql_class.h:
  move wt_lazy_init to THD constructor
storage/maria/ha_maria.cc:
  backport from 6.0
storage/maria/ma_write.c:
  poset-review fixes, set thd->proc_info
storage/maria/trnman.c:
  bugfixing
storage/myisam/mi_check.c:
  warnings
storage/myisam/mi_page.c:
  warnings
storage/myisam/mi_search.c:
  warnings
storage/myisammrg/myrg_create.c:
  warnings
unittest/mysys/waiting_threads-t.c:
  fixes
2008-08-28 14:43:44 +02:00
Sergei Golubchik
e2219ec965 wt_thd_lazy_init(), per-thread deadlock search depths and timeouts
mysys/array.c:
  lazy alloc in dynamic array
sql-common/client.c:
  for dynamic array, specify init_alloc==alloc_increment explicitly
sql/mysqld.cc:
  per-thread deadlock search depths and timeouts
sql/set_var.cc:
  per-thread deadlock search depths and timeouts
sql/sql_class.h:
  per-thread deadlock search depths and timeouts
2008-08-08 13:11:27 +02:00
Sergei Golubchik
6ba12f070c WL#3064 - waiting threads - wait-for graph and deadlock detection
client/mysqltest.c:
  compiler warnings
configure.in:
  remove old tests for unused programs
  disable the use of gcc built-ins if smp assembler atomics were selected explictily.
  add waiting_threads.o to THREAD_LOBJECTS
include/lf.h:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
  constructor/destructor in lf-alloc
include/my_pthread.h:
  shuffle set_timespec/set_timespec_nsec macros a bit to be able to fill
  several timeout structures with only one my_getsystime() call
include/waiting_threads.h:
  waiting threads - wait-for graph and deadlock detection
mysys/Makefile.am:
  add waiting_threads.c
mysys/lf_alloc-pin.c:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
  constructor/destructor in lf-alloc
mysys/lf_hash.c:
  constructor/destructor in lf-alloc
mysys/my_thr_init.c:
  remember end-of-stack pointer in the mysys_var
mysys/waiting_threads.c:
  waiting threads - wait-for graph and deadlock detection
storage/maria/ha_maria.cc:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
storage/maria/ma_commit.c:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
storage/maria/trnman.c:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
storage/maria/trnman_public.h:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
storage/maria/unittest/trnman-t.c:
  replace the end-of-stack pointer with the pointer to the end-of-stack pointer.
  the latter could be stored in THD (mysys_vars) and updated in pool-of-threads
  scheduler.
unittest/mysys/Makefile.am:
  add waiting_threads-t
unittest/mysys/lf-t.c:
  factor out the common code for multi-threaded stress unit tests
  move lf tests to a separate file
unittest/mysys/my_atomic-t.c:
  factor out the common code for multi-threaded stress unit tests
  move lf tests to a separate file
unittest/mysys/thr_template.c:
  factor out the common code for multi-threaded stress unit tests
unittest/mysys/waiting_threads-t.c:
  wt tests
2008-07-29 16:10:24 +02:00
unknown
34fff04d03 Merge gbichot4.local:/home/mysql_src/mysql-5.1-build-gca
into  gbichot4.local:/home/mysql_src/mysql-maria-monty


client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/replace.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysys/my_getopt.c:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
include/my_global.h:
  merge
storage/myisam/myisamdef.h:
  merge
2008-02-18 23:35:17 +01:00
unknown
85213f6235 Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).


client/mysqldump.c:
  my_bool for C
client/mysqltest.c:
  my_bool for C
extra/replace.c:
  my_bool for C
include/my_getopt.h:
  my_bool for C
include/my_global.h:
  Prevent people from using bool in C, it causes real bugs.
include/my_sys.h:
  my_bool for C
include/my_time.h:
  my_bool for C
include/thr_lock.h:
  my_bool for C
libmysql/libmysql.c:
  my_bool for C
mysys/charset.c:
  my_bool for C
mysys/my_getopt.c:
  my_bool for C
mysys/queues.c:
  my_bool for C
mysys/thr_lock.c:
  my_bool for C
regex/reginit.c:
  my_bool for C
sql/set_var.cc:
  C functions use my_bool so we must use my_bool too.
sql/sql_plugin.cc:
  C functions use my_bool so we must use my_bool too.
  This fixes a real observed bug of Maria, because on some Mac OS X,
  sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong.
  Removing useless line.
storage/heap/hp_update.c:
  my_bool for C
storage/myisam/mi_check.c:
  my_bool for C
storage/myisam/mi_dynrec.c:
  my_bool for C
storage/myisam/mi_search.c:
  my_bool for C
storage/myisam/mi_update.c:
  my_bool for C
storage/myisam/mi_write.c:
  my_bool for C
storage/myisam/myisamdef.h:
  my_bool for C
storage/myisam/myisamlog.c:
  my_bool for C
storage/myisam/myisampack.c:
  my_bool for C
tests/mysql_client_test.c:
  my_bool for C
unittest/mysys/bitmap-t.c:
  my_bool for C
vio/viosslfactories.c:
  my_bool for C
2008-02-18 23:29:39 +01:00
unknown
bee40ef1d0 build/test failures on different platforms
include/atomic/rwlock.h:
  define MY_ATOMIC_MODE_RWLOCKS if this is the way we have to go
mysys/lf_alloc-pin.c:
  no semicolon
mysys/lf_hash.c:
  no semicolon
storage/maria/lockman.c:
  no semicolon
storage/maria/ma_loghandler.c:
  no semicolon
unittest/mysys/my_atomic-t.c:
  powerpc is no better
  (condition could be a bit too broad, but hey, it's just a unit test)
2008-02-13 18:25:56 +01:00
unknown
d79e70597a negative lists in dbug (-#-d,info => everything but "info").
unit tests for dbug


dbug/Makefile.am:
  unit tests for dbug
dbug/dbug.c:
  negative lists (-#-d,info => everything but "info")
include/my_dbug.h:
  negative lists (-#-d,info => everything but "info")
unittest/Makefile.am:
  unit tests for dbug
dbug/tests-t.pl:
  unit tests for dbug
dbug/tests.c:
  unit tests for dbug
2008-02-01 16:21:44 +01:00
unknown
db58a1378c changes for big unit tests
Makefile.am:
  make test-unit-big
storage/maria/unittest/Makefile.am:
  support big unit tests
storage/maria/unittest/ma_pagecache_consist.c:
  support big unit tests and other changes
storage/maria/unittest/ma_pagecache_single.c:
  support big unit tests
storage/maria/unittest/ma_test_all-t:
  support big unit tests and sub skip()
storage/maria/unittest/ma_test_loghandler-t.c:
  support big unit tests
unittest/unit.pl:
  don't ignore existing $MYTAP_CONFIG
2008-01-29 18:15:38 +01:00
unknown
71eb292f37 storage/maria/unittest/ma_test_all-t
1. reasonable defaults for maria_path
    2. reasonable TAP-compatible output in non-verbose mode
unittest/Makefile.am
    remove maria_path hack
BitKeeper/etc/ignore@1.269
    added maria_log.00000* ma_test_recovery.output test?.MA?


BitKeeper/etc/ignore:
  added maria_log.00000* ma_test_recovery.output test?.MA?
storage/maria/unittest/ma_test_all-t:
  1. reasonable defaults for maria_path
  2. reasonable TAP-compatible output in non-verbose mode
unittest/Makefile.am:
  remove maria_path hack
2008-01-29 15:26:04 +01:00
unknown
266fde77b2 Added --loose-skip-maria to MYSQLD_BOOTSTRAP_CMD to get bootstrap.test to work
Allow one to run bootstrap even if --skip-maria is used (needed for bootstrap.test)
Fixed lots of compiler warnings

NOTE:
maria-big and maria-recover tests failes becasue of bugs in transaction log handling.
Sanja knows about this and is working on it!


mysql-test/mysql-test-run.pl:
  Added --loose-skip-maria to MYSQLD_BOOTSTRAP_CMD to get bootstrap.test to work
mysql-test/r/maria-recovery.result:
  Updated results
mysql-test/t/bootstrap.test:
  Removed not needed empty line
mysql-test/t/change_user.test:
  Fixed results for 32 bit systems
mysql-test/t/maria-big.test:
  Only run this when you use --big
mysql-test/t/maria-recovery.test:
  Added test case for recovery with big blobs
mysys/my_uuid.c:
  Fixed compiler warning
sql/mysqld.cc:
  Allow one to run bootstrap even if --skip-maria is used (needed for bootstrap.test)
sql/set_var.cc:
  Compare max_join_size with ULONG_MAX instead of HA_POS_ERROR as we set max_join_size to ULONG_MAX by default
storage/maria/ma_bitmap.c:
  Added __attribute((unused)) to fix compiler warning
storage/maria/ma_blockrec.c:
  Added casts to remove compiler warnings
  Change variable types to avoid compiler warnings
storage/maria/ma_check.c:
  Added casts to remove compiler warnings
storage/maria/ma_checkpoint.c:
  Change variable types to avoid compiler warnings
storage/maria/ma_create.c:
  Change variable types to avoid compiler warnings
storage/maria/ma_delete.c:
  Added casts to remove compiler warnings
storage/maria/ma_key_recover.c:
  Added casts to remove compiler warnings
storage/maria/ma_loghandler.c:
  Moved initiazation of prev_buffer first as this could otherwise not be set in case of errors
storage/maria/ma_page.c:
  Added casts to remove compiler warnings
storage/maria/ma_pagecache.c:
  Added __attribute((unused)) to fix compiler warning
storage/maria/ma_pagecrc.c:
  Added #ifndef DBUG_OFF to remove compiler warning
storage/maria/ma_recovery.c:
  Added casts to remove compiler warnings
storage/maria/ma_write.c:
  Added casts to remove compiler warnings
storage/maria/maria_chk.c:
  Split long string into two to avoid compiler warnings
storage/myisam/ft_boolean_search.c:
  Added LINT_INIT() to remove compiler warning
support-files/compiler_warnings.supp:
  Suppress wrong compiler warning
unittest/mytap/tap.c:
  Fixed declaration to match prototypes to remove compiler warnings
2008-01-11 01:47:52 +02:00
unknown
ce8de7afdf Windows fixes
-new option WITH_MARIA_STORAGE_ENGINE for config.js
-correct build errors
-build test executables
-downport changes for atomic functions from 5.2
-remove LOCK_uuid_generator from C++ files to avoid linker errors
-new function my_uuid2str()


BitKeeper/deleted/.del-x86-msvc.h:
  Delete: include/atomic/x86-msvc.h
CMakeLists.txt:
  Windows fixes:
  -New option WITH_MARIA_STORAGE_ENGINE
  -Add unit tests
include/Makefile.am:
  replace x86-msvc.h with generic-msvc.h
include/config-win.h:
  my_chmod() support
include/my_atomic.h:
  Downport my_atomic from 5.2 tree
include/my_bit.h:
  Correct unresolved symbol errors on Windows
include/my_pthread.h:
  pthread_mutex_unlock now returns 0 (was void previously)
  defined PTHREAD_STACK_MIN
include/my_sys.h:
  New function my_uuid2str()
  define MY_UUID_STRING_LENGTH
include/atomic/nolock.h:
  Downport my_atomic from 5.2 tree
libmysqld/CMakeLists.txt:
  New option WITH_MARIA_STORAGE_ENGINE
mysys/CMakeLists.txt:
  Add missing files
mysys/lf_dynarray.c:
  Fix compiler errors on Windows
mysys/my_getncpus.c:
  Windows port
mysys/my_uuid.c:
  Windows fixes: there is no random() on Windows, use ANSI rand()
  New function my_uuid2str()
mysys/my_winthread.c:
  Downport from 5.2 tree
  -Call my_thread_end() before pthread_exit()
  -Avoid crash if pthread_create is called with NULL attributes
sql/CMakeLists.txt:
  Link mysqld with Maria storage engine
sql/item_func.cc:
  Remove LOCK_uuid_generator from C++ to avoid linker errors.
  Use dedicated mutex for short uuids
sql/item_strfunc.cc:
  Use my_uuid() and my_uuid2str() functions from mysys.
sql/item_strfunc.h:
  Define MY_UUID_STRING_LENGTH in my_sys.h
sql/mysql_priv.h:
  LOCK_uuid_generator must be declared as extern "C"
sql/mysqld.cc:
  Init and destroy LOCK_uuid_short mutex
storage/maria/CMakeLists.txt:
  -Use the same source files as in Makefile.am
  -Build test binaries
storage/maria/ha_maria.cc:
  snprintf->my_snprintf
storage/maria/lockman.c:
  Fix compiler error on Windows
storage/maria/ma_check.c:
  Fix compiler error on Windows
storage/maria/ma_loghandler.c:
  Fix compile errors
  my_open()/my_sync() do not work for directories on Windows
storage/maria/ma_recovery.c:
  Fix compile error on Windows
storage/maria/ma_test2.c:
  Rename variable to avoid naming conflict with Microsoft C runtime 
  function
storage/maria/ma_test3.c:
  Fix build errors on Windows
storage/maria/tablockman.c:
  Fix build errors on Windows
storage/maria/unittest/Makefile.am:
  Add CMakeLists.txt
storage/maria/unittest/ma_pagecache_consist.c:
  Fix build errors on Windows
  remove loop from get_len()
storage/maria/unittest/ma_pagecache_single.c:
  Fix build errors on Windows
storage/maria/unittest/ma_test_loghandler-t.c:
  Windows fixes
  -Avoid division by 0 in expressions like
  x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Windows fixes
  -Avoid division by 0 in expressions like
  x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
  -remove loop in get_len()
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Windows fixes
  -Avoid division by 0 in expressions like
  x/(RAND_MAX/y), where y is larger than RAND_MAX(==0x7fff on Windows)
  -remove loop in get_len()
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Fix build errors on Windows
storage/maria/unittest/test_file.c:
  Correct the code to get file size on Windows. 
  stat() information can be outdated and thus cannot be trusted.
  On Vista,stat() returns file size=0 until the file is closed at the
  first time.
storage/myisam/CMakeLists.txt:
  Fix compiler errors on Windows
  Build test executables
storage/myisam/mi_test2.c:
  Rename variable to avoid naming conflict with Microsoft C runtime 
  function
storage/myisam/mi_test3.c:
  Fix build errors on Windows
strings/CMakeLists.txt:
  Add missing file
unittest/unit.pl:
  Windows:
  downport unittest changes from 5.2 bk tree
unittest/mysys/Makefile.am:
  Windows:
  downport unittest changes from 5.2 bk tree
unittest/mysys/my_atomic-t.c:
  Windows:
  downport unittest changes from 5.2 bk tree
unittest/mytap/Makefile.am:
  Windows:
  downport unittest changes from 5.2 bk tree
unittest/mytap/tap.c:
  Windows:
  downport unittest changes from 5.2 bk tree
win/configure.js:
  Add WITH_MARIA_STORAGE_ENGINE configure option
unittest/mytap/CMakeLists.txt:
  Add missing file
unittest/mysys/CMakeLists.txt:
  Add missing file
storage/maria/unittest/CMakeLists.txt:
  Add missing file
BitKeeper/etc/ignore:
  Added comments maria-win.patch to the ignore list
include/atomic/generic-msvc.h:
  Implement atomic operations with MSVC intrinsics
2008-01-10 13:21:53 +01:00
unknown
cab8a363ee Bug fixes and new features to ma_test_all-t
scripts/mysql_fix_privilege_tables.sh:
  Fix a problem with events table not getting updated correctly.
  This happens when you run scripts/mysql_fix_privilege_tables and
  you have an old version of mysql_fix_privilege_tables.sql in
  the actual installation directory. This patch makes it look for
  the file inside the source dir first.
storage/maria/unittest/ma_test_all-t:
  Added several new options for ma_test_all-t
  
  --verbose is handy, if you want to run the tests separately on the
  screen.
  
  Added functions for counting tests and a possibility to
  separate a group of tests inside an array of test.
unittest/Makefile.am:
  Fixed a problem with make test not executing
  ma_test_all-t properly from the top source dir.
2008-01-04 02:16:24 +02:00
unknown
7fdbc4230e Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-maria


Makefile.am:
  Auto merged
configure.in:
  Auto merged
BitKeeper/triggers/post-commit:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_dbug.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
server-tools/instance-manager/CMakeLists.txt:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
sql/handler.cc:
  merged
sql/handler.h:
  merged
sql/mysql_priv.h:
  merged
sql/mysqld.cc:
  merged
sql/set_var.cc:
  merged
sql/sql_select.cc:
  merged
sql/sql_show.cc:
  merged
unittest/mysys/my_atomic-t.c:
  merged
2007-12-27 18:16:02 +01:00
unknown
3e756a80d4 my_atomic-t.c:
gcc bug workaround


unittest/mysys/my_atomic-t.c:
  gcc bug workaround
2007-12-20 23:58:09 +01:00
unknown
f4afcec393 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-maria


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~99a50df6:
  Auto merged
Makefile.am:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
include/keycache.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/lib/mtr_timer.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_events.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_insert.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_insert_delayed.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_insert.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_stm_flsh_tbls.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/array.c:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_symlink2.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/uniques.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/csv/ha_tina.h:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_extra.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_locking.c:
  Auto merged
storage/myisam/mi_log.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisam/sp_test.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
support-files/compiler_warnings.supp:
  Auto merged
client/mysqltest.c:
  Manual merge between mysql-5.1 and mysql-maria
include/my_base.h:
  Manual merge between mysql-5.1 and mysql-maria
include/my_global.h:
  Manual merge between mysql-5.1 and mysql-maria
include/myisam.h:
  Manual merge between mysql-5.1 and mysql-maria
libmysql/Makefile.shared:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/r/events_logs_tests.result:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/t/disabled.def:
  Manual merge between mysql-5.1 and mysql-maria
mysql-test/t/events_logs_tests.test:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_compress.c:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_getsystime.c:
  Manual merge between mysql-5.1 and mysql-maria
mysys/my_open.c:
  Manual merge between mysql-5.1 and mysql-maria
sql/handler.cc:
  Manual merge between mysql-5.1 and mysql-maria
sql/set_var.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_class.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_show.cc:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_sort.h:
  Manual merge between mysql-5.1 and mysql-maria
sql/sql_yacc.yy:
  Manual merge between mysql-5.1 and mysql-maria
sql/table.cc:
  Manual merge between mysql-5.1 and mysql-maria
storage/csv/ha_tina.cc:
  Manual merge between mysql-5.1 and mysql-maria
storage/myisam/mi_open.c:
  Manual merge between mysql-5.1 and mysql-maria
storage/myisam/myisamdef.h:
  Manual merge between mysql-5.1 and mysql-maria
unittest/mysys/my_atomic-t.c:
  Manual merge between mysql-5.1 and mysql-maria
2007-09-27 17:05:07 +03:00
unknown
0c9a3e597d Fixes Bug#30127: --debug-info no longer prints memory usage in mysql
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage


BUILD/compile-solaris-sparc-debug:
  Remove old cpu options
client/client_priv.h:
  Added OPT_DBUG_CHECK
client/mysql.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysql_upgrade.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqladmin.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlbinlog.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlcheck.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqldump.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlimport.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlshow.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlslap.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqltest.c:
  --debug-info now prints memory usage 
  Added --debug-check
include/my_sys.h:
  Added extra option to TERMINATE to not print statistics
libmysql/libmysql.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  --debug-info -> --debug-check to not print memory usage
mysys/my_getsystime.c:
  Moved fast time calculation to my_micro_time_and_time()
  Fixed bug in previous push related to HAVE_GETHRTIME
mysys/my_init.c:
  Print not freed memory in my_end() if MY_CHECK_ERROR is given
mysys/my_static.c:
  Cleanup
mysys/safemalloc.c:
  Added extra option to TERMINATE to not print statistics
sql/item_xmlfunc.cc:
  Fixed compiler warning
sql/sql_test.cc:
  Fixed TERMINATE() call
unittest/mysys/base64-t.c:
  Fixed link error
unittest/mysys/bitmap-t.c:
  Fixed link error
unittest/mysys/my_atomic-t.c:
  Fixed link error
2007-08-01 22:59:05 +03:00
unknown
5444b55cbb Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  hynda.mysql.fi:/home/my/mysql-maria


BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
BUILD/SETUP.sh:
  Auto merged
BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8:
  Auto merged
client/mysqldump.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/m_string.h:
  Auto merged
include/my_base.h:
  Auto merged
include/my_dbug.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/include/varchar.inc:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/events_logs_tests.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/events_logs_tests.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/my_create.c:
  Auto merged
mysys/my_handler.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_open.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
plugin/daemon_example/daemon_example.cc:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/udf_example.c:
  Auto merged
sql/uniques.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/ft_update.c:
  Auto merged
storage/myisam/fulltext.h:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_checksum.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_delete_all.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_log.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_range.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_rsamepos.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_unique.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/rt_index.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisam/sp_test.c:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
unittest/Makefile.am:
  Auto merged
BitKeeper/triggers/post-commit:
  Manual merge from mysql-5.1 to mysql-maria
configure.in:
  Manual merge from mysql-5.1 to mysql-maria
include/ft_global.h:
  Manual merge from mysql-5.1 to mysql-maria
include/keycache.h:
  Manual merge from mysql-5.1 to mysql-maria
include/my_atomic.h:
  Manual merge from mysql-5.1 to mysql-maria
include/my_global.h:
  Manual merge from mysql-5.1 to mysql-maria
include/my_sys.h:
  Manual merge from mysql-5.1 to mysql-maria
include/myisam.h:
  Manual merge from mysql-5.1 to mysql-maria
mysys/array.c:
  Manual merge from mysql-5.1 to mysql-maria
mysys/mf_keycache.c:
  Manual merge from mysql-5.1 to mysql-maria
mysys/mf_keycaches.c:
  Manual merge from mysql-5.1 to mysql-maria
mysys/my_pread.c:
  Manual merge from mysql-5.1 to mysql-maria
sql/mysqld.cc:
  Manual merge from mysql-5.1 to mysql-maria
sql/net_serv.cc:
  Manual merge from mysql-5.1 to mysql-maria
sql/set_var.cc:
  Manual merge from mysql-5.1 to mysql-maria
sql/set_var.h:
  Manual merge from mysql-5.1 to mysql-maria
sql/sql_class.h:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/ft_static.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/ha_myisam.cc:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/mi_check.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/mi_dynrec.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/mi_packrec.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/mi_write.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/myisamchk.c:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisam/myisamdef.h:
  Manual merge from mysql-5.1 to mysql-maria
storage/myisammrg/ha_myisammrg.cc:
  Manual merge from mysql-5.1 to mysql-maria
unittest/mysys/Makefile.am:
  Manual merge from mysql-5.1 to mysql-maria
unittest/mysys/my_atomic-t.c:
  Manual merge from mysql-5.1 to mysql-maria
2007-06-27 17:49:12 +03:00
unknown
aa40e3589f fix unit tests to build
unittest/mysys/Makefile.am:
  build unit tests (they were lost in a bad merge)
unittest/mysys/my_atomic-t.c:
  update to the new lf_pinbox* API
2007-06-05 18:34:24 +02:00
unknown
8f39541e7d This patch is a collection of patches from from Sanja, Sergei and Monty.
Added logging and pinning of pages to block format.
Integration of transaction manager, log handler.
Better page cache intergration
Split trnman.h into two files, so that we don't have to include my_atomic.h into C++ programs.
Renaming of structures, more comments, more debugging etc.
Fixed problem with small head block + long varchar.
Added extra argument to delete_record() and update_record() (needed for UNDO logging)
Small changes to interface of pagecache and log handler.
Change initialization of log_record_type_descriptors to not be depending on enum order.
Use array of LEX_STRING's to send data to log handler
Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists.


include/lf.h:
  Interface fixes
  Rename of structures
  (Patch from Sergei via Sanja)
include/my_atomic.h:
  More comments
include/my_global.h:
  Added MY_ERRPTR
include/pagecache.h:
  Added undo LSN when unlocking pages
mysql-test/r/maria.result:
  Updated results
mysql-test/t/maria.test:
  Added autocommit around lock tables
  (Patch from Sanja)
mysys/lf_alloc-pin.c:
  Post-review fixes, simple optimizations
  More comments
  Struct slot renames
  Check amount of memory on stack
  (Patch from Sergei)
mysys/lf_dynarray.c:
  More comments
mysys/lf_hash.c:
  More comments
  After review fixes
  (Patch from Sergei)
storage/maria/ha_maria.cc:
  Split trnman.h into two files, so that we don't have to include my_atomic.h into the .cc program.
  (Temporary fix to avoid bug in gcc)
  Move out all deferencing of the transaction structure.
  Transaction manager integrated (Patch from Sergei)
storage/maria/ha_maria.h:
  Added prototype for start_stmt()
storage/maria/lockman.c:
  Function call rename
storage/maria/ma_bitmap.c:
  Mark deleted pages free from page cache
storage/maria/ma_blockrec.c:
  Offset -> rownr
  More debugging
  Fixed problem with small head block + long varchar
  Added logging of changed pages
  Added logging of undo (Including only loggging of changed fields in case of update)
  Added pinning/unpinning of all changed pages
  More comments
  Added free_full_pages() as the same code was used in several places.
  fill_rows_parts() renamed as fill_insert_undo_parts()
  offset -> rownr
  Added some optimization of not transactional tables
  _ma_update_block_record() has new parameter, as we need original row to do efficent undo for update
storage/maria/ma_blockrec.h:
  Added ROW_EXTENTS_ON_STACK
  Changed prototype for update and delete of row
storage/maria/ma_check.c:
  Added original row to delete_record() call
storage/maria/ma_control_file.h:
  Added ifdefs for C++
storage/maria/ma_delete.c:
  Added original row to delete_record() call
  (Needed for efficent undo logging)
storage/maria/ma_dynrec.c:
  Added extra argument to delete_record() and update_record()
  Removed not used variable
storage/maria/ma_init.c:
  Initialize log handler
storage/maria/ma_loghandler.c:
  Removed not used variable
  Change initialization of log_record_type_descriptors to not be depending on enum order
  Use array of LEX_STRING's to send data to log handler
storage/maria/ma_loghandler.h:
  New defines
  Use array of LEX_STRING's to send data to log handler
storage/maria/ma_open.c:
  Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists.
  Store in MARIA_SHARE->page_type if pages will have up to date LSN's
storage/maria/ma_pagecache.c:
  Don't decrease number of readers when using pagecache_write()/pagecache_read()
  In pagecache_write() decrement request count if page was left pinned
  Added pagecache_delete_pages()
  Removed some casts
  Make trace output consistent with rest of code
  Simplify calling of DBUG_ASSERT(0)
  Only update LSN if the LSN is bigger than what's already on the page
  Added LSN parameter pagecache_unpin_page(), pagecache_unpin(), and pagecache_unlock()
  (Part of patch from Sanja)
storage/maria/ma_static.c:
  Added 'dummy' transaction option to MARIA_INFO so that we can always assume 'trn' exists.
  Added default page cache
storage/maria/ma_statrec.c:
  Added extra argument to delete_record() and update_record()
storage/maria/ma_test1.c:
  Added option -T for transactions
storage/maria/ma_test2.c:
  Added option -T for transactions
storage/maria/ma_test_all.sh:
  Test with transactions
storage/maria/ma_update.c:
  Changed prototype for update of row
storage/maria/maria_def.h:
  Changed prototype for update & delete of row as block records need to access the old row
  Store in MARIA_SHARE->page_type if pages will have up to date LSN's
  Added MARIA_MAX_TREE_LEVELS to allow us to calculate the number of possible pinned pages we may need.
  Removed not used 'empty_bits_buffer'
  Added pointer to transaction object
  Added array for pinned pages
  Added log_row_parts array for logging of field data.
  Added MARIA_PINNED_PAGE to store pinned pages
storage/maria/trnman.c:
  Added accessor functions to transaction object
  Added missing DBUG_RETURN()
  More debugging
  More comments
  Changed // comment of code to #ifdef NOT_USED
  Transaction manager integrated.
  Post review fixes
  Part of patch originally from Sergei
storage/maria/trnman.h:
  Split trnman.h into two files, so that we don't have to include my_atomic.h into the .cc program.
  (Temporary fix to avoid bug in gcc)
storage/maria/unittest/ma_pagecache_single.c:
  Added missing argument
  Added SKIP_BIG_TESTS
  (Patch from Sanja)
storage/maria/unittest/ma_test_loghandler-t.c:
  Test logging with new LEX_STRING parameter
  (Patch from Sanja)
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Test logging with new LEX_STRING parameter
  (Patch from Sanja)
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Test logging with new LEX_STRING parameter
  (Patch from Sanja)
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Test logging with new LEX_STRING parameter
  (Patch from Sanja)
storage/maria/unittest/trnman-t.c:
  Stack overflow detection
  (Patch from Sergei)
unittest/unit.pl:
  Command-line options --big and --verbose
  (Patch from Sergei)
unittest/mytap/tap.c:
  Detect --big
  (Patch from Sergei)
unittest/mytap/tap.h:
  Skip_big_tests and SKIP_BIG_TESTS
  (Patch from Sergei)
storage/maria/trnman_public.h:
  New BitKeeper file ``storage/maria/trnman_public.h''
2007-05-29 20:13:56 +03:00
unknown
8fb480ef50 Makefile.am:
Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory


plugin/daemon_example/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
plugin/fulltext/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
unittest/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
unittest/examples/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
unittest/mysys/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
unittest/mytap/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
unittest/mytap/t/Makefile.am:
  Consistent use of '%::SCCS/s.%' to prevent some 'make'
  implementations from trying to update files in SCCS directory
2007-05-28 22:18:51 +02:00
unknown
a263017494 remove unnecessary line 2007-03-16 19:44:00 +01:00
unknown
ea57b3d4a0 Merge gbichot3.local:/home/mysql_src/mysql-5.1-for-maria
into  gbichot3.local:/home/mysql_src/mysql-maria


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
client/mysqldump.c:
  Auto merged
config/ac-macros/plugins.m4:
  Auto merged
configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
include/atomic/nolock.h:
  Auto merged
include/atomic/rwlock.h:
  Auto merged
include/atomic/x86-gcc.h:
  Auto merged
include/atomic/x86-msvc.h:
  Auto merged
include/ft_global.h:
  Auto merged
include/keycache.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_atomic.h:
  Auto merged
include/my_base.h:
  Auto merged
include/my_dbug.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_handler.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/myisam.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/events_logs_tests.result:
  Auto merged
mysql-test/t/events_logs_tests.test:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/array.c:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/mf_keycaches.c:
  Auto merged
mysys/my_atomic.c:
  Auto merged
mysys/my_bit.c:
  Auto merged
mysys/my_bitmap.c:
  Auto merged
mysys/my_create.c:
  Auto merged
mysys/my_delete.c:
  Auto merged
mysys/my_getsystime.c:
  Auto merged
mysys/my_handler.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_open.c:
  Auto merged
mysys/my_pread.c:
  Auto merged
mysys/my_rename.c:
  Auto merged
mysys/my_symlink.c:
  Auto merged
mysys/my_sync.c:
  Auto merged
plugin/daemon_example/daemon_example.cc:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_sort.h:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/uniques.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/Makefile.am:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
storage/myisam/Makefile.am:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/myisam/ft_static.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/ft_update.c:
  Auto merged
storage/myisam/fulltext.h:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_delete_all.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_log.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_range.c:
  Auto merged
storage/myisam/mi_rsamepos.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_unique.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/rt_index.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
unittest/mytap/tap.c:
  Auto merged
mysql-test/r/view.result:
  manual merge
mysql-test/t/view.test:
  manual merge
Makefile.am:
  manual merge
mysql-test/t/disabled.def:
  manual merge
sql/mysqld.cc:
  manual merge
sql/set_var.cc:
  manual merge
sql/udf_example.c:
  manual merge
storage/myisam/ha_myisam.cc:
  manual merge
storage/myisam/myisamdef.h:
  manual merge
storage/ndb/src/mgmapi/mgmapi.cpp:
  manual merge
unittest/Makefile.am:
  manual merge
unittest/mysys/Makefile.am:
  manual merge
unittest/mysys/my_atomic-t.c:
  manual merge
2007-02-28 17:50:51 +01:00
unknown
f68789007f base64-t.c:
Calculate and output line count first to be
  compatible with older versions of Test::Harness


unittest/mysys/base64-t.c:
  Calculate and output line count first to be
  compatible with older versions of Test::Harness
2007-02-21 18:17:32 +01:00
unknown
4df381fdbe After merge fix 2007-02-02 17:47:13 +01:00
unknown
199ea756a6 Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-pagecache


mysys/Makefile.am:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
storage/maria/Makefile.am:
  Auto merged
storage/maria/unittest/ma_control_file-t.c:
  Auto merged
storage/maria/unittest/mf_pagecache_consist.c:
  Auto merged
storage/maria/unittest/mf_pagecache_single.c:
  Auto merged
storage/maria/unittest/test_file.h:
  Auto merged
include/pagecache.h:
  merge
mysys/mf_pagecache.c:
  merge
storage/maria/maria_def.h:
  merge
storage/maria/unittest/Makefile.am:
  merge
unittest/mysys/Makefile.am:
  merge
2007-02-02 13:55:48 +02:00
unknown
0254009221 postreview changes for page cache and pre review commit for loghandler
storage/maria/unittest/test_file.c:
  Rename: unittest/mysys/test_file.c -> storage/maria/unittest/test_file.c
storage/maria/unittest/test_file.h:
  Rename: unittest/mysys/test_file.h -> storage/maria/unittest/test_file.h
include/pagecache.h:
  A waiting queue mechanism moved to separate file wqueue.*
  Pointer name changed for compatibility
mysys/Makefile.am:
  A waiting queue mechanism moved to separate file wqueue.*
mysys/mf_keycache.c:
  fixed unsigned comparison
mysys/mf_pagecache.c:
  A waiting queue mechanism moved to separate file wqueue.*
  Fixed bug in unregistering block during write
storage/maria/Makefile.am:
  The loghandler files added
storage/maria/ma_control_file.h:
  Now we have loghandler and can compile control file
storage/maria/maria_def.h:
  Including files need for compilation of maria
storage/maria/unittest/Makefile.am:
  unit tests of loghandler
storage/maria/unittest/ma_control_file-t.c:
  Used maria def
storage/maria/unittest/mf_pagecache_consist.c:
  fixed memory overrun
storage/maria/unittest/mf_pagecache_single.c:
  fixed used uninitialized memory
unittest/mysys/Makefile.am:
  unittests of pagecache moved to maria becase pagecache need loghandler
include/wqueue.h:
  New BitKeeper file ``include/wqueue.h''
mysys/wqueue.c:
  New BitKeeper file ``mysys/wqueue.c''
storage/maria/ma_loghandler.c:
  New BitKeeper file ``storage/maria/ma_loghandler.c''
storage/maria/ma_loghandler.h:
  New BitKeeper file ``storage/maria/ma_loghandler.h''
storage/maria/ma_loghandler_lsn.h:
  New BitKeeper file ``storage/maria/ma_loghandler_lsn.h''
storage/maria/unittest/ma_test_loghandler-t.c:
  New BitKeeper file ``storage/maria/unittest/ma_test_loghandler-t.c''
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  New BitKeeper file ``storage/maria/unittest/ma_test_loghandler_multigroup-t.c''
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  New BitKeeper file ``storage/maria/unittest/ma_test_loghandler_multithread-t.c''
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  New BitKeeper file ``storage/maria/unittest/ma_test_loghandler_pagecache-t.c''
2007-02-02 09:41:32 +02:00
unknown
7412f0fa0c After merge fixes
Removed compiler warnings
Fixed clashing function name in maria
Disable maria tests from MySQL level for now


BitKeeper/deleted/.del-ha_maria.cc:
  Rename: libmysqld/ha_maria.cc -> BitKeeper/deleted/.del-ha_maria.cc
BitKeeper/etc/ignore:
  added libmysqld/ha_maria.cc
  ---
  added storage/maria/unittest/maria_control unittest/maria_control
  ---
  added *.Tpo
  ---
  added unittest/page_cache_test_file_1
  ---
  added unittest/pagecache_debug.log
  ---
  added unittest/mysys/mf_pagecache_consist_1k-t-big unittest/mysys/mf_pagecache_consist_1kHC-t-big unittest/mysys/mf_pagecache_consist_1kRD-t-big unittest/mysys/mf_pagecache_consist_1kWR-t-big unittest/mysys/mf_pagecache_consist_64k-t-big unittest/mysys/mf_pagecache_consist_64kHC-t-big unittest/mysys/mf_pagecache_consist_64kRD-t-big unittest/mysys/mf_pagecache_consist_64kWR-t-big
  ---
  added unittest/mysys/mf_pagecache_single_64k-t-big
Makefile.am:
  Don't run 'test-unit' by default (takes too long time)
client/mysqldump.c:
  Fixed compiler warning
include/lf.h:
  Remove compiler warnings about not used require_pins constant
include/pagecache.h:
  LSN should be of type ulonglong
  (This fixes some compiler warnings)
mysql-test/r/events_logs_tests.result:
  Make test predictable
mysql-test/r/view.result:
  Make test results predictable
mysql-test/t/disabled.def:
  Disable maria tests for a while
mysql-test/t/events_logs_tests.test:
  Make test predictable
mysql-test/t/view.test:
  Make test results predictable
mysys/lf_alloc-pin.c:
  #warning ->QQ
mysys/lf_hash.c:
  #warning ->QQ
  Removed compiler warnings
mysys/mf_pagecache.c:
  Removed compiler warnings
mysys/my_rename.c:
  Removed compiler warnings
plugin/daemon_example/daemon_example.c:
  Remove compiler warning
sql/ha_ndbcluster.cc:
  Remove compiler warning
sql/udf_example.c:
  Remove compiler warning
storage/maria/lockman.c:
  Changed #warnings to QQ comment
  Removed compiler warnings
storage/maria/ma_blockrec.c:
  Removed compiler warnings
storage/maria/ma_check.c:
  After merge fixes
storage/maria/ma_key.c:
  After merge fixes
storage/maria/ma_packrec.c:
  After merge fixes
storage/maria/ma_rkey.c:
  After merge fixes
storage/maria/ma_sort.c:
  After merge fixes
storage/maria/ma_sp_defs.h:
  Rename clashing function name
storage/maria/ma_sp_key.c:
  Rename clashing function name
storage/maria/ma_test_all.res:
  New test results
storage/maria/ma_unique.c:
  Fixed compiler warning
storage/maria/tablockman.c:
  #warning -> QQ
storage/maria/tablockman.h:
  #warning -> QQ
storage/maria/trnman.c:
  #warning -> QQ
storage/maria/unittest/lockman2-t.c:
  Removed compiler warnings
storage/maria/unittest/ma_control_file-t.c:
  Removed warning for 'maria_control' file not found
storage/maria/unittest/trnman-t.c:
  Removed compiler warnings
storage/ndb/src/mgmapi/mgmapi.cpp:
  Remove compiler warnings
unittest/mysys/mf_pagecache_consist.c:
  Removed compiler warnings
unittest/mysys/my_atomic-t.c:
  Removed compiler warnings
2007-01-26 13:32:02 +02:00
unknown
bb48472601 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge


client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
libmysqld/CMakeLists.txt:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_row_tabledefs_2myisam.result:
  Auto merged
mysql-test/r/rpl_row_tabledefs_3innodb.result:
  Auto merged
mysql-test/r/rpl_sp.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/my_thr_init.c:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/rpl_injector.cc:
  Auto merged
sql/rpl_injector.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_locale.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
unittest/mysys/my_atomic-t.c:
  Auto merged
sql/log_event.cc:
  Manual merge main->rpl
sql/mysqld.cc:
  Manual merge main->rpl
2007-01-12 12:31:44 +01:00
unknown
d73b5b8e83 Many files:
Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
  Added GPL copyright text
my_vle.h, rpl_utility.h, my_vle.c, base64-t.c, rpl_utility.cc:
  Changed copyright header formatting some
plugin_example.c, daemon_example.c:
  Added "Copyright (C) 2006 MySQL AB" to GPL header


CMakeLists.txt:
  Added GPL copyright text
client/CMakeLists.txt:
  Added GPL copyright text
dbug/CMakeLists.txt:
  Added GPL copyright text
extra/CMakeLists.txt:
  Added GPL copyright text
extra/yassl/CMakeLists.txt:
  Added GPL copyright text
extra/yassl/taocrypt/CMakeLists.txt:
  Added GPL copyright text
libmysql/CMakeLists.txt:
  Added GPL copyright text
libmysqld/CMakeLists.txt:
  Added GPL copyright text
libmysqld/examples/CMakeLists.txt:
  Added GPL copyright text
mysys/CMakeLists.txt:
  Added GPL copyright text
regex/CMakeLists.txt:
  Added GPL copyright text
server-tools/instance-manager/CMakeLists.txt:
  Added GPL copyright text
sql/CMakeLists.txt:
  Added GPL copyright text
storage/archive/CMakeLists.txt:
  Added GPL copyright text
storage/blackhole/CMakeLists.txt:
  Added GPL copyright text
storage/csv/CMakeLists.txt:
  Added GPL copyright text
storage/example/CMakeLists.txt:
  Added GPL copyright text
storage/federated/CMakeLists.txt:
  Added GPL copyright text
storage/heap/CMakeLists.txt:
  Added GPL copyright text
storage/innobase/CMakeLists.txt:
  Added GPL copyright text
storage/myisam/CMakeLists.txt:
  Added GPL copyright text
storage/myisammrg/CMakeLists.txt:
  Added GPL copyright text
strings/CMakeLists.txt:
  Added GPL copyright text
tests/CMakeLists.txt:
  Added GPL copyright text
vio/CMakeLists.txt:
  Added GPL copyright text
zlib/CMakeLists.txt:
  Added GPL copyright text
include/my_vle.h:
  Changed copyright header formatting some
mysys/my_vle.c:
  Changed copyright header formatting some
plugin/daemon_example/daemon_example.c:
  Added "Copyright (C) 2006 MySQL AB" to GPL header
plugin/fulltext/plugin_example.c:
  Added "Copyright (C) 2006 MySQL AB" to GPL header
plugin/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/authors.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/contributors.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/item_xmlfunc.cc:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/partition_element.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/partition_info.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/rpl_injector.cc:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/rpl_injector.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/sql_binlog.cc:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/sql_servers.h:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/archive/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/blackhole/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/csv/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/example/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
storage/federated/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
win/Makefile.am:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header
sql/rpl_utility.cc:
  Changed copyright header formatting some
sql/rpl_utility.h:
  Changed copyright header formatting some
unittest/mysys/base64-t.c:
  Changed copyright header formatting some
include/my_uctype.h:
  Added GPL copyright text
plugin/daemon_example/Makefile.am:
  Added GPL copyright text
plugin/fulltext/Makefile.am:
  Added GPL copyright text
scripts/make_win_bin_dist:
  Added GPL copyright text
server-tools/instance-manager/user_management_commands.cc:
  Added GPL copyright text
sql/sql_builtin.cc.in:
  Added GPL copyright text
sql/sql_show.h:
  Added GPL copyright text
storage/archive/archive_test.c:
  Added GPL copyright text
storage/ndb/src/kernel/blocks/dbtup/test_varpage.cpp:
  Added GPL copyright text
storage/ndb/src/kernel/blocks/diskpage.cpp:
  Added GPL copyright text
storage/ndb/src/kernel/vm/Rope.cpp:
  Added GPL copyright text
storage/ndb/src/mgmsrv/ParamInfo.hpp:
  Added GPL copyright text
strings/uctypedump.c:
  Added GPL copyright text
unittest/Makefile.am:
  Added GPL copyright text
unittest/examples/Makefile.am:
  Added GPL copyright text
unittest/examples/core-t.c:
  Added GPL copyright text
unittest/examples/no_plan-t.c:
  Added GPL copyright text
unittest/examples/simple-t.c:
  Added GPL copyright text
unittest/examples/skip-t.c:
  Added GPL copyright text
unittest/examples/skip_all-t.c:
  Added GPL copyright text
unittest/examples/todo-t.c:
  Added GPL copyright text
unittest/mysys/Makefile.am:
  Added GPL copyright text
unittest/mytap/Makefile.am:
  Added GPL copyright text
unittest/mytap/t/Makefile.am:
  Added GPL copyright text
unittest/mytap/t/basic-t.c:
  Added GPL copyright text
unittest/unit.pl:
  Added GPL copyright text
win/build-vs71.bat:
  Added GPL copyright text
win/build-vs8.bat:
  Added GPL copyright text
win/configure.js:
  Added GPL copyright text
2006-12-31 02:29:11 +01:00
unknown
92e68d49d7 Many files:
Changed header to GPL version 2 only


client/mysqlslap.c:
  Changed header to GPL version 2 only
include/atomic/nolock.h:
  Changed header to GPL version 2 only
include/atomic/rwlock.h:
  Changed header to GPL version 2 only
include/atomic/x86-gcc.h:
  Changed header to GPL version 2 only
include/atomic/x86-msvc.h:
  Changed header to GPL version 2 only
include/my_atomic.h:
  Changed header to GPL version 2 only
include/my_trie.h:
  Changed header to GPL version 2 only
include/my_vle.h:
  Changed header to GPL version 2 only
include/mysql/plugin.h:
  Changed header to GPL version 2 only
mysys/my_atomic.c:
  Changed header to GPL version 2 only
mysys/my_getncpus.c:
  Changed header to GPL version 2 only
mysys/my_memmem.c:
  Changed header to GPL version 2 only
mysys/my_vle.c:
  Changed header to GPL version 2 only
mysys/trie.c:
  Changed header to GPL version 2 only
plugin/Makefile.am:
  Changed header to GPL version 2 only
server-tools/instance-manager/IMService.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/WindowsService.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/exit_codes.h:
  Changed header to GPL version 2 only
server-tools/instance-manager/user_management_commands.h:
  Changed header to GPL version 2 only
sql/authors.h:
  Changed header to GPL version 2 only
sql/contributors.h:
  Changed header to GPL version 2 only
sql/event_data_objects.cc:
  Changed header to GPL version 2 only
sql/event_data_objects.h:
  Changed header to GPL version 2 only
sql/event_db_repository.cc:
  Changed header to GPL version 2 only
sql/event_db_repository.h:
  Changed header to GPL version 2 only
sql/event_queue.cc:
  Changed header to GPL version 2 only
sql/event_queue.h:
  Changed header to GPL version 2 only
sql/event_scheduler.cc:
  Changed header to GPL version 2 only
sql/event_scheduler.h:
  Changed header to GPL version 2 only
sql/events.cc:
  Changed header to GPL version 2 only
sql/events.h:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_binlog.cc:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_binlog.h:
  Changed header to GPL version 2 only
sql/ha_ndbcluster_tables.h:
  Changed header to GPL version 2 only
sql/ha_partition.cc:
  Changed header to GPL version 2 only
sql/ha_partition.h:
  Changed header to GPL version 2 only
sql/item_xmlfunc.cc:
  Changed header to GPL version 2 only
sql/item_xmlfunc.h:
  Changed header to GPL version 2 only
sql/log.h:
  Changed header to GPL version 2 only
sql/partition_element.h:
  Changed header to GPL version 2 only
sql/partition_info.cc:
  Changed header to GPL version 2 only
sql/partition_info.h:
  Changed header to GPL version 2 only
sql/rpl_filter.cc:
  Changed header to GPL version 2 only
sql/rpl_filter.h:
  Changed header to GPL version 2 only
sql/rpl_injector.cc:
  Changed header to GPL version 2 only
sql/rpl_injector.h:
  Changed header to GPL version 2 only
sql/rpl_mi.cc:
  Changed header to GPL version 2 only
sql/rpl_mi.h:
  Changed header to GPL version 2 only
sql/rpl_rli.cc:
  Changed header to GPL version 2 only
sql/rpl_rli.h:
  Changed header to GPL version 2 only
sql/rpl_tblmap.cc:
  Changed header to GPL version 2 only
sql/rpl_tblmap.h:
  Changed header to GPL version 2 only
sql/rpl_utility.cc:
  Changed header to GPL version 2 only
sql/rpl_utility.h:
  Changed header to GPL version 2 only
sql/sql_binlog.cc:
  Changed header to GPL version 2 only
sql/sql_partition.cc:
  Changed header to GPL version 2 only
sql/sql_partition.h:
  Changed header to GPL version 2 only
sql/sql_plugin.cc:
  Changed header to GPL version 2 only
sql/sql_plugin.h:
  Changed header to GPL version 2 only
sql/sql_servers.cc:
  Changed header to GPL version 2 only
sql/sql_servers.h:
  Changed header to GPL version 2 only
sql/sql_tablespace.cc:
  Changed header to GPL version 2 only
sql/sql_yacc.yy.bak:
  Changed header to GPL version 2 only
storage/Makefile.am:
  Changed header to GPL version 2 only
storage/archive/Makefile.am:
  Changed header to GPL version 2 only
storage/blackhole/Makefile.am:
  Changed header to GPL version 2 only
storage/csv/Makefile.am:
  Changed header to GPL version 2 only
storage/example/Makefile.am:
  Changed header to GPL version 2 only
storage/federated/Makefile.am:
  Changed header to GPL version 2 only
storage/innobase/handler/Makefile.am:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/AllocNodeId.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/CreateObj.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DictObjOp.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DihFragCount.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropFilegroup.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/DropObj.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/Extent.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RestoreImpl.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/RouteOrd.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp:
  Changed header to GPL version 2 only
storage/ndb/include/ndbapi/NdbIndexStat.hpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/mgmapi_logevent/mgmapi_logevent.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/mgmapi_logevent_dual/mgmapi_logevent_dual.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple_dual/ndbapi_simple_dual.cpp:
  Changed header to GPL version 2 only
storage/ndb/ndbapi-examples/ndbapi_simple_index/ndbapi_simple_index.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/diskpage.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/lgman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/lgman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/pgman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/pgman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/print_file.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/record_types.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/restore.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/restore.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/tsman.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/blocks/tsman.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DLCFifoList.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DLCHashTable.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DynArr256.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/DynArr256.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/KeyTable2Ref.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/LinearPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/NdbdSuperPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/NdbdSuperPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Pool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Pool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/RWPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/RWPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/Rope.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/SLFifoList.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/WOPool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/WOPool.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/bench_pool.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp:
  Changed header to GPL version 2 only
storage/ndb/src/mgmsrv/ParamInfo.cpp:
  Changed header to GPL version 2 only
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/test/ndbapi/testIndexStat.cpp:
  Changed header to GPL version 2 only
storage/ndb/test/tools/listen.cpp:
  Changed header to GPL version 2 only
storage/ndb/tools/restore/ndb_nodegroup_map.h:
  Changed header to GPL version 2 only
strings/my_strchr.c:
  Changed header to GPL version 2 only
unittest/mysys/base64-t.c:
  Changed header to GPL version 2 only
unittest/mysys/bitmap-t.c:
  Changed header to GPL version 2 only
unittest/mysys/my_atomic-t.c:
  Changed header to GPL version 2 only
unittest/mytap/tap.c:
  Changed header to GPL version 2 only
unittest/mytap/tap.h:
  Changed header to GPL version 2 only
win/Makefile.am:
  Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
unknown
ba7a2a9ab7 Maria - fixes to the pagecache unit tests (which started to print
"x threads didn't exit" today after my merge); the main() thread
was calling my_init() and my_thread_global_init() which is redudant;
it was not calling my_end() though it's needed.


unittest/mysys/mf_pagecache_consist.c:
  program already calls my_init(), which calls my_thread_global_init(),
  so no need for my_thread_global_init() (double call caused the main()
  thread to wait for itself thus timing out and printing
  "x threads didn't exit".
  my_thread_global_end() is not enough, as we call my_init() we must call
  my_end() (which calls my_thread_global_end()).
unittest/mysys/mf_pagecache_single.c:
  program already calls my_init(), which calls my_thread_global_init(),
  so no need for my_thread_global_init() (double call caused the main()
  thread to wait for itself thus timing out and printing
  "x threads didn't exit".
  my_thread_global_end() is not enough, as we call my_init() we must call
  my_end() (which calls my_thread_global_end()).
2006-12-20 22:30:00 +01:00
unknown
8b998d1199 Merge gbichot3.local:/home/mysql_src/mysql-5.1-clean
into  gbichot3.local:/home/mysql_src/mysql-maria


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
Makefile.am:
  Auto merged
configure.in:
  Auto merged
BitKeeper/triggers/post-commit:
  merge
include/Makefile.am:
  merge
include/my_global.h:
  merge
include/my_sys.h:
  merge
libmysql/Makefile.shared:
  merge
libmysqld/Makefile.am:
  merge
mysql-test/mysql-test-run.pl:
  merge
mysys/Makefile.am:
  merge
mysys/mf_keycache.c:
  merge
mysys/mf_keycaches.c:
  merge
mysys/my_handler.c:
  merge
mysys/my_init.c:
  merge
mysys/my_open.c:
  merge
mysys/my_pread.c:
  merge
sql/Makefile.am:
  merge
sql/handler.h:
  merge
sql/item_func.cc:
  merge
sql/item_func.h:
  merge
sql/log.cc:
  merge
sql/mysql_priv.h:
  merge
sql/mysqld.cc:
  merge
sql/set_var.cc:
  merge
sql/sql_class.h:
  merge
sql/sql_parse.cc:
  merge
sql/sql_select.cc:
  merge
sql/sql_test.cc:
  merge
sql/unireg.cc:
  merge
storage/csv/ha_tina.cc:
  merge
storage/myisam/ft_boolean_search.c:
  merge
storage/myisam/ha_myisam.cc:
  merge
storage/myisam/ha_myisam.h:
  merge
storage/myisam/mi_create.c:
  merge
storage/myisam/mi_delete.c:
  merge
storage/myisam/mi_dynrec.c:
  merge
storage/myisam/mi_key.c:
  merge
storage/myisam/mi_open.c:
  merge
storage/myisam/mi_test2.c:
  merge
storage/myisam/mi_unique.c:
  merge
storage/myisam/mi_write.c:
  merge
storage/myisam/myisamchk.c:
  merge
storage/myisam/myisampack.c:
  merge
storage/myisam/sort.c:
  merge
unittest/mytap/tap.c:
  merge
2006-12-20 00:00:46 +01:00
unknown
c2f2a41ed3 Maria - merging recent changes done to MyISAM into Maria.
Plus compiler warnings, and a fix to the pagecache unit tests for IA64


include/maria.h:
  merging MyISAM into Maria
include/myisam.h:
  post-merge fixes
mysql-test/r/maria.result:
  merging MyISAM into Maria
mysql-test/t/maria.test:
  merging MyISAM into Maria
sql/mysqld.cc:
  post-merge fixes
storage/maria/ha_maria.cc:
  merging MyISAM into Maria
storage/maria/ha_maria.h:
  merging MyISAM into Maria
storage/maria/ma_check.c:
  merging MyISAM into Maria
storage/maria/ma_open.c:
  merging MyISAM into Maria
storage/maria/ma_packrec.c:
  merging MyISAM into Maria
storage/maria/ma_range.c:
  merging MyISAM into Maria
storage/maria/ma_sort.c:
  merging MyISAM into Maria
storage/maria/maria_def.h:
  merging MyISAM into Maria
storage/maria/maria_pack.c:
  merging MyISAM into Maria
storage/maria/plug.in:
  merging MyISAM into Maria
storage/myisam/myisamdef.h:
  merging MyISAM into Maria
storage/myisam/myisampack.c:
  fix for compiler warnings
unittest/mysys/mf_pagecache_consist.c:
  this sets the stack size lower than the minimum on IA64, we remove it
  (it made the test fail)
unittest/mysys/mf_pagecache_single.c:
  this sets the stack size lower than the minimum on IA64, we remove it
  (it made the test fail)
2006-12-19 19:15:53 +01:00
unknown
51bb36a0e2 Merge gbichot3.local:/home/mysql_src/mysql-5.1-clean
into  gbichot3.local:/home/mysql_src/mysql-maria


BitKeeper/etc/ignore:
  auto-union
BUILD/SETUP.sh:
  Auto merged
Makefile.am:
  Auto merged
config/ac-macros/plugins.m4:
  Auto merged
configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
include/my_base.h:
  Auto merged
include/my_dbug.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/my_pread.c:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_range.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/ha_myisammrg.h:
  Auto merged
unittest/mytap/tap.c:
  Auto merged
include/myisam.h:
  merge
sql/mysqld.cc:
  merge
storage/myisam/mi_check.c:
  merge
storage/myisam/myisamdef.h:
  merge
2006-12-18 21:04:35 +01:00
unknown
7199c90559 WL#3071 Maria checkpoint
- cleanups, simplifications
- moving the construction of the "dirty pages table" into the
pagecache where it belongs (because it's the pagecache which knows
dirty pages). TODO: do the same soon for the "transactions table".
- fix for a small bug in the pagecache (decrementation of "changed_blocks")


include/pagecache.h:
  prototype
mysys/mf_pagecache.c:
  m_string.h moves up for LEX_STRING to be known for pagecache.h.
  In pagecache_delete_page(), we must decrement "blocks_changed" even
  if we just delete the page without flushing it.
  A new function pagecache_collect_changed_blocks_with_LSN()
  (used by the Checkpoint module), which stores information about the
  changed blocks (a.k.a. "the dirty pages table") into a LEX_STRING.
  This function is not tested now, it will be when there is a Checkpoint.
storage/maria/ma_checkpoint.c:
  refining the checkpoint code: factoring functions, moving the
  construction of the "dirty pages table" into mf_pagecache.c
  (I'll do the same with the construction of the "transactions table"
  once Serg tells me what's the best way to do it).
storage/maria/ma_least_recently_dirtied.c:
  Simplifying the thread which does background flushing of
  least-recently-dirtied pages:
  - in first version that thread will not flush, just do checkpoints
  - in 2nd version, flushing should re-use existing page cache functions
  like flush_pagecache_blocks().
unittest/mysys/test_file.h:
  m_string.h moves up for LEX_STRING to be known in pagecache.h
2006-12-18 17:24:02 +01:00
unknown
26b6dc4291 Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge


client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
config/ac-macros/ha_ndbcluster.m4:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/rpl_timezone.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/rpl_injector.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/t/mysqldump.test:
  Manual merge
sql/log_event.cc:
  manual merge
2006-12-08 23:41:29 +01:00
unknown
733fb20dcd Work around slow my_atomic-t test on hpux11: decrease number of
iterations on this platform


unittest/mysys/my_atomic-t.c:
  decrease number of iterations on hpux11 (to hopefully go from one hour
  to a few minutes).
2006-12-04 15:57:56 +01:00
unknown
5750daa4cf Maria - post-review change of "fixes for gcc -ansi".
And reducing the time taken by my_atomic-t.


include/lf.h:
  fix to be able to add a ";" at the end of the macro's invokation
  (removing it here, removes a warning from "gcc -ansi" about a
  standalone ";").
mysys/lf_hash.c:
  ";" is ok now after LF_REQUIRE_PINS
mysys/mf_pagecache.c:
  comment fix
unittest/mysys/my_atomic-t.c:
  decreasing number of iterations to make test take less time.
2006-12-04 15:31:04 +01:00
unknown
b72903fe54 Maria:
* merging changes done to the key cache since May 2006 into Maria
* enabling two small enough page cache's unit tests by default
* fix to have non-buffered output in unit tests (to not have a false
timeout killing in pushbuild) (patch given by Serg)
* removing some warnings of gcc -ansi


include/lf.h:
  getting rid of "warning: ISO C does not allow extra `;' outside of a function"
  (gcc -ansi)
mysys/lf_hash.c:
  getting rid of "warning: ISO C does not allow extra `;' outside of a function"
  (gcc -ansi)
mysys/mf_pagecache.c:
  Cosmetic changes to minimize the diff with the key cache.
  #define PAGECACHE_DEBUG_LOG is not needed (just define PAGECACHE_DEBUG
  if you want) (this change removes "warning: 'pagecache_debug_print'
  declared `static' but never defined").
  Importing changes made to mf_keycache.c since May 2006, into the page cache.
  Disabling online resizing in the page cache.
  Fix for "warning: ISO C90 forbids mixed declarations and code".
unittest/mysys/Makefile.am:
  Of the page cache's unit tests, two are small enough to run on pushbuild,
  renaming them to a -t suffix.
unittest/mytap/tap.c:
  pushbuild kills a test after seeing no output from it for 10 minutes;
  so we set the mytap framework to not buffer output (patch given by
  Serg) so that output is seen more frequently and not "all at the end
  of the test".
2006-12-03 17:06:27 +01:00
unknown
9fcc34b4ae Maria - misc fixes:
don't run tests depending on the generic lock manager which will be
removed; don't run page cache unit tests by default (too intensive).


storage/maria/unittest/Makefile.am:
  don't run tests depending on the generic lock manager (it will 
  be removed in the end), one of them crashes.
unittest/mysys/Makefile.am:
  page cache tests put a too high load, causes problems on shared machines;
  so we still build them but give them a suffix so that they are
  not run by the default "test-unit" Makefile target.
2006-11-30 15:12:28 +01:00
unknown
3345ed80a5 Maria - pagecache unit tests: add test_file.h to the tarball
unittest/mysys/Makefile.am:
  add test_file.h in the tarball
2006-11-30 12:14:36 +01:00
unknown
788ad30f08 Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.


client/mysqldump.c:
  Fixed some compiler warnings
  Added some missing DBUG_RETURN
  Remove copying of 'cluster' database
client/mysqlslap.c:
  Fixed compiler warnings
client/mysqltest.c:
  After merge fix
extra/yassl/taocrypt/include/algebra.hpp:
  Removed compiler warning
mysql-test/include/im_check_env.inc:
  Fixed race condition (mysqld1 could report 'starting' or 'online'
mysql-test/mysql-test-run.pl:
  After merge fixes
  Added missing directory to LD_LIBRARY_PATH
mysql-test/r/ctype_cp1250_ch.result:
  After merge fix
mysql-test/r/im_cmd_line.result:
  Fixed race condition
mysql-test/r/im_daemon_life_cycle.result:
  Fixed race condition
mysql-test/r/im_instance_conf.result:
  Fixed race condition
mysql-test/r/im_life_cycle.result:
  Fixed race condition
mysql-test/r/im_utils.result:
  Fixed race condition
mysql-test/r/log_tables.result:
  Fixed wrong result
mysql-test/t/disabled.def:
  Disabled ndb_restore_partion, as ndb_restore_compate caused it to fail, becasue of table 'cluster/def/schema' which is stored in ndb_backup50
mysys/my_compress.c:
  Removed compiler warnings
mysys/my_getopt.c:
  Ensure we always have at least one space between option name and value
plugin/fulltext/plugin_example.c:
  Removed compiler warnings
server-tools/instance-manager/mysql_connection.cc:
  After merge fix
sql/event_data_objects.cc:
  Fixed compiler warnings
  Fixed platform compatibility issues (%lld is not portable)
sql/event_data_objects.h:
  Fixed compiler warnings
sql/event_db_repository.cc:
  Fixed compiler warnings
sql/event_queue.cc:
  Fixed compiler warnings
sql/event_scheduler.cc:
  Fixed compiler warnings
sql/events.cc:
  Fixed compiler warnings
sql/field.cc:
  Fixed compiler warnings
sql/ha_ndbcluster.cc:
  Fixed compiler warnings
sql/ha_ndbcluster_binlog.cc:
  Fixed compiler warnings
sql/ha_partition.cc:
  Fixed compiler warnings
sql/handler.cc:
  Fixed compiler warnings
sql/item_cmpfunc.cc:
  Fixed DBUG_PRINT style
sql/item_func.cc:
  Fixed compiler warnings
sql/log.cc:
  Fixed compiler warnings
sql/log_event.cc:
  Fixed compiler warnings
sql/mysqld.cc:
  Fixed compiler warnings
sql/opt_range.cc:
  Fixed compiler warnings
sql/repl_failsafe.cc:
  Indentation fixes
sql/rpl_rli.cc:
  Fixed compiler warnings
sql/rpl_tblmap.cc:
  Fixed compiler warnings
sql/set_var.cc:
  Fixed compiler warnings
sql/slave.cc:
  Fixed compiler warnings
sql/sp_head.cc:
  Fixed compiler warnings
sql/sql_base.cc:
  Fixed compiler warnings
  Fixed indentation
sql/sql_binlog.cc:
  Fixed compiler warnings
sql/sql_cache.cc:
  Fixed compiler warnings
sql/sql_class.cc:
  Fixed compiler warnings
sql/sql_handler.cc:
  Fixed compiler warnings
sql/sql_lex.cc:
  Fixed compiler warnings
sql/sql_parse.cc:
  Fixed compiler warnings
sql/sql_partition.cc:
  Fixed compiler warnings
sql/sql_prepare.cc:
  Fixed compiler warnings
sql/sql_table.cc:
  Fixed compiler warnings
sql/sql_test.cc:
  Fixed DBUG_PRINT style
sql/sql_trigger.cc:
  Fixed DBUG_PRINT style
sql/table.cc:
  Fixed compiler warnings
storage/federated/ha_federated.cc:
  Fixed compiler warnings
storage/myisam/mi_rsamepos.c:
  Fixed compiler warnings
storage/ndb/include/ndb_global.h.in:
  After merge fix
storage/ndb/include/util/NdbOut.hpp:
  Inform gcc that ndbout_c takes a printf() string as argument
storage/ndb/include/util/SimpleProperties.hpp:
  After merge fixes
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Fixed compiler warnings
  Fixed usage of uninitialized value (Got help from Jonas with patch)
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/lgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/pgman.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/restore.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
  Fixed compiler warnings
  Added missing enum's to switch
storage/ndb/src/kernel/vm/Configuration.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/DLHashTable.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/RWPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/WOPool.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbIndexStat.cpp:
  Initialize possible uninitialized variable
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  Added missing enum's (To avoid compiler warnings)
storage/ndb/src/ndbapi/NdbScanOperation.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/ObjectMap.hpp:
  Fixed compiler warnings
storage/ndb/tools/desc.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/Restore.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/consumer_restore.cpp:
  Fixed compiler warnings
unittest/mytap/t/basic-t.c:
  Fixed compiler warnings
unittest/mytap/tap.c:
  Fixed compiler warnings
2006-11-27 01:47:38 +02:00
unknown
354d4a7e06 shut up signedness warnings in atomic ops in gcc
unittest/mysys/my_atomic-t.c:
  try both signed and unsigned arguments for atomic ops
2006-11-22 15:53:26 +01:00
unknown
6691ce30ec Maria - WL#3134 Key cache to Page cache conversion
Moving the test_pagecache_ tests from mysys to unittest/mysys.
Means fixing includes to work with the new directory, some Makefile.am
editing, replacing memset() with bfill().
test_page_cache_*.c renamed to mf_pagecache_*-t.c (-t is the standard
suffix for tests in the mytap protocol).
Also added plan() and exit_status() calls to tests.
Sanja, I put some TODOs for you at the start of mf_pagecache_*.c


unittest/mysys/test_file.h:
  Rename: mysys/test_file.h -> unittest/mysys/test_file.h
mysys/Makefile.am:
  pagecache test files move to top/unittest/mysys
mysys/mf_pagecache.c:
  my_bit.h needed to compile.
unittest/mysys/Makefile.am:
  INCLUDES is a better place for includes than AM_CPPFLAGS (the latter
  get overriden by prog_CPPFLAGS, which is not desirable here).
  Adding pagecache's test programs (moved from mysys);
  test_pagecache_* has been renamed to mf_pagecache*-t
  (-t is the required suffix for test executables in the mytap framework).
unittest/mysys/mf_pagecache_consist.c:
  fixing includes to work with the new directory.
  The test must return an exit code informing if any part failed.
  TODOs for Sanja.
unittest/mysys/mf_pagecache_single.c:
  fixing includes to work with new directory.
  adding a plan() to account for the number of tests.
  Adding exit_status() to tell how many tests failed.
  memset() was giving a compilation warning (implicit declaration etc),
  properly due to me removing stdio.h etc, so I replaced it with bfill().
  TODOs for Sanja.
unittest/mysys/test_file.c:
  moved from mysys (piece of the page cache tests) and includes fixed.
2006-11-16 22:53:53 +01:00
unknown
3763edd393 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


BitKeeper/etc/collapsed:
  auto-union
include/m_ctype.h:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
unittest/mytap/tap.c:
  Auto merged
sql/log_event.cc:
  manual merge
sql/sql_class.cc:
  manual merge
2006-11-07 19:26:31 +01:00
unknown
7ca33ae5b5 comments, minor changes
---
comments


mysys/lf_alloc-pin.c:
  comments
mysys/lf_dynarray.c:
  comments
mysys/lf_hash.c:
  comments, charset-aware comparison
storage/maria/trnman.c:
  comments
storage/maria/unittest/lockman-t.c:
  test case for a bug
unittest/mysys/my_atomic-t.c:
  removed mistakenly copied line
2006-10-27 17:09:31 +02:00
unknown
32739cbbca make sure all test threads really exit before main() - workaround for
NPTL bug in some linux kernels (Bug#22320)
2006-10-22 16:05:18 +02:00
unknown
d1852da743 less confusing and more correct name for my_atomic_swap 2006-10-21 20:06:56 +02:00
unknown
fcdee0cd39 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/mytap-mysql-5.1-new


unittest/mytap/tap.c:
  Auto merged
unittest/README.txt:
  Manual merge
unittest/mytap/tap.h:
  Manual merge
2006-10-20 22:56:03 +02:00
unknown
ba53dc35eb Documentation changes to MyTAP.
unittest/README.txt:
  Adding reference to generated documentation
unittest/mytap/Doxyfile:
  Some configuration changes to make Doxygen generate better documentation.
unittest/mytap/tap.c:
  Adding documentation and tags
unittest/mytap/tap.h:
  Adding tags to provide document-internal references.
2006-10-20 21:50:08 +02:00
unknown
12a55aeabc lock manager passed unit tests
storage/maria/trnman.c:
  comments
include/my_dbug.h:
  make DBUG_ASSERT always a statement
storage/maria/lockman.h:
  comments
include/lf.h:
  lf_pinbox - don't use a fixed-size purgatory.
mysys/lf_alloc-pin.c:
  lf_pinbox - don't use a fixed-size purgatory.
mysys/lf_hash.c:
  lf_pinbox - don't use a fixed-size purgatory.
storage/maria/lockman.c:
  removed IGNORE_ME/UPGDARED matching - it was wrong in the first place.
  updated for "lf_pinbox - don't use a fixed-size purgatory"
storage/maria/unittest/lockman-t.c:
  IGNORE_ME/UPGRADED pair counting bugtest.
  more tests
unittest/mysys/my_atomic-t.c:
  lf_pinbox - don't use a fixed-size purgatory.
2006-10-18 17:24:07 +02:00
unknown
67a2b7cf29 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  janus.mylan:/usr/home/serg/Abk/mysql-maria


configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/Makefile.am:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
storage/maria/Makefile.am:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
unittest/Makefile.am:
  Auto merged
unittest/mysys/my_atomic-t.c:
  merged
2006-10-13 11:43:33 +02:00
unknown
c2872bafde push for trnman review
(lockmanager still fails unit tests)


BitKeeper/deleted/.del-Makefile.am~4375ae3d4de2bdf0:
  Delete: unittest/maria/Makefile.am
configure.in:
  silence up configure warnings, don't generate unittest/maria/Makefile
include/atomic/nolock.h:
  s/LOCK/LOCK_prefix/
include/atomic/x86-gcc.h:
  s/LOCK/LOCK_prefix/
include/atomic/x86-msvc.h:
  s/LOCK/LOCK_prefix/
include/lf.h:
  pin asserts, renames
include/my_atomic.h:
  move cleanup
include/my_bit.h:
  s/uint/uint32/
mysys/lf_dynarray.c:
  style fixes, split for() in two, remove if()s
mysys/lf_hash.c:
  renames, minor fixes
mysys/my_atomic.c:
  run-time assert -> compile-time assert
storage/maria/Makefile.am:
  lockman here
storage/maria/unittest/Makefile.am:
  new unit tests
storage/maria/unittest/trnman-t.c:
  lots of changes
storage/maria/lockman.c:
  many changes:
  second meaning of "blocker"
  portability: s/gettimeofday/my_getsystime/
  move mutex/cond out of LOCK_OWNER - it creates a race condition
  that will be fixed in a separate changeset
  increment lm->count for every element, not only for distinct ones -
  because we cannot decrease it for distinct elements only :(
storage/maria/lockman.h:
  move mutex/cond out of LOCK_OWNER
storage/maria/trnman.c:
  move mutex/cond out of LOCK_OWNER
  atomic-ops to access short_trid_to_trn[]
storage/maria/trnman.h:
  move mutex/cond out of LOCK_OWNER
storage/maria/unittest/lockman-t.c:
  unit stress test
2006-10-13 11:37:27 +02:00
unknown
cf3b25019c unittest/mytap/tap.c :
Do not (try to) set a signal handler action unless a signal is defined on the platform.


unittest/mytap/tap.c:
  Do not (try to) set a signal handler action unless a signal is defined on the platform.
  SIGXCPU, SIGXFSZ, SIGSYS, and SIGTRAP were reported as undefined in Netware build of 5.1.12-beta.
2006-10-12 22:42:43 +02:00
unknown
5e81d1301e Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b19459-mysql-5.1-new


client/mysqlbinlog.cc:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/base64.c:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
2006-10-06 15:31:05 +02:00
unknown
2d4f71882f BUG#19459 (BINLOG RBR command does not lock tables correctly causing
crash for, e.g., NDB):
Submitting patch to base64_decode() adding extra parameter.


include/base64.h:
  Adding parameter to base64_decode() to return the position just after
  the string that was decoded.
mysys/base64.c:
  Adding comment to base64_decode().
  Adding parameter to base64_decode() to return the position just after
  the string that was decoded.
sql/share/errmsg.txt:
  Adding error message.
storage/ndb/src/mgmapi/mgmapi.cpp:
  Parameters to base64_decode() changed.
unittest/mysys/base64-t.c:
  Parameters to base64_decode() changed.
2006-10-02 15:05:05 +02:00
unknown
d551a55a1b Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  janus.mylan:/usr/home/serg/Abk/mysql-maria


configure.in:
  Auto merged
include/Makefile.am:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/my_bitmap.c:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/maria/Makefile.am:
  merged
unittest/Makefile.am:
  merged
2006-09-20 16:39:14 +02:00
unknown
6e10407c2b WL#3504 "plugin actions for engines' and plugins' unit tests"
for push in 5.1 (I will inform Trudy).
Storage engines and plugins can now have unit tests to test their components; such
test must be an executable C/C++ program which name ends with '-t' and which is
obeys the mytap protocol, it must be stored in the storage engine's or plugin's
source directory (storage/<engine> or plugin/<plugin>) or any subdirectories of
this.
The top-level Makefile target "test-unit" will run all unit tests: it will scan
the engines' and plugins' directories, recursively, and execute all executable
files which name ends with '-t'."


Makefile.am:
  "unittest" directory must be built before "storage" and "plugin"
  because the unit tests in these directories may need libmytap.a
  which is in unittest/mytap.
config/ac-macros/plugins.m4:
  When enabling engine "X", we add "../storage/X" to the unit tests
  directories which unittest/unit.pl should traverse looking for
  tests to execute. Same for plugins.
unittest/Makefile.am:
  Those variables contain all enabled engines and plugins.
2006-09-15 15:15:24 +02:00
unknown
09a7f30973 WL#3234 Maria Control file manager
last round of fixes to the storage engines' and plugins' unit tests
structure. Will extract a total patch and push it in 5.1 as has been
approved.


Makefile.am:
  unittest must be before storage and plugin, because engine and plugin
  may have unit tests which link with libtap which is found in
  unitttest.
config/ac-macros/plugins.m4:
  When enabling an engine/plugin, add its directory to the list
  of directories where unit tests should be searched. That is,
  its directory will be recursively searched by our unit test framework
  which will execute any executable *-t file.
storage/maria/ma_control_file.c:
  those my_message pollute the output of unit tests.
storage/maria/plug.in:
  When Maria is enabled, add its unittest Makefile.
unittest/Makefile.am:
  plugins too
2006-09-15 11:05:35 +02:00
unknown
336bbb52b1 fixes for the my_atomic-t unit test:
- compiler warning
- detection of pthread_create failure (you will see this message
only if you run with "make test-verbose" in unittest; otherwise
unit.pl masks all messages from the test but "ok" ones.
- the test fails randomly on some machines (I filed it as BUG#22320),
on one host it looks like a crash at exit() which a sleep(2) makes
disappear. So I add the sleep(2), which can be removed
when BUG#22320 is fixed. 


unittest/mysys/my_atomic-t.c:
  - fix for compiler warning on 64-bit "cast from pointer to integer of
  different size". Casting to long and then to int. We'll use intptr
  instead later.
  - detect if pthread_create fails.
  - sleep(2) until BUG#22320 is fixed
2006-09-14 01:37:41 +02:00
unknown
15b9ce2201 WL#3234 Maria control file
Fixes after Brian's and Serg's comments: storage engine's unit tests
are now in storage/<engine>/unittest instead of unittest/storage/<engine>


BitKeeper/deleted/.del-Makefile.am~78ea2e42d44d121f:
  Delete: unittest/storage/maria/Makefile.am
BitKeeper/deleted/.del-Makefile.am~80497dbf1a80bdf3:
  Delete: unittest/storage/Makefile.am
storage/maria/unittest/ma_control_file-t.c:
  Rename: unittest/storage/maria/ma_control_file-t.c -> storage/maria/unittest/ma_control_file-t.c
config/ac-macros/plugins.m4:
  we change from unittest/storage/<engine>/ to storage/<engine>/unittest:
  if the engine is enabled has such a directory, build this directory,
  and add it to the list of unit tests to run.
configure.in:
  this dir does not exist anymore
storage/maria/Makefile.am:
  to build Maria unittests, libmaria must be built.
unittest/Makefile.am:
  unittest/storage is removed. target "unitests" is defined at
  "configure" time based on enabled engines.
storage/maria/unittest/Makefile.am:
  simple Makefile.am to build ma_control_file-t
2006-09-12 15:52:01 +02:00
unknown
26fb36067a WL#3234 Maria control file manager.
Fitting ma_control_file_test into the mytap unittest framework:
new directories:
- unittest/storage/ for unit tests of any storage engine
- unittest/storage/maria for ... Maria, containing ma_control_file-t.
Later, older tests like ma_test*, ma_test_all (but which is Unix
dependent in its current form) could move here too.
The plugins macro enable building of unittest/storage/X for any
enabled engine X which has such a directory.
If Falcon wants to have unit tests there too, I may have to merge
this patch into 5.x one day.


config/ac-macros/plugins.m4:
  If a storage engine has a directory in unittest/storage, build this
  directory.
configure.in:
  build storage engines' unit tests.
storage/maria/Makefile.am:
  ma_control_file_test moves to unittest/storage/maria
storage/maria/ma_control_file.c:
  more error codes when opening the control file fails.
  ma_control_file_end() may now return an error if my_close() failed.
storage/maria/ma_control_file.h:
  more error codes when opening the control file fails.
unittest/Makefile.am:
  adding unit tests for storage engines.
  Note that unit.pl simply recurses into "storage", so if a unit test for
  storage engine X has been built previously, and now you re-configure
  (without making clean) to disable this engine, then the unit test of
  X will not be rebuilt but will still be present in storage/X, so will
  be run.
unittest/storage/maria/ma_control_file-t.c:
  Making the test fit the mytap framework (return all the way up
  the stack instead of assert(); use the mytap functions plan(), ok() etc).
  Adding test of file too short/long.
unittest/storage/maria/Makefile.am:
  a_control_file-t is added to the Maria unit tests.
  Later, older tests (ma_test1 etc) could also move here.
unittest/storage/Makefile.am:
  New BitKeeper file ``unittest/storage/Makefile.am''
2006-09-11 16:12:31 +02:00
unknown
45546f3de8 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


BitKeeper/deleted/.del-rpl_heap.test:
  Auto merged
Makefile.am:
  Auto merged
mysql-test/extra/binlog_tests/binlog.test:
  Auto merged
mysql-test/r/binlog_stm_binlog.result:
  Auto merged
mysql-test/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
unittest/README.txt:
  Auto merged
unittest/unit.pl:
  Auto merged
mysql-test/t/disabled.def:
  Merge (main -> rpl 5.1)
2006-09-11 13:34:44 +02:00
unknown
0014295da5 Merge romeo.(none):/home/bk/mytap-mysql-5.1-new
into  romeo.(none):/home/bk/mysql-5.1-new-rpl
2006-08-30 14:48:41 +02:00
unknown
207202aafa Changes to make unit tests work on OS X and AIX
unittest/unit.pl:
  Removing reliance on Straps, since it's to unstable.
2006-08-30 14:10:53 +02:00
unknown
1b8dad2b58 Various fixes to make MyTAP build on all platforms.
unittest/Makefile.am:
  Not installing unit.pl any more.
  Adding test-verbose target to see the TAP output (for debugging).
unittest/mytap/tap.h:
  Including portability file.
  Whitespace changes.
  Code sample for BAIL_OUT() function.
2006-08-29 22:23:56 +02:00
unknown
ac03e43364 Adding missing file
unittest/examples/core-t.c:
  BitKeeper file /users/mkindahl/mysql-5.1-clone/unittest/examples/core-t.c
2006-08-25 16:11:22 +02:00
unknown
0220e4ff87 mytap-changes.patch
unittest/Makefile.am:
  Import patch mytap-changes.patch
unittest/README.txt:
  Import patch mytap-changes.patch
unittest/examples/Makefile.am:
  Import patch mytap-changes.patch
unittest/mytap/tap.c:
  Import patch mytap-changes.patch
unittest/mytap/tap.h:
  Import patch mytap-changes.patch
2006-08-25 13:53:16 +02:00
unknown
d83bc171b6 renamed global variables 2006-08-23 17:27:21 +02:00
unknown
74d050d000 maria transaction manager with unit tests
include/lf.h:
  few lf API changes
mysys/lf_alloc-pin.c:
  few lf API changes
mysys/lf_dynarray.c:
  few lf API changes
mysys/lf_hash.c:
  few lf API changes
storage/maria/Makefile.am:
  transaction manager
unittest/Makefile.am:
  maria transaction manager
unittest/mysys/my_atomic-t.c:
  ensure that values are positive
storage/maria/trxman.h:
  New BitKeeper file ``storage/maria/trxman.h''
unittest/maria/Makefile.am:
  New BitKeeper file ``unittest/maria/Makefile.am''
unittest/maria/trxman-t.c:
  New BitKeeper file ``unittest/maria/trxman-t.c''
storage/maria/trxman.c:
  comment clarified
2006-08-17 15:20:58 +02:00
unknown
dc2264ab86 Fixing unit test execution script to work with AIX 5.2 and OS X machines.
These are using old version of the Test::Harness modules, so I resort
to a safer way of running executable files.


unittest/README.txt:
  Adding reference to Doxygen-generated documentation on the intranet.
unittest/unit.pl:
  Using environment HARNESS_PERL_SWITCHES instead of a replacement
  straps
2006-08-14 13:52:05 +02:00
unknown
cd876fb118 amd64 atomic ops
lock-free alloc (WL#3229), lock-free hash (WL#3230)
bit functions made inline


include/Makefile.am:
  lf.h added
mysys/Makefile.am:
  lf_hash.c lf_dynarray.c lf_alloc-pin.c
include/atomic/nolock.h:
  amd64 atomic ops
include/atomic/rwlock.h:
  s/rw_lock/mutex/g
include/atomic/x86-gcc.h:
  amd64 atomic ops
  try PAUSE
include/my_global.h:
  STATIC_INLINE
mysys/mf_keycache.c:
  make bit functions inline
mysys/my_atomic.c:
  STATIC_INLINE
mysys/my_bitmap.c:
  make bit functions inline
sql/ha_myisam.cc:
  make bit functions inline
sql/item_func.cc:
  make bit functions inline
include/my_atomic.h:
  STATIC_INLINE
mysys/my_bit.c:
  make bit functions inline
sql/sql_select.cc:
  make bit functions inline
storage/myisam/mi_create.c:
  make bit functions inline
storage/myisam/mi_test2.c:
  make bit functions inline
storage/myisam/myisamchk.c:
  make bit functions inline
mysys/my_init.c:
  thread_size moved to mysys
sql/mysql_priv.h:
  thread_size moved to mysys
sql/set_var.cc:
  thread_size moved to mysys
include/my_sys.h:
  thread_size moved to mysys
sql/mysqld.cc:
  thread_size moved to mysys
sql/sql_parse.cc:
  thread_size moved to mysys
sql/sql_test.cc:
  thread_size moved to mysys
include/lf.h:
  dylf_dynarray refactored to remove 65536 elements limit
mysys/lf_alloc-pin.c:
  dylf_dynarray refactored to remove 65536 elements limit
mysys/lf_dynarray.c:
  dylf_dynarray refactored to remove 65536 elements limit
mysys/lf_hash.c:
  dylf_dynarray refactored to remove 65536 elements limit
unittest/mysys/my_atomic-t.c:
  fix to commit (remove debug code)
2006-08-10 19:19:47 +02:00
unknown
a042f18818 Changed the number of test iterations since this makes test time
go from 623 seconds to 11 seconds on AMD64.
This is because we have no native atomic implementation on AMD64, 
so the rwlock-based implementation is used, which is  a bit slow.  
It will be probably be optimized for AMD64 quite soon, but for now 
this test case will do fewer iterations.


unittest/mysys/my_atomic-t.c:
  10k iterations instead of 1M no of iterations
2006-06-30 11:31:43 +02:00
unknown
d1fb292251 atomic ops:
my_atomic_XX_t -> intXX, no implicit locking anymore
    simplified framework, support for requested cleanups


dbug/dbug.c:
  compiler warning
include/atomic/nolock.h:
  my_atomic_XX_t -> intXX
include/atomic/rwlock.h:
  my_atomic_XX_t -> intXX, no implicit locking anymore
include/atomic/x86-gcc.h:
  my_atomic_XX_t -> intXX, no implicit locking anymore
include/atomic/x86-msvc.h:
  my_atomic_XX_t -> intXX
  simplified defines
  support for cleanups
include/my_atomic.h:
  my_atomic_XX_t -> intXX, no implicit locking anymore
  simplified framework, support for requested cleanups
unittest/examples/no_plan-t.c:
  compiler warning
unittest/mysys/Makefile.am:
  fix for dependencies
unittest/mysys/my_atomic-t.c:
  my_atomic_XX_t -> intXX, no implicit locking anymore
unittest/mytap/tap.c:
  cosmetic fix
2006-06-17 16:20:39 +02:00
unknown
555eb848f2 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
include/heap.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/spatial.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/archive/ha_archive.h:
  Auto merged
storage/example/ha_example.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
unittest/mysys/base64-t.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
mysql-test/valgrind.supp:
  manual merge
sql/event.cc:
  manual merge
sql/ha_heap.cc:
  manual merge
sql/ha_myisam.cc:
  manual merge
sql/ha_ndbcluster.cc:
  manual merge
sql/ha_ndbcluster_binlog.cc:
  manual merge
sql/ha_partition.cc:
  manual merge
sql/handler.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/handler.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/item.h:
  automatic merge
sql/item_cmpfunc.cc:
  automatic merge
sql/log_event.cc:
  manual merge
  Trivial cleanup
sql/mysql_priv.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/opt_range.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_delete.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_insert.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_load.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_select.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_show.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_update.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/blackhole/ha_blackhole.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/csv/ha_tina.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
mysql-test/valgrind.supp.orig:
  Manual merge
2006-06-04 21:05:22 +03:00
unknown
01d03e7b4b This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.


BitKeeper/etc/ignore:
  added mysys/test_bitmap
include/base64.h:
  Removed my_global.h, as this must be included first in any program
include/heap.h:
  Added heap_reset() (Required by new handler interface)
include/my_base.h:
  Removed HA_EXTRA_RESET. MySQL will now call ::reset() instead of ::extra(HA_EXTRA_RESET).
  HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIVE_PRIMARY key are deleted as the column bitmaps makes these unnecessary
include/my_bitmap.h:
  Remove my_pthread.h (should be included at upper level)
  Introduced my_bitmap_map typedef to make it the bitmap handling more like a black box
  Added bitmap_is_overlapping(), bitmap_test_and_clear(), bitmap_copy() and bitmap_cmp()
  Made bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit() return void
include/myisam.h:
  Added mi_reset() (Required by new handler interface)
include/myisammrg.h:
  Added myrg_reset() (Required by new handler interface)
include/mysql_com.h:
  Added flag FIELD_IN_ADD_INDEX to be able to remove Field->add_index
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/install_test_db.sh:
  Simplify ldata usage
  Added --tmpdir=. option to mysqld bootstrap (Removed some warnings when TMPDIR was wrongly set)
mysql-test/mysql-test-run.pl:
  Added --tmpdir=. to bootstrap
mysql-test/mysql-test-run.sh:
  Use copy instead of INSTALL_DB for master and slave databases.
  (Speeds up startup time a lot!)
  Remove snapshot directories at startup (removes some strange warnings)
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
mysql-test/r/create.result:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/r/federated.result:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/r/func_gconcat.result:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/r/func_time.result:
  Added drop of test function
mysql-test/r/innodb_mysql.result:
  Added tests for CREATE ... SELECT
mysql-test/r/insert.result:
  More tests
  Added testing of duplicate columns in insert
mysql-test/r/loaddata.result:
  Added testing LOAD DATA ... SET ...
mysql-test/r/multi_update.result:
  Test multi updates and deletes using primary key and without
mysql-test/r/ndb_index_unique.result:
  Better error message
mysql-test/r/ndb_replace.result:
  New correct result after fixing REPLACE handling with NDB
mysql-test/r/rpl_ddl.result:
  Now we don't get these (wrong) warnings anymore
mysql-test/r/view_grant.result:
  Drop used views
mysql-test/t/create.test:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/t/federated.test:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/t/func_gconcat.test:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/t/func_time.test:
  Added drop of test function
mysql-test/t/innodb_mysql.test:
  Added tests for CREATE ... SELECT
mysql-test/t/insert.test:
  More tests
  Added testing of duplicate columns in insert
mysql-test/t/loaddata.test:
  Added testing LOAD DATA ... SET ...
mysql-test/t/multi_update.test:
  Test multi updates and deletes using primary key and without
mysql-test/t/view_grant.test:
  Drop used views
mysql-test/valgrind.supp:
  Added supression of not needed warnings when printing stack trace
mysys/base64.c:
  Include my_global.h first
mysys/my_bitmap.c:
  Added bitmap_is_overlapping(), bitmap_test_and_clear() and bitmap_copy()
  Changed logic of bitmap handling to be a bit more efficent (Did this together with Mikael Ronström)
  Now the 'extra, not used bits' in the bitmap are assumed to have a 'random value' and the bitmap functions are free to change them whenever needed.
  Changed how mutex is allocated to make 'bitmap_free()' function simpler.
mysys/thr_lock.c:
  Added 0x before thread pointers (for easier comparison of DBUG traces)
sql/event.cc:
  Ensure 'use_all_columns()' is used for event tables
  Don't print warning that event table is damaged if it doesn't exists.
sql/field.cc:
  Added ASSERT_COLUMN_MARKED_FOR_WRITE in all store() methods and ASSERT_COLUMN_MARKED_FOR_READ in all val() methods to catch wrong setting if table->read_set and table->write_set
  (Rest of changes are only indentation cleanups)
sql/field.h:
  Removed Field->query_id (replaced by table->read_set and table->write_set)
  Removed Field->fieldnr (use Field->field_index instead)
  Removed Field->add_index (Use Field->flags instead)
  Add Field->part_of_key_not_clustered (for usage in opt_range.cc)
sql/filesort.cc:
  Added paramater sort_postion to filesort() to force sorting by position instead of storing all fields in the result set.
  This allowed me to remove checking of sql_command.
  Create a temporary column bitmap for fields that are used by the sorting process.
  Use column bitmaps instead of query_id
sql/ha_berkeley.cc:
  Update to 'newer' table handler interface
sql/ha_berkeley.h:
  Update to 'newer' table handler interface
sql/ha_federated.cc:
  Update to 'newer' table handler interface
  Only read columns that are needed from remote server.
  In case of eq ranges, don't generate two conditions in the WHERE clause
  (this can still be optimized, but would require a bigger code change)
  Use 'simpler to use' XXXX_LEN' macros
  A bit simpler logic in ::write_row() when creating statements.
  In update, only include test of fields actually read.
  (This greatly simplifies the queries sent by the federated engine)
  Similar changes done for delete_row()
sql/ha_federated.h:
  Update to 'newer' table handler interface
  Changed XXX_LEN macros to use sizeof(...)-1, to simplify usage in ha_federated.cc
  Added HA_PRIMARY_KEY_REQUIRED_FOR_DELETE to tell MySQL to read all primary key columns in case of DELETE
sql/ha_heap.cc:
  Update to 'newer' table handler interface
sql/ha_heap.h:
  Update to 'newer' table handler interface
sql/ha_innodb.cc:
  Update to 'newer' table handler interface
  - Update innobase_create_handler() to new interface
  - Removed HA_NOT_EXACT_COUNT (not needed)
  - Renamed HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
  - Prefixed base status variables with 'stats'
  - Use table column bitmaps instead of ha_get_bit_in_read_set()
  - Added ::reset(), with code from ::extra(HA_EXTRA_RESET)
  - Removed HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIEVE_PRIMARY_KEY as
    the table->read_set and table->write_set bitmaps now are accurate
sql/ha_innodb.h:
  Update to 'newer' table handler interface
  - table_flags are now ulonglong
  - Added reset() method
  - Removed not needed ha_retrieve_all_cols() and ha_retrieve_all_pk() columns.
  - Made build_template() a class function to be able to easier access class variables
sql/ha_myisam.cc:
  Update to 'newer' table handler interface
sql/ha_myisam.h:
  Update to 'newer' table handler interface
sql/ha_myisammrg.cc:
  Update to 'newer' table handler interface
sql/ha_myisammrg.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster.cc:
  Update to 'newer' table handler interface
  Fixed use_blob_value() to be accurate
  In ::complemented_read() we have to check both the read and write bitmap as the old code did mark all changed columns also in the read map
  Correct dumping of field data with DBUG_DUMP
  Prefix addresses in DBUG_PRINT with 0x
  Fixed usage of not initialized memory
  Update to use field->flags & FIELD_IN_ADD_INDEX instead of field->add_index.
sql/ha_ndbcluster.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster_binlog.cc:
  Mark usage of all columns in ndbcluster binlog tables
  false -> FALSE, true -> TRUE
  Use table->s->all_set instead of creating a temporary bitmap.
sql/ha_partition.cc:
  Update to 'newer' table handler interface
  Added memroot to initialise_partitions() and related functions to get faster memory allocation.
  partition_create_handler() is now responsible for initialisation of the partition object
  Some trivial optimizations and indentation fixes
  Ensure that table_flags() are up to date
  Removed documentation for removed HA_EXTRA flags
  Fixed 'strange' usage of m_file[i] in new_handlers_from_part_info()that worked in current code 'by chance'
sql/ha_partition.h:
  Update to 'newer' table handler interface
sql/handler.cc:
  create_xxx handler now takes MEMROOT as an argument to simplify memory allocation.
  Much simpler get_new_handler()
  (Initialization of the object is now handled by the create method for the engine)
  Moved all allocation of bitmap handling to the TABLE object (in table.cc)
  Added column_bitmaps_signal() to signal column usage changes.
  Changed binlog_log_row() to use the exiusting all_set bitmap in the table object.
  Added ha_reset() function to test that the file object is ok at end of statement and call handler::reset()
  Added use_hidden_primary_key() to signal handler that we we are going to read and update + delete the row and the handler should thus remember the position for the row
sql/handler.h:
  Added HA_NO_TRANSACTIONS, HA_PARTIAL_COLUMN_READ, HA_REQUIRES_KEY_COLUMNS_FOR_DELETE,HA_PRIMARY_KEY_REQUIRED_FOR_DELETE and HA_HAS_RECORDS
  Removed HA_NOT_EXACT_COUNT, HA_READ_RND_SAME
  HA_DUPP_POS -> HA_DUPLICATE_POS
  HA_NOT_EXACT_COUNT replaced by HA_STATS_RECORDS_IS_EXACT, HA_HAS_RECORDS and records()
  HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
  Added future row type 'ROW_TYPE_PAGES'
  Added MEM_ROOT to handlerton 'create' function
  Added ha_statistics, a structure for all status variable in the base handler class.
  Moved all status variables in the handler class into a stats structs to improve readability.
  ha_table_flags() is now a cached (not virtual) version of table_flags()
  reset() doesn't anymore call extra(HA_EXTRA_RESET) but is a function of it's own.
  Renamed dupp_ref to dup_ref
  Renamed not used handler::sortkey
  Moved read_set and write_set to TABLE structure
  handler::init() function added for cacheing of virtual constants from engine.
sql/item.cc:
  Added register_field_in_read_map() for marking used columns in expression.
  This is used by filesort() for creating an optimal column bitmap while retrieving columns for sorting.
  Initalize value.cs_info.character_set_client to fix core dump bug with --debug
  set_query_id -> mark_used_columns
  Mark used columns in read_set OR write_set.
sql/item.h:
  Removed reset_query_id_processor() as it's not needed anymore.
  Added register_field_in_read_map()
  Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.
sql/item_cmpfunc.cc:
  Temporary mark used columns to be read/writable
  Update Item::walk to new interface
sql/item_cmpfunc.h:
  Added extra argument to Item::walk() to indicate if we should also traverse sub queries.
sql/item_func.cc:
  Update Item::walk() to new interface
  table_flags() -> ha_table_flags()
sql/item_func.h:
  Update Item::walk() to new interface
sql/item_row.cc:
  Update Item::walk() to new interface
sql/item_row.h:
  Update Item::walk() to new interface
sql/item_strfunc.h:
  Update Item::walk() to new interface
sql/item_subselect.cc:
  Added Item_subselect::walk()
  (It was a bug it was missing before. Not sure what kind of bugs this could have caused)
sql/item_subselect.h:
  Update Item::walk() to new interface
sql/item_sum.cc:
  Update Item::walk() to new interface
  Updates for new handler interace
sql/item_sum.h:
  Update Item::walk() to new interface
sql/key.cc:
  Updates for new handler interace
sql/log.cc:
  Mark all columns used for log tables
  Split options flag
  Ensured that second argument to trans_register_ha is a bool
sql/log_event.cc:
  Fixed comments to be withing 79 characters
  Use OPTION_KEEP_LOG instead of OPTION_STATUS_NO_TRANS_UPDATE to remove wrong warnings
  Updates for new handler interface
  Use 0x%lx instead of %p (portability problem)
sql/mysql_priv.h:
  Added OPTION_KEEP_LOG to indicate that we should replicate the binlog even on rollback
  Removed not used 'conds' argument to setup_tables
sql/mysqld.cc:
  Indentation fixes and removed old comment
sql/opt_range.cc:
  Update to new handler and bitmap interface.
  Fixed calls to cp_buffer_from_ref() and walk() (new argument).
  Create new temporary bitmaps for ror scans.
  (Needed because of handler changes and to get more accurate column bitmaps than before)
  Remove not needed file->ha_reset() call before file->close().
  Some trivial optimization and indentation fixes.
  Use Field->part_of_key_not_clustered() to check if field is part of a key, instead of looping over all key parts.
  
  Added flag 'in_ror_merged_scan' to allow ::get_next() to know that we need a special column bitmap to only fetch pointer to record.
  This is needed because ror scan uses the same TABLE object but different file objects, which creates problem for the column bitmap handling.
  (This is a temporary solution. A better one would be to allocate an own TABLE object for ROR scans)
  
  Optimized bitmap handling in ror scans:
  - Start bitmap at position 0, not 1
  - Use same bitmap size as in TABLE
  - Use table->read_set and table->write_set to create column bitmaps instead of looping over all fields in table
sql/opt_range.h:
  Added 'in_ror_merged_scan' to indicate if we are doing a ROR scan
  Added temporary column bitmaps used in ROR scans
sql/opt_sum.cc:
  Added get_ext_record_count() which is used in COUNT() optimization if handler has HA_HAS_RECORDS
  Note that we don't call this if handler has HA_STATS_RECORDS_IS_EXACT set.
sql/protocol.cc:
  We need to mark columns as readable in ::store() as we sometimes return default value for fields to the user
sql/records.cc:
  Updates for new handler interface
sql/set_var.cc:
  Handle splitting OPTION_STATUS_NO_TRANS_UPDATE to two flags
sql/share/errmsg.txt:
  Fixed wrong
sql/sp.cc:
  Mark that we are using all columns for the proc table
  Update call to setup_tables() to use new prototype
sql/sp_head.cc:
  Removed QQ comment
sql/spatial.cc:
  Removed wrong QQ comment
sql/sql_acl.cc:
  Mark that we need all columns for acl tables
  Supply memroot to some 'new' calls.
  Indentation fixes
sql/sql_base.cc:
  set_query_id removed
  Ensure we call ha_reset() at end of each statement
  Mark read columns in read_set and changed columns in write_set (Before all columns was marked in read set)
  Fixed marking of some columns that was not proplerly marked before
  Maintain in TABLE->merge_keys set of all keys that are used in some way
  Removed not used 'conds' argument from setup_tables()
  Remove not used setting of 'dupp_field' in insert_fields()
  Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after crash)
sql/sql_bitmap.h:
  Added is_overlapping()
sql/sql_class.cc:
  Slow_logs was not properly initialized, which could maybe cause extra/lost entries in slow log.
  set_query_id -> mark_used_columns
  Simpler variable usage in pack_row()  (cleanup)
  Moved some variable declartion at start of function for better code readability
sql/sql_class.h:
  Added enum_mark_columns
  Updated comments
  Renamed dupp_field -> dup_field
  Added virtual function 'can_rollback_data()' to select_insert() to be used in CREATE ... SELECT to optimize use of OPTION_STATUS_NO_TRANS_UPDATE.
  (This fixes a bug in CREATE ... SELECT where we did give wrong warnings when using non transacational tables)
sql/sql_delete.cc:
  Updates to new handler interface
  Call table->mark_columns_needed_for_delete() to allow us to put additional columns in column usage maps if handler so requires.
  Call table->prepare_for_position() to tell handler that we are going to call ha_position().
  Removed call to free_io_cache(). (io_cache is now removed in ha_reset()).
  Fixed calls to setup_tables()
sql/sql_do.cc:
  Update call to setup_fields()
sql/sql_handler.cc:
  Tell handler tables to always read all columns.
  Use temporary column map when storing value in field for later index usage
sql/sql_help.cc:
  Makr all used fields to be read
  Update call to setup_fields()
sql/sql_insert.cc:
  Tell handler we are going to update the auto_increment column
  dupp_field -> dup_field
  Set column usage bits for timestamp field.
  Call table->mark_columns_needed_for_insert() and table->mark_auto_increment_column()
  Removed not used argument from mysql_prepare_insert_check_table().
  
  If we get an duplicate row on insert, change column map to read and write all columns while retrying the operatation.
  This is required by the definition of REPLACE and also ensures that fields that are only part of UPDATE are properly handled.
  This fixed a bug in NDB and REPLACE where REPLACE wrongly copied some column values from the replaced row.
  
  Setup new bitmaps for delayed insert rows
  Remove reseting of next_number_fields as it will be reset on next call to handler_insert()
  
  Fixed usage of thd->options and OPTION_STATUS_NO_TRANS_UPDATE.
  The issue was that one should not to reset this flag as it may be set by a previous statement.
  The way it was now used caused us to loose some warnings and get other wrong warnings when using non transactional tables mixed with transactional.
  I fixed it by introducing 'select_insert::can_rollback_data' to inform send_error() that the given statement can be rolled back (which in case of CREATE TABLE can always be done)
  Don't close tables created with CREATE ... SELECT but keep them in the table cache.
  
  Moved out MY_HOOKS from inside function (better readability)
sql/sql_load.cc:
  Update to use new handler and column marking interface
  Update using setup_tables()
sql/sql_olap.cc:
  Update calls to setup_tables
  Use enums instead of constants to setup_fields()
sql/sql_parse.cc:
  Handle OPTION_KEEP_LOG:
  - Set it on CREATE TEMPORARY TABLE / DROP TABLE
  - Reset it when OPTION_STATUS_NO_TRANS_UPDATE is reset
  - Don't set it for CREATE ... SELECT (this is handled in select_create class)
  Remove reseting of OPTION_STATUS_NO_TRANS_UPDATE in begin_trans() as this should already be reset.
  If in autocommit mode, reset OPTION_KEEP_LOG and OPTION_STATUS_NO_TRANS_UPDATE to not give warnings in future commands
sql/sql_partition.cc:
  Update walk() usage
  Trivial indentation fixes
sql/sql_plugin.cc:
  Mark all columns as used for plugins
sql/sql_prepare.cc:
  Added assert to find out hidden bugs in character_set_client (got an error in debug binary when this not set correctly)
  Updates for new handler interface
  Update calls to setup_fields()
sql/sql_repl.cc:
  Indentation fixes
sql/sql_select.cc:
  Update call to setup_tables() and setup_fields()
  Remove some old disabled code
  Update to new hadler interface
  Indentation cleanups
  Added column bitmaps for temporary tables.
  Remove updating of the removed slots in the Field class
  Added TABLE argument to cp_buffer_from_ref() (To be able to install temporary column maps)
  For internal temporary tables, use handler::write_row(), handler::delete_row() and handler::update_row() instead of handler::ha_xxxx() for faster execution.
sql/sql_select.h:
  Indentaition fixes.
  Install temporary column usage maps when needed
  Added TABLE element to cp_buffer_from_ref()
sql/sql_show.cc:
  Update to new handler interface
  Mark all columns used for internal tables.
  Style fixes.
  Added support for 'future' ROW_TYPE_PAGES.
  Don't allocate TMP_TABLE_PARAM with calloc. The 'init()' function will initialize the structure properly.
sql/sql_table.cc:
  Update to new handler interface
  Simple my_snprintf -> strmake()
  Changed some constants to defines
  Don't test for NULL in primary key (as we a couple of line above force the PRIMARY KEY to be NOT NULL)
  Change field->add_index to use field->flags & FIELD_IN_ADD_INDEX
  Mark all columns as used for ALTER TABLE
  Style fixes
  Update call to filesort()
sql/sql_trigger.h:
  Added friend functions to be able to test if triggers exists for table we are going to insert/update or delete in.
sql/sql_udf.cc:
  Mark all columns as used for udf system table.
sql/sql_union.cc:
  Update call to walk()
  Update to new handler interface
sql/sql_update.cc:
  Remove query_id argument from compare_record()
  Use column bitmaps instead of query_id.
  We can't use compare_records() to skip updates for handlers that returns a partial column set and the read_set doesn't cover all columns in the write set, because compare_record() can't in this case know if a not read column changed value.
  Update call to setup_fields()
  Using separate column read and write sets allows for easier checking of timestamp field was set by statement.
  Removed call to free_io_cache() as this is now done in ha_reset()
  Call table->mark_columns_needed_for_update() and table->prepare_for_position()
  Style fixes
sql/sql_view.cc:
  Style fixes
sql/table.cc:
  Remove implicitely include 'errno.h'
  Remove code for building normalized path, as this is now identical to 'path'
  Remove field->fieldnr
  Added update of field->part_of_key_not_clustered()
  Create column bitmaps in TABLE and TABLE_SHARE
  Don't setup a temporary MEM_ROOT object as a thread specific variable for the handler. Instead we send the to-be-used MEMROOT to get_new_handler()
  Update to new handler interface
  Update call to walk()
  Added new functions:
  - st_table::clear_column_bitmaps()
  - st_table::prepare_for_position()
  - st_table::mark_columns_used_by_index()
  - st_table::restore_column_maps_after_mark_index()
  - st_table::mark_columns_used_by_index_no_reset()
  - st_table::mark_auto_increment_column()
  - st_table::mark_columns_needed_for_delete()
  - st_table::mark_columns_needed_for_update()
  - st_table::mark_columns_needed_for_insert()
sql/table.h:
  Moved column usage bitmaps from handler to TABLE
  Added to TABLE_SHARE all_set and column_bitmap_size
  Added to TABLE merge_keys, bitmap_init_values, def_read_set, def_write_set, tmp_set, read_set and write_set.
  Declared all new table column bitmap functions
  Added TABLE functions column_bitmaps_set(), column_bitmaps_set_no_signal(), use_all_columns() and default_column_bitmaps()
  Added functions: tmp_use_all_columns() and tmp_restore_column_map() to temporarly switch column bitmaps
  Added functions: dbug_tmp_use_all_columns() and dbug_tmp_restore_column_map() to temporarly switch column bitmaps to avoid asserts in Field::store() and Field::val().
sql/tztime.cc:
  Mark all columns as used for timezone tables
storage/archive/ha_archive.cc:
  Update to new handler interface
storage/archive/ha_archive.h:
  Update to new handler interface
storage/blackhole/ha_blackhole.cc:
  Update to new handler interface
storage/blackhole/ha_blackhole.h:
  Update to new handler interface
  removed not needed flag HA_DUPP_POS
storage/csv/ha_tina.cc:
  Update to new handler interface
storage/csv/ha_tina.h:
  Update to new handler interface
storage/example/ha_example.cc:
  Update to new handler interface
storage/example/ha_example.h:
  Update to new handler interface
storage/heap/hp_extra.c:
  Added heap_reset() (Required by new handler interface)
storage/heap/hp_test2.c:
  Use heap_reset()
storage/myisam/ft_boolean_search.c:
  Fixed compiler warning
storage/myisam/mi_extra.c:
  Added mi_reset() (Required by new handler interface)
storage/myisam/mi_search.c:
  Fixed DBUG_PRINT messages to use 0x%lx instead of %lx
storage/myisam/mi_test2.c:
  Use mi_reset()
storage/myisam/myisampack.c:
  Use mi_reset()
storage/myisammrg/myrg_extra.c:
  Added myrg_reset() (Required by new handler interface)
unittest/mysys/base64.t.c:
  Include my_global.h
  Don't include implictely include file 'stdlib.h'
2006-06-04 18:52:22 +03:00
unknown
a82d5e01ed second patch for make distcheck 2006-06-01 23:59:34 +02:00
unknown
600b9f1d70 fixing make distcheck again. fix 1. 2006-06-01 19:39:13 +02:00
unknown
740077bdc5 unittest:
rename *.t* to *-t* to be automake-friendly
  simplify Makefiles
test_atomic.c:
  move to unittest, add GPL comment, fix warnings, convert to tap framework.
configure:
  remove custom tests for available types, use AC_CHECK_TYPE instead
x86-gcc.h:
  fix gcc -ansi errors while maintaining readability
ignore:
  added *-t


unittest/mysys/base64-t.c:
  Rename: unittest/mysys/base64.t.c -> unittest/mysys/base64-t.c
unittest/mysys/bitmap-t.c:
  Rename: unittest/mysys/bitmap.t.c -> unittest/mysys/bitmap-t.c
unittest/mytap/t/basic-t.c:
  Rename: unittest/mytap/t/basic.t.c -> unittest/mytap/t/basic-t.c
unittest/examples/no_plan-t.c:
  Rename: unittest/examples/no_plan.t.c -> unittest/examples/no_plan-t.c
unittest/examples/simple-t.c:
  Rename: unittest/examples/simple.t.c -> unittest/examples/simple-t.c
unittest/examples/skip-t.c:
  Rename: unittest/examples/skip.t.c -> unittest/examples/skip-t.c
unittest/examples/skip_all-t.c:
  Rename: unittest/examples/skip_all.t.c -> unittest/examples/skip_all-t.c
unittest/examples/todo-t.c:
  Rename: unittest/examples/todo.t.c -> unittest/examples/todo-t.c
BitKeeper/etc/ignore:
  added *-t
config/ac-macros/misc.m4:
  remove custom AC_TRY_RUN tests for available types, use AC_CHECK_TYPE instead
configure.in:
  remove custom tests for available types, use AC_CHECK_TYPE instead
include/atomic/x86-gcc.h:
  fix gcc -ansi errors while maintaining readability
include/my_global.h:
  remove custom tests for available types, use AC_CHECK_TYPE instead
include/my_sys.h:
  add missing declaration
mysys/Makefile.am:
  move test_atomic to unittest
unittest/Makefile.am:
  simplifications, correct permissions in chmod
unittest/README.txt:
  rename *.t* to *-t* to be automake-friendly
unittest/examples/Makefile.am:
  rename *.t* to *-t* to be automake-friendly
  simplify Makefile
unittest/mysys/Makefile.am:
  rename *.t* to *-t* to be automake-friendly
  simplify Makefile
unittest/mysys/my_atomic-t.c:
  move mysys/test_atomic.c to unittest, add GPL comment, fix warnings,
  convert to tap framework.
unittest/mytap/t/Makefile.am:
  rename *.t* to *-t* to be automake-friendly
  simplify Makefile
unittest/unit.pl:
  rename *.t* to *-t* to be automake-friendly
2006-06-01 12:25:47 +02:00
unknown
f04b7da96f fix for BSD make 2006-05-25 12:48:31 +02:00
unknown
61bd3fa055 mysql.spec.sh:
Removed Berkeley DB
configure.in:
  Adjusted Netware support
basic.t.c:
  Change for Netware
Makefile.am:
  Use thread safe libmysqlclient_r if it was built
valgrind.supp:
  Hide report about strlen/_dl_init_paths
ha_tina.cc:
  Temporarely disable CSV engine on Netware,
  as the engine depends on mmap()
net_serv.cc:
  Include <sys/select.h> for Netware


sql/net_serv.cc:
  Include <sys/select.h> for Netware
storage/csv/ha_tina.cc:
  Temporarely disable CSV engine on Netware,
  as the engine depends on mmap()
mysql-test/valgrind.supp:
  Hide report about strlen/_dl_init_paths
tests/Makefile.am:
  Use thread safe libmysqlclient_r if it was built
unittest/mytap/t/basic.t.c:
  Change for Netware
configure.in:
  Adjusted Netware support
support-files/mysql.spec.sh:
  Removed Berkeley DB
2006-05-16 22:47:22 +02:00
unknown
f543e65564 Several "unittest" files : Ensure that the configure result is used when compiling them.
unittest/examples/no_plan.t.c:
  Ensure that the "configure" result is used when compiling this module.
unittest/examples/skip_all.t.c:
  Ensure that the configure result is used when compiling this module.
unittest/examples/todo.t.c:
  Ensure that the configure result is used when compiling this module.
unittest/mytap/t/basic.t.c:
  Ensure that the configure result is used when compiling this module.
2006-05-10 17:29:28 +02:00
unknown
dc3e7bdc87 fix for make distcheck 2006-04-20 23:04:55 +02:00
unknown
a7296d9202 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/Users/emurphy/src/mysql/bk-clean/mysql-5.1-new
2006-04-14 10:44:36 -04:00
unknown
6b44b419c5 Fixing HP-UX and AIX builds.
unittest/mytap/tap.h:
  Handle __attribute__ more portably, fixing builds for HP-UX and AIX.
2006-04-14 10:36:36 -04:00
unknown
eb485ecedc Makefile.am:
Move -lmystrings after -ldbug, to define strmov() on HP-UX


unittest/mysys/Makefile.am:
  Move -lmystrings after -ldbug, to define strmov() on HP-UX
2006-04-14 15:34:04 +02:00
unknown
3d185d7935 base64.t.c:
Moved declarations to beginning of block


unittest/mysys/base64.t.c:
  Moved declarations to beginning of block
2006-04-14 14:59:21 +02:00
unknown
17283aa5c3 add a file to EXTRA_DIST. Should fix broken bootstrap.
unittest/Makefile.am:
  add unit.pl to the list of extra files, so that
  "make dist" picks it up.
2006-04-14 13:53:02 +04:00
unknown
78224d023a Remove gcc-specific additions to AM_CFLAGS in unittest Makefile.am files
unittest/examples/Makefile.am:
  Don't add gcc-specific flags to AM_CFLAGS
unittest/mytap/t/Makefile.am:
  Don't add gcc-specific flags to AM_CFLAGS
2006-04-13 13:26:22 -07:00
unknown
d23064a668 Fix 'make distcheck' problems with new unittest code, and a small
portability problem.


BitKeeper/etc/ignore:
  Use a wildcard to ignore all unittest *.t files
unittest/Makefile.am:
  Add unit to DISTCLEANFILES, and make sure to copy it from srcdir
unittest/examples/Makefile.am:
  Use srcdir to find mytap header
unittest/mysys/Makefile.am:
  Use srcdir to find mytap header
unittest/mytap/t/Makefile.am:
  Use builddir for finding mytap library
unittest/mytap/tap.c:
  Fix portability problem (declarations after code in C code)
2006-04-13 13:01:57 -07:00
unknown
24f672c003 WL#3208 (Adding TAP support):
Making it portable to non-gcc compilers by defining __attribute__
macro for non-gcc compilers.


unittest/mytap/Doxyfile:
  Expanding macros while generating documentation.
unittest/mytap/tap.h:
  Defining __attribute__ macro for non-gcc builds.
2006-04-12 21:14:32 +02:00
unknown
a14de3b2db WL#3206 (Add unit tests):
More changes according to review comments.


unittest/README.txt:
  Changes to manifest.
unittest/mysys/bitmap.t.c:
  Removed unused functions and variables. Marked unused parameters
  as unused. No need to test every size up to 4096 bits, testing to 1024,
  but I think this is too much as well.
unittest/unit.pl:
  Added test for version-specific function.
2006-04-11 20:29:34 +02:00
unknown
4f99f11e9c WL#3206 (Adding unit tests):
Added 'test' target to build and run tests. Added documentation.
Added README.txt files. Fixing problem with initialization of
the Test::Harness::Straps replacement. Added code to filter out non-
test directories.


unittest/Makefile.am:
  Adding 'test' target to build and run tests.
unittest/examples/skip.t.c:
  Changing text for skip reason.
unittest/examples/skip_all.t.c:
  Changing text for skip reason.
unittest/mytap/tap.c:
  Adding copyright. Adding documentation. Minor code changes.
unittest/mytap/tap.h:
  Adding copyright. Adding documentation.
unittest/unit.pl:
  Initializing replacement Test::Harness::Straps properly.
  Adding code to filter non-test directories from default directories
  to use.
unittest/README.txt:
  New BitKeeper file ``unittest/README.txt''
2006-04-10 17:06:12 +02:00
unknown
3f9e35d3f3 WL#3206 (Adding unit tests):
Moving mytap library into unittest/
Adding 'test' target to make and run unit tests.
Minor fixes.


unittest/mytap/Doxyfile:
  mvdir
unittest/mytap/t/basic.t.c:
  mvdir
unittest/mytap/tap.c:
  mvdir
unittest/mytap/tap.h:
  mvdir
Makefile.am:
  Correcting after moving mytap/
configure.in:
  Correcting after moving mytap/
unittest/Makefile.am:
  Adding 'test' target to build and execute unit tests.
unittest/examples/Makefile.am:
  Correcting after moving mytap/
unittest/mysys/Makefile.am:
  Correcting after moving mytap/
unittest/mysys/bitmap.t.c:
  Adding copyright notice.
unittest/mytap/Makefile.am:
  Correcting after moving mytap/
unittest/mytap/t/Makefile.am:
  Correcting after moving mytap/
unittest/mysys/base64.t.c:
  New BitKeeper file ``unittest/mysys/base64.t.c''
2006-04-06 17:18:12 +02:00
unknown
6d9323ade0 WL#3206 (Add unit tests):
An implementation of the TAP framework for writing unit tests.


Makefile.am:
  Adding directories mytap and unittest
configure.in:
  Building Makefiles for mytap and unittest directories.
mytap/Doxyfile:
  New BitKeeper file ``mytap/Doxyfile''
mytap/Makefile.am:
  New BitKeeper file ``mytap/Makefile.am''
mytap/t/basic.t.c:
  New BitKeeper file ``mytap/t/basic.t.c''
mytap/tap.c:
  New BitKeeper file ``mytap/tap.c''
mytap/tap.h:
  New BitKeeper file ``mytap/tap.h''
unittest/Makefile.am:
  New BitKeeper file ``unittest/Makefile.am''
unittest/examples/Makefile.am:
  New BitKeeper file ``unittest/examples/Makefile.am''
unittest/examples/no_plan.t.c:
  New BitKeeper file ``unittest/examples/no_plan.t.c''
unittest/examples/simple.t.c:
  New BitKeeper file ``unittest/examples/simple.t.c''
unittest/examples/skip.t.c:
  New BitKeeper file ``unittest/examples/skip.t.c''
unittest/examples/skip_all.t.c:
  New BitKeeper file ``unittest/examples/skip_all.t.c''
unittest/examples/todo.t.c:
  New BitKeeper file ``unittest/examples/todo.t.c''
unittest/mysys/Makefile.am:
  New BitKeeper file ``unittest/mysys/Makefile.am''
unittest/mysys/bitmap.t.c:
  New BitKeeper file ``unittest/mysys/bitmap.t.c''
unittest/unit.pl:
  New BitKeeper file ``unittest/unit.pl''
2006-04-04 18:16:15 +02:00