mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Removed compiler warnings
Fixed sporadic test failure for suit/pbxt/t/lock_multi.test Fixed sporadic test faulure for suit/rpl/t/do_grant.test OpenSolaris 5.11-x86 now compiles (tested with 32 bit) BUILD/compile-solaris-amd64-debug-forte: Added execute bit BUILD/compile-solaris-x86-32: Added execute bit BUILD/compile-solaris-x86-32-debug: Added execute bit BUILD/compile-solaris-x86-32-debug-forte: Added execute bit BUILD/compile-solaris-x86-forte-32: Added execute bit extra/libevent/devpoll.c: Removed compiler warning extra/libevent/evbuffer.c: Removed compiler warning extra/libevent/select.c: Removed compiler warning mysql-test/mysql-test-run.pl: Fixed sporadic test faulure for suit/rpl/t/do_grant.test (Seen on OpenSolaris) mysql-test/suite/pbxt/r/lock_multi.result: Fixed sporadic test failure for suit/pbxt/t/lock_multi.test (seen in buildbot) This was done by merging the test with main/lock_multi.test mysql-test/suite/pbxt/t/lock_multi.test: Fixed sporadic test failure for suit/pbxt/t/lock_multi.test (seen in buildbot) This was done by merging the test with main/lock_multi.test mysys/my_sync.c: Removed compiler warnings sql/ha_ndbcluster.cc: Fixed linking error on OpenSolaris when compiling without ndb Bug #34866 Can't compile on Solaris 9/Sparc with gcc storage/archive/azlib.h: Removed compiler warning about redefined symbols storage/maria/ma_blockrec.c: Removed compiler warning storage/maria/ma_loghandler.c: Removed compiler warning storage/maria/ma_test3.c: Removed compiler warning storage/myisam/mi_test3.c: Removed compiler warning storage/pbxt/src/ha_pbxt.cc: Removed compiler warning thr_main -> thr_main_pbxt storage/pbxt/src/restart_xt.cc: thr_main -> thr_main_pbxt storage/pbxt/src/thread_xt.cc: thr_main -> thr_main_pbxt This was needed as thr_main() is an internal thread function on OpenSolaris() storage/pbxt/src/thread_xt.h: thr_main -> thr_main_pbxt storage/xtradb/srv/srv0srv.c: Use compatiblity macro to get code to work on OpenSolaris support-files/compiler_warnings.supp: Ignore compiler warning from yassl
This commit is contained in:
parent
1378aa0e8f
commit
b96f268acc
24 changed files with 544 additions and 131 deletions
0
BUILD/compile-solaris-amd64-debug-forte
Normal file → Executable file
0
BUILD/compile-solaris-amd64-debug-forte
Normal file → Executable file
0
BUILD/compile-solaris-x86-32
Normal file → Executable file
0
BUILD/compile-solaris-x86-32
Normal file → Executable file
0
BUILD/compile-solaris-x86-32-debug
Normal file → Executable file
0
BUILD/compile-solaris-x86-32-debug
Normal file → Executable file
0
BUILD/compile-solaris-x86-32-debug-forte
Normal file → Executable file
0
BUILD/compile-solaris-x86-32-debug-forte
Normal file → Executable file
0
BUILD/compile-solaris-x86-forte-32
Normal file → Executable file
0
BUILD/compile-solaris-x86-forte-32
Normal file → Executable file
|
@ -185,7 +185,9 @@ devpoll_init(struct event_base *base)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
devpoll_recalc(struct event_base *base, void *arg, int max)
|
devpoll_recalc(struct event_base *base __attribute__((unused)),
|
||||||
|
void *arg __attribute__((unused)),
|
||||||
|
int max)
|
||||||
{
|
{
|
||||||
struct devpollop *devpollop = arg;
|
struct devpollop *devpollop = arg;
|
||||||
|
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -75,7 +75,8 @@ bufferevent_add(struct event *ev, int timeout)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
|
bufferevent_read_pressure_cb(struct evbuffer *buf,
|
||||||
|
size_t old __attribute__((unused)), size_t now,
|
||||||
void *arg) {
|
void *arg) {
|
||||||
struct bufferevent *bufev = arg;
|
struct bufferevent *bufev = arg;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -266,7 +266,7 @@ select_add(void *arg, struct event *ev)
|
||||||
* of the fd_sets for select(2)
|
* of the fd_sets for select(2)
|
||||||
*/
|
*/
|
||||||
if (sop->event_fds < ev->ev_fd) {
|
if (sop->event_fds < ev->ev_fd) {
|
||||||
int fdsz = sop->event_fdsz;
|
unsigned int fdsz = sop->event_fdsz;
|
||||||
|
|
||||||
if (fdsz < sizeof(fd_mask))
|
if (fdsz < sizeof(fd_mask))
|
||||||
fdsz = sizeof(fd_mask);
|
fdsz = sizeof(fd_mask);
|
||||||
|
@ -275,7 +275,7 @@ select_add(void *arg, struct event *ev)
|
||||||
(howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask)))
|
(howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask)))
|
||||||
fdsz *= 2;
|
fdsz *= 2;
|
||||||
|
|
||||||
if (fdsz != sop->event_fdsz) {
|
if (fdsz != (unsigned int) sop->event_fdsz) {
|
||||||
if (select_resize(sop, fdsz)) {
|
if (select_resize(sop, fdsz)) {
|
||||||
check_selectop(sop);
|
check_selectop(sop);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
|
@ -4010,6 +4010,7 @@ sub extract_warning_lines ($) {
|
||||||
qr/Slave I\/O: error reconnecting to master '.*' - retry-time: [1-3] retries/,
|
qr/Slave I\/O: error reconnecting to master '.*' - retry-time: [1-3] retries/,
|
||||||
qr/Error reading packet/,
|
qr/Error reading packet/,
|
||||||
qr/Slave: Can't drop database.* database doesn't exist/,
|
qr/Slave: Can't drop database.* database doesn't exist/,
|
||||||
|
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
|
||||||
);
|
);
|
||||||
|
|
||||||
my $matched_lines= [];
|
my $matched_lines= [];
|
||||||
|
|
|
@ -1,22 +1,4 @@
|
||||||
drop table if exists t1,t2;
|
drop table if exists t1,t2;
|
||||||
create table t1(n int);
|
|
||||||
insert into t1 values (1);
|
|
||||||
lock tables t1 write;
|
|
||||||
update low_priority t1 set n = 4;
|
|
||||||
select n from t1;
|
|
||||||
unlock tables;
|
|
||||||
n
|
|
||||||
1
|
|
||||||
drop table t1;
|
|
||||||
create table t1(n int);
|
|
||||||
insert into t1 values (1);
|
|
||||||
lock tables t1 read;
|
|
||||||
update low_priority t1 set n = 4;
|
|
||||||
select n from t1;
|
|
||||||
unlock tables;
|
|
||||||
n
|
|
||||||
1
|
|
||||||
drop table t1;
|
|
||||||
create table t1 (a int, b int);
|
create table t1 (a int, b int);
|
||||||
create table t2 (c int, d int);
|
create table t2 (c int, d int);
|
||||||
insert into t1 values(1,1);
|
insert into t1 values(1,1);
|
||||||
|
@ -43,6 +25,7 @@ insert t1 select * from t2;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
End of 4.1 tests
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
show columns from t1;
|
show columns from t1;
|
||||||
|
@ -50,10 +33,10 @@ Field Type Null Key Default Extra
|
||||||
a int(11) YES NULL
|
a int(11) YES NULL
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
use mysql;
|
USE mysql;
|
||||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
use mysql;
|
USE mysql;
|
||||||
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||||
OPTIMIZE TABLES columns_priv, db, host, user;
|
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
|
@ -63,7 +46,8 @@ mysql.host optimize status OK
|
||||||
mysql.user optimize status OK
|
mysql.user optimize status OK
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
Select_priv
|
Select_priv
|
||||||
use test;
|
N
|
||||||
|
USE test;
|
||||||
use test;
|
use test;
|
||||||
CREATE TABLE t1 (c1 int);
|
CREATE TABLE t1 (c1 int);
|
||||||
LOCK TABLE t1 WRITE;
|
LOCK TABLE t1 WRITE;
|
||||||
|
@ -90,7 +74,115 @@ DROP DATABASE mysqltest_1;
|
||||||
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
||||||
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
alter table t1 auto_increment=0;
|
||||||
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
alter table t1 auto_increment=0;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (a int);
|
||||||
|
create table t2 like t1;
|
||||||
|
# con1
|
||||||
|
lock tables t1 write;
|
||||||
|
# con2
|
||||||
|
flush tables with read lock;
|
||||||
|
# con5
|
||||||
|
# global read lock is taken
|
||||||
|
# con3
|
||||||
|
select * from t2 for update;
|
||||||
|
# waiting for release of read lock
|
||||||
|
# con4
|
||||||
|
# would hang and later cause a deadlock
|
||||||
|
flush tables t2;
|
||||||
|
# clean up
|
||||||
|
unlock tables;
|
||||||
|
unlock tables;
|
||||||
|
a
|
||||||
|
drop table t1,t2;
|
||||||
|
#
|
||||||
|
# Lightweight version:
|
||||||
|
# Ensure that the wait for a GRL is done before opening tables.
|
||||||
|
#
|
||||||
|
create table t1 (a int);
|
||||||
|
create table t2 like t1;
|
||||||
|
#
|
||||||
|
# UPDATE
|
||||||
|
#
|
||||||
|
# default
|
||||||
|
flush tables with read lock;
|
||||||
|
# con1
|
||||||
|
update t2 set a = 1;
|
||||||
|
# default
|
||||||
|
# statement is waiting for release of read lock
|
||||||
|
# con2
|
||||||
|
flush table t2;
|
||||||
|
# default
|
||||||
|
unlock tables;
|
||||||
|
# con1
|
||||||
|
#
|
||||||
|
# LOCK TABLES .. WRITE
|
||||||
|
#
|
||||||
|
# default
|
||||||
|
flush tables with read lock;
|
||||||
|
# con1
|
||||||
|
lock tables t2 write;
|
||||||
|
# default
|
||||||
|
# statement is waiting for release of read lock
|
||||||
|
# con2
|
||||||
|
flush table t2;
|
||||||
|
# default
|
||||||
|
unlock tables;
|
||||||
|
# con1
|
||||||
|
unlock tables;
|
||||||
|
drop table t1,t2;
|
||||||
|
End of 5.0 tests
|
||||||
|
create table t1 (i int);
|
||||||
|
lock table t1 read;
|
||||||
|
update t1 set i= 10;
|
||||||
|
select * from t1;
|
||||||
|
Timeout in wait_condition.inc for select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "select * from t1"
|
||||||
|
kill query ID;
|
||||||
|
i
|
||||||
|
ERROR 70100: Query execution was interrupted
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
drop table if exists t1;
|
||||||
|
create table t1 (i int);
|
||||||
|
connection: default
|
||||||
|
lock tables t1 write;
|
||||||
|
connection: flush
|
||||||
|
flush tables with read lock;;
|
||||||
|
connection: default
|
||||||
|
alter table t1 add column j int;
|
||||||
|
connection: insert
|
||||||
|
insert into t1 values (1,2);;
|
||||||
|
connection: default
|
||||||
|
unlock tables;
|
||||||
|
connection: flush
|
||||||
|
select * from t1;
|
||||||
|
i j
|
||||||
|
unlock tables;
|
||||||
|
select * from t1;
|
||||||
|
i j
|
||||||
|
1 2
|
||||||
|
drop table t1;
|
||||||
|
drop table if exists t1;
|
||||||
|
create table t1 (i int);
|
||||||
|
connection: default
|
||||||
|
lock tables t1 write;
|
||||||
|
connection: flush
|
||||||
|
flush tables with read lock;;
|
||||||
|
connection: default
|
||||||
|
flush tables;
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
drop table if exists t1,t2;
|
||||||
|
create table t1 (a int);
|
||||||
|
flush status;
|
||||||
|
lock tables t1 read;
|
||||||
|
insert into t1 values(1);;
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
select @tlwa < @tlwb;
|
||||||
|
@tlwa < @tlwb
|
||||||
|
1
|
||||||
|
End of 5.1 tests
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
|
|
||||||
|
# Save the initial number of concurrent sessions
|
||||||
|
--source include/count_sessions.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1,t2;
|
drop table if exists t1,t2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
@ -9,42 +13,6 @@ connect (locker,localhost,root,,);
|
||||||
connect (reader,localhost,root,,);
|
connect (reader,localhost,root,,);
|
||||||
connect (writer,localhost,root,,);
|
connect (writer,localhost,root,,);
|
||||||
|
|
||||||
connection locker;
|
|
||||||
create table t1(n int);
|
|
||||||
insert into t1 values (1);
|
|
||||||
lock tables t1 write;
|
|
||||||
connection writer;
|
|
||||||
send update low_priority t1 set n = 4;
|
|
||||||
connection reader;
|
|
||||||
--sleep 2
|
|
||||||
send select n from t1;
|
|
||||||
connection locker;
|
|
||||||
--sleep 2
|
|
||||||
unlock tables;
|
|
||||||
connection writer;
|
|
||||||
reap;
|
|
||||||
connection reader;
|
|
||||||
reap;
|
|
||||||
drop table t1;
|
|
||||||
|
|
||||||
connection locker;
|
|
||||||
create table t1(n int);
|
|
||||||
insert into t1 values (1);
|
|
||||||
lock tables t1 read;
|
|
||||||
connection writer;
|
|
||||||
send update low_priority t1 set n = 4;
|
|
||||||
connection reader;
|
|
||||||
--sleep 2
|
|
||||||
send select n from t1;
|
|
||||||
connection locker;
|
|
||||||
--sleep 2
|
|
||||||
unlock tables;
|
|
||||||
connection writer;
|
|
||||||
reap;
|
|
||||||
connection reader;
|
|
||||||
reap;
|
|
||||||
drop table t1;
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test problem when using locks with multi-updates
|
# Test problem when using locks with multi-updates
|
||||||
# It should not block when multi-update is reading on a read-locked table
|
# It should not block when multi-update is reading on a read-locked table
|
||||||
|
@ -58,32 +26,33 @@ insert into t1 values(2,2);
|
||||||
insert into t2 values(1,2);
|
insert into t2 values(1,2);
|
||||||
lock table t1 read;
|
lock table t1 read;
|
||||||
connection writer;
|
connection writer;
|
||||||
--sleep 2
|
update t1,t2 set c=a where b=d;
|
||||||
send update t1,t2 set c=a where b=d;
|
|
||||||
connection reader;
|
connection reader;
|
||||||
--sleep 2
|
|
||||||
select c from t2;
|
select c from t2;
|
||||||
connection writer;
|
|
||||||
reap;
|
|
||||||
connection locker;
|
connection locker;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test problem when using locks on many tables and droping a table that
|
# Test problem when using locks on many tables and dropping a table that
|
||||||
# is to-be-locked by another thread
|
# is to-be-locked by another thread
|
||||||
#
|
#
|
||||||
|
#
|
||||||
connection locker;
|
connection locker;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create table t2 (a int);
|
create table t2 (a int);
|
||||||
lock table t1 write, t2 write;
|
lock table t1 write, t2 write;
|
||||||
connection reader;
|
connection reader;
|
||||||
send insert t1 select * from t2;
|
send
|
||||||
|
insert t1 select * from t2;
|
||||||
connection locker;
|
connection locker;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "insert t1 select * from t2";
|
||||||
|
--source include/wait_condition.inc
|
||||||
drop table t2;
|
drop table t2;
|
||||||
connection reader;
|
connection reader;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
reap;
|
reap;
|
||||||
connection locker;
|
connection locker;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -97,20 +66,26 @@ create table t1 (a int);
|
||||||
create table t2 (a int);
|
create table t2 (a int);
|
||||||
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
|
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
|
||||||
connection reader;
|
connection reader;
|
||||||
send insert t1 select * from t2;
|
send
|
||||||
|
insert t1 select * from t2;
|
||||||
connection locker;
|
connection locker;
|
||||||
|
# Sleep a bit till the insert of connection reader is in work and hangs
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "insert t1 select * from t2";
|
||||||
|
--source include/wait_condition.inc
|
||||||
drop table t2;
|
drop table t2;
|
||||||
connection reader;
|
connection reader;
|
||||||
--error 1146
|
--error ER_NO_SUCH_TABLE
|
||||||
reap;
|
reap;
|
||||||
connection locker;
|
connection locker;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#9998 - MySQL client hangs on USE "database"
|
# Bug#9998 MySQL client hangs on USE "database"
|
||||||
#
|
#
|
||||||
create table t1(a int);
|
create table t1(a int);
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
|
@ -121,21 +96,30 @@ unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#16986 - Deadlock condition with MyISAM tables
|
# Bug#16986 Deadlock condition with MyISAM tables
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Need a matching user in mysql.user for multi-table select
|
||||||
|
--source include/add_anonymous_users.inc
|
||||||
|
|
||||||
connection locker;
|
connection locker;
|
||||||
use mysql;
|
USE mysql;
|
||||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
--sleep 1
|
|
||||||
#
|
#
|
||||||
connection reader;
|
connection reader;
|
||||||
use mysql;
|
USE mysql;
|
||||||
#NOTE: This must be a multi-table select, otherwise the deadlock will not occur
|
# Note: This must be a multi-table select, otherwise the deadlock will not occur
|
||||||
send SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
send
|
||||||
--sleep 1
|
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
|
||||||
#
|
#
|
||||||
connection locker;
|
connection locker;
|
||||||
|
# Sleep a bit till the select of connection reader is in work and hangs
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Waiting for table" and info =
|
||||||
|
"SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1";
|
||||||
|
--source include/wait_condition.inc
|
||||||
# Make test case independent from earlier grants.
|
# Make test case independent from earlier grants.
|
||||||
--replace_result "Table is already up to date" "OK"
|
--replace_result "Table is already up to date" "OK"
|
||||||
OPTIMIZE TABLES columns_priv, db, host, user;
|
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||||
|
@ -143,7 +127,7 @@ UNLOCK TABLES;
|
||||||
#
|
#
|
||||||
connection reader;
|
connection reader;
|
||||||
reap;
|
reap;
|
||||||
use test;
|
USE test;
|
||||||
#
|
#
|
||||||
connection locker;
|
connection locker;
|
||||||
use test;
|
use test;
|
||||||
|
@ -158,11 +142,16 @@ LOCK TABLE t1 WRITE;
|
||||||
#
|
#
|
||||||
# This waits until t1 is unlocked.
|
# This waits until t1 is unlocked.
|
||||||
connection locker;
|
connection locker;
|
||||||
send FLUSH TABLES WITH READ LOCK;
|
send
|
||||||
--sleep 1
|
FLUSH TABLES WITH READ LOCK;
|
||||||
#
|
#
|
||||||
# This must not block.
|
|
||||||
connection writer;
|
connection writer;
|
||||||
|
# Sleep a bit till the flush of connection locker is in work and hangs
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables" and info = "FLUSH TABLES WITH READ LOCK";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
# This must not block.
|
||||||
CREATE TABLE t2 (c1 int);
|
CREATE TABLE t2 (c1 int);
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
#
|
#
|
||||||
|
@ -182,12 +171,17 @@ LOCK TABLE t1 WRITE;
|
||||||
#
|
#
|
||||||
# This waits until t1 is unlocked.
|
# This waits until t1 is unlocked.
|
||||||
connection locker;
|
connection locker;
|
||||||
send FLUSH TABLES WITH READ LOCK;
|
send
|
||||||
--sleep 1
|
FLUSH TABLES WITH READ LOCK;
|
||||||
#
|
#
|
||||||
# This must not block.
|
# This must not block.
|
||||||
connection writer;
|
connection writer;
|
||||||
--error 1100
|
# Sleep a bit till the flush of connection locker is in work and hangs
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables" and info = "FLUSH TABLES WITH READ LOCK";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--error ER_TABLE_NOT_LOCKED
|
||||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
#
|
#
|
||||||
|
@ -199,8 +193,10 @@ UNLOCK TABLES;
|
||||||
connection default;
|
connection default;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--source include/delete_anonymous_users.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
|
# Bug#19815 CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
|
||||||
#
|
#
|
||||||
connect (con1,localhost,root,,);
|
connect (con1,localhost,root,,);
|
||||||
connect (con2,localhost,root,,);
|
connect (con2,localhost,root,,);
|
||||||
|
@ -212,12 +208,18 @@ FLUSH TABLES WITH READ LOCK;
|
||||||
# With bug in place: acquire LOCK_mysql_create_table and
|
# With bug in place: acquire LOCK_mysql_create_table and
|
||||||
# wait in wait_if_global_read_lock().
|
# wait in wait_if_global_read_lock().
|
||||||
connection con2;
|
connection con2;
|
||||||
send DROP DATABASE mysqltest_1;
|
send
|
||||||
--sleep 1
|
DROP DATABASE mysqltest_1;
|
||||||
#
|
#
|
||||||
# With bug in place: try to acquire LOCK_mysql_create_table...
|
# With bug in place: try to acquire LOCK_mysql_create_table...
|
||||||
# When fixed: Reject dropping db because of the read lock.
|
# When fixed: Reject dropping db because of the read lock.
|
||||||
connection con1;
|
connection con1;
|
||||||
|
# Wait a bit so that the session con2 is in state "Waiting for release of readlock"
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Waiting for release of readlock"
|
||||||
|
and info = "DROP DATABASE mysqltest_1";
|
||||||
|
--source include/wait_condition.inc
|
||||||
--error ER_CANT_UPDATE_WITH_READLOCK
|
--error ER_CANT_UPDATE_WITH_READLOCK
|
||||||
DROP DATABASE mysqltest_1;
|
DROP DATABASE mysqltest_1;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
@ -234,7 +236,7 @@ disconnect con2;
|
||||||
DROP DATABASE mysqltest_1;
|
DROP DATABASE mysqltest_1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #17264: MySQL Server freeze
|
# Bug#17264 MySQL Server freeze
|
||||||
#
|
#
|
||||||
connection locker;
|
connection locker;
|
||||||
# Disable warnings to allow test to run also without InnoDB
|
# Disable warnings to allow test to run also without InnoDB
|
||||||
|
@ -243,17 +245,22 @@ create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) e
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
connection writer;
|
connection writer;
|
||||||
--sleep 2
|
send
|
||||||
delimiter //;
|
alter table t1 auto_increment=0;
|
||||||
send alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
|
||||||
delimiter ;//
|
|
||||||
connection reader;
|
connection reader;
|
||||||
--sleep 2
|
# Wait till connection writer is blocked
|
||||||
delimiter //;
|
let $wait_condition=
|
||||||
send alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
|
select count(*) = 1 from information_schema.processlist
|
||||||
delimiter ;//
|
where state = "Locked" and info = "alter table t1 auto_increment=0";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
send
|
||||||
|
alter table t1 auto_increment=0;
|
||||||
connection locker;
|
connection locker;
|
||||||
--sleep 2
|
# Wait till connection reader is blocked
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 2 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "alter table t1 auto_increment=0";
|
||||||
|
--source include/wait_condition.inc
|
||||||
unlock tables;
|
unlock tables;
|
||||||
connection writer;
|
connection writer;
|
||||||
reap;
|
reap;
|
||||||
|
@ -262,8 +269,310 @@ reap;
|
||||||
connection locker;
|
connection locker;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely
|
||||||
|
#
|
||||||
|
|
||||||
|
connect (con1,localhost,root,,);
|
||||||
|
connect (con2,localhost,root,,);
|
||||||
|
connect (con3,localhost,root,,);
|
||||||
|
connect (con4,localhost,root,,);
|
||||||
|
connect (con5,localhost,root,,);
|
||||||
|
|
||||||
|
create table t1 (a int);
|
||||||
|
create table t2 like t1;
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # con1
|
||||||
|
lock tables t1 write;
|
||||||
|
connection con2;
|
||||||
|
--echo # con2
|
||||||
|
send flush tables with read lock;
|
||||||
|
connection con5;
|
||||||
|
--echo # con5
|
||||||
|
let $show_statement= SHOW PROCESSLIST;
|
||||||
|
let $field= State;
|
||||||
|
let $condition= = 'Flushing tables';
|
||||||
|
--source include/wait_show_condition.inc
|
||||||
|
--echo # global read lock is taken
|
||||||
|
connection con3;
|
||||||
|
--echo # con3
|
||||||
|
send select * from t2 for update;
|
||||||
|
connection con5;
|
||||||
|
let $show_statement= SHOW PROCESSLIST;
|
||||||
|
let $field= State;
|
||||||
|
let $condition= = 'Waiting for release of readlock';
|
||||||
|
--source include/wait_show_condition.inc
|
||||||
|
--echo # waiting for release of read lock
|
||||||
|
connection con4;
|
||||||
|
--echo # con4
|
||||||
|
--echo # would hang and later cause a deadlock
|
||||||
|
flush tables t2;
|
||||||
|
connection con1;
|
||||||
|
--echo # clean up
|
||||||
|
unlock tables;
|
||||||
|
connection con2;
|
||||||
|
--reap
|
||||||
|
unlock tables;
|
||||||
|
connection con3;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
disconnect con5;
|
||||||
|
disconnect con4;
|
||||||
|
disconnect con3;
|
||||||
|
disconnect con2;
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Lightweight version:
|
||||||
|
--echo # Ensure that the wait for a GRL is done before opening tables.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
connect (con1,localhost,root,,);
|
||||||
|
connect (con2,localhost,root,,);
|
||||||
|
|
||||||
|
create table t1 (a int);
|
||||||
|
create table t2 like t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # UPDATE
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
flush tables with read lock;
|
||||||
|
connection con1;
|
||||||
|
--echo # con1
|
||||||
|
send update t2 set a = 1;
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
let $show_statement= SHOW PROCESSLIST;
|
||||||
|
let $field= State;
|
||||||
|
let $condition= = 'Waiting for release of readlock';
|
||||||
|
--source include/wait_show_condition.inc
|
||||||
|
--echo # statement is waiting for release of read lock
|
||||||
|
connection con2;
|
||||||
|
--echo # con2
|
||||||
|
flush table t2;
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
unlock tables;
|
||||||
|
connection con1;
|
||||||
|
--echo # con1
|
||||||
|
--reap
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # LOCK TABLES .. WRITE
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
flush tables with read lock;
|
||||||
|
connection con1;
|
||||||
|
--echo # con1
|
||||||
|
send lock tables t2 write;
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
let $show_statement= SHOW PROCESSLIST;
|
||||||
|
let $field= State;
|
||||||
|
let $condition= = 'Waiting for release of readlock';
|
||||||
|
--source include/wait_show_condition.inc
|
||||||
|
--echo # statement is waiting for release of read lock
|
||||||
|
connection con2;
|
||||||
|
--echo # con2
|
||||||
|
flush table t2;
|
||||||
|
connection default;
|
||||||
|
--echo # default
|
||||||
|
unlock tables;
|
||||||
|
connection con1;
|
||||||
|
--echo # con1
|
||||||
|
--reap
|
||||||
|
unlock tables;
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
disconnect con2;
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
|
|
||||||
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#21281 Pending write lock is incorrectly removed when its
|
||||||
|
# statement being KILLed
|
||||||
|
#
|
||||||
|
create table t1 (i int);
|
||||||
|
connection locker;
|
||||||
|
lock table t1 read;
|
||||||
|
connection writer;
|
||||||
|
send
|
||||||
|
update t1 set i= 10;
|
||||||
|
connection reader;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "update t1 set i= 10";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
send
|
||||||
|
select * from t1;
|
||||||
|
connection default;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "select * from t1";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
let $ID= `select id from information_schema.processlist where state = "Locked" and info = "update t1 set i= 10"`;
|
||||||
|
--replace_result $ID ID
|
||||||
|
eval kill query $ID;
|
||||||
|
connection reader;
|
||||||
|
--reap
|
||||||
|
connection writer;
|
||||||
|
--error ER_QUERY_INTERRUPTED
|
||||||
|
--reap
|
||||||
|
connection locker;
|
||||||
|
unlock tables;
|
||||||
|
connection default;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
# Disconnect sessions used in many subtests above
|
||||||
|
disconnect locker;
|
||||||
|
disconnect reader;
|
||||||
|
disconnect writer;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#32395 Alter table under a impending global read lock causes a server crash
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test ALTER TABLE under LOCK TABLES and FLUSH TABLES WITH READ LOCK
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
create table t1 (i int);
|
||||||
|
connect (flush,localhost,root,,test,,);
|
||||||
|
connection default;
|
||||||
|
--echo connection: default
|
||||||
|
lock tables t1 write;
|
||||||
|
connection flush;
|
||||||
|
--echo connection: flush
|
||||||
|
--send flush tables with read lock;
|
||||||
|
connection default;
|
||||||
|
--echo connection: default
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
alter table t1 add column j int;
|
||||||
|
connect (insert,localhost,root,,test,,);
|
||||||
|
connection insert;
|
||||||
|
--echo connection: insert
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--send insert into t1 values (1,2);
|
||||||
|
--echo connection: default
|
||||||
|
connection default;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Waiting for release of readlock";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
unlock tables;
|
||||||
|
connection flush;
|
||||||
|
--echo connection: flush
|
||||||
|
--reap
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Waiting for release of readlock";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
select * from t1;
|
||||||
|
unlock tables;
|
||||||
|
connection insert;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from t1;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
disconnect flush;
|
||||||
|
disconnect insert;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test that FLUSH TABLES under LOCK TABLES protects write locked tables
|
||||||
|
# from a impending FLUSH TABLES WITH READ LOCK
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
create table t1 (i int);
|
||||||
|
connect (flush,localhost,root,,test,,);
|
||||||
|
connection default;
|
||||||
|
--echo connection: default
|
||||||
|
lock tables t1 write;
|
||||||
|
connection flush;
|
||||||
|
--echo connection: flush
|
||||||
|
--send flush tables with read lock;
|
||||||
|
connection default;
|
||||||
|
--echo connection: default
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
flush tables;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Flushing tables";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
unlock tables;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 0 from information_schema.processlist
|
||||||
|
where state = "Flushing tables";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
connection flush;
|
||||||
|
--reap
|
||||||
|
connection default;
|
||||||
|
disconnect flush;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#30331 Table_locks_waited shows inaccurate values
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1,t2;
|
||||||
|
--enable_warnings
|
||||||
|
create table t1 (a int);
|
||||||
|
flush status;
|
||||||
|
lock tables t1 read;
|
||||||
|
let $tlwa= `show status like 'Table_locks_waited'`;
|
||||||
|
connect (waiter,localhost,root,,);
|
||||||
|
connection waiter;
|
||||||
|
--send insert into t1 values(1);
|
||||||
|
connection default;
|
||||||
|
let $wait_condition=
|
||||||
|
select count(*) = 1 from information_schema.processlist
|
||||||
|
where state = "Locked" and info = "insert into t1 values(1)";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
let $tlwb= `show status like 'Table_locks_waited'`;
|
||||||
|
unlock tables;
|
||||||
|
drop table t1;
|
||||||
|
disconnect waiter;
|
||||||
|
connection default;
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
|
eval SET @tlwa= SUBSTRING_INDEX('$tlwa', ' ', -1);
|
||||||
|
eval SET @tlwb= SUBSTRING_INDEX('$tlwb', ' ', -1);
|
||||||
drop database pbxt;
|
drop database pbxt;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
# End of 5.0 tests
|
select @tlwa < @tlwb;
|
||||||
|
|
||||||
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
# Wait till all disconnects are completed
|
||||||
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,8 @@ static const char cur_dir_name[]= {FN_CURLIB, 0};
|
||||||
RETURN
|
RETURN
|
||||||
0 if ok, !=0 if error
|
0 if ok, !=0 if error
|
||||||
*/
|
*/
|
||||||
int my_sync_dir(const char *dir_name, myf my_flags)
|
int my_sync_dir(const char *dir_name __attribute__((unused)),
|
||||||
|
myf my_flags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#ifdef NEED_EXPLICIT_SYNC_DIR
|
#ifdef NEED_EXPLICIT_SYNC_DIR
|
||||||
DBUG_ENTER("my_sync_dir");
|
DBUG_ENTER("my_sync_dir");
|
||||||
|
@ -141,7 +142,8 @@ int my_sync_dir(const char *dir_name, myf my_flags)
|
||||||
RETURN
|
RETURN
|
||||||
0 if ok, !=0 if error
|
0 if ok, !=0 if error
|
||||||
*/
|
*/
|
||||||
int my_sync_dir_by_file(const char *file_name, myf my_flags)
|
int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
|
||||||
|
myf my_flags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
#ifdef NEED_EXPLICIT_SYNC_DIR
|
#ifdef NEED_EXPLICIT_SYNC_DIR
|
||||||
char dir_name[FN_REFLEN];
|
char dir_name[FN_REFLEN];
|
||||||
|
|
|
@ -10565,4 +10565,6 @@ mysql_declare_plugin(ndbcluster)
|
||||||
}
|
}
|
||||||
mysql_declare_plugin_end;
|
mysql_declare_plugin_end;
|
||||||
|
|
||||||
|
#else
|
||||||
|
int Sun_ar_require_a_symbol_here= 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,10 +33,9 @@
|
||||||
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
|
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zlib.h>
|
|
||||||
|
|
||||||
#include "../../mysys/mysys_priv.h"
|
#include "../../mysys/mysys_priv.h"
|
||||||
#include <my_dir.h>
|
#include <my_dir.h>
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -6094,7 +6094,7 @@ uint _ma_apply_redo_insert_row_head_or_tail(MARIA_HA *info, LSN lsn,
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type))
|
if (((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != page_type))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
This is a page that has been freed before and now should be
|
This is a page that has been freed before and now should be
|
||||||
|
@ -6241,7 +6241,7 @@ uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn,
|
||||||
Note that in case the page is not anymore a head or tail page
|
Note that in case the page is not anymore a head or tail page
|
||||||
a future redo will fix the bitmap.
|
a future redo will fix the bitmap.
|
||||||
*/
|
*/
|
||||||
if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type)
|
if ((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type)
|
||||||
{
|
{
|
||||||
empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET);
|
empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET);
|
||||||
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE,
|
if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE,
|
||||||
|
|
|
@ -2823,8 +2823,8 @@ static my_bool translog_page_validator(uchar *page,
|
||||||
|
|
||||||
data->was_recovered= 0;
|
data->was_recovered= 0;
|
||||||
|
|
||||||
if (uint3korr(page) != page_no ||
|
if ((pgcache_page_no_t) uint3korr(page) != page_no ||
|
||||||
uint3korr(page + 3) != data->number)
|
(uint32) uint3korr(page + 3) != data->number)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error", ("Page (%lu,0x%lx): "
|
DBUG_PRINT("error", ("Page (%lu,0x%lx): "
|
||||||
"page address written in the page is incorrect: "
|
"page address written in the page is incorrect: "
|
||||||
|
|
|
@ -180,7 +180,7 @@ void start_test(int id)
|
||||||
if (pagecacheing && rnd(2) == 0)
|
if (pagecacheing && rnd(2) == 0)
|
||||||
init_pagecache(maria_pagecache, 65536L, 0, 0, MARIA_KEY_BLOCK_LENGTH,
|
init_pagecache(maria_pagecache, 65536L, 0, 0, MARIA_KEY_BLOCK_LENGTH,
|
||||||
MY_WME);
|
MY_WME);
|
||||||
printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout);
|
printf("Process %d, pid: %ld\n",id,(long) getpid()); fflush(stdout);
|
||||||
|
|
||||||
for (error=i=0 ; i < tests && !error; i++)
|
for (error=i=0 ; i < tests && !error; i++)
|
||||||
{
|
{
|
||||||
|
@ -362,7 +362,7 @@ int test_write(MARIA_HA *file,int id,int lock_type)
|
||||||
maria_extra(file,HA_EXTRA_WRITE_CACHE,0);
|
maria_extra(file,HA_EXTRA_WRITE_CACHE,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf((char*) record.id,"%7d",getpid());
|
sprintf((char*) record.id,"%7ld", (long) getpid());
|
||||||
strnmov((char*) record.text,"Testing...", sizeof(record.text));
|
strnmov((char*) record.text,"Testing...", sizeof(record.text));
|
||||||
|
|
||||||
tries=(uint) rnd(100)+10;
|
tries=(uint) rnd(100)+10;
|
||||||
|
|
|
@ -178,7 +178,8 @@ void start_test(int id)
|
||||||
}
|
}
|
||||||
if (key_cacheing && rnd(2) == 0)
|
if (key_cacheing && rnd(2) == 0)
|
||||||
init_key_cache(dflt_key_cache, KEY_CACHE_BLOCK_SIZE, 65536L, 0, 0);
|
init_key_cache(dflt_key_cache, KEY_CACHE_BLOCK_SIZE, 65536L, 0, 0);
|
||||||
printf("Process %d, pid: %d\n",id,getpid()); fflush(stdout);
|
printf("Process %d, pid: %ld\n", id, (long) getpid());
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
for (error=i=0 ; i < tests && !error; i++)
|
for (error=i=0 ; i < tests && !error; i++)
|
||||||
{
|
{
|
||||||
|
@ -362,7 +363,7 @@ int test_write(MI_INFO *file,int id,int lock_type)
|
||||||
mi_extra(file,HA_EXTRA_WRITE_CACHE,0);
|
mi_extra(file,HA_EXTRA_WRITE_CACHE,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf((char*) record.id,"%7d",getpid());
|
sprintf((char*) record.id,"%7ld",(long) getpid());
|
||||||
strnmov((char*) record.text,"Testing...", sizeof(record.text));
|
strnmov((char*) record.text,"Testing...", sizeof(record.text));
|
||||||
|
|
||||||
tries=(uint) rnd(100)+10;
|
tries=(uint) rnd(100)+10;
|
||||||
|
|
|
@ -1294,7 +1294,7 @@ static int pbxt_init(void *p)
|
||||||
#6 0x000debe1 in THD::THD at sql_class.cc:631
|
#6 0x000debe1 in THD::THD at sql_class.cc:631
|
||||||
#7 0x00e207a4 in myxt_create_thread at myxt_xt.cc:2666
|
#7 0x00e207a4 in myxt_create_thread at myxt_xt.cc:2666
|
||||||
#8 0x00e3134b in tabc_fr_run_thread at tabcache_xt.cc:982
|
#8 0x00e3134b in tabc_fr_run_thread at tabcache_xt.cc:982
|
||||||
#9 0x00e422ca in thr_main at thread_xt.cc:1006
|
#9 0x00e422ca in thr_main_pbxt at thread_xt.cc:1006
|
||||||
#10 0x91ff7c55 in _pthread_start
|
#10 0x91ff7c55 in _pthread_start
|
||||||
#11 0x91ff7b12 in thread_start
|
#11 0x91ff7b12 in thread_start
|
||||||
*
|
*
|
||||||
|
@ -1557,7 +1557,7 @@ static int pbxt_prepare(handlerton *hton, THD *thd, bool all)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, char *thread_name, int *err)
|
static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err)
|
||||||
{
|
{
|
||||||
THD *thd;
|
THD *thd;
|
||||||
XTThreadPtr self = NULL;
|
XTThreadPtr self = NULL;
|
||||||
|
|
|
@ -3314,7 +3314,7 @@ static void *xn_xres_run_recovery_thread(XTThreadPtr self)
|
||||||
* #7 0x000c0db2 in THD::~THD at sql_class.cc:934
|
* #7 0x000c0db2 in THD::~THD at sql_class.cc:934
|
||||||
* #8 0x003b025b in myxt_destroy_thread at myxt_xt.cc:2999
|
* #8 0x003b025b in myxt_destroy_thread at myxt_xt.cc:2999
|
||||||
* #9 0x003b66b5 in xn_xres_run_recovery_thread at restart_xt.cc:3196
|
* #9 0x003b66b5 in xn_xres_run_recovery_thread at restart_xt.cc:3196
|
||||||
* #10 0x003cbfbb in thr_main at thread_xt.cc:1020
|
* #10 0x003cbfbb in thr_main_pbxt at thread_xt.cc:1020
|
||||||
*
|
*
|
||||||
myxt_destroy_thread(mysql_thread, TRUE);
|
myxt_destroy_thread(mysql_thread, TRUE);
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ static xtBool thr_setup_signals(void)
|
||||||
|
|
||||||
typedef void *(*ThreadMainFunc)(XTThreadPtr self);
|
typedef void *(*ThreadMainFunc)(XTThreadPtr self);
|
||||||
|
|
||||||
extern "C" void *thr_main(void *data)
|
extern "C" void *thr_main_pbxt(void *data)
|
||||||
{
|
{
|
||||||
ThreadDataPtr td = (ThreadDataPtr) data;
|
ThreadDataPtr td = (ThreadDataPtr) data;
|
||||||
XTThreadPtr self = td->td_thr;
|
XTThreadPtr self = td->td_thr;
|
||||||
|
@ -1503,10 +1503,10 @@ xtPublic pthread_t xt_run_thread(XTThreadPtr self, XTThreadPtr child, void *(*st
|
||||||
pthread_attr_t attr = { 0, 0, 0 };
|
pthread_attr_t attr = { 0, 0, 0 };
|
||||||
|
|
||||||
attr.priority = THREAD_PRIORITY_NORMAL;
|
attr.priority = THREAD_PRIORITY_NORMAL;
|
||||||
err = pthread_create(&child_thread, &attr, thr_main, &data);
|
err = pthread_create(&child_thread, &attr, thr_main_pbxt, &data);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
err = pthread_create(&child_thread, NULL, thr_main, &data);
|
err = pthread_create(&child_thread, NULL, thr_main_pbxt, &data);
|
||||||
#endif
|
#endif
|
||||||
if (err) {
|
if (err) {
|
||||||
xt_free_thread(child);
|
xt_free_thread(child);
|
||||||
|
|
|
@ -536,7 +536,7 @@ extern struct XTThread **xt_thr_array;
|
||||||
* Function prototypes
|
* Function prototypes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" void *thr_main(void *data);
|
extern "C" void *thr_main_pbxt(void *data);
|
||||||
|
|
||||||
void xt_get_now(char *buffer, size_t len);
|
void xt_get_now(char *buffer, size_t len);
|
||||||
xtBool xt_init_logging(void);
|
xtBool xt_init_logging(void);
|
||||||
|
|
|
@ -81,6 +81,7 @@ Created 10/8/1995 Heikki Tuuri
|
||||||
#include "ut0mem.h"
|
#include "ut0mem.h"
|
||||||
#include "ut0ut.h"
|
#include "ut0ut.h"
|
||||||
#include "os0proc.h"
|
#include "os0proc.h"
|
||||||
|
#include "os0sync.h"
|
||||||
#include "mem0mem.h"
|
#include "mem0mem.h"
|
||||||
#include "mem0pool.h"
|
#include "mem0pool.h"
|
||||||
#include "sync0sync.h"
|
#include "sync0sync.h"
|
||||||
|
@ -1102,12 +1103,12 @@ srv_conc_enter_innodb_timer_based(trx_t* trx)
|
||||||
}
|
}
|
||||||
retry:
|
retry:
|
||||||
if (srv_conc_n_threads < (lint) srv_thread_concurrency) {
|
if (srv_conc_n_threads < (lint) srv_thread_concurrency) {
|
||||||
conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1);
|
conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1);
|
||||||
if (conc_n_threads <= (lint) srv_thread_concurrency) {
|
if (conc_n_threads <= (lint) srv_thread_concurrency) {
|
||||||
enter_innodb_with_tickets(trx);
|
enter_innodb_with_tickets(trx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
__sync_add_and_fetch(&srv_conc_n_threads, -1);
|
os_atomic_increment_lint(&srv_conc_n_threads, -1);
|
||||||
}
|
}
|
||||||
if (!has_yielded)
|
if (!has_yielded)
|
||||||
{
|
{
|
||||||
|
@ -1118,7 +1119,7 @@ retry:
|
||||||
if (trx->has_search_latch
|
if (trx->has_search_latch
|
||||||
|| NULL != UT_LIST_GET_FIRST(trx->trx_locks)) {
|
|| NULL != UT_LIST_GET_FIRST(trx->trx_locks)) {
|
||||||
|
|
||||||
conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1);
|
conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1);
|
||||||
enter_innodb_with_tickets(trx);
|
enter_innodb_with_tickets(trx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1130,7 @@ retry:
|
||||||
trx->op_info = "";
|
trx->op_info = "";
|
||||||
has_slept++;
|
has_slept++;
|
||||||
}
|
}
|
||||||
conc_n_threads = __sync_add_and_fetch(&srv_conc_n_threads, 1);
|
conc_n_threads = os_atomic_increment_lint(&srv_conc_n_threads, 1);
|
||||||
enter_innodb_with_tickets(trx);
|
enter_innodb_with_tickets(trx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1137,7 +1138,7 @@ retry:
|
||||||
static void
|
static void
|
||||||
srv_conc_exit_innodb_timer_based(trx_t* trx)
|
srv_conc_exit_innodb_timer_based(trx_t* trx)
|
||||||
{
|
{
|
||||||
__sync_add_and_fetch(&srv_conc_n_threads, -1);
|
os_atomic_increment_lint(&srv_conc_n_threads, -1);
|
||||||
trx->declared_to_be_inside_innodb = FALSE;
|
trx->declared_to_be_inside_innodb = FALSE;
|
||||||
trx->n_tickets_to_enter_innodb = 0;
|
trx->n_tickets_to_enter_innodb = 0;
|
||||||
return;
|
return;
|
||||||
|
@ -1326,7 +1327,7 @@ srv_conc_force_enter_innodb(
|
||||||
ut_ad(srv_conc_n_threads >= 0);
|
ut_ad(srv_conc_n_threads >= 0);
|
||||||
#ifdef INNODB_RW_LOCKS_USE_ATOMICS
|
#ifdef INNODB_RW_LOCKS_USE_ATOMICS
|
||||||
if (srv_thread_concurrency_timer_based) {
|
if (srv_thread_concurrency_timer_based) {
|
||||||
__sync_add_and_fetch(&srv_conc_n_threads, 1);
|
os_atomic_increment_lint(&srv_conc_n_threads, 1);
|
||||||
trx->declared_to_be_inside_innodb = TRUE;
|
trx->declared_to_be_inside_innodb = TRUE;
|
||||||
trx->n_tickets_to_enter_innodb = 1;
|
trx->n_tickets_to_enter_innodb = 1;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -88,6 +88,9 @@ storage/maria/ma_pagecache.c: .*'info_check_pin' defined but not used
|
||||||
#
|
#
|
||||||
storage/pbxt/ : typedef.*was ignored in this declaration
|
storage/pbxt/ : typedef.*was ignored in this declaration
|
||||||
|
|
||||||
|
#
|
||||||
|
# Yassl
|
||||||
|
include/runtime.hpp: .*pure_error.*
|
||||||
|
|
||||||
#
|
#
|
||||||
# Groff warnings on OpenSUSE.
|
# Groff warnings on OpenSUSE.
|
||||||
|
|
Loading…
Reference in a new issue