into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
myisam/mi_open.c:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/create.result:
SCCS merged
mysql-test/t/create.test:
SCCS merged
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
myisam/mi_open.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/create.result:
Manual merge
mysql-test/t/create.test:
Manual merge
Thanks to Martin Friebe for finding and submitting a fix for this bug!
A table with maximum number of key segments and maximum length key name
would have a corrupted .frm file, due to an incorrect calculation of the
complete key length. Now the key length is computed correctly (I hope) :-)
MyISAM would reject a table with the maximum number of keys and the maximum
number of key segments in all keys. It would allow one less than this total
maximum. Now MyISAM accepts a table defined with the maximum. (This is a
very minor issue.)
myisam/mi_open.c:
change >= to > in a comparison (i.e., error only if key_parts_in_table
really is greater than MAX_KEY * MAX_KEY_SEG)
mysql-test/r/create.result:
Add test results for bug #26642 (create index corrupts table definition in .frm)
mysql-test/t/create.test:
Add test case for bug #26642 (create index corrupts table definition in .frm)
sql/table.cc:
In create_frm(), fix formula for key_length; it was too small by (keys * 2) bytes
- Use mysql_system_tables.sql to create MySQL system tables in
all places where we create them(mysql_install_db, mysql-test-run-pl
and mysql_fix_privilege_tables.sql)
BitKeeper/deleted/.del-init_db.sql:
Rename: mysql-test/init_db.sql -> BitKeeper/deleted/.del-init_db.sql
BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8:
Rename: mysql-test/lib/init_db.sql -> BitKeeper/deleted/.del-init_db.sql~a77d572c39d5a1f8
BitKeeper/deleted/.del-mysql_create_system_tables.sh:
Rename: scripts/mysql_create_system_tables.sh -> BitKeeper/deleted/.del-mysql_create_system_tables.sh
BitKeeper/etc/ignore:
Added scripts/mysql_fix_privilege_tables.sql to the ignore list
mysql-test/Makefile.am:
lib/init_db.sql has been removed
mysql-test/mysql-test-run.pl:
- Build var/tmp/bootstrap.sql from mysql_system_tables.sql,
mysql_test_data_timezone.sql and fill_help_tables.sql and use
it when bootsraping the system tables to use during test.
mysql-test/r/create.result:
Update result file
mysql-test/r/derived.result:
Update result file
mysql-test/r/join.result:
Update result file
mysql-test/r/mysql_upgrade.result:
Update result file
mysql-test/r/sp-security.result:
Update result file
mysql-test/t/create.test:
Add user mysqltest_1 before trying to connect as that user - no
anon users by default anymore
mysql-test/t/derived.test:
Add user mysqltest_1 before trying to connect as that user - no
anon users by default anymore
mysql-test/t/grant2.test:
Add anonymous users for part of thes that need it.
mysql-test/t/grant_cache.test:
Add anonymous users for part of thes that need it.
mysql-test/t/init_connect.test:
Add anonymous users for part of thes that need it.
mysql-test/t/lock_multi.test:
Add anonymous users for part of thes that need it.
mysql-test/t/ndb_basic.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/ndb_index_ordered.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/ndb_multi.test:
Connect as "root", blank user will take currently logged in
username
mysql-test/t/overflow.test:
Connect as root - no anonymous users by default anymore
mysql-test/t/rpl_temporary.test:
Add anonymous users for the test
mysql-test/t/xa.test:
Connect as "root", blank user wil pick currently logged in user
scripts/Makefile.am:
Remove mysql_create_system_tables.sh
Add mysql_system_tables.sql and mysql_test_data_timezone.sql
Build mysql_fix_privilege_tables.sql from mysql_system_tables.sql
and mysql_fix_privilege_tables.sql.in
scripts/mysql_fix_privilege_tables.sh:
Update message describing what the script does
scripts/mysql_fix_privilege_tables.sql.in:
Remove the part that creates system tables as that will be added to
mysql_fix_privileg_tables.sql from mysql_system_tables.sql
Change all comments to use #
scripts/mysql_install_db.sh:
Use mysql_system_tables.sql to create the MySQL system tables
Update comments and indentation
Add more descriptive comments about --windows switch
Reduce number of hardcoded names for the SQL files the script
looks for
mysql-test/include/add_anonymous_users.inc:
New BitKeeper file ``mysql-test/include/add_anonymous_users.inc''
mysql-test/include/delete_anonymous_users.inc:
New BitKeeper file ``mysql-test/include/delete_anonymous_users.inc''
scripts/mysql_system_tables.sql:
New BitKeeper file ``scripts/mysql_system_tables.sql''
scripts/mysql_test_data_timezone.sql:
New BitKeeper file ``scripts/mysql_test_data_timezone.sql''
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/r/create.result:
Merge
mysql-test/t/create.test:
Merge
mysql-test/t/view.test:
Remove the disable_warnings part as engine=innodb has been removed
- Disable warnings when creating the "innodb" tables if it works anyway.
- Move test that are really innodb dependent to innodb_mysql
mysql-test/r/create.result:
Move the innodb dependent test to innodb_mysql.test
mysql-test/r/innodb_mysql.result:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/create.test:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/innodb_mysql.test:
Move the innodb dependent test to innodb_mysql.test
mysql-test/t/lock_multi.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
mysql-test/t/sp.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
mysql-test/t/view.test:
Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same.
Upgrade was a reserved word. Unreserve UPGRADE so it can be used in unquoted identifiers.
mysql-test/r/create.result:
Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24
- test case
mysql-test/t/create.test:
Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24
- test case
sql/sql_yacc.yy:
Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24
- unreserve UPGRADE.
into xiphis.org:/home/antony/work2/mysql-5.0-merge
mysql-test/r/create.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
columns
Fixed confusing warning.
Quoting INSERT section of the manual:
----
Inserting NULL into a column that has been declared NOT NULL. For
multiple-row INSERT statements or INSERT INTO ... SELECT statements, the
column is set to the implicit default value for the column data type. This
is 0 for numeric types, the empty string ('') for string types, and the
"zero" value for date and time types. INSERT INTO ... SELECT statements are
handled the same way as multiple-row inserts because the server does not
examine the result set from the SELECT to see whether it returns a single
row. (For a single-row INSERT, no warning occurs when NULL is inserted into
a NOT NULL column. Instead, the statement fails with an error.)
----
This is also true for LOAD DATA INFILE. For INSERT user can specify
DEFAULT keyword as a value to set column default. There is no similiar
feature available for LOAD DATA INFILE.
mysql-test/r/auto_increment.result:
Fixed confusing warning.
mysql-test/r/create.result:
Fixed confusing warning.
mysql-test/r/insert.result:
Fixed confusing warning.
mysql-test/r/insert_select.result:
Fixed confusing warning.
mysql-test/r/key.result:
Fixed confusing warning.
mysql-test/r/null.result:
Fixed confusing warning.
mysql-test/r/null_key.result:
Fixed confusing warning.
mysql-test/r/ps_2myisam.result:
Fixed confusing warning.
mysql-test/r/ps_3innodb.result:
Fixed confusing warning.
mysql-test/r/ps_4heap.result:
Fixed confusing warning.
mysql-test/r/ps_5merge.result:
Fixed confusing warning.
mysql-test/r/ps_6bdb.result:
Fixed confusing warning.
mysql-test/r/strict.result:
Fixed confusing warning.
mysql-test/r/view.result:
Fixed confusing warning.
mysql-test/r/warnings.result:
Fixed confusing warning.
sql/share/errmsg.txt:
Fixed confusing warning.
into moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql
mysql-test/r/create.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.cc:
Auto merged
mysql-test/r/union.result:
SCCS merged
mysql-test/t/union.test:
SCCS merged
The Item::tmp_table_field_from_field_type() function creates Field_datetime
object instead of Field_timestamp object for timestamp field thus always
changing data type is a tmp table is used.
The Field_blob object constructor which is used in the
Item::tmp_table_field_from_field_type() is always setting packlength field of
newly created blob to 4. This leads to changing fields data type for example
from the blob to the longblob if a temporary table is used.
The Item::make_string_field() function always converts Field_string objects
to Field_varstring objects. This leads to changing data type from the
char/binary to varchar/varbinary.
Added appropriate Field_timestamp object constructor for using in the
Item::tmp_table_field_from_field_type() function.
Added Field_blob object constructor which sets pack length according to
max_length argument.
The Item::tmp_table_field_from_field_type() function now creates
Field_timestamp object for a timestamp field.
The Item_type_holder::display_length() now returns correct NULL length NULL
length.
The Item::make_string_field() function now doesn't change Field_string to
Field_varstring in the case of Item_type_holder.
The Item::tmp_table_field_from_field_type() function now uses the Field_blob
constructor which sets packlength according to max_length.
mysql-test/t/union.test:
Added test case for bug#12185: Data type aggregation may produce wrong result
Corrected test case after fix for bug#12185
mysql-test/t/innodb.test:
Corrected test case after fix for bug#12185
mysql-test/r/union.result:
Added test case for bug#12185: Data type aggregation may produce wrong result
Corrected test case after fix for bug#12185
mysql-test/r/innodb.result:
Corrected test case after fix for bug#12185
mysql-test/r/create.result:
Corrected the test case after fixing bug#12185
sql/field.h:
Fixed bug#12185: Data type aggregation may produce wrong result
Added Field_blob object constructor which sets packlength according to
max_length argument.
sql/item.cc:
Fixed bug#12185: Data type aggregation may produce wrong result
The Item::make_string_field() function now doesn't change Field_string to
Field_varstring in the case of Item_type_holder.
The Item::tmp_table_field_from_field_type() function now creates
Field_timestamp object for a timestamp field.
The Item::tmp_table_field_from_field_type() function now uses the Field_blob
constructor which sets packlength according to max_length.
The Item_type_holder::display_length() now returns correct NULL length NULL
length.
sql/field.cc:
Fixed bug#12185: Data type aggregation may produce wrong result
Added appropriate Field_timestamp object constructor for using in the
Item::tmp_table_field_from_field_type() function.
DESCRIBE returned the type BIGINT for a column of a view if the column
was specified by an expression over values of the type INT.
E.g. for the view defined as follows:
CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
columns of the INT type.
At the same time DESCRIBE returned type INT for the only column of the table
defined by the statement:
CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
This inconsistency was removed by the patch.
Now the code chooses between INT/BIGINT depending on the
precision of the aggregated column type.
Thus both DESCRIBE commands above returns type INT for v1 and t2.
mysql-test/r/analyse.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/bigint.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/create.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/olap.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_2myisam.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_3innodb.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_4heap.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_5merge.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_6bdb.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_7ndb.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/sp.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/subselect.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/type_ranges.result:
Adjusted the results after having fixed bug #19714.
mysql-test/r/view.result:
Added a test case for bug #19714.
mysql-test/t/view.test:
Added a test case for bug #19714.
Bug#19022 "Memory bug when switching db during trigger execution"
Bug#17199 "Problem when view calls function from another database."
Bug#18444 "Fully qualified stored function names don't work correctly in
SELECT statements"
Documentation note: this patch introduces a change in behaviour of prepared
statements.
This patch adds a few new invariants with regard to how THD::db should
be used. These invariants should be preserved in future:
- one should never refer to THD::db by pointer and always make a deep copy
(strmake, strdup)
- one should never compare two databases by pointer, but use strncmp or
my_strncasecmp
- TABLE_LIST object table->db should be always initialized in the parser or
by creator of the object.
For prepared statements it means that if the current database is changed
after a statement is prepared, the database that was current at prepare
remains active. This also means that you can not prepare a statement that
implicitly refers to the current database if the latter is not set.
This is not documented, and therefore needs documentation. This is NOT a
change in behavior for almost all SQL statements except:
- ALTER TABLE t1 RENAME t2
- OPTIMIZE TABLE t1
- ANALYZE TABLE t1
- TRUNCATE TABLE t1 --
until this patch t1 or t2 could be evaluated at the first execution of
prepared statement.
CURRENT_DATABASE() still works OK and is evaluated at every execution
of prepared statement.
Note, that in stored routines this is not an issue as the default
database is the database of the stored procedure and "use" statement
is prohibited in stored routines.
This patch makes obsolete the use of check_db_used (it was never used in the
old code too) and all other places that check for table->db and assign it
from THD::db if it's NULL, except the parser.
How this patch was created: THD::{db,db_length} were replaced with a
LEX_STRING, THD::db. All the places that refer to THD::{db,db_length} were
manually checked and:
- if the place uses thd->db by pointer, it was fixed to make a deep copy
- if a place compared two db pointers, it was fixed to compare them by value
(via strcmp/my_strcasecmp, whatever was approproate)
Then this intermediate patch was used to write a smaller patch that does the
same thing but without a rename.
TODO in 5.1:
- remove check_db_used
- deploy THD::set_db in mysql_change_db
See also comments to individual files.
mysql-test/r/create.result:
Modify the result file: a database can never be NULL.
mysql-test/r/ps.result:
Update test results (Bug#17199 et al)
mysql-test/r/sp.result:
Update test results (Bug#17199 et al)
mysql-test/t/create.test:
Update the id of the returned error.
mysql-test/t/ps.test:
Add test coverage for prepared statements and current database. In scope of
work on Bug#17199 "Problem when view calls function from another database."
mysql-test/t/sp.test:
Add a test case for Bug#17199 "Problem when view calls function from another
database." and Bug#18444 "Fully qualified stored function names don't work
correctly in SELECT statements". Test a complementary problem.
sql/item_strfunc.cc:
Touch the code that reads thd->db (cleanup).
sql/log_event.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/slave.h:
Remove a declaration for a method that is used only in one module.
sql/sp.cc:
Rewrite sp_use_new_db: this is a cleanup that I needed in order to understand
this function and ensure that it has no bugs.
sql/sp.h:
Add a new declaration for sp_use_new_db (uses LEX_STRINGs) and a comment.
sql/sp_head.cc:
- drop sp_name_current_db_new - a creator of sp_name class that was used
when sp_name was created for an identifier without an explicitly initialized
database. Now we pass thd->db to constructor of sp_name right in the
parser.
- rewrite sp_head::init_strings: name->m_db is always set now
- use the new variant of sp_use_new_db
- we don't need to update thd->db with SP MEM_ROOT pointer anymore when
parsing a stored procedure, as noone will refer to it (yes!)
sql/sp_head.h:
- remove unneded methods and members
sql/sql_class.h:
- introduce 3 THD methods to work with THD::db:
.set_db to assign the current database
.reset_db to reset the current database (temporarily) or set it to NULL
.opt_copy_db_to - to deep-copy thd->db to a pointer if it's not NULL
sql/sql_db.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_insert.cc:
- replace checks with asserts: table_list->db must be always set in the parser.
sql/sql_lex.h:
- add a comment
sql/sql_parse.cc:
- implement the invariant described in the changeset comment.
- remove juggling with lex->sphead in SQLCOM_CREATE_PROCEDURE:
now db_load_routine uses its own LEX object and doesn't damage the main
LEX.
- add DBUG_ASSERT(0) to unused "check_db_used"
sql/sql_table.cc:
- replace a check with an assert (table_ident->db)
sql/sql_trigger.cc:
While we are at it, replace direct access to thd->db with a method.
Should simplify future conversion of THD::db to LEX_STRING.
sql/sql_udf.cc:
- use thd->set_db instead of direct modification of to thd->db
sql/sql_view.cc:
- replace a check with an assert (view->db)
sql/sql_yacc.yy:
- make sure that we always copy table->db or name->db or ident->db or
select_lex->db from thd->db if the former is not set. If thd->db
is not set but is accessed, return an error.
sql/tztime.cc:
- be nice, never copy thd->db by pointer.
disallow the use of comma in SET members
mysql-test/r/create.result:
Fix for bug#15316 SET value having comma not correctly handled
test case
mysql-test/t/create.test:
Fix for bug#15316 SET value having comma not correctly handled
test case
When a too long field is used for a key, only a prefix part of the field is
used. Length is reduced to the max key length allowed for storage. But if the
field have a multibyte charset it is possible to break multibyte char
sequence. This leads to the failed assertion in the innodb code and
server crash when a record is inserted.
The make_prepare_table() now aligns truncated key length to the boundary of
multibyte char.
mysql-test/t/create.test:
Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
mysql-test/r/create.result:
Added test case for bug#17530: Incorrect key truncation on table creation caused server crash.
sql/sql_table.cc:
Fixed bug#17530: Incorrect key truncation on table creation caused server crash.
The make_prepare_table() now aligns truncated key length to the boundary of
multibyte char.
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/sql_table.cc:
Auto merged
into mysql.com:/home/my/mysql-5.0
mysql-test/r/create.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/t/disabled.def:
Manual merge
sql/mysqld.cc:
Manual merge
sql/sp_head.cc:
Manual merge
sql/sql_trigger.cc:
Manual merge
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
- #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
- #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null
mysql-test/r/create.result:
Update results after removing wrong warnings for CREATE ... SELECT
New tests
mysql-test/r/handler.result:
Drop used tables
mysql-test/r/kill.result:
Make test portable
mysql-test/r/mysqlshow.result:
Drop tables used by previous test
mysql-test/r/trigger.result:
Reuse old procedure name
mysql-test/r/view.result:
Extra tests
mysql-test/t/create.test:
New tests to test fix of removing wrong warnings for CREATE ... SELECT
mysql-test/t/disabled.def:
Enable 'kill' test (should now be portable)
mysql-test/t/handler.test:
Drop used tables
mysql-test/t/kill.test:
Make test portable even if kill doesn't work at once
mysql-test/t/mysqlshow.test:
Drop tables used by previous test
mysql-test/t/trigger.test:
Reuse old procedure name
mysql-test/t/view.test:
Extra tests
sql/field.cc:
Removed compiler warning
sql/ha_federated.cc:
my_snprintf -> strmake()
(Simple optimization)
sql/ha_ndbcluster.cc:
Indentation cleanups and trival optimization
sql/item.cc:
Moved save_org_in_field() to item.cc to make it easier to test
Remove setting of null_value as this is not needed
sql/item.h:
Moved save_org_in_field() to item.cc to make it easier to test
sql/log_event.cc:
Remove inline of slave_load_file_stem()
Added 'extension' parameter to slave_load_file_stem() to get smaller code
Removed not critical (or needed) DBUG_ASSERT()'s
Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths
Indentation fixes
sql/opt_range.cc:
Moved code from declaration to function body
(To make it more readable)
sql/parse_file.cc:
Fixed DBUG_PRINT
sql/sp.cc:
Simple cleanups
- Removed not needed {} level
- Ensure saved variables starts with old_
sql/sp_head.cc:
Indentation fixes
Remove core dump when using --debug when m_next_cached_sp == 0
Fixed compiler warnings
Trivial optimizations
sql/sp_head.h:
Changed argument to set_definer() to const
Added THD argument to recursion_level_error() to avoid call to current_thd
sql/sql_acl.cc:
Removed not needed test (first_not_own_table is the guard)
sql/sql_base.cc:
Removed extra empty line
sql/sql_handler.cc:
Don't test table version in mysql_ha_read() as this is already tested in lock_tables()
Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables
(Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash)
sql/sql_insert.cc:
Mark fields that are set in CREATE ... SELECT as used
(Removed wrong warnings about field not having a default value)
sql/sql_parse.cc:
Removed not needed test of 'tables' (first_not_own_table is the guard)
Simplify code
sql/sql_select.cc:
Use group->field to check if value is null instead of item called by 'save_org_in_field'
This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null)
sql/sql_trigger.cc:
Move sql_modes_parameters outside of function
Indentation fixes
Fixed compiler warning
Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access()
(This allows us to remove the extra test in check_grant() and check_table_access())
Problem #1: INSERT...SELECT, Version for 5.0.
Extended the unique table check by a check of lock data.
Merge sub-tables cannot be detected by doing name checks only.
mysql-test/r/create.result:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/r/merge.result:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added test results.
mysql-test/t/create.test:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/t/merge.test:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT
Added tests.
sql/lock.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added a new function to find a duplicate lock in a list of tables.
sql/mysql_priv.h:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Added a declaration for the new function.
sql/sql_base.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Added a call to the new mysql_lock_have_duplicate(),
which needs the thread handle, to unique_table().
sql/sql_delete.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_insert.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_load.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_parse.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
sql/sql_update.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.0.
Added the thread handle to unique_table().
Replaced a call to find_table_in_local_list() by
the newly extended unique_table().
Problem #1: INSERT...SELECT, Version for 4.1.
INSERT ... SELECT with the same table on both sides (hidden
below a MERGE table) does now work by buffering the select result.
The duplicate detection works now after open_and_lock_tables()
on the locks.
I did not find a test case that failed without the change in
sql_update.cc. I made the change anyway as it should in theory
fix a possible MERGE table problem with multi-table update.
libmysqld/ha_blackhole.cc:
BUG#5390 - problems with merge tables
No idea, how the symlink change made it into my patch.
mysql-test/r/create.result:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/r/merge.result:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added test results.
mysql-test/t/create.test:
BUG#5390 - problems with merge tables
Removed a duplicate test.
mysql-test/t/merge.test:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added tests.
sql/lock.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added a new function to find a duplicate lock in a list of tables.
sql/mysql_priv.h:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Added a declaration for the new function.
sql/sql_parse.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Changed the duplicate tables detection for INSERT ... SELECT
to use the new function, which does also work for MERGE tables.
sql/sql_update.cc:
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1.
Changed the duplicate tables detection for UPDATE
to use the new function, which does also work for MERGE tables.
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/t/create.test:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/create.result:
Resolve conflict
mysql-test/r/create.result:
Add new results
mysql-test/t/create.test:
Add regression test
sql/table.cc:
To cap a value at 2^32-1 on a 64-bit platform, use UINT_MAX32, not
~(ulong)0, since a ulong may be 64-bit itself.
into mysql.com:/home/psergey/mysql-5.0-oct08-push
mysql-test/r/create.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/sql_table.cc:
Auto merged
when calculating table->null_fields.
mysql-test/r/create.result:
Testcase for BUG#14480
mysql-test/t/create.test:
Testcase for BUG#14480
sql/sql_table.cc:
BUG#14480: For CREATE ... SELECT ... a field list passed to mysql_prepare_table() contains
instances of create_field for both create-list and select-list. mysql_prepare_table()
matches elements that refer to the same field, and joins them together. When the "join"
is performed, both of create_field structures has already been counted in "null_fields".
This fix makes sure that "null_fields" contains the correct value after two create_field
structures have been joined.
include/config-netware.h:
Merged
innobase/row/row0ins.c:
BUG#10511: Per alexi's instructions, the changes in innobase/row/row0ins.c are not
propagated to 5.x
mysql-test/r/create.result:
Auto Merged
mysql-test/t/create.test:
Auto Merged
sql/field.cc:
Auto Merged
sql/field.h:
Manual Merge
sql/sql_table.cc:
Auto Merged
avoid multiplying length of field_X by charset->mbmaxlen twice when calculating space
required for field_X in the new table.
mysql-test/r/create.result:
Testcase for BUG#14139
mysql-test/t/create.test:
Testcase for BUG#14139
sql/field.cc:
BUG#14139: Make create_length_to_internal_length() save length-in-characters in
create_field::chars_length.
sql/field.h:
BUG#14139: Add create_length::chars_length where we save length-in-characters, added comments.
sql/sql_table.cc:
BUG#14139: When handling "CREATE TABLE(field_X type_spec,...) SELECT smth AS field_X, ...."
we get two instances of create_field: (1) is occurence of field_X in create list, and (2) is
in select list. If we figure they both refer to the same field, we "join" them according to
some rule that is not explicitly specified anywhere.
When we do this "join", create_field::length already contains length-in-bytes for both, so
when we transfer field length (in characters) from (1) to (2), use length-in-characters that
we have saved in create_length::chars_length.
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
mysql-test/r/temp_table.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
sql/sql_db.cc:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/create.result:
Merged from 4.1 to 5.0
mysql-test/r/innodb.result:
Merged from 4.1 to 5.0
mysql-test/t/create.test:
Merged from 4.1 to 5.0
sql/item_cmpfunc.cc:
Merged from 4.1 to 5.0
sql/sql_table.cc:
Merged from 4.1 to 5.0
produce warning for 'create database if not exists' if database exists
do not update database options in this case
produce warning for 'create table if not exists' if table exists
mysql-test/r/create.result:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
updated test case result
mysql-test/r/temp_table.result:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
updated test case result
mysql-test/r/warnings.result:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
updated test case result
mysql-test/t/create.test:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
test case
sql/sql_db.cc:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create database if not exists' if database exists
do not update database options in this case
sql/sql_table.cc:
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create table if not exists' if table exists
(Simple SQL can crash server or connection)
(not initialized member leads to server crash)
mysql-test/r/create.result:
result of test for bug #12913
mysql-test/t/create.test:
test for bug#12913
(Simple SQL can crash server or connection)
sql/sql_table.cc:
copy the interval pointer too or a bit later
dereferencing of this pointer being 0x0 will crash the server
(see bug #12913)
After merge fix for bug #12537
sql/item.cc:
After merge fix for bug #12537
sql/sql_select.cc:
After merge fix for bug #12537
mysql-test/r/create.result:
After merge fix for bug #12537
mysql-test/t/create.test:
After merge fix for bug #12537
Item::tmp_table_field_from_field_type() and create_tmp_field_from_item()
was converting string field to blob depending on byte-wise length instead of
character length, which results in converting valid varchar string with
length == 86 to longtext.
Made that functions above take into account max width of character when
converting string fields to blobs.
sql/item.cc:
Fix bug #12537 UNION produces longtext instead of varchar
Item::tmp_table_field_from_field_type() now taking into account max char width when creating tmp field for string fields.
sql/sql_select.cc:
Fix bug #12537 UNION produces longtext instead of varchar
create_tmp_field_from_item()now taking into account max char width when creating tmp field for string fields.
mysql-test/r/create.result:
Test case for bug #12537 UNION produces longtext instead of varchar
mysql-test/t/create.test:
Test case for bug #12537 UNION produces longtext instead of varchar
Added check which throws ER_WRONG_OBJECT error in case the .frm
doesn't contain a valid table type (e.g. view or trigger)
mysql-test/r/create.result:
Added test case for bug #6859
mysql-test/t/create.test:
Add testcase for bug #6850
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/create.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/t/create.test:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/table.cc:
Resolve conflict
sql/unireg.cc:
Resolve conflict
non-existent database. (Bug #10407)
mysql-test/r/create.result:
Update results
mysql-test/t/create.test:
Update error numbers
sql/mysql_priv.h:
Adjust some other function signature so table and db information
is passed down into create_frm().
sql/sql_table.cc:
Check for database not existing after hitting an error when
copying the .frm file for 'CREATE TABLE ... LIKE ...', and
pass table and db name into rea_create_table().
sql/table.cc:
Generate specific error message when .frm creation fails because
the database does not exist.
sql/unireg.cc:
Pass database and table name down into create_frm().
Report error instead of crashing
mysql-test/r/create.result:
Test for bug 11028
mysql-test/t/create.test:
Test for bug 11028
sql/sql_table.cc:
fix for null db name
mysql-test/r/create.result:
test result fixed
mysql-test/r/distinct.result:
test result fixed
mysql-test/t/distinct.test:
test case added
sql/item_cmpfunc.cc:
max_length should be calculated differently for DECIMAL_RESULT and others
BitKeeper/etc/logging_ok:
auto-union
client/sql_string.cc:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
mysys/raid.cc:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/field.cc:
Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_blackhole.cc:
Auto merged
sql/ha_heap.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_geofunc.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_uniq.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/procedure.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol_cursor.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_analyse.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_error.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_map.cc:
Auto merged
sql/sql_olap.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/examples/ha_archive.cc:
Auto merged
sql/examples/ha_example.cc:
Auto merged
sql/examples/ha_tina.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/tztime.cc:
Auto merged
strings/ctype-win1250ch.c:
Auto merged
mysql-test/r/func_gconcat.result:
merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/r/innodb.result:
merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/func_gconcat.test:
merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/innodb.test:
merge & ensure that 4.1 and 5.0 source have tests in same order
sql/item_func.cc:
merge
sql/mysqld.cc:
merge
sql/opt_range.cc:
merge
sql/sql_parse.cc:
merge
Give better name to goto labels
sql/sql_select.cc:
merge