Commit graph

8130 commits

Author SHA1 Message Date
unknown
c8ef55cc41 Manual merge of fix for bug #6081 "Call to deprecated mysql_create_db() function crashes
server" with main tree.


sql/sql_parse.cc:
  Auto merged
2004-10-22 20:21:56 +04:00
unknown
1cd249e0ed Followup to fix for bug#6050: fix valgrind warnings.
sql/item.cc:
  Fix valgrind errors: we need Item::name to point to PS memory
  as well.
sql/item.h:
  set_field no longer can be reused as is for PS purposes.
sql/sql_union.cc:
  Item_field::set_field -> Item_field::reset_field.
2004-10-22 20:21:55 +04:00
unknown
4ff9b60597 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzfix


sql/sql_parse.cc:
  Auto merged
2004-10-22 20:21:55 +04:00
unknown
1c67dea5ae Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1
sql/sql_parse.cc:
  Auto merged
2004-10-22 18:46:35 +03:00
unknown
bc6652db9b Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)


client/mysql.cc:
  Fix compiler warnings
client/mysqltest.c:
  Fix wrong counting of lines
  Remove compiler warnings
heap/hp_hash.c:
  Fix compiler warnings
innobase/dict/dict0load.c:
  Fix compiler warnings
innobase/include/mem0mem.h:
  Fix compiler warnings
libmysql/client_settings.h:
  Fix compiler warnings
myisam/ft_nlq_search.c:
  Add comments about compiler warnings
myisam/rt_index.c:
  Add comments about compiler warnings
myisam/rt_mbr.c:
  Add comments about compiler warnings
mysql-test/r/ps.result:
  Test case for bug#6094
mysql-test/t/ps.test:
  Test case for bug#6094
mysys/hash.c:
  Fix compiler warnings
mysys/my_handler.c:
  Add comments about compiler warnings
mysys/my_thr_init.c:
  Add comments about compiler warnings
ndb/include/mgmapi/mgmapi.h:
  Fix compiler warnings
regex/main.c:
  Fix compiler warnings
sql/item.h:
  Fix compiler warnings
sql/item_func.h:
  Add comments about compiler warnings
sql/spatial.h:
  Add comments about compiler warnings
sql/sql_lex.h:
  Fix compiler warning
sql/sql_list.h:
  Fix compiler warning
sql/sql_parse.cc:
  Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT
  (Bug #6094)
sql/sql_prepare.cc:
  Remove not needed empty line
sql/sql_string.h:
  Fix compiler warnings
strings/ctype-mb.c:
  Fix compiler warnings
2004-10-22 18:44:51 +03:00
unknown
dd126ba1a5 Part of fix for bug #6081 "Call to deprecated mysql_create_db() function
crashes server"

(in 4.0 we fix only connection stalling in case of error, crash itself is
fixed in 4.1, the test case for this code is also there).


sql/sql_parse.cc:
  Handling of COM_CREATE_DB, COM_DROP_DB:
  We should call send_error() if mysql_create_db or mysql_drop_db
  return error (like we do it for SQL versions of these commands).
2004-10-22 19:27:43 +04:00
unknown
b24dd93366 handler.cc:
Typos in comments.


sql/handler.cc:
  Typos in comments.
2004-10-22 09:19:08 -05:00
unknown
ca8be36f3a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-6050


sql/sql_class.h:
  Auto merged
2004-10-22 15:59:58 +04:00
unknown
4512a46e65 A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field
names with ident. tables fr. diff. schemata": revise all uses of
Item_field and make them prepared-statements friendly when necessary.


mysql-test/r/ps.result:
  Test results fixed: the test case for Bug#6050
mysql-test/r/ps_1general.result:
  Test results fixed: in prepared statements we expand '*' to a list
  of fully qualified fields (db.table.column).
mysql-test/t/ps.test:
  A test for Bug#6050 "EXECUTE stmt reports ambiguous fieldnames with 
  ident. tables fr. diff. schemata"
sql/item.cc:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/item.h:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/sql_base.cc:
  Item_field use changed to be prepared statements friendly.
sql/sql_class.h:
  New check of Item_arena state.
sql/sql_union.cc:
  Fixing the problem with name resolving in UNION and prepared statements:
  In case of SELECT a, b, c FROM t1 UNION SELECT a, b, c FROM t2 the list of
  selected items is represented as a List<Item_field>, where each 
  Item_field points to a field of temporary table.
  But the temporary table is created anew on each execution of the prepared 
  statement. So on each subsequent execution we should reset Item_field
  items to point to fields from freshly-created temporary table.
sql/table.h:
  Comment TABLE member.
2004-10-22 14:47:35 +04:00
unknown
25f1344f8c Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1


ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
2004-10-22 11:01:11 +02:00
unknown
746e6e53e7 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into gw.mysql.r18.ru:/usr/home/ram/work/5.0
2004-10-22 12:48:37 +05:00
unknown
e5c610d6d2 A fix (bug #5999 Typo in code, wrong config variable naming).
mysql-test/r/rpl_auto_increment.result:
  A fix (bug #5999 Typo in code, wrong config variable naming).
  Typo fixed.
sql/set_var.cc:
  A fix (bug #5999 Typo in code, wrong config variable naming).
  Typo fixed.
2004-10-22 12:47:32 +05:00
unknown
83a00d2ea9 Merge mysql.com:/home/bk/mysql-4.1
into mysql.com:/users/kboortz/daily/work/mysql-4.1-purify2
2004-10-22 08:57:20 +02:00
unknown
d71efcfdd6 sql_parse.cc:
Bug#6167 One element missing in 'uc_update_queries[]'


sql/sql_parse.cc:
  Bug#6167 One element missing in 'uc_update_queries[]'
2004-10-22 08:54:14 +02:00
unknown
58aa05e23e Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-view-5.0


sql/item_strfunc.h:
  Auto merged
sql/table.h:
  Auto merged
2004-10-22 09:53:08 +03:00
unknown
ac8c655bd8 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1
2004-10-22 07:58:04 +03:00
unknown
bcf7b58318 Show table status now shows creation time of the table for InnoDB. Note that
this timestamp might not be the correct time because e.g. ALTER TABLE
changes this timestamp.


sql/ha_innodb.cc:
  Do not show check_time and update_time because we do not really know them.
  UPDATE, INSERT and CHECK TABLE do not change these timestamps.
2004-10-22 07:52:52 +03:00
unknown
485141ce7a Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2004-10-21 14:47:40 -07:00
unknown
a3212379de ps.result:
Post-merge fixes.
sql_select.cc:
  Post-merge cleanup.


sql/sql_select.cc:
  Post-merge cleanup.
mysql-test/r/ps.result:
  Post-merge fixes.
2004-10-21 14:46:40 -07:00
unknown
e6e1600ec9 Check of temporary tables hiding for query fetched from QC (BUG#6084)
mysql-test/r/query_cache.result:
  hiding real table stored in query cache by temporary table
mysql-test/t/query_cache.test:
  hiding real table stored in query cache by temporary table
sql/sql_cache.cc:
  Check of temporary tables hiding for query fetched from QC
sql/sql_cache.h:
  Key length now stored in table record of query cache
2004-10-21 23:56:12 +03:00
unknown
4d204f4303 added support of view and CHECK OPTION of view to LOAD DATA (BUG#5996)
mysql-test/r/view.result:
  LOAD DATA with view and CHECK OPTION
mysql-test/t/view.test:
  LOAD DATA with view and CHECK OPTION
sql/log_event.cc:
  new parameter for load data
sql/mysql_priv.h:
  new parameter for load data
sql/sql_lex.cc:
  LOAD DATA supported by view
sql/sql_load.cc:
  added support of view and CHECK OPTION of view to LOAD DATA
sql/sql_parse.cc:
  new parameter for CHECK OPTION
2004-10-21 21:53:27 +03:00
unknown
8537cf2f4b Fix for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone* tables".

We are excluding implicitly used time zone tables from privilege
checking.


mysql-test/r/timezone2.result:
  Added test for bug #6116 "SET time_zone := ... requires access to 
  mysql.time_zone tables"
mysql-test/t/timezone2.test:
  Added test for bug #6116 "SET time_zone := ... requires access to 
  mysql.time_zone tables"
sql/sql_parse.cc:
  check_table_access(): we should avoid privilege checking for implicitly
  used time zone tables.
sql/tztime.cc:
  Indicated dependancy between my_tz_get_table_list() function and
  my_tz_check_n_skip_implicit_tables() function.
sql/tztime.h:
  Added my_tz_check_n_skip_implicit_tables() function which allows easily
  determine whenever we have found beggining of the list of implicitly used
  time zone tables and fast-forward to its end.
2004-10-21 22:18:00 +04:00
unknown
7864ea211d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-6059
2004-10-21 19:57:23 +04:00
unknown
149fda59dd new behaviour of CHECK option build, for mor efficience and more correct:
check option build only according most top VIEW  CHECK OPTION TYPE  (BUG#5993)


mysql-test/r/view.result:
  CASCADED should be used for all underlaying VIEWs
mysql-test/t/view.test:
  CASCADED should be used for all underlaying VIEWs
sql/sql_base.cc:
  new behaviour of CHECK option build, for mor efficience and more correct.
sql/table.cc:
  new behaviour of CHECK option build, for mor efficience and more correct.
sql/table.h:
  new behaviour of CHECK option build, for mor efficience and more correct.
2004-10-21 18:10:59 +03:00
unknown
d604eb9932 ha_innodb.cc:
Remove compiler warning 'skip_auto_inc_decr' : unreferenced local variable in Visual C++; of course, I still have to check Monty's auto-inc patch in whole


sql/ha_innodb.cc:
  Remove compiler warning 'skip_auto_inc_decr' : unreferenced local variable in Visual C++; of course, I still have to check Monty's auto-inc patch in whole
2004-10-21 18:01:13 +03:00
unknown
315b7d89eb A fix (bug #6138: MOD operator should not round non-integral argument). 2004-10-21 19:52:55 +05:00
unknown
c8ad5215ea Manual merge.
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
tests/client_test.c:
  Manual merge
2004-10-21 18:44:40 +04:00
unknown
506f648b3a A fix and test case for bug#6059 "mysql_stmt_field_count returns
positive numbers when no resultset is available": when sending
result set metadata we need to use virtual select_result::send_fields, 
and not address protocol directly, because select_result descendents may 
intercept result set (it's the case for example for SELECT INTO OUTFILE).


sql/sql_class.h:
  A fix for bug#6059 "mysql_stmt_field_count returns positive numbers 
  when no resultset is available": introducing select_result::field_count()
  method to report actual number of fields in a result set, if any result
  set is sent to client.
sql/sql_prepare.cc:
  A fix for bug#6059 "mysql_stmt_field_count returns 
  positive numbers when no resultset is available": when sending
  result set metadata we need to use virtual select_result::send_fields, 
  and not address protocol directly, because select_result descendents may 
  intercept result set (it's the case for example for SELECT INTO OUTFILE).
  Now we need to always have lex->result set if we're in prepared statements.
tests/client_test.c:
  A test case for Bug#6059 "mysql_stmt_field_count returns positive 
  numbers when no resultset is available"
2004-10-21 18:33:53 +04:00
unknown
0ea0422907 value should be checked after 'before' trigger work (BUG#5992)
mysql-test/r/view.result:
  changing value by trigger and CHECK OPTION
mysql-test/t/view.test:
  changing value by trigger and CHECK OPTION
sql/sql_insert.cc:
  value should be checked after 'before' trigger work
2004-10-21 17:05:45 +03:00
unknown
81b97c4887 SHOW TABLE STATUS now prints create_time, update_time and check_time
for InnoDB tables. Note that these times may always be correct ones,
because for example ALTER TABLE creates a table again.



innobase/include/os0file.h:
  Added information of file timestamps and a function os_file_get_status
  to get that information using stat().
innobase/os/os0file.c:
  Added function that return information obout the specified file.
sql/ha_innodb.cc:
  Get timestamps for the file where the table is stored.
2004-10-21 14:57:43 +03:00
unknown
2aad30394d inserting single value with check option failed always get error (part of BUG#5995)
mysql-test/r/view.result:
  inserting single value with check option failed always get error
mysql-test/t/view.test:
  inserting single value with check option failed always get error
sql/sql_insert.cc:
  inserting single value with check option failed always get error
2004-10-21 14:32:10 +03:00
unknown
e9c3bc7616 fixed default behaviour of WITH CHECK OPTIONS according to standard (BUG#5989)
mysql-test/r/view.result:
  fixed default behaviour of WITH CHECK OPTIONS according to standard
sql/sql_yacc.yy:
  fixed default behaviour of WITH CHECK OPTIONS according to standard
2004-10-21 13:39:17 +03:00
unknown
9a702d8a31 compile fixes for butch
ndb/src/mgmsrv/ConfigInfo.cpp:
  Better cast
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Add default arg
sql/ha_ndbcluster.cc:
  reorder methods, so that they are not used prior to declaration
  (inlines)
2004-10-21 12:39:08 +02:00
unknown
adc1bff4f8 Allow inheriting check options if view have not WHERE clause (BUG#5988)
mysql-test/r/view.result:
  test of cascaded check option for whiew without WHERE clause
mysql-test/t/view.test:
  test of cascaded check option for whiew without WHERE clause
sql/table.cc:
  Allow inheriting check options if view have not WHERE clause
2004-10-21 13:30:25 +03:00
unknown
0b01d95d21 fixed printing of substring_index (BUG#5911)
mysql-test/r/func_str.result:
  fixed printing of substring_index
mysql-test/r/view.result:
  test of substring_index with view
mysql-test/t/view.test:
  test of substring_index with view
sql/item_strfunc.h:
  fixed printing of substring_index
2004-10-21 13:11:15 +03:00
unknown
db4683c62e force assigning error handler for all mem_roots 2004-10-21 10:58:03 +03:00
unknown
433aec148f Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1


sql/ha_innodb.cc:
  Auto merged
2004-10-21 08:49:57 +03:00
unknown
b0cfdb95c5 func_test.result, item_cmpfunc.cc:
Fixed bug #6187: a wrong initial setting for const_item_cache
  in Item_cond::fix_fields.


sql/item_cmpfunc.cc:
  Fixed bug #6187: a wrong initial setting for const_item_cache
  in Item_cond::fix_fields.
mysql-test/r/func_test.result:
  Fixed bug #6187: a wrong initial setting for const_item_cache
  in Item_cond::fix_fields.
2004-10-20 14:52:30 -07:00
unknown
4e844b19c9 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/t/range.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
2004-10-20 13:17:06 -07:00
unknown
89865a0c27 opt_range.cc:
Post automerge correction.


sql/opt_range.cc:
  Post automerge correction.
2004-10-20 13:16:00 -07:00
unknown
ffd77c4679 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-10-20 17:31:59 +00:00
unknown
44db341fdb fix so that ndb handler can cope with char(0), mapped to char(1) for now 2004-10-20 17:22:58 +00:00
unknown
7b413078cc code clean-up. 2004-10-20 21:50:55 +05:00
unknown
53eb9871ad A fix (bug #6142: SELECT DISTINCT on key field crashes server)
sql/opt_range.cc:
  A fix (bug #6142: SELECT DISTINCT on key field crashes server)
  Code clean-up.
2004-10-20 21:01:52 +05:00
unknown
10a6020ee0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


libmysql/libmysql.c:
  Auto merged
2004-10-20 18:58:01 +03:00
unknown
79a9f6185a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-secfix


sql/mysql_priv.h:
  Auto merged
2004-10-20 17:37:46 +04:00
unknown
5382a18254 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-6049
2004-10-20 17:33:14 +04:00
unknown
560d7bcdd0 Merge with 4.0
BitKeeper/etc/logging_ok:
  auto-union
Docs/Support/texi2html:
  Auto merged
innobase/trx/trx0rec.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/sql_acl.cc:
  Keep old code
2004-10-20 16:24:28 +03:00
unknown
ec8779e95a Fix test case for innodb-lock
mysql-test/r/innodb-lock.result:
  Fix test case (old one didn't test things correctly)
mysql-test/t/innodb-lock.test:
  Fix test case (old one didn't test things correctly)
mysys/thr_lock.c:
  More debugging information
sql/mysqld.cc:
  Enable innodb_table_locks as default, as otherwise there is a possibility for deadlocks
sql/sql_base.cc:
  More debug information
2004-10-20 16:04:28 +03:00
unknown
1d3c05901a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-secfix


sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-10-20 17:02:15 +04:00
unknown
7c20b13288 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/kostja/work/mysql-4.1-6049


libmysql/libmysql.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
tests/client_test.c:
  Auto merged
2004-10-20 16:45:09 +04:00
unknown
b88150c96e Fix for bug #6173 "One can circumvent missing UPDATE privilege if
he has SELECT and INSERT privileges for table with primary key"

Now we set lex->duplicates= DUP_UPDATE right in parser if INSERT has
ON DUPLICATE KEY UPDATE clause, this simplifies insert_precheck()
function (this also fixes a bug) and some other code.


mysql-test/r/grant2.result:
  Added test for bug #6173 "One can circumvent missing UPDATE privilege if
  he has SELECT and INSERT privileges for table with primary key"
mysql-test/t/grant2.test:
  Added test for bug #6173 "One can circumvent missing UPDATE privilege if
  he has SELECT and INSERT privileges for table with primary key"
sql/mysql_priv.h:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause.
sql/sql_parse.cc:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause, so it can determine whenever it is needed to
  require UPDATE_ACL by itself. Also calling of mysql_insert() is
  simplified.
sql/sql_prepare.cc:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause, so it can determine whenever it is needed to
  require UPDATE_ACL by itself. Also calling of mysql_insert() is
  simplified.
sql/sql_yacc.yy:
  It is better to set Lex->duplicates= DUP_UPDATE right in parser if we
  have INSERT with ON DUPLICATE KEY UPDATE clause, rather doing this later.
2004-10-20 16:04:43 +04:00
unknown
9de6a750f0 Fixed a typo, which prevented non-valgrind build. 2004-10-20 13:52:56 +02:00
unknown
ed8ec2cf16 Code cleanups (done during review of new code)
Rename innodb_table_locks_old_behavior -> innodb_table_locks
Set innodb_table_locks to off by default to get same behaviour as in MySQL 4.0.20
(This means that Innodb ignore table locks by default, which makes it easier to combine MyISAM and InnoDB to simulate a transaction)


libmysql/libmysql.c:
  Use ulong instead of unsigned long
  Reuse _dig_vec()
myisam/myisampack.c:
  Simplify code
mysql-test/r/innodb-lock.result:
  new test case
mysql-test/t/innodb-lock.test:
  new test case
sql/ha_innodb.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/mysqld.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
  Set this off by default to get same behaviour as in MySQL 4.0.20
sql/set_var.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/sql_class.h:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
2004-10-20 11:24:08 +03:00
unknown
2da1cbd97d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.local:/home/my/mysql-4.1


client/mysqlimport.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
ndb/src/ndbapi/ndberror.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-10-20 02:55:03 +03:00
unknown
ca1a24e0ad fix for platforms that have lower_case_table_names == 2 2004-10-19 23:55:02 +00:00
unknown
a3e71bdbf5 Merge for post-merge fixes for Item_equal patch.
BitKeeper/etc/ignore:
  auto-union
mysql-test/r/range.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/t/range.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/item.h:
  Manual merge
sql/sql_select.cc:
  Manual merge
2004-10-19 16:07:10 -07:00
unknown
4736d0fe99 Review of all code pushed since last review
Simple optimzations and cleanups
Removed compiler warnings and fixed portability issues
Added client functions 'mysql_embedded()' to allow client to check if we are using embedded server
Fixes for purify


client/mysqlimport.c:
  Remove not used variable
client/mysqltest.c:
  Remove usage of MAXPATHLEN (all MySQL code uses FN_REFLEN)
  Simplified code
  Remove usage of sprintf("%llu") as this is not portable
include/mysql.h:
  Added mysql_embedded() to be able to easily check if we are using the embedded server
innobase/srv/srv0start.c:
  Don't use memcmp() when using purify (to avoid false warnings)
libmysql/libmysql.c:
  Added mysql_embedded() to be able to easily check if we are using the embedded server
libmysql/libmysql.def:
  Added mysql_embedded() to be able to easily check if we are using the embedded server
myisam/myisam_ftdump.c:
  Remove compiler warning
myisam/myisamchk.c:
  Remove compiler warning
myisam/rt_test.c:
  #ifdef not used code
mysys/hash.c:
  Remove compiler warning (from last push)
mysys/my_gethwaddr.c:
  Remove compiler warning
ndb/src/ndbapi/ndberror.c:
  #ifdef not used code
regex/regcomp.c:
  Remove not used code
regex/regcomp.ih:
  Remove not used code (to remove compiler warnings)
sql-common/client.c:
  Remove compiler warnings
sql/field.cc:
  Simple optimization
sql/ha_innodb.cc:
  Rename mysql_embedded -> mysqld_embedded
sql/item.cc:
  Fix comments
  Move variables first on block
  Remove else after return
  Simple optimizations
  (no logic changes)
sql/item_cmpfunc.cc:
  Added comment
sql/mysql_priv.h:
  Rename mysql_embedded -> mysqld_embedded
sql/mysqld.cc:
  Rename mysql_embedded -> mysqld_embedded
sql/sql_acl.cc:
  Added comments
  simple optimization
  Fixed 'very unlikely' bug when doing REVOKE ALL PRIVILEGES
sql/sql_select.cc:
  More comments
  Simple optimization
sql/sql_show.cc:
  Simple changes to make similar code similar
  More comments
sql/sql_string.cc:
  Trivial optimization and better code layout
strings/Makefile.am:
  Change xml.c to use bcmp to avoid warnings from purify
strings/xml.c:
  Change xml.c to use bcmp to avoid warnings from purify
tests/client_test.c:
  Remove usage of MAXPATHLEN (all MySQL code uses FN_REFLEN)
2004-10-20 01:28:42 +03:00
unknown
05933f13f7 table.h, sql_select.h:
Added the code processing on expressions for applying
  multiple equalities.
sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
Many files:
  Post-merge fixes for Item_equal patch.
item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
item.h, item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.


mysql-test/r/func_test.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/index_merge.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/join_nested.result:
  Post-merge fixes for Item_equal patch.
mysql-test/r/range.result:
  Post-merge fixes for Item_equal patch.
sql/item.cc:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/item.h:
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/item_cmpfunc.cc:
  Post-merge fixes for Item_equal patch.
  Fixed a problem when an equality field=const cannot be applied to
  the predicate P(field,c) for constant propagation as a conversion
  of field is needed.
sql/opt_range.cc:
  Post-merge fixes for Item_equal patch.
sql/sql_select.cc:
  Post-merge fixes for Item_equal patch.
  Added the code processing on expressions for applying
  multiple equalities.
sql/sql_select.h:
  Added the code processing on expressions for applying
  multiple equalities.
sql/table.h:
  Added the code processing on expressions for applying
  multiple equalities.
2004-10-19 14:12:55 -07:00
unknown
f0a6f2b6a5 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb-merge
2004-10-19 15:00:02 +00:00
unknown
4324519868 fixed retsult code 2004-10-19 11:54:33 +03:00
unknown
b42ab12527 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/j/mysql-4.1
2004-10-19 11:00:02 +03:00
unknown
c144e1a23c Fixed bug #5835 load data infile...replace error with InnoDB table.
sql/ha_innodb.cc:
  Note that LOAD DATA INFILE REPLACE also handles a duplicate key error
  itself, and we must not decrement the autoinc counter if we are
  performing that statement.
2004-10-19 09:58:41 +03:00
unknown
ad8865cbd7 sql_union.cc:
Check DERIVATION_NONE only for UNIONS.


sql/sql_union.cc:
  Check DERIVATION_NONE only for UNIONS.
2004-10-19 11:45:33 +05:00
unknown
272ff45362 sql_acl.cc:
BUG #5831 Revoke privileges in a loop until no more privileges are revoked, because acl_dbs and column_priv_hash can re-organize during privilege removal.


sql/sql_acl.cc:
  BUG #5831 Revoke privileges in a loop until no more privileges are revoked, because acl_dbs and column_priv_hash can re-organize during privilege removal.
2004-10-18 20:25:47 -05:00
unknown
0cef3945a4 ha_innodb.cc:
Replace a tolower() loop with innobase_casedn_str()


sql/ha_innodb.cc:
  Replace a tolower() loop with innobase_casedn_str()
2004-10-18 16:59:15 +03:00
unknown
bd5bafe1b6 compatibility fix
test results corrected


mysql-test/r/range.result:
  test results corrected
mysql-test/t/range.test:
  test results corrected
sql/opt_range.cc:
  compatibility fix
2004-10-18 15:32:06 +02:00
unknown
e49389334c InnoDB: Treat UTF-8 strings properly in case insensitive operations
innobase/dict/dict0dict.c:
  Use innobase_strcasecmp() and innobase_casedn_str()
  instead of ut_cmp_in_lower_case() and ut_cpy_in_lower_case()
innobase/include/ut0byte.h:
  Remove ut_cpy_in_lower_case() and ut_cmp_in_lower_case()
innobase/ut/ut0byte.c:
  Remove ut_cpy_in_lower_case() and ut_cmp_in_lower_case()
sql/ha_innodb.cc:
  Add innobase_strcasecmp() and innobase_casedn_str()
  Replace tolower() loop with innobase_casedn_str()
  Replace my_casedn_str() with innobase_casedn_str()
  Replace ut_cmp_in_lower_case() with innobase_strcasecmp()
2004-10-18 16:00:57 +03:00
unknown
1412365a3f Bug #6139 UNION doesn't understand collate in the column of second select 2004-10-18 17:56:25 +05:00
unknown
a8b7ac32d0 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-10-18 12:12:02 +00:00
unknown
a4d8ed871a Fix for broken --with-csv-storage-engine build.
Now we use TABLE::timestamp_field_type instead of
TABLE::timestamp_default_now/on_update_now for determining
if we should auto-set value of TIMESTAMP field during this operation.
We are also use Field_timestamp::set_time() instead of
handler::update_timestamp().


sql/examples/ha_example.cc:
  Now we use TABLE::timestamp_field_type instead of
  TABLE::timestamp_default_now/on_update_now for determining
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of
  handler::update_timestamp().
sql/examples/ha_tina.cc:
  Now we use TABLE::timestamp_field_type instead of
  TABLE::timestamp_default_now/on_update_now for determining
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of
  handler::update_timestamp().
2004-10-18 10:32:52 +04:00
unknown
38e717ea13 Merge dellis@bk-internal.mysql.com:/home/bk/mysql-4.0
into goetia.(none):/home/dellis/mysqlab/bk/mysql-4.0


BitKeeper/etc/logging_ok:
  auto-union
sql/mysqld.cc:
  Auto merged
2004-10-17 18:47:08 -05:00
unknown
5dfa8d859b mysqld.cc:
BUG #5731 key_buffer_size not properly restricted to 4GB; use UINT_MAX32 for clarity.


sql/mysqld.cc:
  BUG #5731 key_buffer_size not properly restricted to 4GB; use UINT_MAX32 for clarity.
2004-10-17 18:44:51 -05:00
unknown
07c7aadf44 Fix for bug #6081 "Call to deprecated mysql_create_db() function crashes
server".

Altough mysql_create_db()/mysql_drop_db() API calls are deprecated
since 4.0, they should not crash server and should not stall connection
in case of errors. 


sql/sql_parse.cc:
  Handling of COM_CREATE_DB, COM_DROP_DB:
    mysql_create_db() requires from its second parameter to be non-zero.
    We also should call send_error() if mysql_create_db or mysql_drop_db
    return error (like we do it for SQL versions of these commands).
tests/client_test.c:
  Added test for bug #6081 "Execution of deprecated mysql_create_db()
  crashes server".
2004-10-17 13:59:46 +04:00
unknown
221d51ebb1 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1
2004-10-16 08:17:50 +03:00
unknown
9aefc403f9 A fix and test case for Bug#6049 "Loss of sign when using prepared
statements and negative time/date values". 
The bug was in wrong sprintf format used in the client library.
The fix moves TIME -> string conversion functions to sql-common and
utilized them in the client library.


include/my_time.h:
  Declarations for new functions shared between the client and server.
libmysql/libmysql.c:
  Fix for Bug#6049 "Loss of sign when using prepared statements and negative
  time/date values": use the same function as the server to convert
  date/time/datetime values to strings.
sql-common/my_time.c:
  Implementation of my_{time,datetime,date,TIME}_to_str: it's
  needed by the client library, so it should be shared.
sql/field.cc:
  Don't create String object if it's not needed.
sql/item.cc:
  Don't create String object if it's not needed: TIME_to_string was
  moved to my_TIME_to_str, with different arguments.
sql/item_timefunc.cc:
  Don't create String object if it's not needed.
sql/mysql_priv.h:
  TIME_to_string and MAX_DATE_REP_LENGTH moved to the client library.
  MAX_DATE_REP_LENGTH was renamed to MAX_DATE_STRING_REP_LENGTH to not 
  conflict with the same name in libmysql.c
sql/protocol.cc:
  Don't create String object if it's not needed.
sql/time.cc:
  Implementation of my_{time,date,datetime,TIME}_to_str moved to my_time.c
  shared between the client and the server.
tests/client_test.c:
  A test case for Bug#6049.
2004-10-16 00:12:59 +04:00
unknown
09a895d933 Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-10-15 20:10:05 +02:00
unknown
f945555c17 Remove stale declaration, fix a typo in comment.
include/sql_common.h:
  Remove stale declaration.
2004-10-15 22:03:11 +04:00
unknown
4b379778c8 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-sub-4.1
2004-10-15 17:02:17 +03:00
unknown
7723eb0258 Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/k/mysql-4.0
2004-10-15 14:38:59 +03:00
unknown
1927d24ec0 Use already parsed SQL-query in the current thread when determining
was the query REPLACE or LOAD DATA INFILE REPLACE.


innobase/row/row0ins.c:
  Find SQL-query directly from current thread and see if the
  query was REPLACE or LOAD DATA INFILE REPLACE.
sql/ha_innodb.cc:
  Find current thread and return true if SQL-query in the current
  thread was either REPLACE or LOAD DATA INFILE REPLACE.
2004-10-15 11:28:19 +03:00
unknown
aa43bc07d5 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb
2004-10-15 08:11:45 +02:00
unknown
d942710916 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
2004-10-15 08:10:08 +02:00
unknown
c461eb866e Merge mysql.com:/home/mydev/mysql-4.0
into mysql.com:/home/mydev/mysql-4.0-bug5625


sql/ha_myisam.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-10-14 20:04:47 +02:00
unknown
fc27da0879 BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
Added a try to a normal repair() if repair_by_sort() failed.
This was not done with ENABLE KEYS and OPTIMIZE TABLE.
Fixed error code handling in mysql_alter_table().


sql/ha_myisam.cc:
  BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
  Added a try to a normal repair() if repair_by_sort() failed.
  This was not done with ENABLE KEYS and OPTIMIZE TABLE.
sql/sql_table.cc:
  BUG#5625 - MyISAM Index corruption on ALTER TABLE x ENABLE KEYS due to full tmpdir.
  Added a translation from 'bool' return value to '< 0' error indication,
  which is used within mysql_execute_command() and must as such be
  handed over by mysql_alter_table(). A returncode >= 0 is interpreted
  as 'I have already called send_ok()'.
2004-10-14 20:02:56 +02:00
unknown
a750003f57 Implemented the stored procedure data access characteristics:
NO SQL
CONTAINS SQL (default)
READS SQL DATA
MODIFIES SQL DATA

These are needed as hints for the replication.
(Before this, we did have the default in the mysql.proc table, but no support in the parser.)


mysql-test/r/sp.result:
  Modified test cases for new data access characteristics.
mysql-test/t/sp.test:
  Modified test cases for new data access characteristics.
scripts/mysql_create_system_tables.sh:
  We now support all the SP data access characteristics (not just CONTAINS SQL).
scripts/mysql_fix_privilege_tables.sql:
  We now support all the SP data access characteristics (not just CONTAINS SQL).
sql/lex.h:
  New tokens for SP data access characteristics.
sql/sp.cc:
  Store, print and support alter of data access characteristics.
sql/sp_head.cc:
  Added SP_ prefix to some symbols.
sql/sql_lex.h:
  Added SP_ prefix to some symbols, and added SP data access enum.
sql/sql_yacc.yy:
  Parse SP data access characteristics.
  (And allow "alter ... language sql", mostly as a formality, it was accidently
   put in the wrong clause before.)
2004-10-14 18:07:09 +02:00
unknown
46b10a307f Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mishka.local:/home/my/mysql-4.1


sql/item_cmpfunc.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-10-14 18:06:38 +03:00
unknown
3307318917 true,false -> TRUE, FALSE
Simple fixes/optimization of things discovered during review of new pushed code


include/my_sys.h:
  Ensure that clear_alloc_root() interacts correctly with alloc_root_inited()
mysys/hash.c:
  More comments
  Simple optimization (merge identical code)
mysys/my_bitmap.c:
  Change inline -> static inline
sql/examples/ha_archive.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  true,false -> TRUE, FALSE
  Change if (false) -> #ifdef NOT_USED
sql/ha_ndbcluster.h:
  true,false -> TRUE, FALSE
sql/handler.cc:
  More comments
  Remove not needed initializations.
  #ifdef not used code
sql/item_cmpfunc.h:
  true,false -> TRUE, FALSE
sql/item_strfunc.cc:
  Move local variables to function beginning
  Remove wrong comments
sql/log_event.h:
  true,false -> TRUE, FALSE
sql/sql_base.cc:
  true,false -> TRUE, FALSE
  More comments
sql/sql_help.cc:
  true,false -> TRUE, FALSE
sql/sql_lex.cc:
  Simple optimization of new code
sql/sql_parse.cc:
  true,false -> TRUE, FALSE
sql/sql_prepare.cc:
  true,false -> TRUE, FALSE
sql/sql_table.cc:
  true,false -> TRUE, FALSE
sql/sql_yacc.yy:
  true,false -> TRUE, FALSE
2004-10-14 18:03:46 +03:00
unknown
8141b058ff we can't rely on current variables implementation, so have to use String pointer returned by val_str
fixed handling errors in case of out of memory in SQL interfase of prepared statements
2004-10-14 15:47:00 +03:00
unknown
b7403e8bb2 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1
2004-10-14 12:50:00 +03:00
unknown
81914f489e Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table 2004-10-14 14:14:50 +05:00
unknown
28de5d3607 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mysql.com:/space/pekka/ndb/version/my41-tux


ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2004-10-14 10:38:47 +02:00
unknown
761ae02ca7 Followup to Bug#5985: fixing one thing that went wrong. 2004-10-14 03:37:20 +04:00
unknown
55c1b79459 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-5985


sql/sql_class.h:
  Auto merged
2004-10-14 02:54:44 +04:00
unknown
54b00f5453 A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)"
crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.


mysql-test/r/ps.result:
  A test case for Bug#5985: test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
  server."
sql/item_func.cc:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/item_func.h:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/mysql_priv.h:
  We need a separate call to reset THD state before every execute of
  a prepared statement. Otherwise things like THD->user_var_events
  are never cleaned up and bloat binary log (as the list of events
  grows from execution to execution).
sql/sql_class.cc:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_class.h:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_lex.cc:
  Move the part responsible for initializing LEX from mysql_init_query
  to lex_start.
sql/sql_lex.h:
  All lex-related initialization is now in lex_start.
  Move thd->select_number to lex->select_number to be able to use it
  easily in lex_start.
sql/sql_parse.cc:
  Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
  which is used in PS and conventional execution, and lex_start, used only
  when we want to parse something.
  Fix init_connect to use initialized THD.
sql/sql_prepare.cc:
  Deploy mysql_reset_thd_for_next_query to reset THD state before
  execution of a prepared statement.
  Normally this should have been added to just one place, but
  we have to reset thd before assigning placeholders from variables,
  thus we can't do that in execute_stmt (yuck).
2004-10-14 02:53:59 +04:00
unknown
ee7518b513 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-4.1


sql/item_subselect.cc:
  Auto merged
2004-10-13 23:25:36 +03:00
unknown
f0ed73d874 Added startup option and settable session variable
innodb_table_locks_old_behavior: do not acquire an
InnoDB table lock for LOCK TABLES, as in mysql-4.0.18
and earlier.


sql/ha_innodb.cc:
  Do not acquire an InnoDB table lock for LOCK TABLES if
  innodb_table_locks_old_behavior is enabled.
sql/mysqld.cc:
  Added innodb_table_locks_old_behavior
sql/set_var.cc:
  Added innodb_table_locks_old_behavior
sql/sql_class.h:
  Added innodb_table_locks_old_behavior
2004-10-13 22:54:21 +03:00
unknown
8010477ae5 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
2004-10-13 20:14:04 +02:00
unknown
7b1f818d91 srv0srv.c, log0log.c, srv0srv.h, ha_innodb.cc, ha_innodb.h:
Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem


sql/ha_innodb.h:
  Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
sql/ha_innodb.cc:
  Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
innobase/include/srv0srv.h:
  Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
innobase/log/log0log.c:
  Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
innobase/srv/srv0srv.c:
  Implement innobase_very_fast_shutdown and innobase_start_trx_and_assign_read_view(); these were requested by Guilhem
2004-10-13 20:04:52 +03:00
unknown
fd6009accb BUG#4286 - HANDLER tables are closed by FLUSH TABLE(S).
BUG#4335 - one name can be handler open'ed many times.
Fixed problems detected on Windows build by VC++.
Removed unused variables.
Applied a neccessary cast.
2004-10-13 17:42:22 +02:00