Commit graph

1338 commits

Author SHA1 Message Date
Sergei Golubchik
c11c64e972 MDEV-5822 TokuDB fails to compile without partition storage engine 2014-03-24 20:01:55 +01:00
Sergei Golubchik
41c760b121 merge 2014-02-28 10:00:31 +01:00
Alexander Barkov
57cdc561fc Fixing AIX compilation failires 2014-02-27 19:44:00 +04:00
Sergei Golubchik
0dc23679c8 10.0-base merge 2014-02-26 15:28:07 +01:00
Sergei Golubchik
0b9a0a3517 5.5 merge 2014-02-25 16:04:35 +01:00
Sergey Vojtovich
d12c7adf71 MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.

revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
  Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM

  Rename test() macro to MY_TEST() to avoid conflict with libc++.
2014-02-19 14:05:15 +04:00
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Alexander Barkov
42af7a27f1 Removing "#include <sys/timeb.h>" from my_global.h,
which has been removed earlier, but somehow got into the sources again.

This file is not really needed, and it prints warnings
"sys/timeb.h is deprecated" for every file when compiling on FreeBSD.
2014-02-04 12:05:00 +04:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergei Golubchik
4ec2e9d7ed 5.5 merge and fixes for compiler/test errors 2013-09-18 13:07:31 +02:00
Sergei Golubchik
42f56557f5 MDEV-4941 make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h
C++ comments in C files, and a typo in my_global.h
2013-09-09 19:31:29 +02:00
Sergei Golubchik
b838d081ad mysql-5.5.33 merge 2013-09-06 22:31:30 +02:00
Sergei Golubchik
c06eaf21b7 MDEV-4165 [PATCH] RFE: make tmpdir a build-time configurable option
support -DTMPDIR=/path in CMakeLists.txt

Patch by Honza Horak.
2013-08-17 17:20:09 +04:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Sergei Golubchik
935817e985 Fix to compile without partitioning.
Remove few ifdef's
2013-06-15 19:09:40 +02:00
Tor Didriksen
c94ccb237e Bug#16729109: FIX COMPILATION WARNINGS WITH GCC 4.8
Backport to 5.5
(external Bug#69407 Build warnings with mysql)


support-files/build-tags:
  Run etags on sql_yacc.yy, ignore other .yy files
unittest/mysys/explain_filename-t.cc:
  NO_PLAN seems to fail on some platforms, use the actual number instead.
2013-06-14 10:52:23 +02:00
Tor Didriksen
a040586cce Bug#16729109: FIX COMPILATION WARNINGS WITH GCC 4.8
Backport to 5.5
(external Bug#69407 Build warnings with mysql)
2013-06-14 10:52:23 +02:00
Alexander Barkov
a2cfb8023f Merge from 10.0-connect
added:
  include/mysql/service_thd_timezone.h
  libservices/thd_timezone_service.c
  storage/connect/inihandl.h
  storage/connect/mysql-test/connect/r/grant.result
  storage/connect/mysql-test/connect/r/ini_grant.result
  storage/connect/mysql-test/connect/r/mysql_grant.result
  storage/connect/mysql-test/connect/r/occur.result
  storage/connect/mysql-test/connect/r/odbc_sqlite3_grant.result
  storage/connect/mysql-test/connect/r/pivot.result
  storage/connect/mysql-test/connect/r/xcol.result
  storage/connect/mysql-test/connect/r/xml_grant.result
  storage/connect/mysql-test/connect/std_data/expenses.txt
  storage/connect/mysql-test/connect/t/grant.test
  storage/connect/mysql-test/connect/t/have_odbc_sqlite3.inc
  storage/connect/mysql-test/connect/t/ini_grant.test
  storage/connect/mysql-test/connect/t/mysql_grant.test
  storage/connect/mysql-test/connect/t/occur.test
  storage/connect/mysql-test/connect/t/odbc_sqlite3_grant.test
  storage/connect/mysql-test/connect/t/pivot.test
  storage/connect/mysql-test/connect/t/xcol.test
  storage/connect/mysql-test/connect/t/xml_grant.test
  storage/connect/rcmsg.h
  storage/connect/taboccur.cpp
  storage/connect/taboccur.h
  storage/connect/tabutil.cpp
  storage/connect/tabutil.h
  storage/connect/tabxcl.cpp
  storage/connect/tabxcl.h
modified:
  include/my_global.h
  include/my_time.h
  include/mysql.h.pp
  include/mysql/plugin.h
  include/mysql/plugin_audit.h.pp
  include/mysql/plugin_auth.h.pp
  include/mysql/plugin_ftparser.h.pp
  include/mysql/services.h
  include/mysql_time.h
  include/probes_mysql_nodtrace.h
  include/service_versions.h
  libservices/CMakeLists.txt
  mysql-test/r/handlersocket.result
  mysql-test/r/plugin.result
  mysql-test/suite/plugins/r/show_all_plugins.result
  sql/item_func.cc
  sql/mysqld.cc
  sql/set_var.cc
  sql/sql_class.cc
  sql/sql_plugin.cc
  sql/sql_plugin.h
  sql/sql_plugin_services.h
  sql/sql_show.cc
  sql/sys_vars.cc
  storage/connect/CMakeLists.txt
  storage/connect/catalog.h
  storage/connect/colblk.cpp
  storage/connect/colblk.h
  storage/connect/connect.cc
  storage/connect/connect.h
  storage/connect/filamdbf.cpp
  storage/connect/global.h
  storage/connect/ha_connect.cc
  storage/connect/ha_connect.h
  storage/connect/inihandl.c
  storage/connect/maputil.h
  storage/connect/mycat.cc
  storage/connect/myconn.cpp
  storage/connect/myconn.h
  storage/connect/mysql-test/connect/r/bin.result
  storage/connect/mysql-test/connect/r/csv.result
  storage/connect/mysql-test/connect/r/dbf.result
  storage/connect/mysql-test/connect/r/dir.result
  storage/connect/mysql-test/connect/r/fix.result
  storage/connect/mysql-test/connect/r/fmt.result
  storage/connect/mysql-test/connect/r/ini.result
  storage/connect/mysql-test/connect/r/mysql.result
  storage/connect/mysql-test/connect/r/odbc_sqlite3.result
  storage/connect/mysql-test/connect/r/tbl.result
  storage/connect/mysql-test/connect/r/upd.result
  storage/connect/mysql-test/connect/r/vec.result
  storage/connect/mysql-test/connect/r/xml.result
  storage/connect/mysql-test/connect/t/bin.test
  storage/connect/mysql-test/connect/t/csv.test
  storage/connect/mysql-test/connect/t/dbf.test
  storage/connect/mysql-test/connect/t/dir.test
  storage/connect/mysql-test/connect/t/fix.test
  storage/connect/mysql-test/connect/t/fmt.test
  storage/connect/mysql-test/connect/t/ini.test
  storage/connect/mysql-test/connect/t/mysql.test
  storage/connect/mysql-test/connect/t/odbc_sqlite3.test
  storage/connect/mysql-test/connect/t/tbl.test
  storage/connect/mysql-test/connect/t/vec.test
  storage/connect/mysql-test/connect/t/xml.test
  storage/connect/odbconn.cpp
  storage/connect/osutil.c
  storage/connect/osutil.h
  storage/connect/plgcnx.h
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/plugutil.c
  storage/connect/rcmsg.c
  storage/connect/reldef.cpp
  storage/connect/tabcol.cpp
  storage/connect/tabcol.h
  storage/connect/tabfmt.cpp
  storage/connect/tabmysql.cpp
  storage/connect/tabmysql.h
  storage/connect/tabodbc.cpp
  storage/connect/tabpivot.cpp
  storage/connect/tabpivot.h
  storage/connect/tabsys.cpp
  storage/connect/tabsys.h
  storage/connect/tabtbl.cpp
  storage/connect/tabtbl.h
  storage/connect/tabwmi.cpp
  storage/connect/user_connect.cc
  storage/connect/valblk.cpp
  storage/connect/valblk.h
  storage/connect/value.cpp
  storage/connect/value.h
  storage/connect/xobject.h
  storage/connect/xtable.h
  storage/perfschema/ha_perfschema.cc
pending merges:
  Alexander Barkov 2013-06-08 Fixing a few compiler warnings
    Olivier Bertrand 2013-06-05 - Change CRLF line endings to LF
    Olivier Bertrand 2013-06-04 - Adding parallelism to the TBL table type
    Sergei Golubchik 2013-06-03 compiler warnings
    Alexander Barkov 2013-06-03 Fixing the problem with my_bool_t define...
    Olivier Bertrand 2013-05-28 - Fix crash when a null qrp is returned ...
    Olivier Bertrand 2013-05-28 - Extending connect_assisted_discovery c...
    Alexander Barkov 2013-05-28 Recording test results forgotten in the ...
    Alexander Barkov 2013-05-27 [merge] Merging with the latest 10.0
    Alexander Barkov 2013-05-27 - Fixing embedded verision of the Connec...
    Alexander Barkov 2013-05-27 Fixing ABI template, to take into accoun...
    Alexander Barkov 2013-05-27 Fixing ABI template, to take into accoun...
    Olivier Bertrand 2013-05-27 - Fix Windows compile error
    Alexander Barkov 2013-05-24 Adding the timezone plugin service, to c...
    Alexander Barkov 2013-05-24 Do not run mysql.test in case of embedde...
    Alexander Barkov 2013-05-24 Splitting SQLite3 tests into two parts:
    Alexander Barkov 2013-05-24 Removing more cases of direct use of thd.
    Alexander Barkov 2013-05-24 Removing direct access to thd, using fun...
    Olivier Bertrand 2013-05-24 - Fix setting default type to MYSQL->PRO...
    Alexander Barkov 2013-05-23 Connect: fixing non thread-safe code.
    Olivier Bertrand 2013-05-22 - Changing CONNECT version number and date
    Alexander Barkov 2013-05-21 "mtr --suite=connect --embedded" tests d...
    Olivier Bertrand 2013-05-20 - Correct misplaced parenthesis in last ...
    Olivier Bertrand 2013-05-20 - Save and restore srcdef when getting a...
    Olivier Bertrand 2013-05-19 - Removing unused copy file
    Olivier Bertrand 2013-05-19 [merge] - Commit merged and resolve
    Alexander Barkov 2013-05-13 Fixing warnings (mostly "no previous dec...
    Alexander Barkov 2013-05-13 Fixing compiler warnings ("no previous d...
    Alexander Barkov 2013-05-13 Fixing a few "no previous declaration" w...
    Alexander Barkov 2013-05-13 Fixing a few compilation warnings ("no p...
    Olivier Bertrand 2013-05-19 - Allowing views and queries as paramete...
    Olivier Bertrand 2013-05-13 [merge] - Commit merged changes
    Alexander Barkov 2013-05-13 [merge] Merge from maria-10.0
    Alexander Barkov 2013-05-13 Enabling --suite=connect by default
    Olivier Bertrand 2013-05-13 - Code cleaning. Eliminating unused code...
    Olivier Bertrand 2013-05-13 - fix use of uninitialized variable (colp)
    Olivier Bertrand 2013-05-13 - Set tdbp to NULL when ignored
    Olivier Bertrand 2013-05-12 - Changing mode from +x to -x
    Olivier Bertrand 2013-05-12 - Code cleaning.
    Olivier Bertrand 2013-05-11 - Fix tabpivot compile errors on Linux.
    Olivier Bertrand 2013-05-11 - Added a test case for PIVOT tables
    Olivier Bertrand 2013-05-10 - Add pivot table files and support
    Olivier Bertrand 2013-05-10 - Added table type PIVOT
    Olivier Bertrand 2013-05-09 - Fix inverted test on am in MYSQLDEF::D...
    Olivier Bertrand 2013-05-05 - General code cleaning, eliminating a f...
    Olivier Bertrand 2013-05-04 - Add test for XCOL and OCCUR tables
    Olivier Bertrand 2013-05-02 - Adding a loop test to prevent PROXY ba...
    Olivier Bertrand 2013-04-30 - Change in connect_assisted_discovery t...
    Olivier Bertrand 2013-04-30 - Allow PROXY based tables to specify My...
    Olivier Bertrand 2013-04-29 - Fix a bug causing a crash when using O...
    Olivier Bertrand 2013-04-29 - Adding 3 new table types:
2013-06-08 01:16:00 +04:00
Sergei Golubchik
72ba95873a 10.0-base merge
(without InnoDB - all InnoDB changes were ignored)
2013-06-06 21:32:29 +02:00
Sergei Golubchik
4749d40c63 5.5 merge 2013-06-06 17:51:28 +02:00
Alexander Barkov
1fe92fb87d Fixing the problem with my_bool_t defined two times.
(it worked fine with the modern gcc, but failed on some other compilers).


modified:
  include/my_global.h
  include/mysql/plugin.h
  include/mysql/plugin_audit.h.pp
  include/mysql/plugin_auth.h.pp
  include/mysql/plugin_ftparser.h.pp
  include/mysql/service_thd_timezone.h
  sql/item_func.cc
  sql/mysqld.cc
  sql/set_var.cc
  sql/sql_plugin.cc
  sql/sql_plugin.h
  sql/sql_show.cc
  sql/sys_vars.cc
  storage/perfschema/ha_perfschema.cc
2013-06-03 11:57:34 +04:00
unknown
a0fd7382bc Merge 10.0-base -> 10.0 2013-05-28 15:39:56 +02:00
Vladislav Vaintroub
ef1e767ae3 MDEV-4553 - Fixes for compilation under NetBSD. 2013-05-27 16:35:42 +02:00
Michael Widenius
53d44ad18b Added some fixes that should make MyISAM & Aria REPAIR work with more than 4G records
- If one specifies --force twice to myisamchk and aria_chk, then we will try to finnish the repair even if sort_buffer would be too small.
  This was done by dynamically allocate buffer handler objects as long as memory lasts.
- New option for myisamchk and aria_chk: create-missing-keys
- Changed default size of myisam_sort_buffer_size from 8M to 128M.
- Changed default size of sort_buffer_size in aria_chk from 128M to 256M.
- Increased information in error message about 'sort_buffer_size' beeing to small.
- Print also to 'show warnings' if repair was retried.
- Increased size of internal sort-buffer-readers from 16K to 128K
- Changed printing of 'number of records' to use %ll instead of casting to long
- Changed buffer sizes for myisam and aria to use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines.





include/my_global.h:
  Added MY_ALIGN_DOWN() to get previous alignment (for big memory areas)
include/myisam.h:
  Increased size of types to be able to handle more records
include/myisamchk.h:
  Increased size of types to be able to handle more records
  Added T_FORCE_SORT_MEMORY to force repair to work even if sort_buffer would not be big enough
mysql-test/r/myisam.result:
  Updated result
mysql-test/r/mysqld--help.result:
  Updated result
mysql-test/r/repair.result:
  Updated result
mysql-test/suite/maria/maria.result:
  Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too.
mysql-test/suite/maria/maria.test:
  Added test cases for some fixed bugs in MyISAM to verify that Aria doesn't have them too.
mysql-test/suite/maria/maria3.result:
  Updated result after sort buffer size increase
mysql-test/suite/sys_vars/r/aria_sort_buffer_size_basic.result:
  Updated result after sort buffer size increase
mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic.result:
  Updated result after sort buffer size increase
mysql-test/suite/sys_vars/t/myisam_sort_buffer_size_basic.test:
  Updated result after sort buffer size increase
mysql-test/t/myisam.test:
  Fixed error messages to not print system specific data
mysql-test/t/repair.test:
  Fixed error messages to not print system specific data
storage/maria/ha_maria.cc:
  Print also to 'show warnings' if repair was retried
  Changed default size of sort_buffer_size from 128M to 256M (same as in mysqld)
storage/maria/ma_check.c:
  Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT
storage/maria/ma_sort.c:
  Increased size of internal sort-buffer-readers from 16K to 128K
  Increased size of types to be able to handle more records
  Added support for T_FORCE_SORT_MEMORY
  Don't allocate too many extra BUFFPEK at a time (they are probably not needed)
  Improved error message for "sort_buffer_size is too small"
  Changed printing of 'number of records' to use %ll instead of casting to long
  Fixed bug where maria_update_key_parts() was called too early.
  Fixed bug in detecting result from read_to_buffer().
  Added 'out of memory' checking when calling 'alloc_dynamic()'.
storage/maria/maria_chk.c:
  Added --create-missing-keys
  If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small.
  check_param.sort_buffer_length varialble was used with wrong type.
storage/maria/maria_def.h:
  Increased size of types to be able to handle more records
  Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines
  Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT
storage/maria/maria_ftdump.c:
  Renamed USE_BUFFER_INIT -> PAGE_BUFFER_INIT
storage/maria/maria_read_log.c:
  Use PAGE_BUFFER_INIT for page cache
storage/myisam/ha_myisam.cc:
  Changed default size of myisam_sort_buffer_size from 8M to 128M
storage/myisam/mi_check.c:
  Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT
storage/myisam/myisam_ftdump.c:
  Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT
storage/myisam/myisamchk.c:
  Added --create-missing-keys
  If one specifies --force twice then we will try to finnish the repair even if sort_buffer would be too small.
  check_param.sort_buffer_length varialble was used with wrong type.
  Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT
storage/myisam/myisamdef.h:
  Increased SORT_BUFFER_INIT to 64M
  (speeds up repair a lot and most machines have nowadays a lot of memory)
  Use MY_ALIGN_DOWN() to get same number of bytes allocated on different machines
  Renamed USE_BUFFER_INIT -> KEY_BUFFER_INIT
storage/myisam/sort.c:
  Increased size of internal sort-buffer-readers from 16K to 128K
  Increased size of types to be able to handle more records
  Added support for T_FORCE_SORT_MEMORY
  Don't allocate too many extra BUFFPEK at a time (they are probably not needed)
  Improved error message for "sort_buffer_size is too small"
  Changed printing of 'number of records' to use %ll instead of casting to long
  Fixed bug in detecting result from read_to_buffer().
  Added 'out of memory' checking when calling 'alloc_dynamic()'.
2013-05-10 12:32:34 +03:00
Sergei Golubchik
a9035be5b7 10.0-base merge 2013-04-15 15:09:22 +02:00
Sergei Golubchik
f57ecb7786 5.5 merge 2013-04-14 10:04:07 +02:00
Sergei Golubchik
ce926c90ac 5.3 merge 2013-04-12 01:01:18 +02:00
Sergei Golubchik
ea4a417a8d 5.2 merge 2013-04-11 19:35:39 +02:00
Sergei Golubchik
61ed0ebe73 5.1 merge 2013-04-11 19:30:59 +02:00
Sergei Golubchik
73f79ac83f simpler fix for mysql bug #56085, no need to write an error interceptor,
when the function has a dedicated flag for this very use case.
2013-04-07 15:37:47 +02:00
Sergei Golubchik
0614af18a6 macro do {} while(0) safety 2013-04-07 15:20:58 +02:00
Sergei Golubchik
4ec6fe10e5 remove ULL() and LL(), because they're totally unnecessary
and sometimes harmful (used with expressions)
2013-04-07 14:00:16 +02:00
Sergei Golubchik
7b55b59b57 MDEV-4244 [PATCH] Buffer overruns and use-after-free errors
fixes for gcc 4.8 - compilation warnings and -fsanitize=address
2013-04-06 21:29:12 +02:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Murthy Narkedimilli
8afe262ae5 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Murthy Narkedimilli
d978016d93 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Michael Widenius
a260b15554 MDEV-4011 Added per thread memory counting and usage
Base code and idea from a patch from by plinux at Taobao.

The idea is that we mark all memory that are thread specific with MY_THREAD_SPECIFIC.
Memory counting is done per thread in the my_malloc_size_cb_func callback function from my_malloc().
There are plenty of new asserts to ensure that for a debug server the counting is correct.

Information_schema.processlist gets two new columns: MEMORY_USED and EXAMINED_ROWS.
- The later is there mainly to show how query is progressing.

The following changes in interfaces was needed to get this to work:
- init_alloc_root() amd init_sql_alloc() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- One now have to use alloc_root_set_min_malloc() to set min memory to be allocated by alloc_root()
- my_init_dynamic_array()  has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- my_net_init() has extra option so that one can mark memory with MY_THREAD_SPECIFIC
- Added flag for hash_init() so that one can mark hash table to be thread specific.
- Added flags to init_tree() so that one can mark tree to be thread specific.
- Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
- Added flag to Warning_info::Warning_info() if the structure should be fully initialized.
- String elements can now be marked as thread specific.
- Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
- Changed type of myf from int to ulong, as this is always a set of bit flags.

Other things:
- Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
- We now also show EXAMINED_ROWS in SHOW PROCESSLIST
- Added new variable 'memory_used'
- Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
- Removed calls to the obsoleted function init_dynamic_array()
- Use set_current_thd() instead of my_pthread_setspecific_ptr(THR_THD,...)


client/completion_hash.cc:
  Updated call to init_alloc_root()
client/mysql.cc:
  Updated call to init_alloc_root()
client/mysqlbinlog.cc:
  init_dynamic_array() -> my_init_dynamic_array()
  Updated call to init_alloc_root()
client/mysqlcheck.c:
  Updated call to my_init_dynamic_array()
client/mysqldump.c:
  Updated call to init_alloc_root()
client/mysqltest.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Fixed compiler warnings
extra/comp_err.c:
  Updated call to my_init_dynamic_array()
extra/resolve_stack_dump.c:
  Updated call to my_init_dynamic_array()
include/hash.h:
  Added HASH_THREAD_SPECIFIC
include/heap.h:
  Added flag is internal temporary table.
include/my_dir.h:
  Safety fix: Ensure that MY_DONT_SORT and MY_WANT_STAT don't interfer with other mysys flags
include/my_global.h:
  Changed type of myf from int to ulong, as this is always a set of bit flags.
include/my_sys.h:
  Added MY_THREAD_SPECIFIC and MY_THREAD_MOVE
  Added malloc_flags to DYNAMIC_ARRAY
  Added extra mysys flag argument to my_init_dynamic_array()
  Removed deprecated functions init_dynamic_array() and my_init_dynamic_array.._ci
  Updated paramaters for init_alloc_root()
include/my_tree.h:
  Added my_flags to allow one to use MY_THREAD_SPECIFIC with hash tables.
  Removed with_delete. One should now instead use MY_TREE_WITH_DELETE_FLAG
  Updated parameters to init_tree()
include/myisamchk.h:
  Added malloc_flags to allow one to use MY_THREAD_SPECIFIC for checks.
include/mysql.h:
  Added MYSQL_THREAD_SPECIFIC_MALLOC
  Used 'unused1' to mark memory as thread specific.
include/mysql.h.pp:
  Updated file
include/mysql_com.h:
  Used 'unused1' to mark memory as thread specific.
  Updated parameters for my_net_init()
libmysql/libmysql.c:
  Updated call to init_alloc_root() to mark memory thread specific.
libmysqld/emb_qcache.cc:
  Updated call to init_alloc_root()
libmysqld/lib_sql.cc:
  Updated call to init_alloc_root()
mysql-test/r/create.result:
  Updated results
mysql-test/r/user_var.result:
  Updated results
mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/is_columns_is.result:
  Update to handle new format of SHOW PROCESSLIST
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
  Updated results
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
  Updated results
mysql-test/t/show_explain.test:
  Fixed usage of debug variable so that one can run test with --debug
mysql-test/t/user_var.test:
  Added test of memory_usage variable.
mysys/array.c:
  Added extra my_flags option to init_dynamic_array() and init_dynamic_array2() so that one can mark memory with MY_THREAD_SPECIFIC
  All allocated memory is marked with the given my_flags.
  Removed obsolete function init_dynamic_array()
mysys/default.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
mysys/hash.c:
  Updated call to my_init_dynamic_array_ci().
  Allocated memory is marked with MY_THREAD_SPECIFIC if HASH_THREAD_SPECIFIC is used.
mysys/ma_dyncol.c:
  init_dynamic_array() -> my_init_dynamic_array()
  Added #if to get rid of compiler warnings
mysys/mf_tempdir.c:
  Updated call to my_init_dynamic_array()
mysys/my_alloc.c:
  Added extra parameter to init_alloc_root() so that one can mark memory with MY_THREAD_SPECIFIC
  Extend MEM_ROOT with a flag if memory is thread specific.
  This is stored in block_size, to keep the size of the MEM_ROOT object identical as before.
  Allocated memory is marked with MY_THREAD_SPECIFIC if used with init_alloc_root()
mysys/my_chmod.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_chsize.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_copy.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_create.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_delete.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_error.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fopen.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_fstream.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_getwd.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_lib.c:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Updated DBUG_PRINT because of change of myf type
mysys/my_lock.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_malloc.c:
  Store at start of each allocated memory block the size of the block and if the block is thread specific.
  Call malloc_size_cb_func, if set, with the memory allocated/freed.
  Updated DBUG_PRINT because of change of myf type
mysys/my_open.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_pread.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_read.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_redel.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_rename.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_seek.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_sync.c:
  Updated DBUG_PRINT because of change of myf type
mysys/my_thr_init.c:
  Ensure that one can call my_thread_dbug_id() even if thread is not properly initialized.
mysys/my_write.c:
  Updated DBUG_PRINT because of change of myf type
mysys/mysys_priv.h:
  Updated parameters to sf_malloc and sf_realloc()
mysys/safemalloc.c:
  Added checking that for memory marked with MY_THREAD_SPECIFIC that it's the same thread that is allocation and freeing the memory.
  Added sf_malloc_dbug_id() to allow MariaDB to specify which THD is handling the memory.
  Added my_flags arguments to sf_malloc() and sf_realloc() to be able to mark memory with MY_THREAD_SPECIFIC.
  Added sf_report_leaked_memory() to get list of memory not freed by a thread.
mysys/tree.c:
  Added flags to init_tree() so that one can mark tree to be thread specific.
  Removed with_delete option to init_tree(). Now one should instead use MY_TREE_WITH_DELETE_FLAG.
  Updated call to init_alloc_root()
  All allocated memory is marked with the given malloc flags
mysys/waiting_threads.c:
  Updated call to my_init_dynamic_array()
sql-common/client.c:
  Updated call to init_alloc_root() and my_net_init() to mark memory thread specific.
  Updated call to my_init_dynamic_array().
  Added MYSQL_THREAD_SPECIFIC_MALLOC so that client can mark memory as MY_THREAD_SPECIFIC.
sql-common/client_plugin.c:
  Updated call to init_alloc_root()
sql/debug_sync.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/event_scheduler.cc:
  Removed calls to net_end() as this is now done in ~THD()
  Call set_current_thd() to ensure that memory is assigned to right thread.
sql/events.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/filesort.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/filesort_utils.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/ha_ndbcluster.cc:
  Updated call to init_alloc_root()
  Updated call to my_net_init()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_ndbcluster_binlog.cc:
  Updated call to my_net_init()
  Updated call to init_sql_alloc()
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
sql/ha_partition.cc:
  Updated call to init_alloc_root()
sql/handler.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added missing call to my_dir_end()
sql/item_func.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_subselect.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/item_sum.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/log.cc:
  More DBUG
  Updated call to init_alloc_root()
sql/mdl.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/mysqld.cc:
  Added total_memory_used
  Updated call to init_alloc_root()
  Move mysql_cond_broadcast() before my_thread_end()
  Added mariadb_dbug_id() to count memory per THD instead of per thread.
  Added my_malloc_size_cb_func() callback function for my_malloc() to count memory.
  Move initialization of mysqld_server_started and mysqld_server_initialized earlier.
  Updated call to my_init_dynamic_array().
  Updated call to my_net_init().
  Call my_pthread_setspecific_ptr(THR_THD,...) to ensure that memory is assigned to right thread.
  Added status variable 'memory_used'.
  Updated call to init_alloc_root()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/mysqld.h:
  Added set_current_thd()
sql/net_serv.cc:
  Added new parameter to my_net_init() so that one can mark memory with MY_THREAD_SPECIFIC.
  Store in net->thread_specific_malloc if memory is thread specific.
  Mark memory to be thread specific if requested.
sql/opt_range.cc:
  Updated call to my_init_dynamic_array()
  Updated call to init_sql_alloc()
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/opt_subselect.cc:
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/protocol.cc:
  Fixed compiler warning
sql/records.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/rpl_filter.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_handler.cc:
  Updated call to my_init_dynamic_array2()
sql/rpl_handler.h:
  Updated call to init_sql_alloc()
sql/rpl_mi.cc:
  Updated call to my_init_dynamic_array()
sql/rpl_tblmap.cc:
  Updated call to init_alloc_root()
sql/rpl_utility.cc:
  Updated call to my_init_dynamic_array()
sql/slave.cc:
  Initialize things properly before calling functions that allocate memory.
  Removed calls to net_end() as this is now done in ~THD()
sql/sp_head.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  Added parameter to warning_info() that it should be fully initialized.
sql/sp_pcontext.cc:
  Updated call to my_init_dynamic_array()
sql/sql_acl.cc:
  Updated call to init_sql_alloc()
  Updated call to my_init_dynamic_array()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_admin.cc:
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_analyse.h:
  Updated call to init_tree() to mark memory thread specific.
sql/sql_array.h:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_audit.cc:
  Updated call to my_init_dynamic_array()
sql/sql_base.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_cache.cc:
  Updated comment
sql/sql_class.cc:
  Added parameter to warning_info() that not initialize it until THD is fully created.
  Updated call to init_sql_alloc()
  Mark THD::user_vars has to be thread specific.
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by THD is assigned to the THD.
  More DBUG
  Always acll net_end() in ~THD()
  Assert that all memory signed to this THD is really deleted at ~THD.
  Fixed set_status_var_init() to not reset memory_used.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_class.h:
  Added MY_THREAD_SPECIFIC to allocated memory.
  Added malloc_size to THD to record allocated memory per THD.
sql/sql_delete.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_error.cc:
  Added 'initialize' parameter to Warning_info() to say if should allocate memory for it's structures.
  This is used by THD::THD() to not allocate memory until THD is ready.
  Added Warning_info::free_memory()
sql/sql_error.h:
  Updated Warning_info() class.
sql/sql_handler.cc:
  Updated call to init_alloc_root() to mark memory thread specific.
sql/sql_insert.cc:
  More DBUG
sql/sql_join_cache.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_lex.cc:
  Updated call to my_init_dynamic_array()
sql/sql_lex.h:
  Updated call to my_init_dynamic_array()
sql/sql_load.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/sql_parse.cc:
  Removed calls to net_end() and thd->cleanup() as these are now done in ~THD()
  Ensure that examined_row_count() is reset before query.
  Fixed bug where kill_threads_for_user() was using the wrong mem_root to allocate memory.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Don't restore thd->status_var.memory_used when restoring thd->status_var
sql/sql_plugin.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Don't allocate THD on the stack, as this causes problems with valgrind when doing thd memory counting.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_prepare.cc:
  Added parameter to warning_info() that it should be fully initialized.
  Updated call to init_sql_alloc() to mark memory thread specific.
sql/sql_reload.cc:
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_select.cc:
  Updated call to my_init_dynamic_array() and init_sql_alloc() to mark memory thread specific.
  Added MY_THREAD_SPECIFIC to allocated memory.
  More DBUG
sql/sql_servers.cc:
  Updated call to init_sql_alloc() to mark memory some memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_show.cc:
  Updated call to my_init_dynamic_array()
  Mark my_dir() memory thread specific.
  Use my_pthread_setspecific_ptr(THR_THD,...) to mark that allocated memory should be allocated to calling thread.
  More DBUG.
  Added malloc_size and examined_row_count to SHOW PROCESSLIST.
  Added MY_THREAD_SPECIFIC to allocated memory.
  Updated call to init_sql_alloc()
  Added parameter to warning_info() that it should be fully initialized.
sql/sql_statistics.cc:
  Fixed compiler warning
sql/sql_string.cc:
  String elements can now be marked as thread specific.
sql/sql_string.h:
  String elements can now be marked as thread specific.
sql/sql_table.cc:
  Updated call to init_sql_alloc() and my_malloc() to mark memory thread specific
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
  Fixed compiler warning
sql/sql_test.cc:
  Updated call to my_init_dynamic_array() to mark memory thread specific.
sql/sql_trigger.cc:
  Updated call to init_sql_alloc()
sql/sql_udf.cc:
  Updated call to init_sql_alloc()
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/sql_update.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
sql/table.cc:
  Updated call to init_sql_alloc().
  Mark memory used by temporary tables, that are not for slave threads, as MY_THREAD_SPECIFIC
  Updated call to init_sql_alloc()
sql/thr_malloc.cc:
  Added my_flags argument to init_sql_alloc() to be able to mark memory as MY_THREAD_SPECIFIC.
sql/thr_malloc.h:
  Updated prototype for init_sql_alloc()
sql/tztime.cc:
  Updated call to init_sql_alloc()
  Updated call to init_alloc_root() to mark memory thread specific.
  my_pthread_setspecific_ptr(THR_THD,...) -> set_current_thd()
sql/uniques.cc:
  Updated calls to init_tree(), my_init_dynamic_array() and my_malloc() to mark memory thread specific.
sql/unireg.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/csv/ha_tina.cc:
  Updated call to init_alloc_root()
storage/federated/ha_federated.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
  Ensure that memory allocated by fedarated is registered for the system, not for the thread.
storage/federatedx/federatedx_io_mysql.cc:
  Updated call to my_init_dynamic_array()
storage/federatedx/ha_federatedx.cc:
  Updated call to init_alloc_root()
  Updated call to my_init_dynamic_array()
storage/heap/ha_heap.cc:
  Added MY_THREAD_SPECIFIC to allocated memory.
storage/heap/heapdef.h:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_block.c:
  Added parameter to hp_get_new_block() to be able to do thread specific memory tagging.
storage/heap/hp_create.c:
  - Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
  - Use MY_TREE_WITH_DELETE instead of removed option 'with_delete'.
storage/heap/hp_open.c:
  Internal HEAP tables are now marking it's memory as MY_THREAD_SPECIFIC.
storage/heap/hp_write.c:
  Added new parameter to hp_get_new_block()
storage/maria/ma_bitmap.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_blockrec.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_check.c:
  Updated call to init_alloc_root()
storage/maria/ma_ft_boolean_search.c:
  Updated calls to init_tree() and init_alloc_root()
storage/maria/ma_ft_nlq_search.c:
  Updated call to init_tree()
storage/maria/ma_ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/maria/ma_loghandler.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_open.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_sort.c:
  Updated call to my_init_dynamic_array()
storage/maria/ma_write.c:
  Updated calls to my_init_dynamic_array() and init_tree()
storage/maria/maria_pack.c:
  Updated call to init_tree()
storage/maria/unittest/sequence_storage.c:
  Updated call to my_init_dynamic_array()
storage/myisam/ft_boolean_search.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_nlq_search.c:
  Updated call to init_tree()
storage/myisam/ft_parser.c:
  Updated call to init_tree()
  Updated call to init_alloc_root()
storage/myisam/ft_stopwords.c:
  Updated call to init_tree()
storage/myisam/mi_check.c:
  Updated call to init_alloc_root()
storage/myisam/mi_write.c:
  Updated call to my_init_dynamic_array()
  Updated call to init_tree()
storage/myisam/myisamlog.c:
  Updated call to init_tree()
storage/myisam/myisampack.c:
  Updated call to init_tree()
storage/myisam/sort.c:
  Updated call to my_init_dynamic_array()
storage/myisammrg/ha_myisammrg.cc:
  Updated call to init_sql_alloc()
storage/perfschema/pfs_check.cc:
  Rest current_thd
storage/perfschema/pfs_instr.cc:
  Removed DBUG_ENTER/DBUG_VOID_RETURN as at this point my_thread_var is not allocated anymore, which can cause problems.
support-files/compiler_warnings.supp:
  Disable compiler warning from offsetof macro.
2013-01-23 16:16:14 +01:00
Sergei Golubchik
e1f681c99b 10.0-base -> 10.0-monty 2012-10-19 20:38:59 +02:00
Sergei Golubchik
474fe6d9d9 fixes for test failures
and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
2012-09-27 20:09:46 +02:00
Michael Widenius
f1159b18d9 More fixes 2012-08-17 16:46:34 +03:00
Michael Widenius
60589aeee0 Next part of merge. See TODO for details 2012-08-14 17:23:34 +03:00
Michael Widenius
1d0f70c2f8 Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6 2012-08-01 17:27:34 +03:00
Sergei Golubchik
0117a92fed MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake
remove dead code and unused HAVE_xxx constants from the sources
2012-07-31 19:29:07 +02:00
Sergei Golubchik
329daad2d3 more portable fix for lp:942266 - 5.5 builds fail with systemtap-sdt-dev installed on Ubuntu
include <limits> early, before min/max macros are defined.
2012-05-11 09:18:00 +02:00
Sergei Golubchik
20e706689d mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
  a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
  my_vsnprintf() is ok here, in 5.5
2012-03-28 01:04:46 +02:00
unknown
335de5db18 Merge mariadb 5.3->mariadb 5.5 2012-03-24 18:21:22 +01:00
Sergei Golubchik
e6c213897d merge 2012-03-21 19:15:29 +01:00
Sergei Golubchik
c88e2679c6 merge 2012-03-21 18:30:34 +01:00
Sergei Golubchik
44ea4e7c1f restore my_safe_printf_stderr for "crash-safe sigsegv handler"
use vsnprintf()
use write() on windows, not WriteFile or fwrite()
localtime_r is still a problem
2012-03-14 21:16:24 +01:00
Sergei Golubchik
3f17890892 disable EXTRA_DEBUG in non-dbug builds 2012-03-13 13:27:14 +01:00
Sergei Golubchik
1c530b36d1 mdev-20: INSTALL PLUGIN SONAME 2012-03-05 21:48:06 +01:00
MySQL Build Team
7a35cb9150 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
MySQL Build Team
5734bae576 Updated/added copyright headers 2012-02-16 10:48:16 +01:00
unknown
f0c682858f Merge MWL#192: non-blocking client library into MariaDB. 2012-02-26 16:11:44 +01:00
Sergei Golubchik
db39910f08 disable safemalloc for valgrind builds.
always try to use valgrind headers in debug builds.
define HAVE_valgrind for --with-valgrind
fix valgrind check in my_valgrind.h
2012-02-23 15:31:24 +01:00
unknown
f2db5ef4ba Fix MWL#192 build error: Remove SSL special case for embedded server.
VIO has SSL in embedded server anyway, so we do not win anything by excluding it.

This was actually already done in this changeset:

    revision-id: kostja@sun.com-20100413150445-8x23keoxdiufgq76

"... Also, he removed the (probable) bug of embedded server never using SSL-dependent functions..."
But was apparenly lost by a mis-merge of WL#5030.
2012-02-22 11:44:53 +01:00
Vladislav Vaintroub
19d13a3b17 portability fixes for FreeBSD 8 and 9 2012-01-23 17:12:25 +01:00
Georgi Kodinov
10543a4a2e Bug #11754014: 45549: udf plugin_dir path separator inconsistency
and cryptic error 1126 message

The problem was that dlopen() related code was using just a subset 
of the path normalization routines used in other places.
Fixed the expansion of the pre-dlopen() behavior for plugins and UDFs
to use a platform-dependent consistent encoding of the paths.
Fixed the error dlopen() error handling to take the correct error message
and strip off the trailing newline character(s).
Fixed tests to do a platform independent replace of directories and to 
account for the traling slash.
2012-01-16 12:04:28 +02:00
Georgi Kodinov
0e48b69cba Bug #11754014: 45549: udf plugin_dir path separator inconsistency
and cryptic error 1126 message

The problem was that dlopen() related code was using just a subset 
of the path normalization routines used in other places.
Fixed the expansion of the pre-dlopen() behavior for plugins and UDFs
to use a platform-dependent consistent encoding of the paths.
Fixed the error dlopen() error handling to take the correct error message
and strip off the trailing newline character(s).
Fixed tests to do a platform independent replace of directories and to 
account for the traling slash.
2012-01-16 12:04:28 +02:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Sergei Golubchik
745c53ec06 5.2->5.3 merge 2011-12-12 13:00:33 +01:00
Michael Widenius
6d4224a31c Merge with 5.2.
no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
2011-12-11 11:34:44 +02:00
Sergei Golubchik
d5fd757a42 1. add --plugin-dir and --default-auth to mysqltest.
2. dialog plugin now always returns mysql->password if non-empty and the first question is of password type
3. split get_tty_password into get_tty_password_buff and strdup.
4. dialog plugin now uses get_tty_password by default
5. dialog.test
6. moved small tests of individual plugins into a dedicated suite
2011-12-02 16:26:43 +01:00
Michael Widenius
ffab2a90dc Patch to get MariaDB to compile on CYGWIN; By Guenter Knauf
Increased number of locks in thr_lock (used only when testing)


include/my_global.h:
  Patch for CYGWIN
mysys/my_getsystime.c:
  Patch for CYGWIN
mysys/thr_lock.c:
  Increase number of locks for testing
2011-12-02 00:24:58 +02:00
Michael Widenius
6920457142 Merge with MariaDB 5.1 2011-11-24 18:48:58 +02:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
533d274c03 intptr should be unsigned 2011-10-19 22:48:48 +02:00
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
Chuck Bell
a38fc8d47e WL#5710 : mysql_plugin - enable or disable plugins
This patch adds a new client utility that enables or disables plugin
features. The utility disables or enables a plugin using values (name,
soname, and symbols) provided via a configuration file by the same name.
For example, to ENABLE the daemon_example plugin, the utility will read
the daemon_example.ini configuration file and use the values contained to
enable or disable the plugin.
2011-07-19 10:17:58 -04:00
Chuck Bell
6119cc2bba WL#5710 : mysql_plugin - enable or disable plugins
This patch adds a new client utility that enables or disables plugin
features. The utility disables or enables a plugin using values (name,
soname, and symbols) provided via a configuration file by the same name.
For example, to ENABLE the daemon_example plugin, the utility will read
the daemon_example.ini configuration file and use the values contained to
enable or disable the plugin.
2011-07-19 10:17:58 -04:00
Vladislav Vaintroub
f9cb1467b8 merge Windows performance patches into 5.3 2011-07-05 21:46:53 +02:00
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
b6e6097c95 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
Kent Boortz
1400d7a2cc Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
44135d4725 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Kent Boortz
e5ce023f57 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Vladislav Vaintroub
4171483b53 Backport Fix for Bug#24509 - 2048 file descriptor limit on windows needs increasing.
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with 
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open
 file is stored in the my_file_info struct, along with a flag for append mode 
(because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files=<value> during the server start.

Noteworthy benefit of this patch is that it removes limits from the table_cache size - 
allowing for more simultaneus users
2011-06-12 15:52:07 +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
Kent Boortz
0f03af653c Updated/added copyright headers 2011-07-04 01:25:49 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Davi Arnaut
8aadfb4065 Remove some leftovers from the removal of the gethostbyname wrappers. 2011-04-13 16:05:26 -03:00
Davi Arnaut
9e3699ca4f Remove some leftovers from the removal of the gethostbyname wrappers. 2011-04-13 16:05:26 -03:00
Magne Mahre
517c5c247c Bug#11933945 REMOVE LGPL LICENSED FILES IN MYSQL 5.5
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.
            
Note:  This patch only removed LGPL licensed files
       in MySQL 5.5 and later, and is the third of a 
       set of patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-29 14:43:49 +02:00
Magne Mahre
9b7799d527 Bug#11933945 REMOVE LGPL LICENSED FILES IN MYSQL 5.5
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.
            
Note:  This patch only removed LGPL licensed files
       in MySQL 5.5 and later, and is the third of a 
       set of patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-29 14:43:49 +02:00
Magne Mahre
9ff72a1acf Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.
      
Note:  This patch only removed LGPL licensed files
       in MySQL 5.1, and is the second of a set of
       patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-28 10:47:30 +02:00
Magne Mahre
4c4cb80b0a Bug#11900714 REMOVE LGPL LICENSED FILES IN MYSQL 5.1
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.
      
Note:  This patch only removed LGPL licensed files
       in MySQL 5.1, and is the second of a set of
       patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-28 10:47:30 +02: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
Sergei Golubchik
7e0e4b00c9 we don't support longlong less than 8 bytes 2011-02-23 18:43:29 +01:00
Magnus Blåudd
4846dac064 Remove last traces of HAVE_NDBCLUSTER_DB define - it has not had an effect in a long time and is just confusing.
At the same time backport the removal of OPT_NDB_CONNECTSTRING and OPT_NDBCLUSTER values from "enum options_client"
2011-02-21 11:15:29 +01:00
Magnus Blåudd
6ae9c15048 Remove last traces of HAVE_NDBCLUSTER_DB define - it has not had an effect in a long time and is just confusing.
At the same time backport the removal of OPT_NDB_CONNECTSTRING and OPT_NDBCLUSTER values from "enum options_client"
2011-02-21 11:15:29 +01:00
Michael Widenius
58bb0769bd Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
2011-02-20 18:51:43 +02:00
Magne Mahre
8ede0759c3 Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Magne Mahre
ebd24626ca Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Mats Kindahl
8c937b86b2 Bug #58246: INSTALL PLUGIN not secure & crashable
Adding symbol FN_DIRSEP to Windows as well.
2010-12-02 09:18:47 +01:00
Mats Kindahl
2bd4a70833 Bug #58246: INSTALL PLUGIN not secure & crashable
Adding symbol FN_DIRSEP to Windows as well.
2010-12-02 09:18:47 +01:00
Mats Kindahl
65faf729cd Merging patch for BUG#58246 into mysql-5.5-bugteam. 2010-12-01 23:15:14 +01:00
Mats Kindahl
8ea491e720 Merging patch for BUG#58246 into mysql-5.5-bugteam. 2010-12-01 23:15:14 +01:00
Mats Kindahl
fc9f3efaec BUG#58246: INSTALL PLUGIN not secure & crashable
When installing plugins, there is a missing check
for slash (/) in the path on Windows. Note that on
Windows, both / and \ can be used to separate
directories.

This patch fixes the issue by:
- Adding a FN_DIRSEP symbol for all platforms
  consisting of a string of legal directory
  separators.
- Adding a charset-aware version of strcspn().
- Adding a check_valid_path() function that uses
  my_strcspn() to check if any FN_DIRSEP character
  is in the supplied string.
- Using the check_valid_path() function in
  sql_plugin.cc and sql_udf.cc (which means
  replacing the existing test there).

include/config-netware.h:
  Adding FN_DIRSEP
  ******
  Adding FN_DIRSEP
include/config-win.h:
  Adding FN_DIRSEP
  ******
  Adding FN_DIRSEP
include/m_ctype.h:
  Adding my_strspn() and my_strcspn().
  
  ******
  Adding my_strspn() and my_strcspn().
include/my_global.h:
  Adding FN_DIRSEP
  ******
  Adding FN_DIRSEP
mysql-test/t/plugin_not_embedded.test:
  Adding test that file names containing / is
  disallowed on *all* platforms.
  ******
  Adding test that file names containing / is
  disallowed on *all* platforms.
sql/sql_plugin.cc:
  Introducing check_if_path() function for
  checking if filename is a path to include
  / on Windows.
  ******
  Introducing check_if_path() function for
  checking if filename is a path to include
  / on Windows.
sql/sql_udf.cc:
  Switching to use check_if_path() function.
  ******
  Switching to use check_if_path() function.
strings/my_strchr.c:
  Adding my_strspn() and my_strcspn().
  ******
  Adding my_strspn() and my_strcspn().
2010-12-01 13:54:50 +01:00
Mats Kindahl
91a4a8aba6 BUG#58246: INSTALL PLUGIN not secure & crashable
When installing plugins, there is a missing check
for slash (/) in the path on Windows. Note that on
Windows, both / and \ can be used to separate
directories.

This patch fixes the issue by:
- Adding a FN_DIRSEP symbol for all platforms
  consisting of a string of legal directory
  separators.
- Adding a charset-aware version of strcspn().
- Adding a check_valid_path() function that uses
  my_strcspn() to check if any FN_DIRSEP character
  is in the supplied string.
- Using the check_valid_path() function in
  sql_plugin.cc and sql_udf.cc (which means
  replacing the existing test there).
2010-12-01 13:54:50 +01:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Vladislav Vaintroub
29f9f3470a fix compile error - #if/#endif mismatch 2010-10-05 01:14:16 +02:00
Vladislav Vaintroub
73e139c4dd fix compile error - #if/#endif mismatch 2010-10-05 01:14:16 +02:00
Vladislav Vaintroub
af7a349315 More fixes after WL1054 push:
- fix ~20 warnings about redefinition of HAVE_DLOPEN 
  This was caused by new ADD_DEFINITIONS(-DHAVE_DLOPEN) inside client library CMakeLists.txt

- fix dlerror() message which ("static build?" )  which is only confusing on Windows,
  there is no "static build"
2010-10-04 22:11:18 +02:00
Vladislav Vaintroub
7c4404b667 More fixes after WL1054 push:
- fix ~20 warnings about redefinition of HAVE_DLOPEN 
  This was caused by new ADD_DEFINITIONS(-DHAVE_DLOPEN) inside client library CMakeLists.txt

- fix dlerror() message which ("static build?" )  which is only confusing on Windows,
  there is no "static build"
2010-10-04 22:11:18 +02:00
Georgi Kodinov
8789c79723 merge 2010-10-04 15:42:16 +03:00
Georgi Kodinov
dd2e3db48f merge 2010-10-04 15:42:16 +03:00
Davi Arnaut
40ee088f68 Bug#57210: remove pstack
Quoting from the bug report:

The pstack library has been included in MySQL since version
4.0.0. It's useless and should be removed.

Details: According to its own documentation, pstack only works
on Linux on x86 in 32 bit mode and requires LinuxThreads and a
statically linked binary. It doesn't really support any Linux
from 2003 or later and doesn't work on any other OS.
2010-10-04 08:52:59 -03:00
Davi Arnaut
774a5778d5 Bug#57210: remove pstack
Quoting from the bug report:

The pstack library has been included in MySQL since version
4.0.0. It's useless and should be removed.

Details: According to its own documentation, pstack only works
on Linux on x86 in 32 bit mode and requires LinuxThreads and a
statically linked binary. It doesn't really support any Linux
from 2003 or later and doesn't work on any other OS.
2010-10-04 08:52:59 -03:00
Sergei Golubchik
a3d80d952d merge with 5.1 2010-09-11 20:43:48 +02:00
Sergei Golubchik
966661c8cc to simpliy and unify the code 2010-09-11 09:46:33 +02: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
Michael Widenius
a826711789 Automatic merge
Fixed compiler warning

client/mysql.cc:
  Fixed compiler warning
include/my_global.h:
  Fixed typo
storage/maria/ha_maria.cc:
  Merge
2010-08-24 21:31:06 +03:00
Michael Widenius
31f66e55a8 Increase some very old limits.
This will give a smoother experience when using the Aria engine by those that are using default limits
without still causing a notable problem for desktop users.
2010-08-24 21:15:05 +03:00
Georgi Kodinov
9705711596 WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +03:00
Georgi Kodinov
881a76699e WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
2010-08-09 11:32:50 +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
Davi Arnaut
ecd4a294a5 WL#5498: Remove dead and unused source code
Remove wrappers around inline -- static inline is used without
wrappers throughout the source code. We rely on the compiler or
linker to eliminate unused static functions.
2010-07-23 17:18:36 -03:00
Davi Arnaut
152df97da1 WL#5498: Remove dead and unused source code
Remove wrappers around inline -- static inline is used without
wrappers throughout the source code. We rely on the compiler or
linker to eliminate unused static functions.
2010-07-23 17:18:36 -03:00
Davi Arnaut
e001970cc7 WL#5498: Remove dead and unused source code
Remove workarounds for ancient systems.

mysys/default.c:
  Make cast more explicit to ensure a correct offset.
2010-07-23 17:17:55 -03:00
Davi Arnaut
e81506971f WL#5498: Remove dead and unused source code
Remove workarounds for ancient systems.
2010-07-23 17:17:55 -03:00
Davi Arnaut
75e2212397 WL#5498: Remove dead and unused source code
Remove unused macros or macro which are always defined.

include/my_global.h:
  Remove unused macros and move macros which aren't used globally.
2010-07-23 17:16:29 -03:00
Davi Arnaut
60ab2b9283 WL#5498: Remove dead and unused source code
Remove unused macros or macro which are always defined.
2010-07-23 17:16:29 -03:00
Davi Arnaut
7a344b6106 WL#5498: Remove dead and unused source code
Remove the obsolete and buggy bmove512, use memcpy instead.
2010-07-23 17:15:41 -03:00
Davi Arnaut
72fbf95e5d WL#5498: Remove dead and unused source code
Remove the obsolete and buggy bmove512, use memcpy instead.
2010-07-23 17:15:41 -03:00
Davi Arnaut
cc3a26289d WL#5498: Remove dead and unused source code
Remove the ancient and dead raid code. By now, even the server side
has been removed.
2010-07-23 17:15:07 -03:00
Davi Arnaut
85bbcfee02 WL#5498: Remove dead and unused source code
Remove the ancient and dead raid code. By now, even the server side
has been removed.
2010-07-23 17:15:07 -03: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
fb91a92330 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
711c318c07 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
649390ac81 Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
Davi Arnaut
37113a6867 WL#5486: Remove code for unsupported platforms
Remove QNX specific code.
2010-07-15 08:28:41 -03:00
Davi Arnaut
3c418c5709 WL#5486: Remove code for unsupported platforms
Remove QNX specific code.
2010-07-15 08:28:41 -03:00
Davi Arnaut
13f7a1d244 WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
2010-07-15 08:16:06 -03:00
Davi Arnaut
b3d22cef93 WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
2010-07-15 08:16:06 -03:00
Davi Arnaut
07e7b4d6fe WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
f54a118249 WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
ddab5f842a Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-14 16:42:35 -03:00
Davi Arnaut
6f6be1e77a Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-14 16:42:35 -03:00
Davi Arnaut
d7944b621e Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Post-merge fix: include my_compiler.h before my_attribute.h
as the latter will undef __attribute__ if the compiler is not
GCC. Based on the compiler version, in my_compiler.h we know
for sure whether the aligned attribute is supported. Furthermore,
undefining attribute might cause bugs if some system header
uses it.

include/my_compiler.h:
  Drop aligned attribute support from Sun Studio C++ compiler
  as its not clear exactly which version of it supports the
  attribute.
2010-07-14 16:39:40 -03:00
Davi Arnaut
d5e8508f90 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Post-merge fix: include my_compiler.h before my_attribute.h
as the latter will undef __attribute__ if the compiler is not
GCC. Based on the compiler version, in my_compiler.h we know
for sure whether the aligned attribute is supported. Furthermore,
undefining attribute might cause bugs if some system header
uses it.
2010-07-14 16:39:40 -03:00
Davi Arnaut
7f1eedec2d Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-14 11:12:26 -03:00
Davi Arnaut
e29211c366 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-14 11:12:26 -03:00
Davi Arnaut
f317d3a6fb Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Another rather noisy violation of strict aliasing rules
is the spatial code which makes use of stack-based memory
(of type Geometry_buffer) to provide placement for Geometry
objects. Although a placement new is allowed to dynamically
change the type of a object, the object returned by the
new placement was being ignored and the original stack-based
object was being casted to the new type, thus violating strict
aliasing rules.

The solution is to reorganize the code so that the object
returned by the new placement is used instead of casting the
original object. Also, to ensure that the stack-based object
is properly aligned with respect to the objects it provides
placement for, a set of compiler-dependent macros and types
are introduced so that the alignment of objects can be inquired
and specified.

include/Makefile.am:
  Add new header.
include/my_compiler.h:
  Add new header.
include/my_global.h:
  Remove now-unnecessary macros.
sql/spatial.cc:
  Make object creation functions return the object whose type
  was dynamically changed by the new placement.
  
  Move static method from the header in order to avoid having
  to access a forward declaration.
sql/spatial.h:
  Object creation callbacks now take a array of chars as the
  storage area.
  
  Move create_by_typeid to a source file as to not access the
  forward declaration of Geometry_buffer.
  
  Ensure that Geometry_buffer is properly aligned.
sql/sql_show.cc:
  Use newly added aligned storage helper.
2010-07-14 09:27:13 -03:00
Davi Arnaut
21f63caf8e Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Another rather noisy violation of strict aliasing rules
is the spatial code which makes use of stack-based memory
(of type Geometry_buffer) to provide placement for Geometry
objects. Although a placement new is allowed to dynamically
change the type of a object, the object returned by the
new placement was being ignored and the original stack-based
object was being casted to the new type, thus violating strict
aliasing rules.

The solution is to reorganize the code so that the object
returned by the new placement is used instead of casting the
original object. Also, to ensure that the stack-based object
is properly aligned with respect to the objects it provides
placement for, a set of compiler-dependent macros and types
are introduced so that the alignment of objects can be inquired
and specified.
2010-07-14 09:27:13 -03:00
Davi Arnaut
1c924a1652 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-09 09:28:51 -03:00
Davi Arnaut
e1f748c0bd Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-09 09:28:51 -03:00
Davi Arnaut
11fae04527 Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
2010-07-09 09:00:17 -03:00
Davi Arnaut
ed9ffc6b09 Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
2010-07-09 09:00:17 -03:00
unknown
2be1a25faa Automerge MariaDB 5.1->5.2. 2010-07-09 13:39:19 +02: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
a10ae35328 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.
2010-07-08 18:20:08 -03:00
Davi Arnaut
5641fb64b4 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-02 16:38:04 -03:00
Davi Arnaut
74283a052e Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-02 16:38:04 -03:00
Davi Arnaut
0eb26fdfa8 Bug#53445: Build with -Wall and fix warnings that it generates
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.

One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.

There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.

BUILD/SETUP.sh:
  Remove flags that are implied by -Wall and -Wextra.
  Do not warn about unused parameters in C++.
BUILD/check-cpu:
  Print only the compiler version instead of verbose banner.
  Although the option is gcc specific, the check was only
  being used for GCC specific checks anyway.
client/mysql.cc:
  bcmp is no longer defined.
client/mysqltest.cc:
  Pass a string to function expecting a format string.
  Replace use of bcmp with memcmp.
cmd-line-utils/readline/Makefile.am:
  Always define _GNU_SOURCE when compiling GNU readline.
  Required to make certain prototypes visible.
cmd-line-utils/readline/input.c:
  Condition for the code to be meaningful.
configure.in:
  Remove check for bcmp.
extra/comp_err.c:
  Use appropriate type.
extra/replace.c:
  Replace use of bcmp with memcmp.
extra/yassl/src/crypto_wrapper.cpp:
  Do not ignore the return value of fgets. Retrieve the file
  position if fgets succeed -- if it fails, the function will
  bail out and return a error.
extra/yassl/taocrypt/include/blowfish.hpp:
  Use a single array instead of accessing positions of the sbox_
  through a subscript to pbox_.
extra/yassl/taocrypt/include/runtime.hpp:
  One definition of such functions is enough.
extra/yassl/taocrypt/src/aes.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/algebra.cpp:
  Rename arguments to avoid shadowing related warnings.
extra/yassl/taocrypt/src/blowfish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/taocrypt/src/integer.cpp:
  Do not define type within a anonymous union.
  Use a variable to return a value instead of
  leaving the result in a register -- compiler
  does not know the logic inside the asm.
extra/yassl/taocrypt/src/misc.cpp:
  Define handler for pure virtual functions.
  Remove unused code.
extra/yassl/taocrypt/src/twofish.cpp:
  Avoid potentially ambiguous conditions.
extra/yassl/testsuite/test.hpp:
  Function must have C language linkage.
include/m_string.h:
  Remove check which relied on bcmp being defined -- they weren't
  being used as bcmp is only visible when _BSD_SOURCE is defined.
include/my_bitmap.h:
  Remove bogus helpers which were used only in a few files and
  were causing warnings about dead code.
include/my_global.h:
  Due to G++ bug, always silence false-positive uninitialized
  variables warnings when compiling C++ code with G++.
  Remove bogus helper.
libmysql/Makefile.shared:
  Remove built-in implementation of bcmp.
mysql-test/lib/My/SafeProcess/safe_process.cc:
  Cast pid to largest possible type for a process identifier.
mysys/mf_loadpath.c:
  Leave space of the ending nul.
mysys/mf_pack.c:
  Replace bcmp with memcmp.
mysys/my_bitmap.c:
  Dead code removal.
mysys/my_gethwaddr.c:
  Remove unused variable.
mysys/my_getopt.c:
  Silence bogus uninitialized variable warning.
  Do not cast away the constant qualifier.
mysys/safemalloc.c:
  Cast to expected type.
mysys/thr_lock.c:
  Silence bogus uninitialized variable warning.
sql/field.cc:
  Replace bogus helper with a more appropriate logic which is
  used throughout the code.
sql/item.cc:
  Remove bogus logical condition which always evaluates to TRUE.
sql/item_create.cc:
  Simplify code to avoid signedness related warnings.
sql/log_event.cc:
  Replace use of bcmp with memcmp.
  No need to use helpers for simple bit operations.
sql/log_event_old.cc:
  Replace bmove_align with memcpy.
sql/mysqld.cc:
  Move use declaration of variable to the ifdef block where it
  is used. Remove now-unnecessary casts and arguments.
sql/set_var.cc:
  Replace bogus helpers with simple and classic bit operations.
sql/slave.cc:
  Cast to expected type and silence bogus warning.
sql/sql_class.h:
  Don't use enum values as bit flags, the supposed type safety is
  bogus as the combined bit flags are not a value in the enumeration.
sql/udf_example.c:
  Only declare variable when necessary.
sql/unireg.h:
  Replace use of bmove_align with memcpy.
storage/innobase/os/os0file.c:
  Silence bogus warning.
storage/myisam/mi_open.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
storage/myisam/mi_page.c:
  Remove bogus cast, DBUG_DUMP expects a pointer to unsigned
  char.
strings/bcmp.c:
  Remove built-in bcmp.
strings/ctype-ucs2.c:
  Silence bogus warning.
tests/mysql_client_test.c:
  Use a appropriate type as expected by simple_command().
2010-07-02 15:30:47 -03:00
Davi Arnaut
93fb8bb235 Bug#53445: Build with -Wall and fix warnings that it generates
Apart strict-aliasing warnings, fix the remaining warnings
generated by GCC 4.4.4 -Wall and -Wextra flags.

One major source of warnings was the in-house function my_bcmp
which (unconventionally) took pointers to unsigned characters
as the byte sequences to be compared. Since my_bcmp and bcmp
are deprecated functions whose only difference with memcmp is
the return value, every use of the function is replaced with
memcmp as the special return value wasn't actually being used
by any caller.

There were also various other warnings, mostly due to type
mismatches, missing return values, missing prototypes, dead
code (unreachable) and ignored return values.
2010-07-02 15:30:47 -03:00
Alexey Kopytov
88ec546247 Manual merge from 5.1.
conflicts:
   conflict      include/my_alarm.h
2010-07-01 12:06:41 +04:00
Alexey Kopytov
92f7433d71 Manual merge from 5.1.
conflicts:
   conflict      include/my_alarm.h
2010-07-01 12:06:41 +04:00
Alexey Kopytov
f3ccf5061f Bug#54667: Unnecessary signal handler redefinition
POSIX requires that a signal handler defined with sigaction()
is not reset on delivering a signal unless SA_NODEFER or
SA_RESETHAND is set. It is therefore unnecessary to redefine
the handler on signal delivery on platforms where sigaction()
is used without those flags.

include/my_alarm.h:
  Renamed DONT_REMEMBER_SIGNAL ->
  SIGNAL_HANDLER_RESET_ON_DELIVERY.
include/my_global.h:
  Renamed DONT_REMEMBER_SIGNAL ->
  SIGNAL_HANDLER_RESET_ON_DELIVERY. The latter is now defined
  only on non-BSD platforms missing the POSIX sigaction()
  function.
libmysql/libmysql.c:
  Renamed DONT_REMEMBER_SIGNAL ->
  SIGNAL_HANDLER_RESET_ON_DELIVERY
mysys/thr_alarm.c:
  Renamed DONT_REMEMBER_SIGNAL ->
  SIGNAL_HANDLER_RESET_ON_DELIVERY
sql/mysqld.cc:
  Renamed DONT_REMEMBER_SIGNAL ->
  SIGNAL_HANDLER_RESET_ON_DELIVERY
2010-07-01 12:02:00 +04:00
Alexey Kopytov
ac89d92625 Bug#54667: Unnecessary signal handler redefinition
POSIX requires that a signal handler defined with sigaction()
is not reset on delivering a signal unless SA_NODEFER or
SA_RESETHAND is set. It is therefore unnecessary to redefine
the handler on signal delivery on platforms where sigaction()
is used without those flags.
2010-07-01 12:02:00 +04:00
Michael Widenius
5a2f40d48a Fixes for Opensolaris (to get buildbot green)
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris


client/mysqldump.c:
  Fixed memory leaks
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
  Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
  Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
  Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
  (OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
  This did speed up logging to cvs with a magnitude for large strings.
2010-06-23 03:48:11 +03:00
Alexander Nozdrin
f29d24b0f8 Manual merge from mysql-trunk-bugfixing.
Conflicts:
  - BUILD/SETUP.sh
  - mysql-test/mysql-test-run.pl
  - mysql-test/r/partition_error.result
  - mysql-test/t/disabled.def
  - mysql-test/t/partition_error.test
  - sql/share/errmsg-utf8.txt
2010-06-07 12:47:04 +04:00
Alexander Nozdrin
8a247e963d Manual merge from mysql-trunk-bugfixing.
Conflicts:
  - BUILD/SETUP.sh
  - mysql-test/mysql-test-run.pl
  - mysql-test/r/partition_error.result
  - mysql-test/t/disabled.def
  - mysql-test/t/partition_error.test
  - sql/share/errmsg-utf8.txt
2010-06-07 12:47:04 +04:00
Sergei Golubchik
ffc8f62b08 merge 5.1->5.2 2010-06-01 21:52:20 +02:00
Davi Arnaut
a8c288054e Bug#53445: Build with -Wall and fix warnings that it generates
Fix various mismatches between function's language linkage. Any
particular function that is declared in C++ but should be callable
from C must have C linkage. Note that function types with different
linkages are also distinct. Thus, if a function type is declared in
C code, it will have C linkage (same if declared in a extern "C"
block).

client/mysql.cc:
  Mismatch between prototype and declaration.
client/mysqltest.cc:
  mysqltest used to be C code. Use C linkage where appropriate.
cmd-line-utils/readline/input.c:
  Isolate unreachable code.
include/my_alloc.h:
  Function type must have C linkage.
include/my_base.h:
  Function type must have C linkage.
include/my_global.h:
  Add helper macros to avoid spurious namespace indentation.
include/mysql.h.pp:
  Update ABI file.
mysys/my_gethwaddr.c:
  Remove stray carriage return and fix coding style.
plugin/semisync/semisync_master_plugin.cc:
  Callback function types have C linkage.
plugin/semisync/semisync_slave_plugin.cc:
  Callback function types have C linkage.
sql/derror.cc:
  Expected function type has C linkage.
sql/field.cc:
  Use helper macro and fix indentation.
sql/handler.cc:
  Expected function type has C linkage.
sql/item_sum.cc:
  Correct function linkages. Remove now unnecessary cast.
sql/item_sum.h:
  Add prototypes with the appropriate linkage as otherwise they
  are distinct.
sql/mysqld.cc:
  Wrap functions in C linkage mode.
sql/opt_range.cc:
  C language linkage is ignored for class member functions.
sql/partition_info.cc:
  Add wrapper functions with C linkage for class member functions.
sql/rpl_utility.h:
  Use helper macro and fix indentation.
sql/sql_class.cc:
  Change type of thd argument -- THD is a class.
  Use helper macro and fix indentation.
sql/sql_class.h:
  Change type of thd argument -- THD is a class.
sql/sql_select.cc:
  Expected function type has C linkage.
sql/sql_select.h:
  Move prototype to sql_test.h
sql/sql_show.cc:
  Expected function type has C linkage.
sql/sql_test.cc:
  Fix required function prototype and fix coding style.
sql/sql_test.h:
  Removed unnecessary export and add another.
storage/myisammrg/ha_myisammrg.cc:
  Expected function type has C linkage.
storage/perfschema/pfs.cc:
  PSI headers are declared with C language linkage, which also
  applies to function types.
2010-05-31 12:29:54 -03:00
Davi Arnaut
5dec0c9637 Bug#53445: Build with -Wall and fix warnings that it generates
Fix various mismatches between function's language linkage. Any
particular function that is declared in C++ but should be callable
from C must have C linkage. Note that function types with different
linkages are also distinct. Thus, if a function type is declared in
C code, it will have C linkage (same if declared in a extern "C"
block).
2010-05-31 12:29:54 -03:00
Alexander Nozdrin
59a9912963 Auto-merge from mysql-trunk. 2010-05-28 09:47:58 +04:00
Alexander Nozdrin
4e633ec234 Auto-merge from mysql-trunk. 2010-05-28 09:47:58 +04:00
Alexey Kopytov
7779b9830c Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
Null-merged patch for bug 53907.

Conflicts:

   conflict      sql/sql_parse.cc
2010-05-27 14:42:12 +04:00
Alexey Kopytov
17325b8d67 Manual merge from mysql-5.1-bugteam to mysql-trunk-merge.
Null-merged patch for bug 53907.

Conflicts:

   conflict      sql/sql_parse.cc
2010-05-27 14:42:12 +04:00
Michael Widenius
9e23495b1d Added macros to inform valgrind that memory is uninitialized
include/Makefile.am:
  Make my_valgrind.h global (as it's used by my_global.h)
include/my_global.h:
  Include my_valgrind.h
include/my_sys.h:
  TRASH() moved to my_valgrind.h
include/my_valgrind.h:
  Add VALGRIND defines to mark memory
mysys/my_alloc.c:
  Mark internal freed memory as undefined
2010-05-26 22:27:01 +03:00
Michael Widenius
4aa9d903c1 Merge with MySQL 5.1.47
Fixed some bugs introduced in 5.1.47
Disabled some tests until we have merged with latest Xtradb

configure.in:
  Added testing if valgrind/memcheck.h exists
storage/pbxt/src/ha_pbxt.cc:
  LOCK_plugin is not anymore locked in init
2010-05-26 21:55:40 +03:00
Tor Didriksen
85da8956e6 Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.


cmd-line-utils/libedit/filecomplete.c:
  Remove unused auto variables.
configure.cmake:
  Add -Wall to gcc.
extra/comp_err.c:
  Cast to correct type.
extra/perror.c:
  Fix segfault (but warnings about deprecated features remain)
extra/yassl/taocrypt/include/runtime.hpp:
  Comparing two literals was reported as undefined behaviour.
include/my_global.h:
  Add a template for aligning character buffers.
mysys/lf_alloc-pin.c:
  Initialize pointer.
sql/mysqld.cc:
  Use UNINIT_VAR rather than LINT_INIT.
sql/partition_info.cc:
  Use UNINIT_VAR rather than LINT_INIT.
sql/rpl_handler.cc:
  Use char[] rather than unsigned long[] array for placement buffer.
sql/spatial.cc:
  Use char[] rather than unsigned void*[] array for placement buffer.
sql/spatial.h:
  Use char[] rather than unsigned void*[] array for placement buffer.
sql/sql_partition.cc:
  Initialize auto variable.
sql/sql_table.cc:
  Initialize auto variables.
  Add parens around assignment within if()
sql/sys_vars.cc:
  Use UNINIT_VAR.
storage/innobase/os/os0file.c:
  Init first slot in auto variable.
storage/myisam/mi_create.c:
  Use UNINIT_VAR rather than LINT_INIT.
storage/myisam/mi_open.c:
  Remove (wrong) casting.
storage/myisam/mi_page.c:
  Remove (wrong) casting.
storage/myisam/mi_search.c:
  Cast to uchar* rather than char*.
strings/ctype-ucs2.c:
  Use UNINIT_VAR rather than LINT_INIT.
  Add (uchar*) casting.
2010-05-26 16:12:23 +02:00
Tor Didriksen
d8536dfbdd Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++
Fix most warnings reported in dbg and opt mode.
2010-05-26 16:12:23 +02:00
Jonathan Perkin
c42772c7f2 bug#49968: Properly define HAVE_ERRNO_AS_DEFINE for the appropriate
OpenBSD releases.

Apply patch from Brad Smith, thanks!
2010-05-25 14:27:52 +01:00
Jonathan Perkin
baa8f0127b bug#49968: Properly define HAVE_ERRNO_AS_DEFINE for the appropriate
OpenBSD releases.

Apply patch from Brad Smith, thanks!
2010-05-25 14:27:52 +01:00
Alexander Nozdrin
e642701c32 Manual merge from mysql-trunk.
Conflicts:
  - mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
2010-04-27 13:58:21 +04:00
Alexander Nozdrin
d328d5be33 Manual merge from mysql-trunk.
Conflicts:
  - mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
2010-04-27 13:58:21 +04:00
Alexey Kopytov
fa3b2dcb83 Manual merge of mysql-5.1-bugteam to
mysql-trunk-merge.

Conflicts:

Text conflict in sql/sql_priv.h
2010-04-19 16:09:44 +04:00
Alexey Kopytov
ee09f97211 Manual merge of mysql-5.1-bugteam to
mysql-trunk-merge.

Conflicts:

Text conflict in sql/sql_priv.h
2010-04-19 16:09:44 +04:00
Joerg Bruehe
4b68b2d289 Merge the changes of the 5.5.3-m3 release build
back into the development branches.
2010-04-18 15:32:05 +02:00
Joerg Bruehe
8dcbf6e20c Merge the changes of the 5.5.3-m3 release build
back into the development branches.
2010-04-18 15:32:05 +02:00
Daniel Fischer
c62d8e5cb5 Make the libraries we produce on Windows actually usable 2010-04-16 10:27:18 +02:00
Daniel Fischer
29f098f2d3 Make the libraries we produce on Windows actually usable 2010-04-16 10:27:18 +02:00
Alexey Kopytov
456235a13c Automerge of mysql-5.1-bugteam to mysql-trunk-merge. 2010-04-11 11:17:42 +04:00
Alexey Kopytov
abab51e0db Automerge of mysql-5.1-bugteam to mysql-trunk-merge. 2010-04-11 11:17:42 +04:00
Georgi Kodinov
83dfeb2435 Bug #47095: Can't open_files_limit really be larger than 65535?
Several problems addressed:

1. The maximum value for --open_files_limit on non-windows boxes
is now raised to UINT_MAX (the maximum possible without significant
changes in the code). The maximum value on windows is kept to be
2048 due to a known limitation (bug 24509).

2. mysqld_safe now supports --open_files_limit=xx in addition to 
--open-files-limit=xx

3. mysqld_safe always passes through --open[_-]files[_-]limit
to the underlying mysqld. It used to pass it through only if it 
the user running the script has access to the root directory or
there was an --user argument specified.

4. Fixed a prototype in my_file.c to match its counterpart in 
the other #ifdef branch.
2010-04-09 14:47:18 +03:00
Georgi Kodinov
17a21c4f35 Bug #47095: Can't open_files_limit really be larger than 65535?
Several problems addressed:

1. The maximum value for --open_files_limit on non-windows boxes
is now raised to UINT_MAX (the maximum possible without significant
changes in the code). The maximum value on windows is kept to be
2048 due to a known limitation (bug 24509).

2. mysqld_safe now supports --open_files_limit=xx in addition to 
--open-files-limit=xx

3. mysqld_safe always passes through --open[_-]files[_-]limit
to the underlying mysqld. It used to pass it through only if it 
the user running the script has access to the root directory or
there was an --user argument specified.

4. Fixed a prototype in my_file.c to match its counterpart in 
the other #ifdef branch.
2010-04-09 14:47:18 +03:00
Sergei Golubchik
3b03f5d97e fixes for windows builds 2010-04-02 11:20:09 +02:00