Commit d7579018 authored by unknown's avatar unknown

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  rama.(none):/home/jimw/my/mysql-5.1-clean


mysql-test/extra/binlog_tests/insert_select-binlog.test:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/sp_trans.test:
  Auto merged
parents 0f6047e4 e92dcb38
...@@ -20,4 +20,3 @@ then ...@@ -20,4 +20,3 @@ then
echo "Set REAL_EMAIL and retry." echo "Set REAL_EMAIL and retry."
exit 1 exit 1
fi fi
...@@ -90,6 +90,16 @@ extern char* tgoto(const char*, int, int); ...@@ -90,6 +90,16 @@ extern char* tgoto(const char*, int, int);
extern char* tgetstr(char*, char**); extern char* tgetstr(char*, char**);
#endif #endif
#if !HAVE_DECL_TGOTO
/*
'tgoto' is not declared in the system header files, this causes
problems on 64-bit systems. The function returns a 64 bit pointer
but caller see it as "int" and it's thus truncated to 32-bit
*/
extern char* tgoto(const char*, int, int);
#endif
protected void term_move_to_line(EditLine *, int); protected void term_move_to_line(EditLine *, int);
protected void term_move_to_char(EditLine *, int); protected void term_move_to_char(EditLine *, int);
protected void term_clear_EOL(EditLine *, int); protected void term_clear_EOL(EditLine *, int);
......
...@@ -1867,6 +1867,19 @@ else ...@@ -1867,6 +1867,19 @@ else
fi fi
AC_SUBST(TERMCAP_LIB) AC_SUBST(TERMCAP_LIB)
# Check if the termcap function 'tgoto' is already declared in
# system header files or if it need to be declared locally
AC_CHECK_DECLS(tgoto,,,[
#ifdef HAVE_CURSES_H
# include <curses.h>
#elif HAVE_NCURSES_H
# include <ncurses.h>
#endif
#ifdef HAVE_TERM_H
# include <term.h>
#endif
])
LIBEDIT_LOBJECTS="" LIBEDIT_LOBJECTS=""
AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"]) AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"])
AC_CHECK_FUNC(strvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"]) AC_CHECK_FUNC(strvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"])
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_log_bin.inc
-- source include/have_debug.inc -- source include/have_debug.inc
--disable_warnings --disable_warnings
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
# #
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_blackhole.inc -- source include/have_blackhole.inc
-- source include/have_log_bin.inc
# The server need to be started in $MYSQLTEST_VARDIR since it
# uses ../std_data_ln/
-- source include/uses_vardir.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
...@@ -109,7 +114,7 @@ insert into t1 values(1); ...@@ -109,7 +114,7 @@ insert into t1 values(1);
insert ignore into t1 values(1); insert ignore into t1 values(1);
replace into t1 values(100); replace into t1 values(100);
create table t2 (a varchar(200)) engine=blackhole; create table t2 (a varchar(200)) engine=blackhole;
load data infile '../std_data_ln/words.dat' into table t2; eval load data infile '../std_data_ln/words.dat' into table t2;
alter table t1 add b int; alter table t1 add b int;
alter table t1 drop b; alter table t1 drop b;
create table t3 like t1; create table t3 like t1;
......
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_cp932.inc -- source include/have_cp932.inc
-- source include/have_log_bin.inc
--character_set cp932 --character_set cp932
--disable_warnings --disable_warnings
......
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/have_ucs2.inc --source include/have_ucs2.inc
--source include/have_log_bin.inc
# #
# Check correct binlogging of UCS2 user variables (BUG#3875) # Check correct binlogging of UCS2 user variables (BUG#3875)
......
# Embedded server doesn't support binlog --source include/have_log_bin.inc
-- source include/not_embedded.inc
--disable_warnings --disable_warnings
drop database if exists `drop-temp+table-test`; drop database if exists `drop-temp+table-test`;
......
# Embedded server doesn't support binlog # Embedded server doesn't support binlog
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_log_bin.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
# did some tests manually on a slave; tables are replicated fine and # did some tests manually on a slave; tables are replicated fine and
# Exec_Master_Log_Pos advances as expected. # Exec_Master_Log_Pos advances as expected.
# Embedded server doesn't support binlogging -- source include/have_log_bin.inc
-- source include/not_embedded.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_debug.inc -- source include/have_debug.inc
......
--source include/have_log_bin.inc
-- require r/have_binlog_format_mixed.require -- require r/have_binlog_format_mixed.require
disable_query_log; disable_query_log;
show variables like "binlog_format"; show variables like "binlog_format";
......
--source include/have_log_bin.inc
--require r/have_binlog_format_row.require --require r/have_binlog_format_row.require
--disable_query_log --disable_query_log
--replace_result MIXED ROW --replace_result MIXED ROW
......
source include/have_log_bin.inc;
--require r/have_binlog_format_statement.require --require r/have_binlog_format_statement.require
--disable_query_log --disable_query_log
--replace_result MIXED STATEMENT --replace_result MIXED STATEMENT
......
--source include/have_log_bin.inc
-- require r/have_binlog_format_row.require -- require r/have_binlog_format_row.require
disable_query_log; disable_query_log;
show variables like "binlog_format"; show variables like "binlog_format";
......
--source include/have_log_bin.inc
-- require r/have_binlog_format_statement.require -- require r/have_binlog_format_statement.require
disable_query_log; disable_query_log;
show variables like "binlog_format"; show variables like "binlog_format";
......
# Replication tests need binlog
source include/have_log_bin.inc;
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
......
#
# Some tests uses LOAD DATA with a relative path
# and need to see for example ../std_data
#
# Also if an absolute path was used, the server might be started
# with --secure-file-priv and wouldn't be allowed to LOAD a file
# outside of it's vardir anyway
#
let $datadir=
query_get_value("SHOW VARIABLES LIKE 'datadir'", Value, 1);
if (`select LOCATE("$MYSQLTEST_VARDIR", "$datadir") != 1`)
{
skip Need mysqld in MYSQLTEST_VARDIR;
}
...@@ -596,6 +596,22 @@ sub collect_one_test_case($$$$$$$) { ...@@ -596,6 +596,22 @@ sub collect_one_test_case($$$$$$$) {
} }
} }
if ( $tinfo->{'need_binlog'} )
{
if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) )
{
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Test need binlog";
return;
}
}
else
{
# Test does not need binlog, add --skip-binlog to
# the options used when starting it
push(@{$tinfo->{'master_opt'}}, "--skip-log-bin");
}
} }
} }
...@@ -606,6 +622,7 @@ our @tags= ...@@ -606,6 +622,7 @@ our @tags=
( (
["include/have_innodb.inc", "innodb_test", 1], ["include/have_innodb.inc", "innodb_test", 1],
["include/have_binlog_format_row.inc", "binlog_format", "row"], ["include/have_binlog_format_row.inc", "binlog_format", "row"],
["include/have_log_bin.inc", "need_binlog", 1],
["include/have_binlog_format_statement.inc", "binlog_format", "statement"], ["include/have_binlog_format_statement.inc", "binlog_format", "statement"],
["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"], ["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"],
["include/big_test.inc", "big_test", 1], ["include/big_test.inc", "big_test", 1],
......
drop table if exists t1; drop table if exists t1;
SHOW GLOBAL VARIABLES LIKE "%_format%"; SHOW GLOBAL VARIABLES LIKE "%e_format";
Variable_name Value Variable_name Value
binlog_format <format>
date_format %d.%m.%Y date_format %d.%m.%Y
datetime_format %Y-%m-%d %H:%i:%s datetime_format %Y-%m-%d %H:%i:%s
default_week_format 0
time_format %H.%i.%s time_format %H.%i.%s
SHOW SESSION VARIABLES LIKE "%_format%"; SHOW SESSION VARIABLES LIKE "%e_format";
Variable_name Value Variable_name Value
binlog_format <format>
date_format %d.%m.%Y date_format %d.%m.%Y
datetime_format %Y-%m-%d %H:%i:%s datetime_format %Y-%m-%d %H:%i:%s
default_week_format 0
time_format %H.%i.%s time_format %H.%i.%s
SET time_format='%H%i%s'; SET time_format='%H%i%s';
SET time_format='%H:%i:%s.%f'; SET time_format='%H:%i:%s.%f';
...@@ -30,12 +26,10 @@ set datetime_format= '%H:%i:%s %Y-%m-%d'; ...@@ -30,12 +26,10 @@ set datetime_format= '%H:%i:%s %Y-%m-%d';
set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
set datetime_format= '%h:%i:%s %p %Y-%m-%d'; set datetime_format= '%h:%i:%s %p %Y-%m-%d';
set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
SHOW SESSION VARIABLES LIKE "%format"; SHOW SESSION VARIABLES LIKE "%e_format";
Variable_name Value Variable_name Value
binlog_format <format>
date_format %m-%d-%Y date_format %m-%d-%Y
datetime_format %h:%i:%s.%f %p %Y-%m-%d datetime_format %h:%i:%s.%f %p %Y-%m-%d
default_week_format 0
time_format %h:%i:%s%p time_format %h:%i:%s%p
SET time_format='%h:%i:%s'; SET time_format='%h:%i:%s';
ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s' ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s'
......
Variable_name Value Variable_name Value
have_log_bin ON log_bin ON
...@@ -1235,4 +1235,18 @@ aaa 2 ...@@ -1235,4 +1235,18 @@ aaa 2
drop table t1; drop table t1;
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808)); create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
drop table t1; drop table t1;
create table t1(a int auto_increment, b int, primary key (b, a))
partition by hash(b) partitions 2;
insert into t1 values (null, 1);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 1 9 9 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1(a int auto_increment primary key)
partition by key(a) partitions 2;
insert into t1 values (null), (null), (null);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 10 Fixed 3 7 21 0 0 0 4 NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
End of 5.1 tests End of 5.1 tests
...@@ -603,9 +603,9 @@ Warnings: ...@@ -603,9 +603,9 @@ Warnings:
Note 1449 There is no 'no-such-user'@'localhost' registered Note 1449 There is no 'no-such-user'@'localhost' registered
SHOW CREATE VIEW v; SHOW CREATE VIEW v;
View Create View View Create View
v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `t1`.`a` AS `a` from `t1` v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1`
Warnings: Warnings:
Note 1449 There is no 'no-such-user'@'localhost' registered Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
SELECT * FROM v; SELECT * FROM v;
ERROR HY000: There is no 'no-such-user'@'localhost' registered ERROR HY000: There is no 'no-such-user'@'localhost' registered
DROP VIEW v; DROP VIEW v;
...@@ -889,23 +889,23 @@ Warnings: ...@@ -889,23 +889,23 @@ Warnings:
Note 1449 There is no 'no_such'@'user_1' registered Note 1449 There is no 'no_such'@'user_1' registered
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1`
Warnings: Warnings:
Note 1449 There is no 'no_such'@'user_1' registered Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View
v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1`
Warnings: Warnings:
Note 1449 There is no 'no_such'@'user_1' registered Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1; ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1;
Warnings: Warnings:
Note 1449 There is no 'no_such'@'user_2' registered Note 1449 There is no 'no_such'@'user_2' registered
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View View Create View
v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1`
Warnings: Warnings:
Note 1449 There is no 'no_such'@'user_2' registered Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
End of 5.1 tests. End of 5.1 tests.
# The server need to be started in $MYSQLTEST_VARDIR since it
# uses ../std_data_ln/
-- source include/uses_vardir.inc
# #
# This test is a bit tricky as we can't use backup table to overwrite an old # This test is a bit tricky as we can't use backup table to overwrite an old
# table # table
......
...@@ -7,9 +7,9 @@ drop table if exists t1; ...@@ -7,9 +7,9 @@ drop table if exists t1;
--enable_warnings --enable_warnings
--replace_result ROW <format> STATEMENT <format> MIXED <format> --replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW GLOBAL VARIABLES LIKE "%_format%"; SHOW GLOBAL VARIABLES LIKE "%e_format";
--replace_result ROW <format> STATEMENT <format> MIXED <format> --replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW SESSION VARIABLES LIKE "%_format%"; SHOW SESSION VARIABLES LIKE "%e_format";
# #
# Test setting a lot of different formats to see which formats are accepted and # Test setting a lot of different formats to see which formats are accepted and
...@@ -37,7 +37,7 @@ set datetime_format= '%h:%i:%s %p %Y-%m-%d'; ...@@ -37,7 +37,7 @@ set datetime_format= '%h:%i:%s %p %Y-%m-%d';
set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
--replace_result ROW <format> STATEMENT <format> MIXED <format> --replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW SESSION VARIABLES LIKE "%format"; SHOW SESSION VARIABLES LIKE "%e_format";
--error 1231 --error 1231
SET time_format='%h:%i:%s'; SET time_format='%h:%i:%s';
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# This is intended to mimick how mysqldump and innobackup work. # This is intended to mimick how mysqldump and innobackup work.
# And it requires InnoDB # And it requires InnoDB
-- source include/not_embedded.inc -- source include/have_log_bin.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_log_bin.inc
# #
# Small basic test with ignore # Small basic test with ignore
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_cp932.inc -- source include/have_cp932.inc
-- source include/have_log_bin.inc
# Bug#16217 (mysql client did not know how not switch its internal charset) # Bug#16217 (mysql client did not know how not switch its internal charset)
flush logs; flush logs;
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
# TODO: Need to look at making a row based version once the new row based client is completed. [jbm] # TODO: Need to look at making a row based version once the new row based client is completed. [jbm]
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_mixed_or_statement.inc
# Embedded server doesn't support binlogging -- source include/have_log_bin.inc
-- source include/not_embedded.inc
# we need this for getting fixed timestamps inside of this test # we need this for getting fixed timestamps inside of this test
set timestamp=1000000000; set timestamp=1000000000;
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
# TODO: Need to look at making row based version once new binlog client is complete. # TODO: Need to look at making row based version once new binlog client is complete.
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_mixed_or_statement.inc
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
......
# Embedded server doesn't support external clients # Embedded server doesn't support external clients
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/have_log_bin.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3;
......
...@@ -1448,4 +1448,21 @@ drop table t1; ...@@ -1448,4 +1448,21 @@ drop table t1;
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808)); create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
drop table t1; drop table t1;
#
# Bug #28806: Running SHOW TABLE STATUS during high INSERT load crashes server
#
create table t1(a int auto_increment, b int, primary key (b, a))
partition by hash(b) partitions 2;
insert into t1 values (null, 1);
--replace_column 9 0 12 NULL 13 NULL 14 NULL
show table status;
drop table t1;
create table t1(a int auto_increment primary key)
partition by key(a) partitions 2;
insert into t1 values (null), (null), (null);
--replace_column 9 0 12 NULL 13 NULL 14 NULL
show table status;
drop table t1;
--echo End of 5.1 tests --echo End of 5.1 tests
-- source include/not_embedded.inc -- source include/not_embedded.inc
-- source include/have_log_bin.inc
# #
# SQL Syntax for Prepared Statements test # SQL Syntax for Prepared Statements test
# #
......
-- source include/have_log_bin.inc
##################### #####################
# Change Author: JBM # Change Author: JBM
# Change Date: 2006-01-17 # Change Date: 2006-01-17
......
# This test uses chmod, can't be run with root permissions # This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc -- source include/not_as_root.inc
-- source include/have_log_bin.inc
# #
# Test is run with max_binlog_size=2048 to force automatic rotation of the # Test is run with max_binlog_size=2048 to force automatic rotation of the
# binary log # binary log
......
-- source include/have_log_bin.inc
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR # Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
# save status # save status
......
# Requires statement logging # Requires statement logging
-- source include/have_binlog_format_mixed_or_statement.inc -- source include/have_binlog_format_mixed_or_statement.inc
# TODO: Create row based version once $MYSQL_BINLOG has new RB version # TODO: Create row based version once $MYSQL_BINLOG has new RB version
# Embedded server does not support binlogging
--source include/not_embedded.inc
# Check that user variables are binlogged correctly (BUG#3875) # Check that user variables are binlogged correctly (BUG#3875)
create table t1 (a varchar(50)); create table t1 (a varchar(50));
......
...@@ -101,6 +101,7 @@ my_bool my_thread_global_init(void) ...@@ -101,6 +101,7 @@ my_bool my_thread_global_init(void)
TODO: Remove this code when fixed versions of glibc6 are in common TODO: Remove this code when fixed versions of glibc6 are in common
use. use.
*/ */
if (thd_lib_detected == THD_LIB_NPTL)
{ {
pthread_t dummy_thread; pthread_t dummy_thread;
pthread_attr_t dummy_thread_attr; pthread_attr_t dummy_thread_attr;
......
...@@ -411,7 +411,7 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) ...@@ -411,7 +411,7 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
shared_memory_base_name is unique value for each server shared_memory_base_name is unique value for each server
unique_part is uniquel value for each object (events and file-mapping) unique_part is uniquel value for each object (events and file-mapping)
*/ */
suffix_pos = strxmov(tmp,shared_memory_base_name,"_",NullS); suffix_pos = strxmov(tmp, "Global\\", shared_memory_base_name, "_", NullS);
strmov(suffix_pos, "CONNECT_REQUEST"); strmov(suffix_pos, "CONNECT_REQUEST");
if (!(event_connect_request= OpenEvent(event_access_rights, FALSE, tmp))) if (!(event_connect_request= OpenEvent(event_access_rights, FALSE, tmp)))
{ {
...@@ -465,8 +465,8 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) ...@@ -465,8 +465,8 @@ HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout)
unique_part is uniquel value for each object (events and file-mapping) unique_part is uniquel value for each object (events and file-mapping)
number_of_connection is number of connection between server and client number_of_connection is number of connection between server and client
*/ */
suffix_pos = strxmov(tmp,shared_memory_base_name,"_",connect_number_char, suffix_pos = strxmov(tmp, "Global\\", shared_memory_base_name, "_", connect_number_char,
"_",NullS); "_", NullS);
strmov(suffix_pos, "DATA"); strmov(suffix_pos, "DATA");
if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL) if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL)
{ {
......
...@@ -4253,22 +4253,16 @@ int ha_partition::info(uint flag) ...@@ -4253,22 +4253,16 @@ int ha_partition::info(uint flag)
if (flag & HA_STATUS_AUTO) if (flag & HA_STATUS_AUTO)
{ {
ulonglong nb_reserved_values; ulonglong auto_increment_value= 0;
DBUG_PRINT("info", ("HA_STATUS_AUTO")); DBUG_PRINT("info", ("HA_STATUS_AUTO"));
/* we don't want to reserve any values, it's pure information */ file_array= m_file;
do
if (table->found_next_number_field)
{ {
/* file= *file_array;
Can only call get_auto_increment for tables that actually file->info(HA_STATUS_AUTO);
have auto_increment columns, otherwise there will be set_if_bigger(auto_increment_value, file->stats.auto_increment_value);
problems in handlers that don't expect get_auto_increment } while (*(++file_array));
for non-autoincrement tables. stats.auto_increment_value= auto_increment_value;
*/
get_auto_increment(0, 0, 0, &stats.auto_increment_value,
&nb_reserved_values);
release_auto_increment();
}
} }
if (flag & HA_STATUS_VARIABLE) if (flag & HA_STATUS_VARIABLE)
{ {
......
...@@ -1110,12 +1110,13 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host, ...@@ -1110,12 +1110,13 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host,
*/ */
for (i=0 ; i < acl_users.elements ; i++) for (i=0 ; i < acl_users.elements ; i++)
{ {
acl_user= dynamic_element(&acl_users,i,ACL_USER*); ACL_USER *acl_user_tmp= dynamic_element(&acl_users,i,ACL_USER*);
if ((!acl_user->user && !user[0]) || if ((!acl_user_tmp->user && !user[0]) ||
(acl_user->user && strcmp(user, acl_user->user) == 0)) (acl_user_tmp->user && strcmp(user, acl_user_tmp->user) == 0))
{ {
if (compare_hostname(&acl_user->host, host, ip)) if (compare_hostname(&acl_user_tmp->host, host, ip))
{ {
acl_user= acl_user_tmp;
res= 0; res= 0;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment