Commit graph

33 commits

Author SHA1 Message Date
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
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
tomas@whalegate.ndb.mysql.com
9e37aaf433 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge
2007-09-11 16:17:28 +02:00
kostja@bodhi.(none)
8d1af60da0 Never access thd->ha_data directly, use getters/setters from the plugin
API instead.
This is a pre-requisite of the fix for Bug 12713, which changes the
data type of thd->ha_data from void * to struct Ha_data.
2007-08-31 10:19:52 +04:00
tomas@whalegate.ndb.mysql.com
08b8d6aeaf Bug#20872 master*.err: miscellaneous error messages 2007-08-30 11:46:30 +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
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
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@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
kent@mysql.com/kent-amd64.(none)
1e3237fefa Many files:
Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
mskold/marty@mysql.com/linux.site
cde79e4f79 Changed mysql.apply_status, mysql.binlog_index, and mysql.schema to mysql.ndb_apply_status, mysql.ndb_binlog_index, and mysql.ndb_schema 2006-12-01 15:49:07 +01:00
mskold/marty@mysql.com/linux.site
1206f28782 bug #21495 Alter table from x engine to ndb and back can cause issue with drop DB:disable distributed drop database if a database contains local tables 2006-11-15 11:13:49 +01:00
brian@zim.(none)
8685747f06 This patch makes ndbcluster_hton not static. I have a second patch for ndbcluster_hton to be static, but I want to talk to Jonas first. 2006-10-01 11:17:59 -07:00
mskold/marty@linux.site
5e60232da9 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1
2006-09-22 21:14:58 +02:00
brian@zim.(none)
7194b6d75a This changes the order of the universe, black is now the new white.
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
2006-09-15 10:28:00 -07:00
mskold/marty@mysql.com/linux.site
4f30db1f26 Bug #21378 Alter table from X storage engine to NDB could cause data loss: don't overwrite local tables when pushing out schema changes 2006-09-12 16:34:12 +02:00
ingo/istruewing@chilla.local
8e4c36ad4a Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)

The intermediate (not temporary) files of the new table
during ALTER TABLE was visible for SHOW TABLES. These
intermediate files are copies of the original table with
the changes done by ALTER TABLE. After all the data is
copied over from the original table, these files are renamed 
to the original tables file names. So they are not temporary 
files. They persist after ALTER TABLE, but just with another 
name.

In 5.0 the intermediate files are invisible for SHOW TABLES
because all file names beginning with "#sql" were suppressed.

This failed since 5.1.6 because even temporary table names were
converted when making file names from them. The prefix became
converted to "@0023sql". Converting the prefix during SHOW TABLES
would suppress the listing of user tables that start with "#sql".

The solution of the problem is to continue the implementation of
the table name to file name conversion feature. One requirement
is to suppress the conversion for temporary table names.

This change is straightforward for real temporary tables as there
is a function that creates temporary file names.

But the generated path names are located in TMPDIR and have no
relation to the internal table name. This cannot be used for
ALTER TABLE. Its intermediate files need to be in the same
directory as the old table files. And it is necessary to be
able to deduce the same path from the same table name repeatedly.

Consequently the intermediate table files must be handled like normal
tables. Their internal names shall start with tmp_file_prefix
(#sql) and they shall not be converted like normal table names.

I added a flags parameter to all relevant functions that are
called from ALTER TABLE. It is used to suppress the conversion
for the intermediate table files.

The outcome is that the suppression of #sql in SHOW TABLES
works again. It does not suppress user tables as these are
converted to @0023sql on file level.

This patch does also fix ALTER TABLE ... RENAME, which could not 
rename a table with non-ASCII characters in its name.

It does also fix the problem that a user could create a table like
`#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
ID of some other thread, which prevented this thread from running 
ALTER TABLE.

Some of the above problems are mentioned in Bug 1405, which can
be closed with this patch.

This patch does also contain some minor fixes for other forgotten
conversions. Still known problems are reported as bugs 21370,
21373, and 21387.
2006-08-02 17:57:06 +02:00
mskold@mysql.com
38a445fee1 sql_delete.cc:
Bug #18864  TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table: locked lock_OPEN mutex to support TRUNCATE with re-create and cluster binlog
Many files:
  Bug #18864  TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table: adaption to MySQ Cluster replication
ndb_lock.result, ha_ndbcluster.cc:
  Fix for Bug #18184  SELECT ... FOR UPDATE does not work..: Adaption to 5.1 code
NdbDictionaryImpl.hpp:
  Fix of bad merge
2006-06-12 14:23:21 +02:00
tomas@poseidon.ndb.mysql.com
df507201b2 ndb: release LOCK_open during mysqld schema sync and mysqld sync with binlog (create/drop/rename table)
+ increase timeout for sync... which now should never occur
2006-05-31 01:52:14 +02:00
tomas@poseidon.ndb.mysql.com
37e8b5ac06 removing the usage if the ndb local dict cache to adress the 241 errors we get now and then 2006-05-04 13:58:17 +02:00
tomas@poseidon.ndb.mysql.com
85ad10d50d Bug #18932: Cluster binlog mysqld accepts updating although binlog not setup 2006-04-10 16:08:40 +02:00
tomas@poseidon.ndb.mysql.com
57198f85d6 Bug #18472 race condition between multiple mysqld's when setting up cluster/schema
- check that event is the correct one, and only delete if wrong version
2006-03-23 22:49:02 +01:00
tomas@poseidon.ndb.mysql.com
500fa8262a Bug #17827 cluster: rename of several tables in one statement, gets multiply logged
- redo log table query for log, split into separate entries per rename, to avoid duplicates, also to only log renames that relate to ndb tables
2006-03-01 18:23:00 +01:00
mskold@mysql.com
043a16e34a Merge mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new-ndb_improved_on-line_discover
into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new
2006-02-21 13:54:58 +01:00
tomas@poseidon.ndb.mysql.com
82be07c41b Bug #17559 ndb_gis test failure
- test tables use blobs without PK, and was not handled correctly
2006-02-20 12:36:10 +01:00
mskold@mysql.com
5db302c834 Added on-line handling of altered frm in binlog thread 2006-02-13 11:23:13 +01:00
tomas@poseidon.ndb.mysql.com
a8f1cffd95 Bug #17038, distribution of schema operation to multiple binlogs missing/multiple entries, partial fix
- log alter table directly in server instead of in handler
- acknowledge alter table _after_ all binlog events have been processed
2006-02-06 11:47:12 +01:00
tomas@poseidon.ndb.mysql.com
a2f7fcf87b wl2325, distribution of schema operations between mysql servers 2006-02-01 01:12:11 +01:00
tomas@poseidon.ndb.mysql.com
933813c0c3 Bug #16851 Cluster: Auto Database Push is not working properly 2006-01-31 15:40:26 +01:00
tomas@poseidon.ndb.mysql.com
f10a7edff5 Bug #16851, log floods with ndb discover messages
+ fix crashing bug when discovering ndb tables outside select context
2006-01-31 01:37:48 +01:00
tomas@poseidon.ndb.mysql.com
826d0066ee fix so that ndb builds --without-ndb-binlog 2006-01-20 12:55:07 +01:00
tomas@poseidon.ndb.mysql.com
4b731ddfb4 wl2325 wl2324 2006-01-12 19:51:02 +01:00