Commit a85150c3 authored by Luis Soares's avatar Luis Soares

BUG#11762616: BUG#55229: 'POSTION'

Manual merge from mysql-5.1 into mysql-5.5.

Conflicts
=========
Text conflict in mysql-test/suite/rpl/t/rpl_row_until.test
Text conflict in sql/handler.h
Text conflict in storage/archive/ha_archive.cc
parents f2fa3015 8a08fd43
......@@ -10071,7 +10071,7 @@ int find_set(REP_SETS *sets,REP_SET *find)
return i;
}
}
return i; /* return new postion */
return i; /* return new position */
}
/* find if there is a found_set with same table_offset & found_offset
......@@ -10091,7 +10091,7 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset;
found_sets++;
return -i-2; /* return new postion */
return -i-2; /* return new position */
}
/* Return 1 if regexp starts with \b or ends with \b*/
......
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -11,7 +12,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA */
/*
Replace strings in textfile
......@@ -818,7 +820,7 @@ static short find_set(REP_SETS *sets,REP_SET *find)
return (short) i;
}
}
return (short) i; /* return new postion */
return (short) i; /* return new position */
}
......@@ -841,7 +843,7 @@ static short find_found(FOUND_SET *found_set,uint table_offset,
found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset;
found_sets++;
return (short) (-i-2); /* return new postion */
return (short) (-i-2); /* return new position */
}
/* Return 1 if regexp starts with \b or ends with \b*/
......
......@@ -22,7 +22,7 @@ change master to master_port=MASTER_PORT;
start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS;
include/wait_for_slave_io_to_start.inc
include/wait_for_slave_sql_to_stop.inc
*** checking until postion execution: must be only t1 in the list ***
*** checking until position execution: must be only t1 in the list ***
show tables;
Tables_in_test
t1
......
......@@ -8,32 +8,32 @@
connection master;
CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(2),(3),(4);
# Save master log postion for query DROP TABLE t1
# Save master log position for query DROP TABLE t1
let $master_pos_drop_t1= query_get_value(SHOW MASTER STATUS, Position, 1);
DROP TABLE t1;
# Save master log postion for query DROP TABLE t1
# Save master log position for query DROP TABLE t1
save_master_pos;
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7);
let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
# Save master log postion for query CREATE TABLE t2
# Save master log position for query CREATE TABLE t2
let $master_pos_create_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
#show binlog events;
INSERT INTO t2 VALUES (1),(2);
# Save master log postion for query INSERT INTO t2 VALUES (1),(2);
# Save master log position for query INSERT INTO t2 VALUES (1),(2);
let $master_pos_insert1_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
#show binlog events;
# Save relay log postion for query INSERT INTO t2 VALUES (1),(2);
# Save relay log position for query INSERT INTO t2 VALUES (1),(2);
let $relay_pos_insert1_t2= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1);
connection master;
INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2;
# Save master log postion for query DROP TABLE t2;
# Save master log position for query DROP TABLE t2;
let $master_pos_drop_t2= query_get_value(SHOW MASTER STATUS, Position, 1);
sync_slave_with_master;
#show binlog events;
......
......@@ -50,7 +50,7 @@ eval start slave until master_log_file='master-bin.000001', master_log_pos=$unti
--source include/wait_for_slave_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.inc
--echo *** checking until postion execution: must be only t1 in the list ***
--echo *** checking until position execution: must be only t1 in the list ***
show tables;
# cleanup
......
......@@ -3,9 +3,10 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -14,7 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA */
/* Definitions for parameters to do with handler-routines */
......@@ -60,7 +62,7 @@
a table with rnd_next()
- We will see all rows (including deleted ones)
- Row positions are 'table->s->db_record_offset' apart
If this flag is not set, filesort will do a postion() call for each matched
If this flag is not set, filesort will do a position() call for each matched
row to be able to find the row later.
*/
#define HA_REC_NOT_IN_SEQ (1 << 3)
......
......@@ -113,7 +113,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]=
registration on master",
"Reconnecting after a failed registration on master",
"failed registering on master, reconnecting to try again, \
log '%s' at postion %s",
log '%s' at position %s",
"COM_REGISTER_SLAVE",
"Slave I/O thread killed during or after reconnect"
},
......@@ -121,7 +121,7 @@ log '%s' at postion %s",
"Waiting to reconnect after a failed binlog dump request",
"Slave I/O thread killed while retrying master dump",
"Reconnecting after a failed binlog dump request",
"failed dump request, reconnecting to try again, log '%s' at postion %s",
"failed dump request, reconnecting to try again, log '%s' at position %s",
"COM_BINLOG_DUMP",
"Slave I/O thread killed during or after reconnect"
},
......@@ -130,7 +130,7 @@ log '%s' at postion %s",
"Slave I/O thread killed while waiting to reconnect after a failed read",
"Reconnecting after a failed master event read",
"Slave I/O thread: Failed reading log event, reconnecting to retry, \
log '%s' at postion %s",
log '%s' at position %s",
"",
"Slave I/O thread killed during or after a reconnect done to recover from \
failed read"
......
/* Copyright (C) 2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -11,7 +12,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA */
#ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation
......@@ -923,7 +925,7 @@ int ha_archive::write_row(uchar *buf)
*/
azflush(&(share->archive_write), Z_SYNC_FLUSH);
/*
Set the position of the local read thread to the beginning postion.
Set the position of the local read thread to the beginning position.
*/
if (read_data_header(&archive))
{
......
/* Copyright (C) 2003 MySQL AB
/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -11,7 +12,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA */
#include "lgman.hpp"
#include "diskpage.hpp"
......@@ -2501,7 +2503,7 @@ Lgman::init_run_undo_log(Signal* signal)
sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
/**
* Insert in correct postion in list of logfile_group's
* Insert in correct position in list of logfile_group's
*/
Ptr<Logfile_group> pos;
for(tmp.first(pos); !pos.isNull(); tmp.next(pos))
......
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2 of
the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -11,7 +12,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA */
/*
Note that we can't have assertion on file descriptors; The reason for
......@@ -865,7 +867,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
{
size_t length;
size_t remain_local;
char *current_postion;
char *current_position;
HANDLE events[2];
DBUG_ENTER("vio_read_shared_memory");
......@@ -873,7 +875,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
size));
remain_local = size;
current_postion=buf;
current_position=buf;
events[0]= vio->event_server_wrote;
events[1]= vio->event_conn_closed;
......@@ -907,11 +909,11 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
if (length > remain_local)
length = remain_local;
memcpy(current_postion,vio->shared_memory_pos,length);
memcpy(current_position,vio->shared_memory_pos,length);
vio->shared_memory_remain-=length;
vio->shared_memory_pos+=length;
current_postion+=length;
current_position+=length;
remain_local-=length;
if (!vio->shared_memory_remain)
......@@ -931,7 +933,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
{
size_t length, remain, sz;
HANDLE pos;
const uchar *current_postion;
const uchar *current_position;
HANDLE events[2];
DBUG_ENTER("vio_write_shared_memory");
......@@ -939,7 +941,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
size));
remain = size;
current_postion = buf;
current_position = buf;
events[0]= vio->event_server_read;
events[1]= vio->event_conn_closed;
......@@ -957,9 +959,9 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
int4store(vio->handle_map,sz);
pos = vio->handle_map + 4;
memcpy(pos,current_postion,sz);
memcpy(pos,current_position,sz);
remain-=sz;
current_postion+=sz;
current_position+=sz;
if (!SetEvent(vio->event_client_wrote))
DBUG_RETURN((size_t) -1);
}
......
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