- 25 Mar, 2011 1 commit
-
-
Magnus Blåudd authored
(aka BUG#11766883) - fix review comments - Rewrite last usage of handler::get_tablespace_name to use table->s->tablespace directly - Remove(revert) the addition of default implementation for handler::get_tablespace_name - Add comments describing the new TABLE_SHARE members default_storage_media and tablespace - Fix usage of incorrect mask for column_format bits, i.e COLUMN_FORMAT_MASK
-
- 04 Mar, 2011 1 commit
-
-
Magnus Blåudd authored
- Add new "format section" in extra data segment with additional table and column properties. This was originally introduced in 5.1.20 based MySQL Cluster - Remove hardcoded STORAGE DISK for table and instead output the real storage format used. Keep both TABLESPACE and STORAGE inside same version guard. - Implement default version of handler::get_tablespace_name() since tablespace is now available in share and it's unnecessary for each handler to implement. (the function could actually be removed totally now). - Add test for combinations of TABLESPACE and STORAGE with CREATE TABLE and ALTER TABLE - Add test to show that 5.5 now can read a .frm file created by MySQL Cluster 7.0.22. Although it does not yet show the column level attributes, they are read.
-
- 21 Feb, 2011 7 commits
-
-
Jorgen Loland authored
UPDATES THE TABLE ENTRIES (formerly 55385) BUG#11764529: MULTI UPDATE+INNODB REPORTS ER_KEY_NOT_FOUND IF A TABLE IS UPDATED TWICE (formerly 57373) If multiple-table update updates a row through two aliases and the first update physically moves the row, the second update will fail to locate the row. This results in different errors depending on storage engine: * MyISAM: Got error 134 from storage engine * InnoDB: Can't find record in 'tbl' None of these errors accurately describe the problem. Furthermore, since MyISAM is non-transactional, the update executed first will be performed while the second will not. In addition, for two equal multiple-table update statements, one could succeed and the other fail based on whether or not the record actually moved or not. This was inconsistent. Two update operations may physically move a row: 1) Update of a column in a clustered primary key 2) Update of a column used to calculate which partition the row belongs to BUG#11764529 is about case 1) above, BUG#11762751 was about case 2). The fix for these bugs is to return with an error if multiple-table update is about to: a) Update a table through multiple aliases, and b) Perform an update that may physically more the row in at least one of these aliases This avoids * partial updates as described for MyISAM above, * provides the same error message that describes the actual problem for all SEs * inconsistent behavior where a statement fails or succeeds based on e.g. the partitioning algorithm of the table.
-
Magnus Blåudd authored
-
Jon Olav Hauglid authored
The problem was that doing ALTER TABLE on a table which had a key on a TEXT/BLOB column with a prefix longer than the maximum number of characteres in this column (as per the character set), by mistake, caused an error (Error 1170 - ER_BLOB_KEY_WITHOUT_LENGTH). This bug not repeatable in 5.5. This patch adds a regression test to alter_table.test and contains no code changes.
-
Magnus Blåudd authored
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"
-
Sergey Vojtovich authored
-
Nirbhay Choubey authored
-
Nirbhay Choubey authored
("-") IN DATABASE NAMES IN ALTER DATABASE. mysqldump did not quote database name in 'ALTER DATABASE' statements in its output. This can further cause a failure while loading if database name contains a hyphen '-'. This happened as, while printing the 'ALTER DATABASE' statements, the database name was not quoted. Fixed by quoting the database name.
-
- 18 Feb, 2011 12 commits
-
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Alexander Barkov authored
-
Alexander Barkov authored
A separate fix for 5.1 (as 5.1 and 5.5 have seriously differged in the related pieces of the code). A patch for 5.5 was approved earlier. Problem: ucs2 was correctly disallowed in "SET NAMES" only, while mysql_real_connect() and mysql_change_user() still allowed to use ucs2, which made server crash. Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user(). @ sql/sql_priv.h - changing return type for thd_init_client_charset() to bool, to return errors to the caller @ sql/sql_var.cc - using new function @ sql/sql_connect.cc - thd_client_charset_init: in case of unsupported client character set send error and return true; in case of success return false - check_connection: Return error if character set initialization failed @ sql/sql_parse.cc - check charset in the very beginnig of the CMD_CHANGE_USER handling code @ tests/mysql_client_test.c - adding tests
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Martin Hansson authored
-
Martin Hansson authored
The loop that was looping over subqueries' references to outer field used a local boolean variable to tell whether the field was grouped or not. But the implementor failed to reset the variable after each iteration. Thus a field that was not directly aggregated appeared to be. Fixed by resetting the variable upon each new iteration.
-
Alexander Barkov authored
Problem: ucs2 was correctly disallowed in "SET NAMES" only, while mysql_real_connect() and mysql_change_user() still allowed to use ucs2, which made server crash. Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user(). @ sql/set_var.cc Using new function. @ sql/sql_acl.cc - Return error if character set initialization failed - Getting rid of pointer aliasing: Initialize user_name to NULL, to avoid double free(). @ sql/sql_connect.cc - in case of unsupported client character set send error and return true - in case of success return false @ sql/sql_connect.h - changing return type for thd_init_client_charset() to bool, to return errors to the caller @ sql/sql_parse.h - introducing a new function, to reuse in all places where we need to check client character set. @ tests/mysql_client_test.c Adding test
-
Sergey Vojtovich authored
MONTHNAME(0) claims that it is about to return NOT NULL value, whereas it actually returns NULL. As a result storage_engine variable (which cannot be NULL) protection was bypassed and NULL value was accepted, causing server crash. Fixed MONTHNAME(0) to report valid NULL flag.
-
Alexander Barkov authored
Problem: IF() did not copy collation derivation and repertoire from an argument if the opposite argument was NULL: IF(cond, res1, NULL) IF(cond, NULL, res2) only CHARSET_INFO pointer was copied. This resulted in illegal mix of collations error. Fix: copy all collation parameters from the non-NULL argument: CHARSET_INFO pointer, derivation, repertoire.
-
- 17 Feb, 2011 15 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Vasil Dimov authored
-
Vasil Dimov authored
Thanks to Kristian Nielsen for finding out the root cause for the failure, see: https://bugs.launchpad.net/maria/+bug/677407
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Vasil Dimov authored
-
Magne Mahre authored
-
Magne Mahre authored
memory reference There are two issues present here. 1) There is a possibility that we test a byte beyond the allocated buffer 2) We compare a byte that might never have been initalized to see if it's 0. The first issue is not triggered by existing code, but an ASSERT has been added to safe-guard against introducing new code that triggers it. The second issue is what triggers the Valgrind warnings reported in the bug report. A buffer is allocated in class String to hold the value. This buffer is populated by the character data constituting the string, but is not zero-terminated in most cases. Testing if it is indeed zero-terminated means that we check a byte that has never been explicitly set, thus causing Valgrind to trigger. Note that issue 2 is not a serious problem. The variable is read, and if it's not zero, we will set it to zero. There are no further consequences. Note that this patch does not fix the underlying problems with issue 1, as it is deemed too risky to fix at this point (as noted in the bug report). As discussed in the report, the c_ptr() method should probably be replaced, but this requires a thorough analysis of the ~200 calls to the method.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Tor Didriksen authored
With --mem if fails with +UNEXPECTED ERROR NUMBER: 1290 In var/log/mysqld.2.err we have: [ERROR] LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir. Please, report a bug. [ERROR] Slave SQL: Error 'The MySQL server is running with the --slave-load-tmpdir option so it cannot execute this statement' on query. Default database: 'test'. Query: 'LOAD DATA INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`, `b`)', Error_code: 1290 getcwd() in the server yields something like: /dev/shm/var_auto_iv5Q/mysqld.2/data
-
- 16 Feb, 2011 4 commits
-
-
Jonathan Perkin authored
-
Jonathan Perkin authored
-
Jonathan Perkin authored
-
Bjorn Munch authored
-