Commit graph

18954 commits

Author SHA1 Message Date
unknown
9fefd8eb71 BUG#24533 (uninitialized null bits in m_after_image):
Removing valgrind memory checks from code.


sql/log_event.cc:
  Removing valgrind memory checks from code.
2006-11-23 10:43:43 +01:00
unknown
227e8e4ea3 BUG#24533 (uninitialized null but of m_after_image):
Patch to fix valgrind warning that uninitialized bytes were written. 
The warning was caused by set_default(), which assumes that the field pointer is pointing
into record[0], while all other functions honors the move_field_offset().


sql/log_event.cc:
  Changing unpack_row() to always unpack into table->record[0] since the Field class hierarchy
  contain too many dependencies on the record to operate on being in table->record[0].
  Changing code to use the new unpack_row(), which requires some juggling of records in
  one case.
2006-11-23 10:15:02 +01:00
unknown
b8fe9fb47f Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-my_lread.c:
  Auto merged
BitKeeper/deleted/.del-my_lwrite.c:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
cmd-line-utils/readline/complete.c:
  Auto merged
extra/yassl/src/ssl.cpp:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/ctype_cp1250_ch.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/sp-prelocking.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysys/default.c:
  Auto merged
mysys/mf_iocache.c:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_alloc.c:
  Auto merged
mysys/my_dup.c:
  Auto merged
mysys/my_getwd.c:
  Auto merged
mysys/my_handler.c:
  Auto merged
mysys/my_lib.c:
  Auto merged
mysys/my_malloc.c:
  Auto merged
mysys/my_pread.c:
  Auto merged
mysys/my_seek.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/strfunc.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/heap/_check.c:
  Auto merged
storage/heap/hp_delete.c:
  Auto merged
storage/heap/hp_hash.c:
  Auto merged
storage/heap/hp_open.c:
  Auto merged
storage/heap/hp_rkey.c:
  Auto merged
storage/heap/hp_rrnd.c:
  Auto merged
storage/heap/hp_write.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_close.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_keycache.c:
  Auto merged
storage/myisam/mi_page.c:
  Auto merged
storage/myisam/mi_statrec.c:
  Auto merged
storage/myisam/mi_test2.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/myisammrg/myrg_extra.c:
  Auto merged
storage/ndb/include/logger/LogHandler.hpp:
  Auto merged
storage/ndb/include/util/OutputStream.hpp:
  Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
  Auto merged
storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
storage/ndb/src/common/transporter/Transporter.cpp:
  Auto merged
storage/ndb/src/cw/cpcd/CPCD.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/error/ErrorReporter.cpp:
  Auto merged
storage/ndb/src/kernel/error/ErrorReporter.hpp:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/ndbapi/ClusterMgr.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
  Auto merged
storage/ndb/src/ndbapi/Ndb.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbOperationInt.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
storage/ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
storage/ndb/tools/drop_index.cpp:
  Auto merged
storage/ndb/tools/drop_tab.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
vio/viossl.c:
  Auto merged
vio/viosslfactories.c:
  Auto merged
BUILD/SETUP.sh:
  Use local version
client/client_priv.h:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/ctype_cp1250_ch.result:
  Manual merge
mysql-test/t/disabled.def:
  Manual merge
mysys/hash.c:
  Manual merge
mysys/thr_lock.c:
  Manual merge
server-tools/instance-manager/mysql_connection.cc:
  Manual merge
sql/ha_ndbcluster.cc:
  Manual merge
sql/handler.cc:
  Manual merge
sql/item_timefunc.cc:
  Manual merge
sql/mysqld.cc:
  Manual merge
sql/opt_range.cc:
  Manual merge
sql/slave.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
sql/sql_view.cc:
  Manual merge
sql/table.cc:
  Manual merge
storage/archive/ha_archive.cc:
  Manual merge
storage/federated/ha_federated.cc:
  Manual merge
storage/federated/ha_federated.h:
  Manual merge
storage/innobase/handler/ha_innodb.cc:
  Manual merge
storage/ndb/include/ndb_global.h.in:
  Manual merge
storage/ndb/include/util/InputStream.hpp:
  Manual merge
storage/ndb/include/util/SimpleProperties.hpp:
  Manual merge
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Manual merge
storage/ndb/src/ndbapi/NdbOperationDefine.cpp:
  Manual merge
storage/ndb/src/ndbapi/NdbOperationSearch.cpp:
  Manual merge
storage/ndb/src/ndbapi/Ndbinit.cpp:
  Manual merge
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Manual merge
strings/decimal.c:
  Manual merge
vio/viosocket.c:
  Manual merge
2006-11-22 14:11:36 +02:00
unknown
498fcdc6b3 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21635
2006-11-22 14:18:17 +03:00
unknown
74dff15226 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21635


tests/mysql_client_test.c:
  Manual merge.
2006-11-22 14:17:24 +03:00
unknown
f3c9b38ea3 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21635
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug21635


sql/item_sum.cc:
  Auto merged
tests/mysql_client_test.c:
  Manual merge.
2006-11-22 14:08:43 +03:00
unknown
5af294b9aa Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21635
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21635


sql/item_sum.cc:
  Auto merged
tests/mysql_client_test.c:
  Manual merge.
2006-11-22 14:05:26 +03:00
unknown
18770d2fe4 BUG#21635: MYSQL_FIELD struct's member strings seem to misbehave for
expression cols.

The problem was that MYSQL_FIELD::org_name was set for MIN() and MAX()
functions (COUNT() is also mentioned in the bug report but was already
fixed).

After this patch for expressions MYSQL_FIELD::name is set to either
expression itself or its alias, and other data origin fields of
MYSQL_FILED (db, org_table, table, org_name) are empty strings.


sql/item_sum.cc:
  For expressions only col_name should be non-empty string.
tests/mysql_client_test.c:
  Add test case for bug#21635: MYSQL_FIELD struct's member strings seem
  to misbehave for expression cols.
2006-11-22 13:58:00 +03:00
unknown
1089f637c5 Merge macbook.gmz:/Users/kgeorge/mysql/work/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt


sql/filesort.cc:
  Auto merged
2006-11-22 12:50:58 +02:00
unknown
941beef6b2 Merge macbook.gmz:/Users/kgeorge/mysql/work/mysql-5.1
into  macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt


sql/table.cc:
  Auto merged
2006-11-22 12:48:29 +02:00
unknown
c65ce2e09f Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug22029/my41-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-22 10:30:46 +04:00
unknown
ca0658d471 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22029/my50-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-22 10:27:11 +04:00
unknown
904e46968a Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/usr/home/ram/work/bug22029/my51-bug22029


sql/item_timefunc.cc:
  Auto merged
2006-11-22 10:10:55 +04:00
unknown
c77bd19bc6 Merge mysql.com:/usr/home/ram/work/bug22029/my50-bug22029
into  mysql.com:/usr/home/ram/work/bug22029/my51-bug22029


mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
mysql-test/r/date_formats.result:
  merging
2006-11-22 09:29:22 +04:00
unknown
8473844792 Merge mysql.com:/usr/home/ram/work/bug22029/my41-bug22029
into  mysql.com:/usr/home/ram/work/bug22029/my50-bug22029


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  merging
2006-11-22 09:19:51 +04:00
unknown
cd784a51df Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch


configure.in:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
2006-11-22 05:54:30 +01:00
unknown
7463704e1c Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


client/mysql.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
mysql-test/mysql-test-run-shell.sh:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/drop.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/rpl_ndb_dd_advance.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/rpl_ndb_dd_advance.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
client/mysql_upgrade.c:
  Manual merge
client/mysqltest.c:
  Manual merge
mysql-test/mysql-test-run.pl:
  Manual merge
storage/innobase/handler/ha_innodb.cc:
  Manual merge
2006-11-21 23:12:45 +02:00
unknown
85a590a26c Added --debug-info to most clients to detect memory leaks in mysql-test-run
Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1


client/client_priv.h:
  Added OPT_DEBUG_INFO and OPT_COLUMN_TYPES
client/mysql.cc:
  Split --debug-info into --debug-info and --column-type-info
client/mysql_upgrade.c:
  Give only error info at end if using --debug-info
client/mysqladmin.cc:
  Added --debug-info to detect memory leaks in mysqltest
client/mysqlbinlog.cc:
  Added --debug-info to detect memory leaks in mysqltest
client/mysqlcheck.c:
  Added --debug-info to detect memory leaks in mysqltest
client/mysqlimport.c:
  Added --debug-info to detect memory leaks in mysqltest
client/mysqlshow.c:
  Added --debug-info to detect memory leaks in mysqltest
client/mysqltest.c:
  Added --debug-info to detect memory leaks in mysqltest
  Added option --logdir to force .progress files in a specific directory
libmysql/libmysql.c:
  Fixed memory leak
mysql-test/include/ndb_setup_slave.inc:
  Moved cluster tables under 'mysql'
mysql-test/include/query_cache.inc:
  Added more tests for query cache
mysql-test/lib/init_db.sql:
  Move cluster.binlog_index -> mysql.binlog_index
mysql-test/lib/mtr_report.pl:
  Find memory leaks
mysql-test/mysql-test-run-shell.sh:
  Added --debug-info to programs to detect memory leaks
mysql-test/mysql-test-run.pl:
  Added --debug-info to programs to detect memory leaks
  Force log files to var/log
  cluster tables moved under 'mysql'
mysql-test/r/cache_innodb.result:
  New query cache test with innodb
mysql-test/r/connect.result:
  binlog_index is now in mysql
mysql-test/r/drop.result:
  Removed 'cluster' database
mysql-test/r/information_schema.result:
  Removed 'cluster' database
mysql-test/r/mysqlcheck.result:
  cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_basic.result:
  cluster.binlog_index -> mysql.binlog_index
mysql-test/r/ndb_binlog_ddl_multi.result:
  cluster -> mysql
mysql-test/r/ndb_binlog_discover.result:
  cluster -> mysql
mysql-test/r/ndb_binlog_multi.result:
  cluster -> mysql
mysql-test/r/ndb_restore_compat.result:
  cluster -> mysql
mysql-test/r/ps_1general.result:
  Removed cluster database
mysql-test/r/rpl_create_database.result:
  Removed cluster database
mysql-test/r/rpl_load_from_master.result:
  Removed cluster database
mysql-test/r/rpl_loaddata_m.result:
  Removed cluster database
mysql-test/r/rpl_ndb_bank.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_dd_advance.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_dd_basic.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_idempotent.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_log.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_multi.result:
  cluster -> mysql
mysql-test/r/rpl_ndb_sync.result:
  cluster -> mysql
mysql-test/r/rpl_row_basic_11bugs.result:
  Removed cluster database
mysql-test/r/rpl_truncate_7ndb.result:
  Position have changed
mysql-test/r/rpl_truncate_7ndb_2.result:
  cluster -> mysql
mysql-test/r/schema.result:
  Removed cluster database
mysql-test/r/show_check.result:
  Removed cluster database
mysql-test/r/system_mysql_db.result:
  binlog_index moved under mysql
mysql-test/r/upgrade.result:
  More tests
mysql-test/t/information_schema.test:
  cluster -> mysql
mysql-test/t/mysqldump.test:
  More test to detect memory leaks
mysql-test/t/ndb_binlog_basic.test:
  cluster -> mysql
mysql-test/t/ndb_binlog_multi.test:
  cluster -> mysql
mysql-test/t/ndb_restore_compat.test:
  cluster -> mysql
mysql-test/t/rpl_ndb_bank.test:
  cluster -> mysql
mysql-test/t/rpl_ndb_dd_advance.test:
  cluster -> mysql
mysql-test/t/rpl_ndb_idempotent.test:
  cluster -> mysql
mysql-test/t/rpl_ndb_multi.test:
  cluster -> mysql
mysql-test/t/rpl_ndb_sync.test:
  cluster -> mysql
mysql-test/t/system_mysql_db_fix.test:
  Drop also binlog_index
mysql-test/t/upgrade.test:
  Check that tables created with 3.23 works
mysys/my_error.c:
  Remove all registered errors (to avoid memory leaks)
mysys/my_init.c:
  call my_error_unregister_all() to avoid some possible memory leaks
mysys/mysys_priv.h:
  Added prototype
scripts/mysql_create_system_tables.sh:
  cluster -> mysql
scripts/mysql_fix_privilege_tables.sql:
  Changed -- to #
  Create binlog_index table if it dosesn't exist
sql/field.cc:
  Made offset() inline
sql/field.h:
  Changed prototype of offset() to not make it depending on TABLE structure
sql/field_conv.cc:
  Removed some usage of current_thd
sql/ha_ndbcluster_tables.h:
  cluster -> mysql
sql/item_sum.cc:
  Usage of new 'offset' parameters
sql/key.cc:
  Changed 'find_ref_key' to not be dependent on field->table
  (This fixed a crash when using a table created in MySQL 3.23)
sql/mysql_priv.h:
  Changed find_ref_key() to not use field->table
sql/mysqld.cc:
  Fix that plugin_init() works properly on bootstrap
  (Previously we got warnings from plugin_init)
sql/sql_class.cc:
  new 'field->offset()'
sql/sql_select.cc:
  New field->offset()
sql/table.cc:
  We don't need field->table to be set in find_ref_key() or find_field() anymore.
storage/archive/ha_archive.cc:
  New field->offset()
storage/federated/ha_federated.cc:
  New field->offset()
storage/innobase/handler/ha_innodb.cc:
  Fixed compiler warnings
storage/myisam/ha_myisam.cc:
  Fixed compiler warnings (Wrong paramter to sprintf())
  New field->offset()
storage/myisam/ha_myisam.h:
  Fixed wrong type of table_flags
storage/ndb/tools/restore/Restore.cpp:
  Fixed compiler warning
mysql-test/r/1st.result:
  New BitKeeper file ``mysql-test/r/1st.result''
mysql-test/std_data/old_table-323.frm:
  New BitKeeper file ``mysql-test/std_data/old_table-323.frm''
mysql-test/t/1st.test:
  New BitKeeper file ``mysql-test/t/1st.test''
2006-11-21 22:32:58 +02:00
unknown
c0f63d8564 Fix typo in comment 2006-11-21 21:52:39 +03:00
unknown
de613e2eb2 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-11733_topdown


sql/set_var.cc:
  Auto merged
2006-11-21 11:02:25 -07:00
unknown
413e0f0b2a Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
2006-11-21 17:37:57 +03:00
unknown
5e1c2e3644 Update after merge.
Use mutex when reading prepared_stmt_count global status variable.

Update test case for bug 16365 and bug 23159: add test for
prepared_stmt_count being decreased when some connection that had
prepared statements is closed.


mysql-test/r/ps.result:
  Update result for bug#16365 and bug#23159.
mysql-test/t/ps.test:
  Update test case for bug#16365 and bug#23159: add test for
  prepared_stmt_count being decreased when some connection that had
  prepared statements is closed.
sql/mysqld.cc:
  Use mutex when reading prepared_stmt_count global status variable.
2006-11-21 17:23:54 +03:00
unknown
8b4a32afcd Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug23159


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  SCCS merged
2006-11-21 17:00:42 +03:00
unknown
596e29c253 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23159
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23159


mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/set_var.cc:
  Manual merge.
2006-11-21 16:53:33 +03:00
unknown
7a45fb546f BUG#23159: prepared_stmt_count should be status variable
Make Prepared_stmt_count a global status variable, accessible via
SHOW STATUS LIKE 'Prepared_stmt_count';.  Documentation should be
updated.


mysql-test/r/ps.result:
  Update result for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
mysql-test/t/ps.test:
  Update test case for bug#16365: Prepared Statements: DoS with too many
  open statements, according to bug#23159: prepared_stmt_count should be
  status variable.
sql/mysqld.cc:
  Add Prepared_stmt_count as global status variable.
sql/set_var.cc:
  Remove prepared_stmt_count as system variable.
2006-11-21 16:49:18 +03:00
unknown
75eb156275 No need for ndb_util_thread to have two different ndb objects allocated. Use the thd_ndb one and remove the other one. 2006-11-21 13:58:26 +01:00
unknown
b8f6ba8041 BUG#24403 (valgrind complaint on uninited st_table for innodb + rbr):
Removing DBUG_DUMP printouts for valgrind builds since they trigger warnings.
Removing valgrind memory checks completely.
Removing bzero() of record when opening table that was added earlier.


sql/log_event.cc:
  Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
  warnings.
  Removing valgrind checks completely, since they can trigger false valgrind warnings.
sql/sql_class.cc:
  Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
  warnings.
sql/table.cc:
  Removing extreneous bzero() that were added previously.
2006-11-21 13:57:52 +01:00
unknown
0c28027838 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint


configure.in:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-21 12:00:19 +01:00
unknown
22204c0ac1 Updates for gethostname and gethostbyname_r usage
configure.in:
  Change "gethostname_r" to "gethostbyname_r" as that is the function
  being looked for
sql/sql_parse.cc:
  gethostname is not used from sql_parse.cc so no need to declare it's
  prototype here
2006-11-21 11:59:25 +01:00
unknown
3a64adc4ea Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/information_schema.result:
  SCCS merged
mysql-test/t/information_schema.test:
  SCCS merged
2006-11-21 14:04:43 +04:00
unknown
1ae9f3b985 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
disable filling of I_S tables for EXPLAIN


mysql-test/r/information_schema.result:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
mysql-test/t/information_schema.test:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
2006-11-21 13:45:01 +04:00
unknown
77b7a86206 WL#3602 (SET GLOBAL READONLY)
Bug#11733 (COMMITs should not happen if read-only is set)
Bug#22009 (Can write to a read-only server under some circumstances)

See the work log for details

The change consist of
a) acquiring the global read lock in SET GLOBAL READONLY
b) honoring opt_readonly in ha_commit_trans(),
c) honoring opt_readonly in mysql_lock_tables().

a) takes care of the server stability,
b) makes the transactional tables safe (Bug 11733)
c) makes the non transactional tables safe (Bug 22009)


mysql-test/r/read_only.result:
  WL#3602 (SET GLOBAL READONLY)
mysql-test/t/read_only.test:
  WL#3602 (SET GLOBAL READONLY)
sql/handler.cc:
  WL#3602 (SET GLOBAL READONLY)
sql/lock.cc:
  WL#3602 (SET GLOBAL READONLY)
sql/set_var.cc:
  WL#3602 (SET GLOBAL READONLY)
sql/set_var.h:
  WL#3602 (SET GLOBAL READONLY)
mysql-test/r/read_only_innodb.result:
  WL#3602 (SET GLOBAL READONLY)
mysql-test/t/read_only_innodb.test:
  WL#3602 (SET GLOBAL READONLY)
2006-11-20 20:40:35 -07:00
unknown
e4040c77c6 Fix printf warnings
Improve dbug_print_open_tables so the trace files are readable.
2006-11-21 00:23:38 +01:00
unknown
b894f48013 This straightens up usage of have_ variables, and removes dead -skip-isam option.
mysql-test/r/warnings.result:
  Modified skip to use NDB.
mysql-test/t/warnings-master.opt:
  Removed dead options
mysql-test/t/warnings.test:
  Updated test to use NDB
sql/mysql_priv.h:
  Removed dead have_ variables
sql/mysqld.cc:
  Removed dead options (one which was never documenteD).
sql/set_var.cc:
  Removed have_ variables for prefered usage of show engines
storage/federated/ha_federated.cc:
  Removed head variable
storage/myisammrg/ha_myisammrg.cc:
  Updated to use correct state
2006-11-20 14:04:07 -08:00
unknown
8869653031 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/t/ctype_ucs.test:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-11-20 22:46:52 +02:00
unknown
14decc4fbc Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)


BitKeeper/etc/ignore:
  added mysql-test/r/*.warnings
BUILD/SETUP.sh:
  Don't build with BDB as default
client/client_priv.h:
  Added OPT_DEBUG_INFO
client/mysqlbinlog.cc:
  Fixed compiler warning
client/mysqldump.c:
  Removed compiler warnings
  Added option --debug-info to detect memory leaks
  Fixed memory leak
  Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning
cmd-line-utils/readline/complete.c:
  Fixed compiler warning
cmd-line-utils/readline/display.c:
  Fixed compiler warning
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warning
cmd-line-utils/readline/input.c:
  Fixed compiler warning
cmd-line-utils/readline/isearch.c:
  Fixed compiler warning
cmd-line-utils/readline/kill.c:
  Fixed compiler warning
cmd-line-utils/readline/macro.c:
  Fixed compiler warning
cmd-line-utils/readline/misc.c:
  Fixed compiler warning
cmd-line-utils/readline/nls.c:
  Fixed compiler warning
cmd-line-utils/readline/readline.c:
  Fixed compiler warning
cmd-line-utils/readline/rltty.c:
  Fixed compiler warning
cmd-line-utils/readline/search.c:
  Fixed compiler warning
cmd-line-utils/readline/terminal.c:
  Fixed compiler warning
cmd-line-utils/readline/text.c:
  Fixed compiler warning
cmd-line-utils/readline/tilde.c:
  Fixed compiler warning
cmd-line-utils/readline/undo.c:
  Fixed compiler warning
cmd-line-utils/readline/util.c:
  Fixed compiler warning
cmd-line-utils/readline/vi_mode.c:
  Fixed compiler warning
dbug/dbug_analyze.c:
  Fixed compiler warning
extra/yassl/src/ssl.cpp:
  Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp:
  Fixed compiler warning
heap/_check.c:
  Fixed compiler warning
heap/hp_delete.c:
  Fixed compiler warning
heap/hp_hash.c:
  Fixed compiler warning
heap/hp_open.c:
  Fixed compiler warning
heap/hp_rkey.c:
  Fixed compiler warning
heap/hp_rrnd.c:
  Fixed compiler warning
heap/hp_write.c:
  Fixed compiler warning
libmysql/libmysql.c:
  Fixed compiler warning
libmysqld/libmysqld.c:
  Fixed compiler warning
myisam/mi_close.c:
  Fixed compiler warning
myisam/mi_delete.c:
  Fixed compiler warning
myisam/mi_dynrec.c:
  Fixed compiler warning
myisam/mi_keycache.c:
  Fixed compiler warning
myisam/mi_page.c:
  Fixed compiler warning
myisam/mi_statrec.c:
  Fixed compiler warning
myisam/mi_test2.c:
  Fixed compiler warning
myisam/mi_write.c:
  Fixed compiler warning
myisam/myisampack.c:
  Fixed compiler warning
myisammrg/myrg_extra.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  Remove .reject, .progress, .log and .warnings flag at start
  cluster -> mysql database (for 5.1)
mysql-test/include/federated.inc:
  Remove mysqltest warnings
mysql-test/include/sp-vars.inc:
  Remove mysqltest warnings
mysql-test/mysql-test-run.sh:
  Fix so that 'make test' works again
  Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result:
  Drop used tables at startup
mysql-test/t/create.test:
  Remove mysqltest warnings
mysql-test/t/csv.test:
  Remove mysqltest warnings
mysql-test/t/ctype_collate.test:
  Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test:
  Drop used tables at startup
mysql-test/t/ctype_ucs.test:
  Remove mysqltest warnings
mysql-test/t/func_sapdb.test:
  Remove mysqltest warnings
mysql-test/t/func_str.test:
  Remove mysqltest warnings
mysql-test/t/grant.test:
  Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test:
  Remove mysqltest warnings
mysql-test/t/group_min_max.test:
  Remove mysqltest warnings
mysql-test/t/innodb.test:
  Remove mysqltest warnings
mysql-test/t/join.test:
  Remove mysqltest warnings
mysql-test/t/limit.test:
  Remove mysqltest warnings
mysql-test/t/null.test:
  Remove mysqltest warnings
mysql-test/t/select.test:
  Remove mysqltest warnings
mysql-test/t/sp-prelocking.test:
  Remove mysqltest warnings
mysql-test/t/strict.test:
  Remove mysqltest warnings
mysql-test/t/subselect.test:
  Remove mysqltest warnings
mysql-test/t/type_newdecimal.test:
  Remove mysqltest warnings
mysql-test/t/view_grant.test:
  Remove mysqltest warnings
mysys/default.c:
  Fixed compiler warning
mysys/hash.c:
  Fixed compiler warning
mysys/list.c:
  Fixed compiler warning
mysys/mf_iocache.c:
  Fixed compiler warning
mysys/mf_keycache.c:
  Fixed compiler warning
mysys/mf_keycaches.c:
  Fixed compiler warning
mysys/my_alloc.c:
  Fixed compiler warning
mysys/my_dup.c:
  Fixed compiler warning
mysys/my_fopen.c:
  Fixed compiler warning
mysys/my_fstream.c:
  Fixed compiler warning
mysys/my_getwd.c:
  Fixed compiler warning
mysys/my_handler.c:
  Fixed compiler warning
  Added missing enums in switch
mysys/my_lib.c:
  Fixed compiler warning
mysys/my_lread.c:
  Fixed compiler warning
mysys/my_lwrite.c:
  Fixed compiler warning
mysys/my_malloc.c:
  Fixed compiler warning
mysys/my_pread.c:
  Fixed compiler warning
mysys/my_read.c:
  Fixed compiler warning
mysys/my_realloc.c:
  Fixed compiler warning
mysys/my_seek.c:
  Fixed compiler warning
mysys/my_write.c:
  Fixed compiler warning
mysys/safemalloc.c:
  Fixed compiler warning
mysys/thr_lock.c:
  Fixed compiler warning
mysys/tree.c:
  Fixed compiler warning
mysys/typelib.c:
  Fixed compiler warning
ndb/include/logger/LogHandler.hpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in:
  Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp:
  Fixed compiler warning
ndb/include/util/OutputStream.hpp:
  Fixed compiler warning
ndb/include/util/SimpleProperties.hpp:
  Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp:
  remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Add missing enums
ndb/src/common/logger/LogHandler.cpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c:
  Fixed compiler warning
ndb/src/common/portlib/NdbThread.c:
  Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp:
  Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp:
  Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c:
  Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp:
  Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/Services.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp:
  Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Fixed compiler warning
ndb/tools/drop_index.cpp:
  Fixed compiler warning
ndb/tools/drop_tab.cpp:
  Fixed compiler warning
ndb/tools/ndb_config.cpp:
  Fixed compiler warning
regex/regexec.c:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warning
sql/Makefile.am:
  Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_federated.h:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/handler.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_subselect.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compiler warning
sql/net_serv.cc:
  Fixed compiler warning
sql/opt_range.cc:
  Fixed compiler warning
  Formated DBUG statements to be as rest of code
sql/slave.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_cache.cc:
  Fixed compiler warning
  Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
sql/sql_delete.cc:
  Fixed compiler warning
sql/sql_parse.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc:
  Fixed compiler warning
sql/sql_select.cc:
  Fixed compiler warning
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Fixed compiler warning
sql/strfunc.cc:
  Fixed compiler warning
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed compiler warning
sql/table.cc:
  Fixed compiler warning
sql/tztime.cc:
  Fixed compiler warning
sql/unireg.cc:
  Fixed compiler warning
strings/decimal.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
vio/viosocket.c:
  Fixed compiler warning
vio/viossl.c:
  Fixed compiler warning
vio/viosslfactories.c:
  Fixed compiler warning
2006-11-20 22:42:06 +02:00
unknown
eb8be70f14 Merge romeo.(none):/home/bkroot/mysql-5.1
into  romeo.(none):/home/bk/memcheck-mysql-5.1
2006-11-20 21:37:48 +01:00
unknown
cf40ae7601 BUG#24403 (valgrind complained on uninited st_table for InnoDB and RBR):
Fix to correct behaviour of find_and_fetch_row() for tables that have primary keys stored
in storage engines that support the fast method to fetch rows given a primary key. The
method uses position() to retrieve the key for a given record and rnd_pos() to position
the internal "cursor" at the row. Rnd_pos() returns the found record in table->record[0],
so the record has to be moved to table->record[1] for further processing after calling
find_and_fetch_row().


sql/log_event.cc:
  Adding code to one exit branch of find_and_fetch_row() to move output record from
  table->record[0] to table->record[1].
  Adding function to do valgrind memory check.
  Adding valgrind memory checks to check that records are defined when they should be.
  Adding Doxygen comment to find_and_fetch_row() with pre- and post-conditions.
2006-11-20 21:27:39 +01:00
unknown
2b720487f0 Fix for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
Do not issue a 'read-only' error in case of DROP TEMPORARY TABLE on a non-existing temporary table.
Instead produce the correct "Unknown table" error or warning (in cases when the IF EXISTS clause was specified).

To a documentor: the part of the manual describing the 'read_only' system variable should be clarified to state the following:
"When the read_only variable is set to ON, all operations which create/update/drop tables are rejected with the exceptions for:
1. Any operation performed by the replication thread on a slave server
2. Any operation performed by a user that have the SUPER privilege
3. Any operation that creates/updates/drops only temporary tables"


mysql-test/r/read_only.result:
  Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
mysql-test/t/read_only.test:
  Added testcases for bug #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
sql/sql_parse.cc:
  Before issuing the 'read-only' error also check if the operation is not a DROP TEMPORARY TABLE statement
2006-11-20 17:35:23 +03:00
unknown
1e3f42b246 5.0-opt -> 5.1-opt merge fixed. 2006-11-20 12:46:47 +02:00
unknown
7d6b4a1ab0 Refactored a number of engines to have correct init/deinit. Added pass support for "data" from plugin to plugin generic init to use memory location.
plugin/daemon_example/plug.in:
  Switched the plug.in type (corrected)
sql/handler.h:
  Added data pointer to use for engines.
sql/sql_plugin.cc:
  Passing plugin to generic handlers to allow them to add data to "data"
storage/archive/ha_archive.cc:
  Refactored. Now uses less logic for startup/shutdown.
storage/csv/ha_tina.cc:
  Refactored init/deinit to use less code.
storage/example/ha_example.cc:
  Refactored example to show correct behavior for init/deinit.
storage/example/ha_example.h:
  Removed unneeded references to methods that do not need to be implemened.
storage/federated/ha_federated.cc:
  Refactored to use less code and startup/shutdown correctly.
2006-11-19 18:01:54 -08:00
unknown
1fbe1fc3b0 Merge mysql.com:/home/hf/work/mysql-5.0-0mrg
into  mysql.com:/home/hf/work/mysql-5.1-mrg


client/mysqltest.c:
  Auto merged
include/my_time.h:
  Auto merged
include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/include/deadlock.inc:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
Makefile.am:
  SCCS merged
mysql-test/t/order_by.test:
  SCCS merged
mysql-test/t/type_newdecimal.test:
  merging
2006-11-19 22:26:36 +04:00
unknown
934a231825 merging
mysql-test/t/disabled.def:
  meging bug
2006-11-18 21:49:59 +04:00
unknown
2ff157dbee Bug #24403 valgrind complained on uninited st_table, rbr + innodb
open_table_from_share did not initialize table->record members. that was
  interpreted as the error by valgrind.
  
  Fixed with bzero-ing the members if compilation with -DHAVE_purify.


sql/table.cc:
  zeroing memory allocated for table->record[]
2006-11-17 23:44:14 +02:00
unknown
e46dbc9b52 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456


mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-17 21:32:08 +01:00
unknown
b84e9d10b4 Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).


mysql-test/r/func_time.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/gis.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/grant2.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/innodb_notembedded.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/ps.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/query_cache.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/query_cache_notembedded.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/rpl_sp.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Move test for SF-calls in different replication modes to its own file, rpl_sf.
mysql-test/r/rpl_sp_effects.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/r/sp.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/r/timezone2.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/func_time.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/gis.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/t/grant2.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/innodb_notembedded.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/ps.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/query_cache_notembedded.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/rpl_sp_effects.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
mysql-test/t/sp.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Mark function as DETERMINISTIC so it can be called with no error while
  doing statement-based replication (SBR).
mysql-test/t/timezone2.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Modify test that contains non-deterministic functions so it can still be
  called with no error while doing statement-based replication (SBR).
sql/item_func.cc:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  If 'log_bin_trust_function_creators' variable is set, don't throw an error
  on calling a non-deterministc function in statement-based replication (SBR).
sql/sql_parse.cc:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Do not throw an error on calling a NON DETERMINISTIC stored procedure (SP)
  while doing statement-based replication (SBR), as the routine body is
  executed statement-by-statement.
mysql-test/r/rpl_sf.result:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Test for stored function (SF) calls in different replication modes.
  NON DETERMINISTIC SFs are not allowed while doing
  statement-based replication (SBR).
mysql-test/t/rpl_sf.test:
  Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
  
  Test for stored function (SF) calls in different replication modes.
  NON DETERMINISTIC SFs are not allowed while doing
  statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
unknown
476eaae84d Bug#19194 (Right recursion in parser for CASE causes excessive stack usage,
limitation)

Note to the reviewer
====================

Warning: reviewing this patch is somewhat involved.
Due to the nature of several issues all affecting the same area,
fixing separately each issue is not practical, since each fix can not be
implemented and tested independently.
In particular, the issues with
- rule recursion
- nested case statements
- forward jump resolution (backpatch list)
are tightly coupled (see below).

Definitions
===========

The expression
  CASE expr
  WHEN expr THEN expr
  WHEN expr THEN expr
  ...
  END
is a "Simple Case Expression".

The expression
  CASE
  WHEN expr THEN expr
  WHEN expr THEN expr
  ...
  END
is a "Searched Case Expression".

The statement
  CASE expr
  WHEN expr THEN stmts
  WHEN expr THEN stmts
  ...
  END CASE
is a "Simple Case Statement".

The statement
  CASE
  WHEN expr THEN stmts
  WHEN expr THEN stmts
  ...
  END CASE
is a "Searched Case Statement".

A "Left Recursive" rule is like
  list:
      element
    | list element
    ;

A "Right Recursive" rule is like
  list:
      element
    | element list
    ;

Left and right recursion produces the same language, the difference only
affects the *order* in which the text is parsed.

In a descendant parser (usually written manually), right recursion works
very well, and is typically implemented with a while loop.
In an ascendant parser (yacc/bison) left recursion works very well,
and is implemented naturally by the parser stack.
In both cases, using the wrong type or recursion is very bad and should be
avoided, as it causes technical issues with the parser implementation.

Before this change
==================

The "Simple Case Expression" and "Searched Case Expression" were both
implemented by the "when_list" and "when_list2" rules, which are left
recursive (ok).

These rules, however, used lex->when_list instead of using the parser stack,
which is more complex that necessary, and potentially dangerous because
of other rules using THD::reset_lex.

The "Simple Case Statement" and "Searched Case Statements" were implemented
by the "sp_case", "sp_whens" and in part by "sp_proc_stmt" rules.
Both cases were right recursive (bad).

The grammar involved was convoluted, and is assumed to be the results of
tweaks to get the code generation to work, but is not what someone would
naturally write.

In addition, using a common rule for both "Simple" and "Searched" case
statements was implemented with sp_head::m_flags |= IN_SIMPLE_CASE,
which is a flag and not a stack, and therefore does not take into account
*nested* case statements. This leads to incorrect generated code, and either
a server crash or an incorrect result.

With regards to the backpatch mechanism, a *different* backpatch list was
created for each jump from "WHEN expr THEN stmt" to "END CASE", which
relied on the grammar to be right recursive.
This is a mis-use of the backpatch list, since this list can resolve
multiple references to the same target at once.

The optimizer algorithm used to detect dead code in the "assembly" SQL
instructions, implemented by sp_head::opt_mark(uint ip), was recursive
in some cases (a conditional jump pointing forward to another conditional
jump).
In case of specially crafted code, like
- a long list of "IF expr THEN stmt END IF"
- a long CASE statement
this would actually cause a server crash with a stack overflow.
In general, having a stack that grows proportionally with user data (the
SQL code given by the client in a CREATE PROCEDURE) is to be avoided.

In debug builds only, creating a SP / SF / Trigger which had a significant
amount of code would spend --literally-- several minutes in sp_head::create,
because of the debug code involved with DBUG_PRINT("info", ("Code %s ...
There are several issues with this code:
- in a CASE with 5 000 WHEN, there are 15 000 instructions generated,
  which create a sting representation of the code which is 500 000 bytes
  long,
- using a String instead of an io stream causes performances to degrade
  to a total server freeze, as time is spent doing realloc of a buffer
  always too short,
- Printing a 500 000 long string in the debug log is too verbose,
- Generating this string even when DBUG_PRINT is off is useless,
- Having code that potentially can affect the server behavior, used with
  #ifdef / #endif is useful in some cases, but is also a bad practice.

After this change
=================

"Case Expressions" (both simple and searched) have been simplified to
not use LEX::when_list, which has been removed.

Considering all the issues affecting case statements, the grammar for these
has been totally re written.

The existing actions, used to generate "assembly" sp_inst* code, have been
preserved but moved in the new grammar, with the following changes:

a) Bison rules are no longer shared between "Simple" and "Searched" case
statements, because a stack instead of a flag is required to handle them.
Nested statements are handled naturally by the parser stack, which by
definition uses the correct rule in the correct context.
Nested statements of the opposite type (simple vs searched) works correctly.
The flag sp_head::IN_SIMPLE_CASE is no longer used.
This is a step towards resolution of WL#2999, which correctly identified
that temporary parsing flags do not belong to sp_head.
The code in the action is shared by mean of the case_stmt_action_xxx()
helpers.

b) The backpatch mechanism, used to resolve forward jumps in the generated
code, has been changed to:
- create a label for the instruction following 'END CASE',
- register each jump at the end of a "WHEN expr THEN stmt" in a *unique*
  backpatch list associated with the 'END CASE' label
- resolve all the forward jumps for this label at once.

In addition, the code involving backpatch has been commented, so that a
reader can now understand by reading matching "Registering" and "Resolving"
comments how the forward jumps are resolved and what target they resolve to,
as this is far from evident when reading the code alone.

The implementation of sp_head::opt_mark() has been revised to avoid
recursive calls from jump instructions, and instead add the jump location
to the list of paths to explore during the flow analysis of the instruction
graph, with a call to sp_head::add_mark_lead().
In addition, the flow analysis will stop if an instruction has already
been marked as reachable, which the previous code failed to do in the
recursive case.
sp_head::opt_mark() is now private, to prevent new calls to this method from
being introduced.

The debug code present in sp_head::create() has been removed.
Considering that SHOW PROCEDURE CODE is also available in debug builds,
and can be used anytime regardless of the trace level, as opposed to
"CREATE PROCEDURE" time and only if the trace was on,
removing the code actually makes debugging easier (usable trace).

Tests have been written to cover the parser overflow (big CASE),
and to cover nested CASE statements.


mysql-test/r/sp-code.result:
  Test cases for nested CASE statements.
mysql-test/t/sp-code.test:
  Test cases for nested CASE statements.
sql/sp_head.cc:
  Re factored opt_mark() to avoid recursion, clean up.
sql/sp_head.h:
  Re factored opt_mark() to avoid recursion, clean up.
sql/sql_lex.cc:
  Removed when_list.
sql/sql_lex.h:
  Removed when_list.
sql/sql_yacc.yy:
  Minor clean up for case expressions,
  Major re write for case statements (Bug#19194).
mysql-test/r/sp_stress_case.result:
  New test for massive CASE statements.
mysql-test/t/sp_stress_case.sh:
  New test for massive CASE statements.
mysql-test/t/sp_stress_case.test:
  New test for massive CASE statements.
2006-11-17 12:14:29 -07:00
unknown
092b8f9e9e Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/mysql-5.1-mrg


BitKeeper/deleted/.del-bdb-deadlock.test:
  Auto merged
Makefile.am:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/deadlock.inc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
client/mysqltest.c:
  merging
include/my_time.h:
  merging
libmysql/libmysql.c:
  merging
mysql-test/t/order_by.test:
  merging
sql/sql_yacc.yy:
  merging
2006-11-17 19:01:35 +04:00
unknown
45989298ee Merge mysql.com:/home/hf/work/mysql-5.0-mrg
into  mysql.com:/home/hf/work/mysql-5.1-mrg


Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql.h:
  Auto merged
BitKeeper/deleted/.del-bdb-deadlock.test:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/include/deadlock.inc:
  SCCS merged
mysql-test/t/disabled.def:
  merging
sql/item.cc:
  merging
2006-11-17 18:27:28 +04:00
unknown
0aad12d99e Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/lib/mtr_cases.pl:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
mysql-test/mysql-test-run.pl:
  Use remote
2006-11-17 14:45:08 +01:00
unknown
14abceaa75 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-11-17 12:47:16 +01:00
unknown
e90bf5647f Merge bk-internal:/home/bk/mysql-5.1-new-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-11-17 12:43:30 +01:00
unknown
9260b74ee6 Merge 192.168.0.4:mysql/bug22958/my50-bug22958
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


sql/mysqld.cc:
  Auto merged
2006-11-17 12:38:52 +01:00
unknown
bde03bcec4 merging 2006-11-17 11:15:40 +04:00
unknown
96ad04dec0 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg


BitKeeper/deleted/.del-mysql_client.test:
  Auto merged
include/mysql.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
include/my_time.h:
  merging
libmysql/libmysql.c:
  merging
mysql-test/t/order_by.test:
  merging
2006-11-17 10:30:16 +04:00
unknown
779f9feda8 Fix of debbuging mode of query cache (proposed by Monty reviewed by me).
sql/sql_cache.cc:
  Call of BLOCK_UNLOCK_WR() moved before query_cache.check_integrity() call which privent lock of query cache during debugging.
  Comments added.
2006-11-17 08:18:10 +02:00
unknown
e971334ece Merge mysql.com:/home/hf/work/mysql-4.1-mrg
into  mysql.com:/home/hf/work/mysql-5.0-mrg


client/mysqltest.c:
  Auto merged
mysql-test/t/flush.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/status.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql-common/client.c:
  Auto merged
Makefile.am:
  merging
BitKeeper/deleted/.del-mysql_client.test:
  merging
include/mysql.h:
  SCCS merged
libmysql/libmysql.c:
  merging
libmysqld/lib_sql.cc:
  merging
mysql-test/r/order_by.result:
  SCCS merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/order_by.test:
  merging
mysql-test/t/subselect.test:
  SCCS merged
sql/item_subselect.cc:
  merging
sql/item_subselect.h:
  merging
sql/protocol.cc:
  merging
sql/sql_class.h:
  merging
2006-11-16 23:16:44 +04:00
unknown
f224238f8a Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-22684


sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-11-16 10:06:36 -07:00
unknown
17c238a15b Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1-mrg


include/mysql.h:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_class.h:
  Auto merged
Makefile.am:
  merging
client/mysqltest.c:
  merging
mysql-test/t/mysql_client.test:
  merging
2006-11-16 20:44:37 +04:00
unknown
2975d65cd8 Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could
only accept a constant for some parameters.

After this change, this restriction has been removed. An implication is that
these functions can also be used in prepared statements.

The change consist of changing the following classes:
- Item_func_benchmark
- Item_func_encode
- Item_func_decode
- Item_func_format
to:
- only accept Item* in the constructor,
- and evaluate arguments during calls to val_xxx()
which fits the general design of all the other functions.

The 'TODO' items identified in item_create.cc during the work done for
Bug 21114 are addressed by this fix, as a natural consequence of aligning
the design.

In the 'func_str' test, a single very long test line involving an explain
extended select with many functions has been rewritten into multiple
separate tests, to improve maintainability.
The result of explain extended select decode(encode(...)) has changed,
since the encode and decode functions now print all their parameters.


mysql-test/r/func_str.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/parser.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/ps.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/func_str.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/parser.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/ps.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_create.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
2006-11-16 09:03:47 -07:00
unknown
b81f37ed21 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  example.com:/work/bug24219/my51
2006-11-16 16:44:08 +01:00
unknown
3d958eb1af Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug24219/my50


sql/sql_table.cc:
  Auto merged
2006-11-16 16:37:07 +01:00
unknown
6ce5681b12 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  example.com:/work/bug24219/my41
2006-11-16 16:29:06 +01:00
unknown
8bb9d5894b Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-11-16 16:22:29 +01:00
unknown
ec71e89aa9 Add the two new functions to udf_example.def so they will be exported by dll's 2006-11-16 16:19:29 +01:00
unknown
902ce6fc8b Merge mysql.com:/usr/home/ram/work/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/mysql-5.1-maint


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-16 18:13:27 +04:00
unknown
8639c18f4d after-merge fixup.
- have to explicitly set null_value.
2006-11-16 18:09:34 +04:00
unknown
05a2da2c1a Merge example.com:/work/bug24219/my50
into  example.com:/work/bug24219/my51


mysql-test/t/alter_table.test:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/alter_table.result:
  manual merge
2006-11-16 14:16:32 +01:00
unknown
d63fa0a407 Fix for bug#24219 ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
(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.
2006-11-16 14:01:51 +01:00
unknown
0b3eee81df Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string


BUILD/SETUP.sh:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/item_timefunc.cc:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/mysqld.cc.rej:
  manual merge
2006-11-16 14:38:45 +02:00
unknown
f754fd2543 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug23653/my41-bug23653
2006-11-16 16:19:10 +04:00
unknown
09fc514bd5 Fix for bug#24219 ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
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.
2006-11-16 13:18:37 +01:00
unknown
3ea5628b11 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
2006-11-16 16:17:29 +04:00
unknown
153421fb06 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/usr/home/ram/work/bug23653/my51-bug23653


mysql-test/r/func_time.result:
  Auto merged
2006-11-16 16:15:33 +04:00
unknown
7d8b858eed Merge mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
into  mysql.com:/usr/home/ram/work/bug23653/my51-bug23653


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-16 16:11:21 +04:00
unknown
096631a3d3 Merge mysql.com:/usr/home/ram/work/bug23653/my41-bug23653
into  mysql.com:/usr/home/ram/work/bug23653/my50-bug23653


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-11-16 15:26:33 +04:00
unknown
a4823607f9 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047


sql/item_strfunc.cc:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
mysql-test/t/func_str.test:
  Manual merge.
2006-11-16 14:19:37 +03:00
unknown
5cb0011de7 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug17047


sql/item_cmpfunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_in.result:
  Manual merge.  Add "End of <version> tests" marker.
mysql-test/r/func_str.result:
  Manual merge.  Add "End of <version> tests" marker.
mysql-test/t/func_in.test:
  Manual merge.  Add "End of <version> tests" marker.
mysql-test/t/func_str.test:
  Manual merge.  Add "End of <version> tests" marker.
2006-11-16 14:13:03 +03:00
unknown
af22eb35e5 Add 5.0 part of fix for bug 17047.
mysql-test/r/func_str.result:
  Add result for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
mysql-test/t/func_str.test:
  Add test case for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
sql/item_strfunc.cc:
  Add Item_str_func::fix_fields() implementation, and set maybe_null to
  TRUE if we are in the SQL mode that requires some functions to return
  null even if they normally do not.
sql/item_strfunc.h:
  Add declaration of Item_str_func::fix_fields().
  Do not reset maybe_null in Item_func_char::fix_length_and_dec().
2006-11-16 14:06:51 +03:00
unknown
ec845335ac Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047


sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/func_in.result:
  Manual merge.  Add "End of 5.0 tests".
mysql-test/t/func_in.test:
  Manual merge.  Add "End of 5.0 tests".
2006-11-16 13:25:55 +03:00
unknown
e40e8052e8 BUG#17047: CHAR() and IN() can return NULL without signaling NULL result
The problem was that some functions (namely IN() starting with 4.1, and
CHAR() starting with 5.0) were returning NULL in certain conditions,
while they didn't set their maybe_null flag.  Because of that there could
be some problems with 'IS NULL' check, and statements that depend on the
function value domain, like CREATE TABLE t1 SELECT 1 IN (2, NULL);.

The fix is to set maybe_null correctly.


mysql-test/r/func_in.result:
  Add result for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
mysql-test/t/func_in.test:
  Add test case for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
sql/item_cmpfunc.cc:
  Remove assignment to maybe_null, as it was already set in fix_fields()
  based on all arguments, not only on the first.
2006-11-16 13:21:38 +03:00
unknown
a0672f0674 Merge romeo.(none):/home/bkroot/mysql-5.1
into  romeo.(none):/home/bk/memcheck-mysql-5.1


sql/sql_class.cc:
  Auto merged
2006-11-16 08:47:47 +01:00
unknown
3e0eee1d7b Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-arch
into  zim.(none):/home/brian/mysql/unmerge-5.1
2006-11-15 18:04:35 -08:00
unknown
97ec4aa687 This finished the bzero() on varchar patch I wrote a few months ago. It also completes the data_length() method I added to Fields to determine the length of data for a particular data type. I have many uses for this :)
mysql-test/r/archive.result:
  Added test case results.
mysql-test/t/archive.test:
  Added varchar specifc test case.
sql/field.cc:
  Just corrected interface.
sql/field.h:
  Completed data_length() call.
storage/archive/ha_archive.cc:
  Corrected warnings, and finished bzero() patch
2006-11-15 17:55:17 -08:00
unknown
0586acd05d Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-18239


mysql-test/t/sp.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-11-15 11:24:57 -07:00
unknown
5f1fc19b9e Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


sql/item_func.cc:
  Auto merged
2006-11-15 12:29:24 -05:00
unknown
ab6d44374e Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug19955/my50-bug19955
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


sql/item_func.cc:
  Auto merged
2006-11-15 12:27:09 -05:00
unknown
011513bd49 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug19955/my50-bug19955
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug19955/my51-bug19955


mysql-test/r/bigint.result:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-11-15 12:24:21 -05:00
unknown
3be6493aab Bug#19955: unsigned bigint used as signed with MOD function
Problem:  When we have a really large number (between 2^63 and 2^64)
as the left side of the mod operator, it gets improperly corerced
into a signed value.

Solution:  Added check to see if the "negative" number is really
positive, and if so, cast it.


mysql-test/r/bigint.result:
  Added test case result
mysql-test/t/bigint.test:
  Added test case
sql/item_func.cc:
  Added check to see if we have an unsigned number that looks like a
  signed number.
2006-11-15 12:23:07 -05:00
unknown
09ee05568b Changeset to fix a valgrind error in the main tree.
Adding class to handle temporary allocate of memory during write of rows.
Eliminating cut'n-paste error between THD::binlog_{write,update,delete}_row().


sql/sql_class.cc:
  Adding class to handle temporary allocate of memory during write of rows.
  Eliminating cut'n-paste error between THD::binlog_{write,update,delete}_row().
2006-11-15 16:49:03 +01:00
unknown
4a3ac57363 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/rpl_sp.result:
  manual merge
2006-11-15 15:47:29 +01:00
unknown
b846af899d bug #24301 Next command hangs in mysql after creating new NDB table via LIKE operation.: Locked mutex LOCK_open during operation 2006-11-15 12:05:05 +01:00
unknown
497e7c3ac1 bug #21495 Alter table from x engine to ndb and back can cause issue with drop DB:added error printout to log 2006-11-15 11:38:22 +01:00
unknown
a3b373600a bug #21495 Alter table from x engine to ndb and back can cause issue with drop DB:disable distributed drop database if a database contains local tables 2006-11-15 11:13:49 +01:00
unknown
bedfbf87c5 BUG#23576, Table is created although tablespace does not exist
sql/ha_ndbcluster.cc:
  if use tablespace, that also means store on disk, so pass tablespace's name to ndb,
  then will get a error from ndb and its cause;
2006-11-15 13:43:02 +08:00
unknown
418fd54843 Bug#18239 (Possible to overload internal functions with stored functions)
Bug#21025 (misleading error message when creating functions named 'x', or 'y')
Bug#22619 (Spaces considered harmful)

This change contains a fix to report warnings or errors, and multiple tests
cases.

Before this fix, name collisions between:
- Native functions
- User Defined Functions
- Stored Functions
were not systematically reported, leading to confusing behavior.

I) Native / User Defined Function

Before this fix, is was possible to create a UDF named "foo", with the same
name as a native function "foo", but it was impossible to invoke the UDF,
since the syntax "foo()" always refer to the native function.
After this fix, creating a UDF fails with an error if there is a name
collision with a native function.

II) Native / Stored Function

Before this fix, is was possible to create a SF named "db.foo", with the same
name as a native function "foo", but this was confusing since the syntax
"foo()" would refer to the native function. To refer to the Stored Function,
the user had to use the "db.foo()" syntax.
After this fix, creating a Stored Function reports a warning if there is a
name collision with a native function.

III) User Defined Function / Stored Function

Before this fix, creating a User Defined Function "foo" and a Stored Function
"db.foo" are mutually exclusive operations. Whenever the second function is
created, an error is reported. However, the test suite did not cover this
behavior.
After this fix, the  behavior is unchanged, and is now covered by test cases.

Note that the code change in this patch depends on the fix for Bug 21114.


mysql-test/r/sp.result:
  New test cases.
mysql-test/r/udf.result:
  New test cases.
mysql-test/t/sp.test:
  New test cases.
mysql-test/t/udf.test:
  New test cases.
sql/sql_lex.cc:
  Name collisions with native functions.
sql/sql_lex.h:
  Name collisions with native functions.
sql/sql_yacc.yy:
  Name collisions with native functions.
sql/share/errmsg.txt:
  Name collisions with native functions.
mysql-test/r/sp_gis.result:
  New test cases.
mysql-test/t/sp_gis.test:
  New test cases.
2006-11-14 19:34:16 -07:00
unknown
f3a877abbc Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.1-maint-16456


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-15 01:58:11 +01:00
unknown
beea123546 Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
calling (rather than defining) non-deterministic SP in SBR (as opposed
to RBR or mixed) will throw an error now.

require mixed mode for tests now. SBR will now fail when calling
non-deter SPs and SFs (as it should), and RBR already failed by virtue of
giving different results for "show binlog" than the results-file has.
also test for 16456 now. lastly make amends because one of the tests
fails with a new error # now as code was added to sql_trigger.cc while
test was disabled.


mysql-test/mysql-test-run.pl:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  mtr falsely assumed that default rep mode is stmt i/o mixed?
mysql-test/r/func_time.result:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  rpl_sp.test was disabled for a while; update results where wording has
  changed and add results for #16456
mysql-test/r/rpl_sp.result:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  rpl_sp.test was disabled for a while; update results where wording has
  changed and add results for #16456
  ---
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  calling (rather than defining) non-deterministic SP or SF in SBR
  (as opposed to RBR or mixed) will throw an error now.
mysql-test/t/disabled.def:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  re-enable rpl_sp.test
mysql-test/t/rpl_sp.test:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  require mixed mode for tests now. SBR will now fail when calling
  non-deter SPs (as it should), and RBR already failed by virtue of
  giving different results for "show binlog" than the results-file has.
  also test for 16456 now. lastly make amends because one of the tests
  fails with a new error # now as code was added to sql_trigger.cc while
  test was disabled.
  ---
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  calling (rather than defining) non-deterministic SP or SF in SBR
  (as opposed to RBR or mixed) will throw an error now.
sql/item_func.cc:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  calling (rather than defining) non-deterministic SF in SBR
  (as opposed to RBR or mixed) will throw an error now.
sql/sql_parse.cc:
  Bug#16456 "RBR: rpl_sp.test expects query to fail, but passes in RBR"
  
  calling (rather than defining) non-deterministic SP in SBR (as opposed
  to RBR or mixed) will throw an error now.
2006-11-15 01:27:39 +01:00
unknown
327a9f1805 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  example.com:/work/bug23760/my50


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-14 20:48:48 +01:00
unknown
768d6f52e8 Merge example.com:/work/bug23760/my50
into  example.com:/work/bug23760/my51


mysql-test/t/sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/sp.result:
  manual merge
2006-11-14 19:10:29 +01:00
unknown
645aac545e Fix for bug#23760 ROW_COUNT() and store procedure not owrking together
The problem was that THD::row_count_func was zeroed too. It was zeroed
as a fix for bug 4905 "Stored procedure doesn't clear for "Rows affected"
However, the proper solution is not to zero, because THD::row_count_func has
been set to -1 already in mysql_execute_command(), a later fix, which obsoletes
the incorrect fix of #4095


mysql-test/r/sp.result:
  update result
mysql-test/t/sp.test:
  test for bug#23760 ROW_COUNT() and store procedure not owrking together
sql/sql_parse.cc:
  Remove zeroing for thd->row_count_func
  The fix for #4905 wasn't right. Now, it's ok without this zeroing
  because if there was an error THD::
2006-11-14 18:40:11 +01:00
unknown
1019dd404c Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
The regression is caused by the fix for bug 14767. When INSERT ... SELECT
used a view in the SELECT list that was not inlined, and there was an 
active transaction, the server could crash in Query_cache::invalidate.

On INSERT ... SELECT only the table being inserted into is invalidated.
Thus views that can't be inlined are skipped from invalidation.

The bug manifests itself in two ways so there is 2 test cases.
One checks that the only the table being inserted into is invalidated.
And the second one checks that there is no crash on INSERT ... SELECT.


mysql-test/t/query_cache.test:
  Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
mysql-test/r/query_cache.result:
  Added a test case for bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view
sql/sql_parse.cc:
  Bug#20045: Server crash on INSERT ... SELECT ... FROM non-mergeable view 
  On INSERT ... SELECT only the table being inserted into is invalidated.
2006-11-14 19:50:44 +03:00
unknown
cfe679b318 Merge dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/5.0
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/merge_50_1


sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
2006-11-14 13:04:40 +02:00
unknown
d149fc30d0 bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
ver 5.0 and 5.1 refinement.
adding to the MAX_SIZE_LOG_EVENT_STATUS estimation status vars and 
EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN


sql/log_event.cc:
  assertion on size of status vars
sql/log_event.h:
  MAX_SIZE_LOG_EVENT_STATUS as the max bytes of contribution of status vars into repl
  message; MAX_SIZE_LOG_EVENT_STATUS is getting more wrt to 4.1 version.
2006-11-14 12:48:17 +02:00
unknown
541e9c9ac5 Bug#23703 (DROP TRIGGER needs an IF EXISTS)
This change set implements the DROP TRIGGER IF EXISTS functionality.

This fix is considered a bug and not a feature, because without it,
there is no known method to write a database creation script that can create
a trigger without failing, when executed on a database that may or may not
contain already a trigger of the same name.

Implementing this functionality closes an orthogonality gap between triggers
and stored procedures / stored functions (which do support the DROP IF
EXISTS syntax).

In sql_trigger.cc, in mysql_create_or_drop_trigger,
the code has been reordered to:
- perform the tests that do not depend on the file system (access()),
- get the locks (wait_if_global_read_lock, LOCK_open)
- call access()
- perform the operation
- write to the binlog
- unlock (LOCK_open, start_waiting_global_read_lock)

This is to ensure that all the code that depends on the presence of the
trigger file is executed in the same critical section,
and prevents race conditions similar to the case fixed by Bug 14262 :

- thread 1 executes DROP TRIGGER IF EXISTS, access() returns a failure
- thread 2 executes CREATE TRIGGER
- thread 2 logs CREATE TRIGGER
- thread 1 logs DROP TRIGGER IF EXISTS

The patch itself is based on code contributed by the MySQL community,
under the terms of the Contributor License Agreement (See Bug 18161).


mysql-test/r/rpl_trigger.result:
  DROP TRIGGER IF EXISTS
mysql-test/r/trigger.result:
  DROP TRIGGER IF EXISTS
mysql-test/t/rpl_trigger.test:
  DROP TRIGGER IF EXISTS
mysql-test/t/trigger.test:
  DROP TRIGGER IF EXISTS
sql/sql_trigger.cc:
  DROP TRIGGER IF EXISTS
sql/sql_yacc.yy:
  DROP TRIGGER IF EXISTS
2006-11-13 15:40:22 -07:00
unknown
5e508a35d5 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my51-bug18761
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/etc/collapsed:
  auto-union
sql/item_func.cc:
  Auto merged
2006-11-13 13:19:49 -05:00
unknown
1aad990179 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my50-bug18761
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
sql/item_func.cc:
  Auto merged
2006-11-13 13:19:13 -05:00
unknown
3d02114824 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my50-bug18761
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my51-bug18761


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/udf_example.c:
  Auto merged
2006-11-13 13:17:02 -05:00
unknown
154c6e0677 Bug#18761: constant expression as UDF parameters not passed in as constant
The code that set up data to be passed to user-defined functions was very
old and analyzed the "Type" of the data that was passed into the UDF, when
it really should analyze the "return_type", which is hard-coded for simple
Items and works correctly for complex ones like functions.
---
Added test at Sergei's behest.


mysql-test/r/udf.result:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
mysql-test/t/udf.test:
  Verify that various arguments work.
  ---
  Added test at Sergei's behest.
sql/item_func.cc:
  For function-Items, test whether it is constant and set the struct members 
  for the UDF parameter appropriately.
  
  Replace tabs with spaces in affected code.
sql/udf_example.c:
  Include a simple function that is useful in testing.
2006-11-13 13:13:44 -05:00
unknown
739a761399 Merge mysql.com:/home/bk/MERGE/mysql-5.0-merge
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge


BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/slave.cc:
  Manual merge
2006-11-13 17:59:51 +01:00
unknown
1613ad2c98 Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/log_event.h:
  Manual merge
sql/slave.cc:
  Manual merge
2006-11-13 17:54:01 +01:00
unknown
173d093a2b Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b18581-mysql-5.1-new-rpl


sql/ha_ndbcluster_binlog.cc:
  Auto merged
2006-11-13 15:48:39 +01:00
unknown
8a7db87e4b Fixing problem in injector code making NDB tests fire an assertion.
sql/ha_ndbcluster_binlog.cc:
  Removing extreneous setting of current_stmt_binlog_row_based.
sql/rpl_injector.cc:
  Since current_stmt_binlog_row_based is reset as the end of a transaction
  it needs to be set at the beginning of a transaction.
2006-11-13 15:42:01 +01:00
unknown
e56742d7a9 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B19216-4.1-opt
2006-11-13 15:40:19 +02:00
unknown
c07065b330 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values. 5.1 re-implementation 2006-11-13 12:56:45 +01:00
unknown
36dfa434cc Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.1-merge


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2006-11-13 12:45:31 +01:00
unknown
181c9b4dd4 Merge mysql.com:/home/bkroot/mysql-5.0-rpl
into  mysql.com:/home/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
2006-11-13 12:44:53 +01:00
unknown
8fd48ccec0 Merge mysql.com:/home/bkroot/mysql-4.1-rpl
into  mysql.com:/home/bk/MERGE/mysql-4.1-merge
2006-11-13 12:44:24 +01:00
unknown
ea7921f68a Small adjustment after merging fix for bug#23651 "Server crashes when
trigger which uses stored function invoked from different connections"
into 5.1.


sql/item_func.cc:
  After merge fix. Starting from 5.1 TABLE_SHARE for dummy TABLE object
  is also allocated in Item_func_sp constructor, so we use TABLE::alias
  instead of TABLE::s to check that dummy TABLE was not initialized yet
  or requires re-initialization.
2006-11-13 14:30:12 +03:00
unknown
421f4c0907 WL#3368 mixed binlog_format default
An amendment for parsing argument in case NDB is compiled and active.
  NDB switches from mixed to row-based and back per each query. The previous patch
  was not aware of such behaviour and made exceptional assingment to row-based when
  no command line arg --binlog-format provided.
  
  Removing #if HAVE_NDB_BINLOG block alltogether: ndb supports mixed and if server 
  was build without NDB using binlog nothing to care.
  Test for this piece of code is rather specific. While there is active bug23110
  ndb_alter_table and some other should fail if no explict --binlog-format is given:
  mysql-test-run ndb_alter_table


sql/mysqld.cc:
  ndb accepts mixed binlog_format switching to row internally via calling
  thd->set_binlog_format_row_if_mixed at the beginning and careful
  the->reset_current_stmt_binlog_row_based(). There is 
  bug#23110 to implement it all carefully for DDL.
2006-11-13 13:20:35 +02:00
unknown
9b50b66219 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/merge_50


sql/log_event.cc:
  Auto merged
2006-11-13 12:45:47 +02:00
unknown
92a3ed719e Merge macbook.gmz:/Users/kgeorge/mysql/work/B19216-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B19216-5.0-opt


sql/protocol.h:
  Auto merged
sql-common/client.c:
  Auto merged
BitKeeper/deleted/.del-mysql_client.test:
  merge 4.1->5.0
sql/protocol.cc:
  merge 4.1->5.0
2006-11-13 12:44:56 +02:00
unknown
f53af7b8e5 Bug #19216: Client crashes on long SELECT
The server sends a number of columns to the client.
 It uses a limited "fast" function for that instead of the
 general one. This fast function cannot send numbers larger 
 than 2 bytes. 
 This causes the client to expect smaller number of columns. 
 The client writes outside of the allocated memory buffer 
 as a result.
 Fixed the server to use the general function to send column
 count.
 Fixed the client to check the column count before writing
 column data. 


mysql-test/t/mysql_client.test:
  Bug #19216: Client crashes on long SELECT
   - test case
sql/protocol.cc:
  Bug #19216: Client crashes on long SELECT
   - renamed the function for bether comprehention
     and made it local
   - used the right (non-local) function to transfer 
     the column count in Protocol::send_fields
sql/protocol.h:
  Bug #19216: Client crashes on long SELECT
   - made optimized net_store_length local
sql-common/client.c:
  Bug #19216: Client crashes on long SELECT
   - fixed the client to check for older servers (without the fix).
2006-11-13 12:28:55 +02:00
unknown
458fb082d0 Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651
into  mockturtle.local:/home/dlenev/src/mysql-5.1-merge


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-11-13 11:29:40 +03:00
unknown
1031c460de Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg23651


sql/item_func.cc:
  Auto merged
2006-11-13 11:15:02 +03:00
unknown
fc83f787cb Fix for bug bug#23651 "Server crashes when trigger which uses
stored function invoked from different connections".

Invocation of trigger which was using stored function from different
connections caused server crashes (for non-debug server this happened
in highly concurrent environment, but debug server failed on assertion
in relatively simple scenario).

Item_func_sp was not safe to use in triggers (in other words for
re-execution from different threads) as artificial TABLE object
pointed by Item_func_sp::dummy_table referenced incorrect THD
object. To fix the problem we force re-initialization of this
object for each re-execution of statement.


mysql-test/r/trigger.result:
  Added test for bug#23651 "Server crashes when trigger which uses
  stored function invoked from different connections".
mysql-test/t/trigger.test:
  Added test for bug#23651 "Server crashes when trigger which uses
  stored function invoked from different connections".
sql/item_func.cc:
  To make Item_func_sp safe for usage in triggers (in other words safe
  for re-execution in different threads) we need to ensure that artificial
  TABLE object pointed by Item_func_sp::dummy_table references correct
  THD object. To achieve this we simply force its re-initialization for
  each re-execution of statement.
2006-11-13 11:10:49 +03:00
unknown
57ba34ff8a bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
comments are fixed as was suggested in reviews.


sql/log_event.h:
  fixing comments
sql/slave.cc:
  fixing comments
sql/sql_repl.cc:
  fixing comments
2006-11-12 20:01:58 +02:00
unknown
c0c14155ee Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my51-bug22860
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


sql/mysqld.cc:
  Auto merged
2006-11-11 09:02:01 -05:00
unknown
236ed28ebf Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my50-bug22860
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-11 09:01:09 -05:00
unknown
82ad1db0af Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my50-bug22860
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my51-bug22860


BitKeeper/etc/collapsed:
  auto-union
sql/mysqld.cc:
  Auto merged
2006-11-11 08:58:24 -05:00
unknown
4f4b46456a Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my41-bug22860
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug22860/my50-bug22860


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BitKeeper/etc/collapsed:
  'Auto converge'
sql/mysqld.cc:
  manual merge
2006-11-11 08:57:26 -05:00
unknown
45256b35d6 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch


include/mysql/plugin.h:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
configure.in:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-11-11 02:25:40 +01:00
unknown
bfefdaf0f3 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-arch
into  zim.(none):/home/brian/mysql/merge-5.1


configure.in:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2006-11-10 17:25:39 -08:00
unknown
81d3eb5440 This patch fixes the example engine, the example parser, and the example daemon to compile. AKA You can now test that the interface is actually working :)
configure.in:
  Removed unneeded call to old plugin syntax.
include/mysql/plugin.h:
  Updates for daemon type (and fixed warning on declare end).
plugin/fulltext/Makefile.am:
  Updated names so that we can install and test it.
plugin/fulltext/plugin_example.c:
  Fixed wrong call.
sql/mysqld.cc:
  Removed old have_example (we don't need it any longer).
sql/set_var.cc:
  Removed old have_example
sql/sql_plugin.cc:
  Added support for DAEMON type (just an internal raw plugin)
storage/example/plug.in:
  Removed example static build so that we can test dynamic engines
plugin/daemon_example/AUTHORS:
  New BitKeeper file ``plugin/daemon_example/AUTHORS''
plugin/daemon_example/ChangeLog:
  New BitKeeper file ``plugin/daemon_example/ChangeLog''
plugin/daemon_example/Makefile.am:
  New BitKeeper file ``plugin/daemon_example/Makefile.am''
plugin/daemon_example/NEWS:
  New BitKeeper file ``plugin/daemon_example/NEWS''
plugin/daemon_example/README:
  New BitKeeper file ``plugin/daemon_example/README''
plugin/daemon_example/configure.in:
  New BitKeeper file ``plugin/daemon_example/configure.in''
plugin/daemon_example/daemon_example.c:
  New BitKeeper file ``plugin/daemon_example/daemon_example.c''
plugin/daemon_example/plug.in:
  New BitKeeper file ``plugin/daemon_example/plug.in''
plugin/fulltext/plug.in:
  Added plug.in file so that we compile fulltext example!
2006-11-10 17:21:59 -08:00
unknown
93e1030ddd Bug #22860: Option --memlock should be revisited
Support says that memlock doesn't work on OSes other than Solaris.  
Add a warning about --memlock to the crash monologue.


sql/mysqld.cc:
  On a crash when --memlock was active, emit advice about the insta-
  bility of that parameter.
2006-11-10 16:36:08 -05:00
unknown
a1ff523974 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-11-10 14:51:01 -05:00
unknown
55bc5ffac1 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug20691/my51-bug20691
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-11-10 14:49:43 -05:00
unknown
00e781c8cc Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug20691/my50-bug20691
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-10 14:48:37 -05:00
unknown
9e2e4f7dd2 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug20691/my50-bug20691
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug20691/my51-bug20691


mysql-test/r/default.result:
  Auto merged
sql/item.cc:
  Auto merged
2006-11-10 14:48:07 -05:00
unknown
cb80733a89 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
mysql-test/t/rename.test:
  choose one of the race problem solutions. It was solved
  differently in -runtime and mainstream
2006-11-10 15:05:38 +03:00
unknown
bbc5d13891 fixed bad 5.0->5.1 merge 2006-11-10 12:43:44 +02:00
unknown
00d96458b7 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb


client/mysqldump.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
sql/sql_class.h:
  Fixed indentation
2006-11-10 11:38:54 +01:00
unknown
19d61b1b81 Bug#20691: DATETIME col (NOT NULL, NO DEFAULT) may insert garbage when \
specifying DEFAULT

This was not specific to datetime.  When there is no default value 
for a column, and the user inserted DEFAULT, we would write 
uninitialized memory to the table.  

Now, insist on writing a default value, a zero-ish value, the same 
one that comes from inserting NULL into a not-NULL field.

(This is, at best, really strange behavior that comes from allowing 
sloppy usage, and serves as a good reason always to run one's server 
in a strict SQL mode.)


mysql-test/r/default.result:
  Verify that all kinds of types work, even others other than datetime.
mysql-test/t/default.test:
  Verify that all kinds of types work, even others other than datetime.
sql/item.cc:
  Even if we warn that there is no default value in the table definition,
  we have to insert /something/.
2006-11-09 18:33:58 -05:00
unknown
a5975941a4 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B20191-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-11-09 18:03:49 +02:00
unknown
59b45b5b0a Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
When compiling GROUP BY Item_ref instances are dereferenced in 
setup_copy_fields(), i.e. replaced with the corresponding Item_field 
(if they point to one) or Item_copy_string for the other cases.
Since the Item_ref (in the Item_field case) is no longer used the information
about the aliases stored in it is lost.   
Fixed by preserving the column, table and DB alias on dereferencing Item_ref


mysql-test/r/metadata.result:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - test case
mysql-test/t/metadata.test:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - test case
sql/item.cc:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - use the table and db name to fill up the metadata for columns
sql/sql_select.cc:
  Bug #20191: getTableName gives wrong or inconsistent result when using VIEWs
   - preserve the field, table and DB name on dereferencing an Item_ref
2006-11-09 16:55:42 +02:00
unknown
69d8bfe231 Fix for bug #23653: Crash if last_day('0000-00-00')
As get_arg0_date() in the Item_func_last_day::get_date() returns 
0000-00-00 date sometimes, we have to check ltime->month for 0 after the call.


mysql-test/r/func_time.result:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - test result.
mysql-test/t/func_time.test:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - test case.
sql/item_timefunc.cc:
  Fix for bug #23653: Crash if last_day('0000-00-00')
    - return error if month is 0.
2006-11-09 16:17:50 +04:00
unknown
463e9409bb Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/8663/my51-8663


mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-11-09 16:10:15 +04:00
unknown
27aa4489ad Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2006-11-09 16:08:31 +04:00
unknown
f90f1e306f Bug#19371 VARBINARY() have trailing zeros after upgrade from 4.1
- Detect if a table has field of type MYSQL_TYPE_VAR_STRING while running
   "CHECK TABLE t FOR UPGRADE" and indicate it need to be fixed
   with "REPAIR TABLE t".
 - When running a "REPAIR TABLE t" or "ALTER TABLE t FORCE" on the above
   table, install a special copy function to trim off the trailing spaces
   which we safely can say that the pre 5.0 mysqld didn't put there. 


mysql-test/r/varbinary.result:
  Add test to see that a table with varbinary from 4.1 can be REPAIRED
mysql-test/t/varbinary.test:
  Add test to see that a table with varbinary from 4.1 can be REPAIRED
sql/field_conv.cc:
  Add new field copy function 'do_field_varbinary_pre50' used for copying
  between MYSQL_TYPE_VAR_STRING and MYSQL_TYPE_VARCHAR. It will remove trailing
  spaces from the field as MySQL <= 4.1 never stores the trailing spaces for
  a MYSQL_TYPE_VAR_STRING.
  Install this new copy function in ALTER TABLEs list of functions to use for
  copying data during and alter if from field is a <= 4.1 varbinary and to
  field is 5.0 varbinary.
sql/handler.cc:
  If the table has a pre 5.0 varbinary, table not to be altered so the field
  type is upgraded to 5.0 version and trailing space can be trimmed.
mysql-test/std_data/bug19371.MYD:
  New BitKeeper file ``mysql-test/std_data/bug19371.MYD''
mysql-test/std_data/bug19371.MYI:
  New BitKeeper file ``mysql-test/std_data/bug19371.MYI''
mysql-test/std_data/bug19371.frm:
  New BitKeeper file ``mysql-test/std_data/bug19371.frm''
2006-11-09 12:00:27 +01:00
unknown
d4f4301126 Merge mysql.com:/usr/home/bar/mysql-5.0.b21505
into  mysql.com:/usr/home/bar/mysql-5.1.b21505


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-11-09 14:46:01 +04:00
unknown
7614eb0d1d Bug#21505 Create view - illegal mix of collation for operation 'UNION'
The problem was that any VIEW columns had always implicit derivation.
  Fix: derivation is now copied from the original expression
  given in VIEW definition.
  For example:
  - a VIEW column which comes from a string constant
    in CREATE VIEW definition have now coercible derivation.
  - a VIEW column having COLLATE clause
    in CREATE VIEW definition have now explicit derivation.


mysql-test/r/ctype_utf8.result:
  Adding test case
mysql-test/t/ctype_utf8.test:
  Adding test case
sql/field.cc:
  Copying derivation from item to field.
sql/field.h:
  Adding derivation and methods to get/set it into Field.
sql/item.cc:
  Copying derivation from field to item.
sql/item.h:
  Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/mysql_priv.h:
  Moving "enum Derivation" declaration from item.h to mysql_priv.h
sql/sql_select.cc:
  Copying derivation from item to field in
  create_tmp_field_from_item() and create_tmp_field().
2006-11-09 14:41:34 +04:00
unknown
81369793df Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/g51
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
vio/viosslfactories.c:
  Auto merged
2006-11-09 00:28:31 +01:00
unknown
6004231787 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/g50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
2006-11-09 00:26:22 +01:00
unknown
78be2cdcbe Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2006-11-08 22:20:58 +03:00
unknown
69ac4dbaa1 Merge mysql.com:/usr/home/bar/mysql-5.0.b23451
into  mysql.com:/usr/home/bar/mysql-5.1.b23451


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-08 22:14:36 +04:00
unknown
a39b8a064e after merge fix for bug 23451.
sql/item_sum.cc:
  after merge fix.
2006-11-08 22:08:50 +04:00
unknown
1144a46631 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1-rpl
into  mysql.com:/usr/home/bar/mysql-4.1.b23451v2


mysql-test/t/func_gconcat.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-08 22:03:08 +04:00
unknown
1df2059462 merging
sql/field.cc:
  here we can get negative values
2006-11-08 20:41:47 +04:00
unknown
75d86b93b5 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my51-bug10963
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-11-08 10:19:02 -05:00
unknown
eca59e1faf Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my50-bug10963
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-11-08 10:18:16 -05:00
unknown
d75c784ec2 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my50-bug10963
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my51-bug10963


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2006-11-08 10:12:06 -05:00
unknown
3a86738289 Bug#10963: LEFT/RIGHT/SUBSTR/.. string functions returns wrong result \
on large length
  
Problem:  Most (all) of the numeric inputs were being coerced into
int (32 bit) sized variables.  Works OK for sane inputs; any input
larger than 2^32 (or 2^31 for signed vars) exihibited predictable
wrapping behavior (up to about 10^18) and then started having really
strange behaviour past that point (since the conversion to 64 bit int
from the DECIMAL type can do weird things on out of range numbers).

Solution: 1)  Add many tests.  2)  Convert input from (u)long type to
(u)longlong.  3)  Do (sometimes multiple) sanity checks on input,
keeping in mind that sometimes a negative longlong is not a negative
longlong (if the unsigned_flag is set).  4) Emulate existing behavior
w/rt negative and "small" out-of-bounds values.


mysql-test/r/func_str.result:
  Additional test results for #10963
mysql-test/t/func_str.test:
  Additional test results for #10963
sql/item_func.cc:
  Used larger type for counting, to avoid truncation.
sql/item_strfunc.cc:
  Fix for #10963, including comments and cleaned up logic
2006-11-08 10:11:02 -05:00
unknown
90d14d50a9 Merge mysql.com:/home/hf/work/mysql-5.0.clean
into  mysql.com:/home/hf/work/mysql-5.1.clean


include/my_time.h:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/gis-rtree.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/my_decimal.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/records.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/type_newdecimal.result:
  SCCS merged
mysql-test/t/type_newdecimal.test:
  merging
sql/item.cc:
  merging
sql/item_subselect.cc:
  SCCS merged
sql/item_timefunc.h:
  merging
sql/sql_lex.cc:
  SCCS merged
sql/sql_select.h:
  merging
2006-11-08 19:09:39 +04:00
unknown
163c2a604f bug#23542 crash on DELETE from ndb dd table: uses_blob_value always reads write_set, should check read_set if read operation 2006-11-08 15:09:35 +01:00
unknown
6bae01057c Merge mysql.com:/usr/home/bar/mysql-4.1.b23451v2
into  mysql.com:/usr/home/bar/mysql-5.0.b23451


mysql-test/r/func_gconcat.result:
  after merge fix
mysql-test/t/func_gconcat.test:
  after merge fix
sql/item_sum.cc:
  after merge fix
2006-11-08 17:03:37 +04:00
unknown
3e0139d957 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug8804-pfix
2006-11-08 14:43:17 +03:00
unknown
3f40c19deb Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-ndb
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
2006-11-08 11:53:21 +01:00
unknown
4a3d614352 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


configure.in:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
2006-11-08 11:40:33 +01:00
unknown
29aae3e801 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1
2006-11-08 11:34:34 +01:00
unknown
6befbec8bc Merge dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/4.1/bug19402-max_allowed
into  dsl-hkibras-fe30f900-107.dhcp.inet.fi:/home/elkin/MySQL/TEAM/BARE/mysql-4.1-rpl


sql/slave.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
2006-11-08 09:57:20 +02:00
unknown
42c2a2cb50 fix runtime warning of freeing null ptr
sql/sql_show.cc:
  fix warning during mysql-test-run of freeing null pointer
2006-11-08 17:09:16 +11:00
unknown
1d2e456f59 BUG#24056: Crash in subquery:
Don't assume that condition that was pushed down into subquery has 
produced exactly one KEY_FIELD element - it could produce several or
none at all, handle all of those cases.
2006-11-08 02:26:50 +03:00
unknown
9c73436b2e Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B11032-5.0-opt
2006-11-07 21:25:49 +02:00
unknown
3763edd393 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


BitKeeper/etc/collapsed:
  auto-union
include/m_ctype.h:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
unittest/mytap/tap.c:
  Auto merged
sql/log_event.cc:
  manual merge
sql/sql_class.cc:
  manual merge
2006-11-07 19:26:31 +01:00
unknown
878b4a3af4 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0.clean
2006-11-07 21:03:45 +04:00
unknown
955e0b1304 bug fixed
sql/field.cc:
  datatime length is 19, not 12
2006-11-07 21:02:41 +04:00
unknown
5ad3ed8c19 Merge macbook.gmz:/Users/kgeorge/mysql/work/B11032-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B11032-5.0-opt


mysql-test/r/subselect.result:
  merge fixes
mysql-test/t/subselect.test:
  merge fixes
sql/item_subselect.cc:
  merge fixes
sql/item_subselect.h:
  merge fixes
2006-11-07 18:44:37 +02:00
unknown
5af4fd2563 Bug #11032: getObject() returns a String for a sub-query of type datetime
- When returning metadata for scalar subqueries the actual type of the
   column was calculated based on the value type, which limits the actual
   type of a scalar subselect to the set of (currently) 3 basic types : 
   integer, double precision or string. This is the reason that columns
   of types other then the basic ones (e.g. date/time) are reported as
   being of the corresponding basic type.
   Fixed by storing/returning information for the column type in addition
   to the result type.


mysql-test/r/subselect.result:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - test case
mysql-test/t/subselect.test:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - test case
sql/item_subselect.cc:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - store and return the field type as well in addition to result type for 
     single row subqueries
sql/item_subselect.h:
  Bug #11032: getObject() returns a String for a sub-query of type datetime
   - store and return the field type as well in addition to result type for 
     single row subqueries
2006-11-07 18:16:17 +02:00
unknown
807d6c0950 bug#21507 I can't create a unique hash index in NDB: Added possibillity to create hash only indexes with NULL valued attributes, but any NULL valued access will become full table scan with pushed condition on index attribute values 2006-11-07 16:38:37 +01:00
unknown
c0487fb970 item.cc:
merge fixes


sql/item.cc:
  merge fixes
2006-11-07 14:39:20 +01:00
unknown
12ed25e7e3 Automerge fix.
sql/sql_view.cc:
  Manually merged.
2006-11-07 16:25:57 +03:00
unknown
e50678f1ce Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-2


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/kill.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/time.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manually merged.
sql/sql_parse.cc:
  Manually merged.
2006-11-07 16:24:35 +03:00
unknown
c6de4d1c3b Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-11-07 12:02:53 +01:00
unknown
4d37f9b56a Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/item.cc:
  Auto merged
mysql-test/r/order_by.result:
  SCCS merged
2006-11-07 11:53:48 +01:00
unknown
b4093b65be Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt


configure.in:
  Auto merged
include/my_time.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/rename.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/rename.test:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-11-07 13:45:56 +03:00
unknown
d9360eae3b Bug#23451 GROUP_CONCAT truncates a multibyte utf8 character
Problem: GROUP_CONCAT on a multi-byte column can truncate
  in the middle of a multibyte character when applying
  group_concat_max_len limit. It produces an invalid
  multi-byte character in the result string.
  
The second, easier version - reusing old "warning_for_row" flag,
instead of introducing of "result_is_full" - which was
added in the previous commit.


mysql-test/r/func_gconcat.result:
  Adding test case
mysql-test/t/func_gconcat.test:
  Adding test case
sql/item_sum.cc:
  Adding well_formed_len() call not to cut
      in the middle of a multi-byte character.
2006-11-07 12:45:48 +04:00
unknown
29c614459e Merge mysql.com:/usr/home/ram/work/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/mysql-5.1-maint


sql/slave.cc:
  merging
2006-11-07 12:12:59 +04:00
unknown
03618c710e Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug19736/my50-bug19736
2006-11-07 11:49:09 +04:00
unknown
9691a43cc8 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-arch


sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2006-11-07 06:59:51 +01:00
unknown
c13142f556 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663


mysql-test/r/gis-rtree.result:
  Auto merged
2006-11-07 09:41:08 +04:00
unknown
c0718d7301 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


sql/item_func.h:
  Auto merged
2006-11-06 20:42:28 -05:00
unknown
31a3edf1e2 Fix after merge. 2006-11-06 20:41:18 -05:00
unknown
c7902f9c88 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my50-bug23411
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my51-bug23411


BitKeeper/etc/collapsed:
  auto-union
mysql-test/r/func_test.result:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-11-06 17:46:50 -05:00
unknown
8f8ee04b14 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my41-bug23411
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug23411/my50-bug23411


BitKeeper/deleted/.del-collapsed~fbec3523369aae99:
  Delete: BitKeeper/etc/collapsed
BitKeeper/etc/collapsed:
  'Auto converge'
mysql-test/r/func_test.result:
  Manual merge.
mysql-test/t/func_test.test:
  Manual merge.
sql/item_func.cc:
  Manual merge.
2006-11-06 17:45:47 -05:00
unknown
2b35fee8ab Bug#23411: ... MOD-ing zero returns strange result
The Item_func_mod objects never had maybe_null set, so users had no reason 
to expect that they can be NULL, and may therefore deduce wrong results.
Now, set maybe_null.


mysql-test/r/func_test.result:
  Verify that the predictions are true.
mysql-test/t/func_test.test:
  Verify that the predictions are true.
sql/item_func.cc:
  MOD functions may be NULL.
2006-11-06 17:13:19 -05:00
unknown
030d080d8b bug #19491 (5.0-related additional fixes)
include/my_time.h:
  we need to use it outside the my_time.cc
mysql-test/r/gis-rtree.result:
  result fixed
sql-common/my_time.c:
  'static' removed
sql/field.cc:
  checks for invalid datetimes added
2006-11-06 22:33:18 +04:00
unknown
f9c6368e48 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663


mysql-test/r/type_newdecimal.result:
  merging
mysql-test/t/type_newdecimal.test:
  merging
2006-11-06 15:04:58 +04:00
unknown
c8ac3b7ccc Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/8663/my51-8663
2006-11-06 15:00:10 +04:00
unknown
c0c56d13aa Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663


sql/item_func.cc:
  Auto merged
2006-11-06 14:57:47 +04:00
unknown
10dd1a371d Merge abotchkov@production.mysql.com:mysql-5.0-opt
into  mysql.com:/home/hf/work/21790/my50-21790


mysql-test/t/gis-rtree.test:
  Auto merged
mysql-test/r/gis-rtree.result:
  merging
2006-11-06 11:16:13 +04:00