Commit graph

7472 commits

Author SHA1 Message Date
unknown
85d04ccebd Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1


myisam/myisamchk.c:
  Auto merged
2004-10-22 18:21:56 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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