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.
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.
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.
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"
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.
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)
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
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
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
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
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.
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
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
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)
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.
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()
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().
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.
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.
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.