Commit graph

333 commits

Author SHA1 Message Date
Mattias Jonsson
d7e7afd403 Merge of bug#51851.
Also moved HA_DATA_PARTITION from ha_partition.cc to table.h.
2010-05-24 14:51:59 +02:00
Mats Kindahl
e409d6f69c WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Mattias Jonsson
864d6bc90b Bug#51851: Server with SBR locks mutex twice on LOAD DATA
into partitioned MyISAM table

Problem was that the ha_data structure was introduced in 5.1
and only used for partitioning first, but with the intention
of be of use for others engines as well, and when used by other
engines it would clash if it also was partitioned.

Solution is to move the partitioning specific data to a separate
structure, with its own mutex (which is used for auto_increment).

Also did rename PARTITION_INFO to PARTITION_STATS since there
already exist a class named partition_info, also cleaned up
some related variables.
2010-03-30 22:52:45 +02:00
Marc Alff
a4c3bc618b WL#2360 Performance schema
Part IV: sql instrumentation
2010-01-06 22:42:07 -07:00
Sergei Golubchik
ae2768ce9c WL#4738 streamline/simplify @@variable creation process
Bug#16565 mysqld --help --verbose does not order variablesBug#20413 sql_slave_skip_counter is not shown in show variables
Bug#20415 Output of mysqld --help --verbose is incomplete
Bug#25430 variable not found in SELECT @@global.ft_max_word_len;
Bug#32902 plugin variables don't know their names
Bug#34599 MySQLD Option and Variable Reference need to be consistent in formatting!
Bug#34829 No default value for variable and setting default does not raise error
Bug#34834 ? Is accepted as a valid sql mode
Bug#34878 Few variables have default value according to documentation but error occurs  
Bug#34883 ft_boolean_syntax cant be assigned from user variable to global var.
Bug#37187 `INFORMATION_SCHEMA`.`GLOBAL_VARIABLES`: inconsistent status
Bug#40988 log_output_basic.test succeeded though syntactically false.
Bug#41010 enum-style command-line options are not honoured (maria.maria-recover fails)
Bug#42103 Setting key_buffer_size to a negative value may lead to very large allocations 
Bug#44691 Some plugins configured as MYSQL_PLUGIN_MANDATORY in can be disabled
Bug#44797 plugins w/o command-line options have no disabling option in --help
Bug#46314 string system variables don't support expressions
Bug#46470 sys_vars.max_binlog_cache_size_basic_32 is broken
Bug#46586 When using the plugin interface the type "set" for options caused a crash.
Bug#47212 Crash in DBUG_PRINT in mysqltest.cc when trying to print octal number
Bug#48758 mysqltest crashes on sys_vars.collation_server_basic in gcov builds
Bug#49417 some complaints about mysqld --help --verbose output
Bug#49540 DEFAULT value of binlog_format isn't the default value
Bug#49640 ambiguous option '--skip-skip-myisam' (double skip prefix)
Bug#49644 init_connect and \0
Bug#49645 init_slave and multi-byte characters
Bug#49646 mysql --show-warnings crashes when server dies
2009-12-22 10:35:56 +01:00
Luis Soares
58e2fde011 manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-merge
Conflicts
=========

Text conflict in .bzr-mysql/default.conf
Text conflict in libmysqld/CMakeLists.txt
Text conflict in libmysqld/Makefile.am
Text conflict in mysql-test/collections/default.experimental
Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test
Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result
Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result
Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result
Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result
Text conflict in mysql-test/t/mysqlbinlog.test
Text conflict in sql/CMakeLists.txt
Text conflict in sql/Makefile.am
Text conflict in sql/log_event_old.cc
Text conflict in sql/rpl_rli.cc
Text conflict in sql/slave.cc
Text conflict in sql/sql_binlog.cc
Text conflict in sql/sql_lex.h
21 conflicts encountered.

NOTE
====
 mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr:
 - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr"

 This is the first cset (merge/...) committed after pulling 
 from mysql-next-mr.
2009-10-22 23:30:28 +01:00
Mats Kindahl
4ad8ef0602 WL#5016: Fix header file include guards
Adding header include file guards to files that are missing such.
2009-09-23 23:32:31 +02:00
Mikael Ronstrom
16a024c486 Backport of DTrace patches from 6.0 2008-12-20 11:01:41 +01:00
tomas@poseidon.ndb.mysql.com
04c26018a7 Bug #34275 mysqld leak if doing multiple statements within same transaction (or wo/ trans)
- in autocommit do not allocate statistics share, but instead use one directly on the handler
2008-02-04 15:40:04 +01:00
mskold/marty@quadfish.(none)
b5dc9abbf0 Merge mysql.com:/home/marty/MySQL/mysql-5.0-ndb
into  mysql.com:/home/marty/MySQL/mysql-5.1-new-ndb
2007-11-05 21:11:15 +01:00
mskold/marty@mysql.com/quadfish.(none)
4cf742a8a8 ha_ndbcluster.h:
Bug #31956       auto increment bugs in MySQL Cluster: Added utility method and constant for internal prefetch default
ndb_auto_increment.result:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/r/ndb_auto_increment.result
mysqld.cc:
  Bug #25176  	Trying to set ndb_autoincrement_prefetch_sz always fails: Changed pointer to max value
  Bug #31956  	auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement)
ndb_insert.test, ndb_insert.result:
  Moved auto_increment tests to ndb_auto_increment.test
ndb_auto_increment.test:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/t/ndb_auto_increment.test
ha_ndbcluster.cc:
  Bug #31956       auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement), added handling of updates of pk/unique key with auto_increment
  Bug #32055  	Cluster does not handle auto inc correctly with insert ignore statement
2007-11-05 20:18:22 +01:00
mskold/marty@linux.site
a26772ca21 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-10-02 14:23:59 +02:00
mskold/marty@mysql.com/linux.site
403f0afc29 Bug#25817 UPDATE IGNORE doesn't check write_set when checking unique indexes: Added checks 2007-10-02 13:36:13 +02:00
mikael@dator6.(none)
0f18ff3350 BUG#30996: Committed too early when autocommit and lock table
Moved out a lot of code into functions from external_lock and
start_stmt
Fixed a crashing bug at memory alloc failure
Merged the stmt and all variables into one trans variable
Always register start of statement as according to the
interface of the handlers.
Also register for start of transaction when not statement commit
== not autocommit AND no begin - commit ongoing
Now that we registered in a proper manner we also needed to handle
the commit call when end of statement and transaction is ongoing
Added start_stmt_count to know when we have start of statement
for first table
2007-09-14 00:10:47 +02:00
gluh@mysql.com/eagle.(none)
27ab885525 WL#3732 Information schema optimization 2007-08-03 03:14:05 +05:00
tomas@poseidon.mysql.com
efbe23a486 Bug #29222 Statement mode replicates both statement and rows when writing to an NDB table
- only log statements locally (changes will not be logged on other servers)
2007-06-27 22:33:03 +02:00
tomas@whalegate.ndb.mysql.com
6b8e7c9484 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-engines
2007-06-17 19:47:56 +02:00
tomas@whalegate.ndb.mysql.com
ff804bc546 Bug #28989 hpux11 ps_row warnings
- do not print 701 dictionary busy error
2007-06-17 19:47:20 +02:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c
2007-05-10 12:59:39 +03:00
Justin.He/justin.he@dev3-240.dev.cn.tlan
71bac85adf Merge jhe@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0-ndb-bj.merge
2007-04-28 13:36:05 +08:00
mskold/marty@linux.site
cabef956c2 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-04-24 15:11:22 +02:00
mskold/marty@mysql.com/linux.site
eaba3f2548 ha_ndbcluster.h, ha_ndbcluster.cc:
Refactored code for engine_condition_pushdown to ha_ndbcluster_cond
Makefile.am:
  Added compilation of ha_ndbcluster_cond
ha_ndbcluster_cond.h, ha_ndbcluster_cond.cc:
  Merge
2007-04-24 14:24:06 +02:00
mskold/marty@mysql.com/linux.site
25ecc73891 Moved method definition to ease merge to 5.1 2007-04-24 11:17:27 +02:00
mskold/marty@mysql.com/linux.site
5d4f9e22b1 Moved all code related to engine_condition_pushdown to a new class,
ha_ndbcluster_cond.
Added new files:
sql/ha_ndbcluster_cond.h
sql/ha_ndbcluster_cond.cc
2007-04-23 11:25:33 +02:00
mats@romeo.(none)
875de0e571 Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/merge-mysql-5.1
2007-04-20 10:46:58 +02:00
tomas@whalegate.ndb.mysql.com
38f9729c2a Bug #27076 Cluster does not honor SQL_LOG_BIN flag
- both for data schema operations
- also make sure schema events vet the right server id when injected into the binlog
- use same mechanism to signal server_id in bug#17095, and reserve some "id's" for flagging special conditions on the event, in this case do not log it
- enable printing of server ids in the testcases to show that we cot it right
2007-04-18 16:02:20 +02:00
lzhou/zhl@dev3-63.(none)
3189a4de5f Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj
into  dev3-63.(none):/home/zhl/mysql/mysql-5.0/bug26675
2007-04-18 10:03:49 +00:00
monty@mysql.com/narttu.mysql.fi
72d135bec5 Clear field_alloc when it's moved to result set (allows us to always call free_root on field_alloc)
Change to use remove_file instead of 'system rm' in a lot of tests. (Should fix some windows test problems)
Removed memory leak in mysql_test if sync_with_master fails.
Do not terminate ndb_cluster_binary_log before the util thread has finnished. This should fix a shutdown bug where a thread is accessing injector_mutex after it's freed.
Patch may fix Bug#27622 "mysqld shutdown, util thread continues, while binlog thread exits"
2007-04-16 17:08:29 +03:00
mskold/marty@mysql.com/linux.site
3e8cf5958b Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-04-05 08:39:12 +02:00
mskold/marty@linux.site
552d1086ec Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2007-04-04 17:03:31 +02:00
mskold/marty@linux.site
7e33b92279 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1
2007-04-04 13:21:49 +02:00
mskold/marty@mysql.com/linux.site
625a2629f0 Bug #26242 UPDATE with subquery and triggers failing with cluster tables
In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced
subject table didn't see the results of operation which caused invocation
of those triggers. In other words AFTER trigger invoked as result of update
(or deletion) of particular row saw version of this row before update (or
deletion).

The problem occured because NDB handler in those cases postponed actual
update/delete operations to be able to perform them later as one batch.

This fix solves the problem by disabling this optimization for particular
operation if subject table has AFTER trigger for this operation defined.
To achieve this we introduce two new flags for handler::extra() method:
HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH.
These are called if there exists AFTER DELETE/UPDATE triggers during a
statement that potentially can generate calls to delete_row()/update_row().
This includes multi_delete/multi_update statements as well as insert statements
that do delete/update as part of an ON DUPLICATE statement.
2007-04-04 12:50:39 +02:00
tomas@whalegate.ndb.mysql.com
8bf9bf001d Bug #26783 replication status unknown after cluster or mysqld failure
- update the ndb_apply_status table with binlog info
2007-04-03 07:20:55 +02:00
tomas@whalegate.ndb.mysql.com
a449d1de33 Bug #27320 ndb handler does not reset extra flags on reset()
- make sure all extra flags are reset
2007-03-22 12:42:13 +01:00
lzhou/zhl@dev3-63.(none)
6dc52739df BUG#26675 Add ndb_connectstring in "show global variables". 2007-03-12 18:08:35 +00:00
serg@janus.mylan
689eed7406 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-02-21 11:36:23 +01:00
mskold/marty@mysql.com/linux.site
2d0bd82a06 NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc:
bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
ha_ndbcluster.h:
  Removed stray mthod declaration
2007-02-07 11:36:34 +01:00
mskold/marty@mysql.com/linux.site
0446aa9cbd Fix for bug#25821 Excessive partition pruning for multi-range index scan in NDB API: don't set distribution key if multi_range 2007-02-06 23:06:58 +01:00
tomas@poseidon.mysql.com
475da34697 Bug #26021 - valgrind reports error regarding handle_trailing_share and client thread share usage
- add ndb_share connect_count to decide if share can be reused to setup replication
2007-02-05 13:21:18 +07:00
serg@janus.mylan
a07fd5fa8f WL#3700: Handler API change: all index search methods - that is,
index_read(), index_read_idx(), index_read_last(), and
records_in_range() - instead of 'uint keylen' argument take
'ulonglong keypart_map', a bitmap showing which keyparts are
present in the key value.
Fallback method is provided for handlers that are lagging behind.
2007-01-29 10:40:26 +01:00
stewart@willster.(none)
adf40be13b Bug#25567 records() call performs scan in NDB, performance bug 2007-01-24 00:27:19 +11:00
tomas@poseidon.
044c410968 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.:/home/tomas/mysql-5.1-new-ndb
2006-12-27 11:01:54 +01:00
kent@kent-amd64.(none)
be15e3bc15 Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-23 20:20:40 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
mskold/marty@mysql.com/linux.site
3587ee8e4e bug#24667 After ALTER TABLE operation ndb_dd table becomes regular ndb: ALTER TABLE must specify STORAGE explicitely to change it, + post review changes 2006-12-19 23:20:43 +01:00
mskold/marty@mysql.com/linux.site
dab48d5df2 bug#24667 After ALTER TABLE operation ndb_dd table becomes regular ndb: copy tablespace from old table in copying alter table 2006-12-19 15:53:46 +01:00
mskold/marty@mysql.com/linux.site
4b7e0b5fd9 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: only check pk if it is updated 2006-11-30 23:10:11 +01:00
mskold/marty@mysql.com/linux.site
aa03fbcac9 bug#18487 UPDATE IGNORE not supported for unique constraint violation of non-primary key: only check pk if it is updated 2006-11-30 22:52:23 +01:00
mskold/marty@mysql.com/linux.site
4acc1af12c bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values. 5.1 re-implementation 2006-11-13 12:56:45 +01:00
mskold/marty@mysql.com/linux.site
f293350725 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values 2006-11-07 16:38:37 +01:00