Commit 8a08fd43 authored by Luis Soares's avatar Luis Soares

BUG#11762616: BUG#55229: 'POSTION'

            
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
parent 16f26d2a
...@@ -9739,7 +9739,7 @@ int find_set(REP_SETS *sets,REP_SET *find) ...@@ -9739,7 +9739,7 @@ int find_set(REP_SETS *sets,REP_SET *find)
return i; 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 /* find if there is a found_set with same table_offset & found_offset
...@@ -9759,7 +9759,7 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset) ...@@ -9759,7 +9759,7 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
found_set[i].table_offset=table_offset; found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset; found_set[i].found_offset=found_offset;
found_sets++; 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*/ /* 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 This program is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU General Public License
the Free Software Foundation; version 2 of the 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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software 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 Replace strings in textfile
...@@ -819,7 +821,7 @@ static short find_set(REP_SETS *sets,REP_SET *find) ...@@ -819,7 +821,7 @@ static short find_set(REP_SETS *sets,REP_SET *find)
return (short) i; return (short) i;
} }
} }
return (short) i; /* return new postion */ return (short) i; /* return new position */
} }
...@@ -842,7 +844,7 @@ static short find_found(FOUND_SET *found_set,uint table_offset, ...@@ -842,7 +844,7 @@ static short find_found(FOUND_SET *found_set,uint table_offset,
found_set[i].table_offset=table_offset; found_set[i].table_offset=table_offset;
found_set[i].found_offset=found_offset; found_set[i].found_offset=found_offset;
found_sets++; 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*/ /* Return 1 if regexp starts with \b or ends with \b*/
......
...@@ -19,7 +19,7 @@ change master to master_port=MASTER_PORT; ...@@ -19,7 +19,7 @@ change master to master_port=MASTER_PORT;
start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS; 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_io_to_start.inc
include/wait_for_slave_sql_to_stop.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; show tables;
Tables_in_test Tables_in_test
t1 t1
......
...@@ -9,29 +9,29 @@ connection master; ...@@ -9,29 +9,29 @@ connection master;
CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t1(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1),(2),(3),(4); INSERT INTO t1 VALUES (1),(2),(3),(4);
DROP TABLE t1; DROP TABLE t1;
# Save master log postion for query DROP TABLE t1 # Save master log position for query DROP TABLE t1
save_master_pos; save_master_pos;
let $master_pos_drop_t1= query_get_value(SHOW BINLOG EVENTS, Pos, 7); 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); let $master_log_file= query_get_value(SHOW BINLOG EVENTS, Log_name, 7);
CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY); CREATE TABLE t2(n INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
# Save master log postion for query CREATE TABLE t2 # Save master log position for query CREATE TABLE t2
save_master_pos; save_master_pos;
let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 8); let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 8);
INSERT INTO t2 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2);
save_master_pos; save_master_pos;
# 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 BINLOG EVENTS, End_log_pos, 12); let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 12);
sync_slave_with_master; sync_slave_with_master;
# 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); let $relay_pos_insert1_t2= query_get_value(show slave status, Relay_Log_Pos, 1);
connection master; connection master;
INSERT INTO t2 VALUES (3),(4); INSERT INTO t2 VALUES (3),(4);
DROP TABLE t2; DROP TABLE t2;
# 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_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17); let $master_pos_drop_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 17);
sync_slave_with_master; sync_slave_with_master;
......
...@@ -47,7 +47,7 @@ eval start slave until master_log_file='master-bin.000001', master_log_pos=$unti ...@@ -47,7 +47,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_io_to_start.inc
--source include/wait_for_slave_sql_to_stop.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; show tables;
# cleanup # cleanup
......
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU General Public License
the Free Software Foundation; version 2 of the 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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software 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 */ /* Definitions for parameters to do with handler-routines */
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
a table with rnd_next() a table with rnd_next()
- We will see all rows (including deleted ones) - We will see all rows (including deleted ones)
- Row positions are 'table->s->db_record_offset' apart - 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. row to be able to find the row later.
*/ */
#define HA_REC_NOT_IN_SEQ (1 << 3) #define HA_REC_NOT_IN_SEQ (1 << 3)
......
...@@ -97,7 +97,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]= ...@@ -97,7 +97,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]=
registration on master", registration on master",
"Reconnecting after a failed registration on master", "Reconnecting after a failed registration on master",
"failed registering on master, reconnecting to try again, \ "failed registering on master, reconnecting to try again, \
log '%s' at postion %s", log '%s' at position %s",
"COM_REGISTER_SLAVE", "COM_REGISTER_SLAVE",
"Slave I/O thread killed during or after reconnect" "Slave I/O thread killed during or after reconnect"
}, },
...@@ -105,7 +105,7 @@ log '%s' at postion %s", ...@@ -105,7 +105,7 @@ log '%s' at postion %s",
"Waiting to reconnect after a failed binlog dump request", "Waiting to reconnect after a failed binlog dump request",
"Slave I/O thread killed while retrying master dump", "Slave I/O thread killed while retrying master dump",
"Reconnecting after a failed binlog dump request", "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", "COM_BINLOG_DUMP",
"Slave I/O thread killed during or after reconnect" "Slave I/O thread killed during or after reconnect"
}, },
...@@ -114,7 +114,7 @@ log '%s' at postion %s", ...@@ -114,7 +114,7 @@ log '%s' at postion %s",
"Slave I/O thread killed while waiting to reconnect after a failed read", "Slave I/O thread killed while waiting to reconnect after a failed read",
"Reconnecting after a failed master event read", "Reconnecting after a failed master event read",
"Slave I/O thread: Failed reading log event, reconnecting to retry, \ "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 \ "Slave I/O thread killed during or after a reconnect done to recover from \
failed read" failed read"
......
/* 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 This program is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU General Public License
the Free Software Foundation; version 2 of the 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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software 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 #ifdef USE_PRAGMA_IMPLEMENTATION
#pragma implementation // gcc: Class implementation #pragma implementation // gcc: Class implementation
...@@ -864,7 +866,7 @@ int ha_archive::write_row(uchar *buf) ...@@ -864,7 +866,7 @@ int ha_archive::write_row(uchar *buf)
*/ */
azflush(&(share->archive_write), Z_SYNC_FLUSH); 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)) 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 This program is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU General Public License
the Free Software Foundation; version 2 of the 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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software 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 "lgman.hpp"
#include "diskpage.hpp" #include "diskpage.hpp"
...@@ -2501,7 +2503,7 @@ Lgman::init_run_undo_log(Signal* signal) ...@@ -2501,7 +2503,7 @@ Lgman::init_run_undo_log(Signal* signal)
sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB); 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; Ptr<Logfile_group> pos;
for(tmp.first(pos); !pos.isNull(); tmp.next(pos)) for(tmp.first(pos); !pos.isNull(); tmp.next(pos))
......
/* 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 This program is free software; you can redistribute it and/or
it under the terms of the GNU General Public License as published by modify it under the terms of the GNU General Public License
the Free Software Foundation; version 2 of the 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, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software 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 Note that we can't have assertion on file descriptors; The reason for
...@@ -548,7 +550,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size) ...@@ -548,7 +550,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
{ {
size_t length; size_t length;
size_t remain_local; size_t remain_local;
char *current_postion; char *current_position;
HANDLE events[2]; HANDLE events[2];
DBUG_ENTER("vio_read_shared_memory"); DBUG_ENTER("vio_read_shared_memory");
...@@ -556,7 +558,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size) ...@@ -556,7 +558,7 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
size)); size));
remain_local = size; remain_local = size;
current_postion=buf; current_position=buf;
events[0]= vio->event_server_wrote; events[0]= vio->event_server_wrote;
events[1]= vio->event_conn_closed; events[1]= vio->event_conn_closed;
...@@ -590,11 +592,11 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size) ...@@ -590,11 +592,11 @@ size_t vio_read_shared_memory(Vio * vio, uchar* buf, size_t size)
if (length > remain_local) if (length > remain_local)
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_remain-=length;
vio->shared_memory_pos+=length; vio->shared_memory_pos+=length;
current_postion+=length; current_position+=length;
remain_local-=length; remain_local-=length;
if (!vio->shared_memory_remain) if (!vio->shared_memory_remain)
...@@ -614,7 +616,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size) ...@@ -614,7 +616,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
{ {
size_t length, remain, sz; size_t length, remain, sz;
HANDLE pos; HANDLE pos;
const uchar *current_postion; const uchar *current_position;
HANDLE events[2]; HANDLE events[2];
DBUG_ENTER("vio_write_shared_memory"); DBUG_ENTER("vio_write_shared_memory");
...@@ -622,7 +624,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size) ...@@ -622,7 +624,7 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
size)); size));
remain = size; remain = size;
current_postion = buf; current_position = buf;
events[0]= vio->event_server_read; events[0]= vio->event_server_read;
events[1]= vio->event_conn_closed; events[1]= vio->event_conn_closed;
...@@ -640,9 +642,9 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size) ...@@ -640,9 +642,9 @@ size_t vio_write_shared_memory(Vio * vio, const uchar* buf, size_t size)
int4store(vio->handle_map,sz); int4store(vio->handle_map,sz);
pos = vio->handle_map + 4; pos = vio->handle_map + 4;
memcpy(pos,current_postion,sz); memcpy(pos,current_position,sz);
remain-=sz; remain-=sz;
current_postion+=sz; current_position+=sz;
if (!SetEvent(vio->event_client_wrote)) if (!SetEvent(vio->event_client_wrote))
DBUG_RETURN((size_t) -1); 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