An error occurred fetching the project authors.
- 17 Jun, 2008 1 commit
-
-
Davi Arnaut authored
The problem was that when comparing tables for a possible fast alter table, the comparison was being performed using the parsed information and not the final definition. The solution is to use the possible final table layout to compare if a fast alter is possible or not. mysql-test/include/mix1.inc: Disable test case for Bug 21704 as it hasn't been fixed. mysql-test/r/alter_table.result: Add test case result for Bug#33873 mysql-test/r/innodb_mysql.result: Update test case result mysql-test/t/alter_table.test: Add test case for Bug#33873 sql/sql_table.cc: Use updated (final) information to compare fields.
-
- 31 Jan, 2008 1 commit
-
-
unknown authored
Error message modified to be consistent with the manual. mysql-test/r/alter_table.result: Bug #25426 Prefix index on DECIMAL column causes warning. test result fixed sql/share/errmsg.txt: Bug #25426 Prefix index on DECIMAL column causes warning. error messages modified
-
- 20 Sep, 2007 2 commits
-
-
unknown authored
-
unknown authored
added get_field_default_value() function which obtains default value from the field (used in store_create_info() & get_schema_column_record() functions) mysql-test/r/alter_table.result: result fix mysql-test/r/create.result: result fix mysql-test/r/ctype_collate.result: result fix mysql-test/r/ctype_recoding.result: result fix mysql-test/r/default.result: result fix mysql-test/r/gis.result: result fix mysql-test/r/grant.result: result fix mysql-test/r/information_schema.result: result fix mysql-test/r/key.result: result fix mysql-test/r/mysql.result: result fix mysql-test/r/ps_1general.result: result fix mysql-test/r/show_check.result: result fix mysql-test/r/sp.result: result fix mysql-test/r/type_enum.result: result fix mysql-test/r/type_ranges.result: result fix mysql-test/t/information_schema.test: test case
-
- 27 Jul, 2007 1 commit
-
-
unknown authored
INSERT/DELETE/UPDATE followed by ALTER TABLE within LOCK TABLES may cause table corruption on Windows. That happens because ALTER TABLE writes outdated shared state info into index file. Fixed by removing obsolete workaround. Affects MyISAM tables on Windows only. myisam/mi_extra.c: On windows when mi_extra(HA_EXTRA_PREPARE_FOR_DELETE) is called, we release external lock and close index file. If we're in LOCK TABLES, MyISAM state info doesn't get updated until UNLOCK TABLES. That means when we release external lock and we're in LOCK TABLES, we may write outdated state info. As SQL layer closes all table instances, we do not need this workaround anymore. mysql-test/r/alter_table.result: A test case for BUG#29957. mysql-test/t/alter_table.test: A test case for BUG#29957.
-
- 20 Jul, 2007 1 commit
-
-
unknown authored
Fixed wrong test case. Added lost row that appeared after fix for this bug. mysql-test/r/alter_table.result: Fixed wrong test case. Added lost row that appeared after fix for BUG#28838 - duplicate external_lock in mysql_alter_table.
-
- 01 Jun, 2007 1 commit
-
-
unknown authored
To avoid unnecessary work the mysql_alter_table function takes the list of table fields and applies all changes to it (drops/moves/renames/etc). Then this function compares the new list and the old one. If the changes require only .frm to be modified then the actual data isn't copied. To detect changes all columns attributes but names are compared. When a column has been moved and has replaced another column with the same attributes except name the mysql_alter_table function wrongly decides that two fields has been just renamed. As a result the data from the moved column and from all columns after it is not copied. Now the mysql_alter_table function forces table data copying by setting the need_copy_table flag when it finds a moved column. The flag is set at the stage when the modified fields are created. sql/sql_table.cc: Bug#28427: Columns were renamed instead of moving by ALTER TABLE. Now the mysql_alter_table function forces table data copying by setting the need_copy_table flag when it finds a moved column. The flag is set at the stage when the modified fields are created. mysql-test/r/alter_table.result: Added a test case for the bug#28427: Columns were renamed instead of moving by ALTER TABLE. mysql-test/t/alter_table.test: Added a test case for the bug#28427: Columns were renamed instead of moving by ALTER TABLE.
-
- 21 May, 2007 1 commit
-
-
unknown authored
mode. When a new DATE/DATETIME field without default value is being added by the ALTER TABLE the '0000-00-00' value is used as the default one. But it wasn't checked whether such value was allowed by the set sql mode. Due to this '0000-00-00' values was allowed for DATE/DATETIME fields even in the NO_ZERO_DATE mode. Now the mysql_alter_table() function checks whether the '0000-00-00' value is allowed for DATE/DATETIME fields by the set sql mode. The new error_if_not_empty flag is used in the mysql_alter_table() function to indicate that it should abort if the table being altered isn't empty. The new new_datetime_field field is used in the mysql_alter_table() function for error throwing purposes. The new error_if_not_empty parameter is added to the copy_data_between_tables() function to indicate the it should return error if the source table isn't empty. mysql-test/t/alter_table.test: Added a test case for the bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. mysql-test/r/alter_table.result: Added a test case for the bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. sql/sql_table.cc: Bug#27507: Wrong DATETIME value was allowed by ALTER TABLE in the NO_ZERO_DATE mode. Now the mysql_alter_table() function checks whether the '0000-00-00' value is allowed for DATE/DATETIME fields by the set sql mode. The new error_if_not_empty flag is used in the mysql_alter_table() function to indicate that it should abort if the table being altered isn't empty. The new new_datetime_field field is used in the mysql_alter_table() function for error throwing purposes. The new error_if_not_empty parameter is added to the copy_data_between_tables() function to indicate the it should return error if the source table isn't empty.
-
- 19 May, 2007 1 commit
-
-
unknown authored
and invalidation in the most general case (non-temporary table and not simple RENAME or ENABLE/DISABLE KEYS or partitioning command). See comment for sql/sql_table.cc for more information. These changes are prerequisite for 5.1 version of fix for bug #23667 "CREATE TABLE LIKE is not isolated from alteration by other connections" mysql-test/include/mix1.inc: Extended coverage for behavior of ALTER TABLE statement under LOCK TABLES, which should be consistent across all platforms and for all engines. mysql-test/r/alter_table-big.result: Changed test for bug #25044 to use @@debug and injected sleeps infrastructure. Extended test coverage for ALTER TABLE's behavior under concurrency. mysql-test/r/alter_table.result: Extended coverage for behavior of ALTER TABLE statement under LOCK TABLES, which should be consistent across all platforms and for all engines. mysql-test/r/innodb_mysql.result: Extended coverage for behavior of ALTER TABLE statement under LOCK TABLES, which should be consistent across all platforms and for all engines. mysql-test/t/alter_table-big.test: Changed test for bug #25044 to use @@debug and injected sleeps infrastructure. Extended test coverage for ALTER TABLE's behavior under concurrency. mysql-test/t/alter_table.test: Extended coverage for behavior of ALTER TABLE statement under LOCK TABLES, which should be consistent across all platforms and for all engines. sql/mysql_priv.h: Made functions reopen_table() and close_handle_and_leave_table_as_lock() available outside of sql_base.cc file. Changed close_data_tables() in such way that after closing handler for the table it leaves TABLE object for it in table cache not as placeholder for ordinary name-lock but as placeholder for an exclusive name-lock. Renamed this routine to close_data_files_and_morph_locks(). sql/sql_base.cc: Made functions reopen_table() and close_handle_and_leave_table_as_lock() available outside of sql_base.cc file. Changed close_data_tables() in such way that after closing handler for the table it leaves TABLE object for it in table cache not as placeholder for ordinary name-lock but as placeholder for an exclusive name-lock. Renamed this routine to close_data_files_and_morph_locks(). Also adjusted it so it can work properly not only in LOCK TABLES mode. sql/sql_table.cc: Changed the way in which ALTER TABLE implementation handles table locking and invalidation in the most general case (non-temporary table and not simple RENAME or ENABLE/DISABLE KEYS or partitioning command) Now after preparing new version of the table we: 1) Wait until all other threads close old version of table. 2) Close instances of table open by this thread and replace them with exclusive name-locks. 3) Rename the old table to a temp name, rename the new one to the old name. 4) If we are under LOCK TABLES and don't do ALTER TABLE ... RENAME we reopen new version of table. 5) Write statement to the binary log. 6) If we are under LOCK TABLES and do ALTER TABLE ... RENAME we remove name-locks from list of open tables and table cache. 7) If we are not not under LOCK TABLES we rely on close_thread_tables() call to remove name-locks from table cache and list of open table. Such approach: a) Eliminates possibility for concurrent statement to sneak in and get access to the new version of the table before ALTER TABLE gets logged into binary log. b) Ensures that ALTER TABLE behaves under LOCK TABLES in the same way on all platforms and for all engines (in 5.0 this was not true) c) Preserves nice invariant that if table is open in some connection there is a guarantee that .FRM file for this table exists and is properly named.
-
- 28 Apr, 2007 1 commit
-
-
unknown authored
This bug occurs when error message length exceeds allowed limit: my_error() function outputs "%s" sequences instead of long string arguments. Formats like %-.64s are very common in errmsg.txt files, however my_error() function simply ignores precision of those formats. mysys/my_error.c: Fixed bug #20710. This bug occurs when error message length exceeds allowed limit: my_error() function output "%s" sequences instead of long string arguments. my_error() function has been fixed to accept formats like %-.64s. mysql-test/t/alter_table.test: Added test case for bug #20710. mysql-test/r/alter_table.result: Added test case for bug #20710.
-
- 14 Mar, 2007 3 commits
-
-
unknown authored
-
unknown authored
It was syntactically correct to define spatial keys over parts of columns (e.g. ALTER TABLE t1 ADD x GEOMETRY NOT NULL, ADD SPATIAL KEY (x(32))). This may lead to undefined results and/or interpretation. Fixed by not allowing partial column specification in a SPATIAL index definition. mysql-test/r/alter_table.result: Bug #26794: 5.1 part test case mysql-test/r/gis-rtree.result: Bug #26794: 5.1 part updated the tests to the new syntax mysql-test/t/alter_table.test: Bug #26794: 5.1 part test case mysql-test/t/gis-rtree.test: Bug #26794: 5.1 part updated the tests to the new syntax sql/sql_table.cc: Bug #26794: 5.1 part Disable defining SPATIAL KEYS with sub-key parts
-
unknown authored
Different set of conditions is used to verify the validity of index definitions over a GEOMETRY column in ALTER TABLE and CREATE TABLE. The difference was on how sub-keys notion validity is checked. Fixed by extending the CREATE TABLE condition to support the cases allowed in ALTER TABLE. Made the SHOW CREATE TABLE not to display spatial indexes using the sub-key notion. mysql-test/r/alter_table.result: Bug #26794: test case mysql-test/r/gis-rtree.result: Bug #26794: fixed SHOW CREATE TABLE output. mysql-test/t/alter_table.test: Bug #26794: test case sql/field.cc: Bug #26794: Allow sub-keys for GEOMETRY sql/sql_show.cc: Bug #26794: Don't show sub-key notion in SHOW CREATE TABLE for SPATIAL indexes. sql/sql_table.cc: Bug #26794: Allow sub-keys for GEOMETRY
-
- 12 Mar, 2007 1 commit
-
-
unknown authored
Different set of conditions is used to verify the validity of index definitions over a GEOMETRY column in ALTER TABLE and CREATE TABLE. The difference was on how sub-keys notion validity is checked. Fixed by extending the CREATE TABLE condition to support the cases allowed in ALTER TABLE. Made the SHOW CREATE TABLE not to display spatial indexes using the sub-key notion. mysql-test/r/alter_table.result: Bug #26794: test case mysql-test/r/gis-rtree.result: Bug #26794: fixed SHOW CREATE TABLE output. mysql-test/t/alter_table.test: Bug #26794: test case sql/field.cc: Bug #26794: Allow sub-keys for GEOMETRY sql/sql_show.cc: Bug #26794: Don't show sub-key notion in SHOW CREATE TABLE for SPATIAL indexes. sql/sql_table.cc: Bug #26794: Allow sub-keys for GEOMETRY
-
- 01 Mar, 2007 1 commit
-
-
unknown authored
- Try to copy the autoincrement value when altering the table mysql-test/r/alter_table.result: Update test result mysql-test/t/alter_table.test: Add test case as described in bug report sql/sql_table.cc: Try to copy the autoincrement value when altering the table
-
- 19 Jan, 2007 2 commits
- 18 Jan, 2007 1 commit
-
-
unknown authored
WL#3681 (ALTER TABLE ORDER BY) Before this fix, the ALTER TABLE statement implemented an ORDER BY option with the following characteristics : 1) The order by clause accepts a list of criteria, with optional ASC or DESC keywords 2) Each criteria can be a general expression, involving operators, native functions, stored functions, user defined functions, subselects ... With this fix : 1) has been left unchanged, since it's a de-facto existing feature, that was already present in the code base and partially covered in the test suite. Code coverage for ASC and DESC was missing and has been improved. 2) has been changed to limit the kind of criteria that are permissible: now only a column name is valid. mysql-test/r/alter_table.result: Prevent ALTER TABLE ORDER BY clauses to use general expressions. mysql-test/t/alter_table.test: Prevent ALTER TABLE ORDER BY clauses to use general expressions. sql/sql_yacc.yy: Prevent ALTER TABLE ORDER BY clauses to use general expressions.
-
- 13 Dec, 2006 1 commit
-
-
unknown authored
-
- 07 Dec, 2006 1 commit
-
-
unknown authored
table ROW_FORMAT option is lost during CREATE/DROP INDEX. This fix forces CREATE/DROP INDEX to retain ROW_FORMAT by instructing mysql_alter_table() that ROW_FORMAT is not used during creating/dropping indexes. mysql-test/r/alter_table.result: A test case for bug#23404. mysql-test/t/alter_table.test: A test case for bug#23404. sql/sql_parse.cc: CREATE/DROP INDEX must not change ROW_FORMAT. Setting create_info.row_type to ROW_TYPE_NOT_USED informs mysql_alter_table that ROW_FORMAT was not used during alteration, and thus must be retained.
-
- 04 Dec, 2006 1 commit
-
-
unknown authored
with other alterations causes lost tables Using RENAME clause combined with other clauses of ALTER TABLE led to data loss (the data was there but not accessible). This could happen if the changes do not change the table much. Adding and droppping of fields and indices was safe. Renaming a column with MODIFY or CHANGE was unsafe operation, if the actual column didn't change (changing from int to int, which is a noop) Depending on the storage engine (SE) the behavior is different: 1)MyISAM/MEMORY - the ALTER TABLE statement completes without any error but next SELECT against the new table fails. 2)InnoDB (and every other transactional table) - The ALTER TABLE statement fails. There are the the following files in the db dir - `new_table_name.frm` and a temporary table's frm. If the SE is file based, then the data and index files will be present but with the old names. What happens is that for InnoDB the table is not renamed in the internal DDIC. Fixed by adding additional call to mysql_rename_table() method, which should not include FRM file rename, because it has been already done during file names juggling. mysql-test/r/alter_table.result: update result mysql-test/r/grant.result: update result mysql-test/t/alter_table.test: 2006/11/29 11:46:23+01:00 andrey@example.com +44 -9 Error to bug number Added test case for #22369: Alter table rename combined with other alterations causes lost tables mysql-test/t/grant.test: add test for bug#22369 - alter table was missing check for DROP_ACL when ALTER_RENAME clause is specified. Synchronise with RENAME TABLE DDL. sql/mysql_priv.h: Add a new flag for mysql_rename_table() sql/sql_parse.cc: To be consistent with SQLCOM_RENAME_TABLE, SQLCOM_ALTER_TABLE has to check for DROP_ACL if there is ALTER_RENAME flag set. sql/sql_table.cc: ALTER_RENAME, the data and index files weren't renamed in the engine but only the FRM was new, when the tables old and new tables are compatible. In the chain of FRM renames we add a call to mysql_rename_table() which should instruct the engine to rename the table but not rename the FRM. This bug was there only in 5.1 branch. 4.1 and 5.0 always do copy data on RENAME if there are more clauses than just rename.
-
- 28 Nov, 2006 1 commit
-
-
unknown authored
ALTER TABLE DISABLE KEYS doesn't work when modifying the table ENABLE|DISABLE KEYS combined with another ALTER TABLE option, different than RENAME TO did nothing. Also, if the table had disabled keys and was ALTER-ed then the end table was with enabled keys. Fixed by checking whether the table had disabled keys and enabling them in the copied table. myisam/mi_open.c: Extend mi_indexes_are_disabled to implement return value 2 - Non-unique indexes are disabled mysql-test/r/alter_table.result: update result mysql-test/t/alter_table.test: update test sql/sql_table.cc: When ENABLE|DISABLE index is combined with another option different than RENAME TO, we should ENABLE|DISABLE the keys of the modified table. Also when modifying we should preserve the previous state of the indices. (This problem exists in 5.0 and 5.1 but since the codebase has diverged, this fix won't automerge, but the fix will be quite similar).
-
- 16 Nov, 2006 2 commits
-
-
unknown authored
(this is the 5.0 patch, because 4.1 differs) There was an improper order of doing chained operations. To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other ALTER TABLE clause, leads to server crash independent of the presence of indices and data in the table. mysql-test/r/alter_table.result: post-merge fix my locale is utf8, and this breaks non-utf8 stuff when doing manual merge :( sql/sql_table.cc: If there is operation on the KEYS, first do it and then do a rename if there is such. Or, we will crash because the underlying table has changed.
-
unknown authored
There was an improper order of doing chained operations. To the documentor: ENABLE|DISABLE KEYS combined with RENAME TO, and no other ALTER TABLE clause, leads to server crash independent of the presence of indices and data in the table. mysql-test/r/alter_table.result: update result mysql-test/t/alter_table.test: add test for bug#24129 sql/sql_table.cc: If there is operation on the KEYS, first do it and then do a rename if there is such. Or, we will crash because the underlying table has changed.
-
- 03 Aug, 2006 1 commit
-
-
unknown authored
New test cases. Names with umlauts don't compare well on Windows. mysql-test/r/alter_table.result: Bug#18775 - Temporary table from alter table visible to other threads New test results mysql-test/r/backup.result: Bug#18775 - Temporary table from alter table visible to other threads New test results mysql-test/t/alter_table.test: Bug#18775 - Temporary table from alter table visible to other threads New test case. Names with umlauts don't compare well on Windows. mysql-test/t/backup.test: Bug#18775 - Temporary table from alter table visible to other threads New test case. Names with umlauts don't compare well on Windows.
-
- 02 Aug, 2006 1 commit
-
-
unknown authored
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. mysql-test/r/alter_table.result: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added test results. mysql-test/r/backup.result: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added test results. mysql-test/r/repair.result: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added test results. mysql-test/t/alter_table.test: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added test cases. mysql-test/t/backup.test: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added test cases. mysql-test/t/repair.test: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added a test case. sql/ha_myisam.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added missing table name mapping calls to backup() and restore(). sql/ha_myisammrg.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/ha_ndbcluster.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/ha_ndbcluster_binlog.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/ha_ndbcluster_binlog.h: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Removed unnecessary check for wrong temp file prefix. sql/mysql_priv.h: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Extended quick_rm_table(), mysql_rename_table(), and build_table_filename() by an flags argument, which can indicate temporary table names that should not be converted. Added symbolic flag values. sql/sql_acl.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_base.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Fixed a comment. Added DBUG calls. sql/sql_db.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_delete.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_insert.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_partition.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_rename.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_show.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Reverted the former fix for this bug. tmp_file_prefix is now used verbatim in the comparison of file names. sql/sql_table.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added a check for a tmp_file_prefix file name to filename_to_tablename(). These names are now accepted without conversion. Extended quick_rm_table(), mysql_rename_table(), and build_table_filename() by an flags argument, which can indicate temporary table names that should not be converted. Removed the table to file name conversion from build_tmptable_filename(). Disabled REPAIR TABLE ... USE_FRM for temporary tables. Added the forgotten conversion to mysql_alter_table() for the case of ALTER TABLE ... RENAME. Added comments and DBUG calls. sql/sql_trigger.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/sql_view.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Added an zero argument for the new 'flags' parameter. sql/table.cc: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Replaced a literal ".frm" by reg_ext. Added DBUG calls. storage/innobase/row/row0mysql.c: Bug#18775 - Temporary table from alter table visible to other threads Continued implementation of WL#1324 (table name to filename encoding) Changed back the encoded temp file prefix to #sql.
-
- 15 May, 2006 1 commit
-
-
unknown authored
The problem is that in a MyISAM table the following column after a varchar field gets corrupted, if varchar field is extended. This should be made to work without a copy in the future, but I'm not sure if this code is ready yet. This fix will force copy in this case. It will not do any harm to have it here, only makes alter table a bit slower in this case. If this should work for MyISAM, then the bug is somewhere else in that code. Until it works, I propose this as a temporary fix or a workaround. Test case for the bug has been added. mysql-test/r/alter_table.result: Added test case for Bug#19386: Multiple alter causes crashed table. mysql-test/t/alter_table.test: Added test case for Bug#19386: Multiple alter causes crashed table. sql/ha_myisam.cc: For MyISAM type, if varchar column is extended, it should return not compatible for now. In other words, it forces a copy of the table during alter table.
-
- 15 Mar, 2006 2 commits
- 22 Feb, 2006 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: Update test result mysql-test/r/analyse.result: Update test result mysql-test/r/archive.result: Update test result mysql-test/r/archive_bitfield.result: Update test result mysql-test/r/archive_gis.result: Update test result mysql-test/r/bdb.result: Update test result mysql-test/r/bdb_gis.result: Update test result mysql-test/r/bigint.result: Update test result mysql-test/r/binary.result: Update test result mysql-test/r/case.result: Update test result mysql-test/r/cast.result: Update test result mysql-test/r/constraints.result: Update test result mysql-test/r/create.result: Update test result mysql-test/r/ctype_collate.result: Update test result mysql-test/r/ctype_create.result: Update test result mysql-test/r/ctype_latin1_de.result: Update test result mysql-test/r/ctype_many.result: Update test result mysql-test/r/ctype_mb.result: Update test result mysql-test/r/ctype_recoding.result: Update test result mysql-test/r/ctype_sjis.result: Update test result mysql-test/r/ctype_tis620.result: Update test result mysql-test/r/ctype_ucs.result: Update test result mysql-test/r/ctype_ujis.result: Update test result mysql-test/r/ctype_utf8.result: Update test result mysql-test/r/default.result: Update test result mysql-test/r/events.result: Update test result mysql-test/r/federated.result: Update test result mysql-test/r/fulltext.result: Update test result mysql-test/r/func_gconcat.result: Update test result mysql-test/r/func_group.result: Update test result mysql-test/r/func_math.result: Update test result mysql-test/r/func_misc.result: Update test result mysql-test/r/func_str.result: Update test result mysql-test/r/func_system.result: Update test result mysql-test/r/gis-rtree.result: Update test result mysql-test/r/heap.result: Update test result mysql-test/r/index_merge_innodb.result: Update test result mysql-test/r/information_schema.result: Update test result mysql-test/r/innodb.result: Update test result mysql-test/r/innodb_gis.result: Update test result mysql-test/r/key.result: Update test result mysql-test/r/merge.result: Update test result mysql-test/r/myisam.result: Update test result mysql-test/r/mysqldump-max.result: Update test result mysql-test/r/mysqldump.result: Update test result mysql-test/r/ndb_bitfield.result: Update test result mysql-test/r/ndb_gis.result: Update test result mysql-test/r/ndb_partition_key.result: Update test result mysql-test/r/null.result: Update test result mysql-test/r/partition.result: Update test result mysql-test/r/partition_02myisam.result: Update test result mysql-test/r/partition_mgm_err.result: Update test result mysql-test/r/partition_range.result: Update test result mysql-test/r/ps_2myisam.result: Update test result mysql-test/r/ps_3innodb.result: Update test result mysql-test/r/ps_4heap.result: Update test result mysql-test/r/ps_5merge.result: Update test result mysql-test/r/ps_6bdb.result: Update test result mysql-test/r/rpl_mixed_ddl_dml.result: Update test result mysql-test/r/rpl_multi_engine.result: Update test result mysql-test/r/rpl_ndb_UUID.result: Update test result mysql-test/r/show_check.result: Update test result mysql-test/r/sp-vars.result: Update test result mysql-test/r/sp.result: Update test result mysql-test/r/sql_mode.result: Update test result mysql-test/r/strict.result: Update test result mysql-test/r/subselect.result: Update test result mysql-test/r/symlink.result: Update test result mysql-test/r/synchronization.result: Update test result mysql-test/r/system_mysql_db.result: Update test result mysql-test/r/temp_table.result: Update test result mysql-test/r/trigger.result: Update test result mysql-test/r/type_binary.result: Update test result mysql-test/r/type_bit.result: Update test result mysql-test/r/type_bit_innodb.result: Update test result mysql-test/r/type_blob.result: Update test result mysql-test/r/type_decimal.result: Update test result mysql-test/r/type_enum.result: Update test result mysql-test/r/type_float.result: Update test result mysql-test/r/type_nchar.result: Update test result mysql-test/r/type_newdecimal.result: Update test result mysql-test/r/type_set.result: Update test result mysql-test/r/type_timestamp.result: Update test result mysql-test/r/type_varchar.result: Update test result mysql-test/r/union.result: Update test result mysql-test/r/user_var.result: Update test result mysql-test/r/variables.result: Update test result sql/sql_show.cc: Make ouput from SHOW CREATE TABLE use uppercase for "CHARACTER SET", "COLLATE", "DEFAULT", "ON UPDATE" and "AUTO_INCREMENT"
-
- 02 Feb, 2006 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: Update test results mysql-test/r/archive_bitfield.result: Update test results mysql-test/r/create.result: Update test results mysql-test/r/ctype_tis620.result: Update test results mysql-test/r/gis-rtree.result: Update test results mysql-test/r/index_merge_innodb.result: Update test results mysql-test/r/information_schema.result: Update test results mysql-test/r/innodb.result: Update test results mysql-test/r/key.result: Update test results mysql-test/r/merge.result: Update test results mysql-test/r/partition.result: Update test results mysql-test/r/partition_range.result: Update test results mysql-test/r/rpl000002.result: Update test results mysql-test/r/rpl_multi_engine.result: Update test results mysql-test/r/show_check.result: Update test results mysql-test/r/sql_mode.result: Update test results mysql-test/r/strict.result: Update test results mysql-test/r/symlink.result: Update test results mysql-test/r/system_mysql_db.result: Update test results mysql-test/r/type_blob.result: Update test results sql/sql_show.cc: Avoid adding extra space between 'PRIMARY KEY' and key fields in SHOW CREATE TABLE output.
-
- 16 Jan, 2006 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: Test results fixed (Bug#6073) mysql-test/t/alter_table.test: A test case for Bug#6073
-
- 31 Dec, 2005 1 commit
-
-
unknown authored
- Encoding itself, implemented as a charset "filename". Originally planned to use '.' as an escape character, but now changed to '@' for two reasons: "ls" does not return file names starting with '.' considering them as a kind of hidden files; some platforms do not allow several dots in a file name. - replacing many calls of my_snprintf() and strnxmov() to the new build_table_filename(). - Adding MY_APPEND_EXT mysys flag, to append an extention rather that replace it. - Replacing all numeric constants in fn_format flag arguments to their mysys definitions, e.g. MY_UNPACK_FILENAME, - Predictability in several function/methods: when a table name can appear with or withot .frm extension. Some functions/methods were changed so accept names strictly with .frm, other - strictly without .frm extensions. Several DBUG_ASSERTs were added to check whether an extension is passed. Many files: table name to file name encoding mysql_priv.h: Prototypes for new table name encoding tools. ctype-utf8.c: Implementing "filename" charset for table name to file name encoding. row0mysql.c: Fixing table name prefix. mf_format.c: Adding MY_APPEND_EXT processing. Many files: Fixing tests. my_sys.h: Adding new flag to append rather than replace an extension. m_ctype.h: Adding "filename" charset definition. include/m_ctype.h: Adding "filename" charset definition. include/my_sys.h: Adding new flag to append rather than replace an extension. mysql-test/t/alter_table.test: Fixing tests. mysql-test/t/create.test: Fixing tests. mysql-test/t/show_check.test: Fixing tests. mysql-test/r/alter_table.result: Fixing tests. mysql-test/r/create.result: Fixing tests. mysql-test/r/mysqldump.result: Fixing tests. mysys/mf_format.c: Adding MY_APPEND_EXT processing. sql/discover.cc: table name to file name encoding sql/ha_berkeley.cc: table name to file name encoding sql/ha_innodb.cc: table name to file name encoding sql/ha_myisam.cc: table name to file name encoding sql/ha_myisammrg.cc: table name to file name encoding sql/ha_ndbcluster.cc: table name to file name encoding sql/ha_partition.cc: table name to file name encoding sql/handler.cc: table name to file name encoding. sql/init.cc: table name to file name encoding sql/mysqld.cc: table name to file name encoding sql/parse_file.cc: table name to file name encoding sql/sql_acl.cc: table name to file name encoding sql/sql_base.cc: table name to file name encoding sql/sql_db.cc: table name to file name encoding sql/sql_delete.cc: table name to file name encoding sql/sql_rename.cc: table name to file name encoding sql/sql_show.cc: table name to file name encoding sql/sql_table.cc: table name to file name encoding sql/sql_trigger.cc: table name to file name encoding sql/sql_view.cc: table name to file name encoding sql/strfunc.cc: table name to file name encoding sql/table.cc: table name to file name encoding sql/unireg.cc: table name to file name encoding storage/innobase/row/row0mysql.c: Fixing table name prefix. , storage/myisam/mi_create.c: table name to file name encoding storage/myisam/mi_delete_table.c: table name to file name encoding storage/myisam/mi_open.c: table name to file name encoding storage/myisam/mi_rename.c: table name to file name encoding strings/ctype-utf8.c: Implementing "filename" charset for table name to file name encoding. sql/mysql_priv.h: Prototypes for new table name encoding tools. storage/myisammrg/myrg_create.c: table name to file name encoding storage/myisammrg/myrg_open.c: table name to file name encoding
-
- 30 Nov, 2005 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: Add drop table that got axed in merge mysql-test/t/alter_table.test: Fix merge
-
- 24 Nov, 2005 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: test result mysql-test/t/alter_table.test: test case sql/sql_table.cc: we should set the flag with the ALTER requirements
-
- 13 Oct, 2005 1 commit
-
-
unknown authored
new file mysql_fix_privilege_tables.sql, mysql_create_system_tables.sh: Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding. Many files: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. Adding true BINARY/VARBINARY: new pad_char structure member. ctype-bin.c: Adding true BINARY/VARBINARY: new pad_char structure member. New strnxfrm, with two trailing length bytes. field.cc: Adding true BINARY/VARBINARY. sql/field.cc: Adding true BINARY/VARBINARY. strings/ctype-big5.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-bin.c: Adding true BINARY/VARBINARY: new pad_char structure member. New strnxfrm, with two trailing length bytes. strings/ctype-cp932.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-czech.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-euc_kr.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-eucjpms.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-extra.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-gb2312.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-gbk.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-latin1.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-simple.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-sjis.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-tis620.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-uca.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-ucs2.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-ujis.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-utf8.c: Adding true BINARY/VARBINARY: new pad_char structure member. strings/ctype-win1250ch.c: Adding true BINARY/VARBINARY: new pad_char structure member. include/m_ctype.h: Adding true BINARY/VARBINARY: new pad_char structure member. mysql-test/t/alter_table.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/binary.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/cast.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/ctype_cp1251.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/ctype_many.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/federated.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/func_in.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/ndb_condition_pushdown.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/ndb_types.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/sp.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/t/type_blob.test: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/alter_table.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/binary.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/cast.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/ctype_cp1251.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/ctype_many.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/federated.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/func_in.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/ndb_condition_pushdown.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/ndb_types.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/sp.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/system_mysql_db.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. mysql-test/r/type_blob.result: Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes. scripts/mysql_create_system_tables.sh: Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding. scripts/mysql_fix_privilege_tables.sql: Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
-
- 06 Oct, 2005 1 commit
-
-
unknown authored
Ensure that ccache is also used for C programs mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter Fixed test cases by adding missing DROP's and rename views to be of type 'v#' Removed MY_UNIX_PATH from fn_format() Removed current_db_used from TABLE_LIST Removed usage of 'current_thd' in Item_splocal Removed some compiler warnings A bit faster longlong2str code BUILD/FINISH.sh: Ensure that ccache is also used for C programs BUILD/SETUP.sh: Ensure that ccache is also used for C programs client/mysql.cc: More debugging Ensure that 'delimiter' works the same way in batch mode as in normal mode. Compare 'delimiter' command case-insensitive. The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump. client/mysqldump.c: Indentation fixes Use ;; as a delmimiter for stored procedures and triggers instead of // client/mysqltest.c: Indentation fixes include/my_sys.h: Remove not needed MY_UNIX_PATH parameter mysql-test/r/alter_table.result: Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start) mysql-test/r/func_str.result: More testing of CONV() (to ensure that longlong2str() works correctly) mysql-test/r/information_schema.result: Drop all used tables and views Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails mysql-test/r/information_schema_inno.result: Drop all used tables mysql-test/r/multi_statement.result: Drop used tables mysql-test/r/mysql.result: Add error messages to result mysql-test/r/mysqldump.result: ;; is now used as SP/trigger delimiter mysql-test/r/mysqlshow.result: Drop used tables mysql-test/r/temp_table.result: Drop used views Rename views to v# mysql-test/t/alter_table.test: Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start) mysql-test/t/func_str.test: More testing of CONV() (to ensure that longlong2str() works correctly) mysql-test/t/information_schema.test: Drop all used tables and views Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails mysql-test/t/information_schema_inno.test: Drop all used tables mysql-test/t/multi_statement.test: Drop used tables mysql-test/t/mysql.test: Add error messages to result mysql-test/t/mysqlshow.test: Drop used tables mysql-test/t/temp_table.test: Drop used views Rename views to v# mysys/mf_format.c: Remove not needed MY_UNIX_PATH parameter (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH) sql/ha_federated.cc: Removed extra empty line sql/item.cc: Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable One doesn't have to set 'null_value' when calling 'is_null()' sql/item.h: Add THD as a class variable to Item_splocal Use 'str_value' instead of 'str_value_ptr' to hold temp result Fixed bug in Item_hex when used in CAST() sql/item_func.cc: Optimize new code sql/log_event.cc: Move 'to_unix_path()' out of fn_format() sql/opt_range.cc: Simplify code sql/sp_head.cc: Ensure that Item_splocal has thd set before we call '->this_item()' sql/sql_class.cc: Return error if Statement::insert() fails in either hash_insert() sql/sql_parse.cc: Remove 'current_db_used' as we can trivially check if db table qualifier was used without this. Simplify code sql/sql_prepare.cc: Use enum instead of const int, to avoid ugly code for VC++ sql/structs.h: Remove compiler warnings when using STRING_WITH_LEN() with constant strings. sql/table.cc: Fixed indentation sql/table.h: Remove not needed current_db_used strings/decimal.c: Simplify code strings/longlong2str-x86.s: A bit faster longlong2str. (Took some ideas from Peter Gulutzan's code) strings/my_strtoll10.c: Simplify code for MetroWerks compiler
-
- 03 Sep, 2005 1 commit
-
-
unknown authored
mysql-test/r/alter_table.result: Fix test case
-
- 31 Aug, 2005 1 commit
-
-
unknown authored
-
- 29 Aug, 2005 1 commit
-
-
unknown authored
causes ERROR 2013). (all-in-one approved patch) mysql-test/r/alter_table.result: result for test for bug #12207 (alter table discard database works on mysiam and causes error 2013) mysql-test/t/alter_table.test: test for bug #12207 (alter table discard tablescpae on MyISAM table causes ERROR 2013) sql/sql_table.cc: send all error message to table->file->print_error() thus not missing handing of some (like engine not supported). fix for bug #12207 (alter table discard tablespace on MyISAM table causes ERROR 2013)
-