Commit a009cd4d authored by unknown's avatar unknown

Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into mysql.com:/home/stewart/Documents/MySQL/5.0/ndb
parents 23afe307 1628141f
...@@ -20,14 +20,20 @@ if [ "$BK_STATUS" = OK ] ...@@ -20,14 +20,20 @@ if [ "$BK_STATUS" = OK ]
then then
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet` CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'` BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'` WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
if [ "$BUG" = "" ] if [ "$BUG" = "" ]
then then
TO=dev-public@mysql.com TO=dev-public@mysql.com
BS=""
BH=""
else else
TO=dev-bugs@mysql.com TO=dev-bugs@mysql.com
BS=" BUG#$BUG"
# need newline here
BH="X-Bug: $BUG
"
fi fi
#++ #++
# dev-public@ / dev-bugs@ # dev-public@ / dev-bugs@
...@@ -38,8 +44,8 @@ fi ...@@ -38,8 +44,8 @@ fi
List-ID: <bk.mysql-$VERSION> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $TO To: $TO
Subject: bk commit - $VERSION tree ($CHANGESET)${BUG}${WL} Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
$BH
EOF EOF
bk changes -v -r+ bk changes -v -r+
bk cset -r+ -d bk cset -r+ -d
...@@ -54,14 +60,15 @@ EOF ...@@ -54,14 +60,15 @@ EOF
List-ID: <bk.mysql-$VERSION> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $INTERNALS To: $INTERNALS
Subject: bk commit into $VERSION tree ($CHANGESET) Subject: bk commit into $VERSION tree ($CHANGESET)$BS
$BH
Below is the list of changes that have just been committed into a local Below is the list of changes that have just been committed into a local
$VERSION repository of $USER. When $USER does a push these changes will $VERSION repository of $USER. When $USER does a push these changes will
be propagated to the main repository and, within 24 hours after the be propagated to the main repository and, within 24 hours after the
push, to the public repository. push, to the public repository.
For information on how to access the public repository For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
EOF EOF
bk changes -v -r+ bk changes -v -r+
...@@ -81,7 +88,7 @@ EOF ...@@ -81,7 +88,7 @@ EOF
List-ID: <bk.mysql-$VERSION> List-ID: <bk.mysql-$VERSION>
From: $FROM From: $FROM
To: $DOCS To: $DOCS
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET) Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
EOF EOF
bk changes -v -r+ bk changes -v -r+
......
...@@ -66,18 +66,18 @@ LINK32=link.exe ...@@ -66,18 +66,18 @@ LINK32=link.exe
# PROP Output_Dir ".\Release" # PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release" # PROP Intermediate_Dir ".\Release"
# PROP Target_Dir "" # PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX # ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX # ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
# ADD BASE MTL /nologo /tlb".\Release\client_test.tlb" /win32 # ADD BASE MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
# ADD MTL /nologo /tlb".\Release\client_test.tlb" /win32 # ADD MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
# ADD BASE RSC /l 1033 # ADD BASE RSC /l 1033
# ADD RSC /l 1033 # ADD RSC /l 1033
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
!ENDIF !ENDIF
......
...@@ -1130,15 +1130,15 @@ static int dump_local_log_entries(const char* logname) ...@@ -1130,15 +1130,15 @@ static int dump_local_log_entries(const char* logname)
} }
check_header(file, &description_event); check_header(file, &description_event);
} }
else // reading from stdin; TODO: check that it works else // reading from stdin;
{ {
if (init_io_cache(file, fileno(result_file), 0, READ_CACHE, (my_off_t) 0, if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE))) 0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
return 1; return 1;
check_header(file, &description_event); check_header(file, &description_event);
if (start_position) if (start_position)
{ {
/* skip 'start_position' characters from stdout */ /* skip 'start_position' characters from stdin */
byte buff[IO_SIZE]; byte buff[IO_SIZE];
my_off_t length,tmp; my_off_t length,tmp;
for (length= start_position_mot ; length > 0 ; length-=tmp) for (length= start_position_mot ; length > 0 ; length-=tmp)
...@@ -1151,8 +1151,6 @@ static int dump_local_log_entries(const char* logname) ...@@ -1151,8 +1151,6 @@ static int dump_local_log_entries(const char* logname)
} }
} }
} }
file->pos_in_file= start_position_mot;
file->seek_not_done=0;
} }
if (!description_event || !description_event->is_valid()) if (!description_event || !description_event->is_valid())
......
...@@ -376,8 +376,8 @@ static REP_SET *make_new_set(REP_SETS *sets); ...@@ -376,8 +376,8 @@ static REP_SET *make_new_set(REP_SETS *sets);
static void make_sets_invisible(REP_SETS *sets); static void make_sets_invisible(REP_SETS *sets);
static void free_last_set(REP_SETS *sets); static void free_last_set(REP_SETS *sets);
static void free_sets(REP_SETS *sets); static void free_sets(REP_SETS *sets);
static void set_bit(REP_SET *set, uint bit); static void internal_set_bit(REP_SET *set, uint bit);
static void clear_bit(REP_SET *set, uint bit); static void internal_clear_bit(REP_SET *set, uint bit);
static void or_bits(REP_SET *to,REP_SET *from); static void or_bits(REP_SET *to,REP_SET *from);
static void copy_bits(REP_SET *to,REP_SET *from); static void copy_bits(REP_SET *to,REP_SET *from);
static int cmp_bits(REP_SET *set1,REP_SET *set2); static int cmp_bits(REP_SET *set1,REP_SET *set2);
...@@ -454,7 +454,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -454,7 +454,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
{ {
if (from[i][0] == '\\' && from[i][1] == '^') if (from[i][0] == '\\' && from[i][1] == '^')
{ {
set_bit(start_states,states+1); internal_set_bit(start_states,states+1);
if (!from[i][2]) if (!from[i][2])
{ {
start_states->table_offset=i; start_states->table_offset=i;
...@@ -463,8 +463,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -463,8 +463,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
} }
else if (from[i][0] == '\\' && from[i][1] == '$') else if (from[i][0] == '\\' && from[i][1] == '$')
{ {
set_bit(start_states,states); internal_set_bit(start_states,states);
set_bit(word_states,states); internal_set_bit(word_states,states);
if (!from[i][2] && start_states->table_offset == (uint) ~0) if (!from[i][2] && start_states->table_offset == (uint) ~0)
{ {
start_states->table_offset=i; start_states->table_offset=i;
...@@ -473,11 +473,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -473,11 +473,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
} }
else else
{ {
set_bit(word_states,states); internal_set_bit(word_states,states);
if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2])) if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
set_bit(start_states,states+1); internal_set_bit(start_states,states+1);
else else
set_bit(start_states,states); internal_set_bit(start_states,states);
} }
for (pos=from[i], len=0; *pos ; pos++) for (pos=from[i], len=0; *pos ; pos++)
{ {
...@@ -583,9 +583,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -583,9 +583,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
follow[i].len > found_end) follow[i].len > found_end)
found_end=follow[i].len; found_end=follow[i].len;
if (chr && follow[i].chr) if (chr && follow[i].chr)
set_bit(new_set,i+1); /* To next set */ internal_set_bit(new_set,i+1); /* To next set */
else else
set_bit(new_set,i); internal_set_bit(new_set,i);
} }
} }
if (found_end) if (found_end)
...@@ -602,7 +602,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count, ...@@ -602,7 +602,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
if (follow[bit_nr-1].len < found_end || if (follow[bit_nr-1].len < found_end ||
(new_set->found_len && (new_set->found_len &&
(chr == 0 || !follow[bit_nr].chr))) (chr == 0 || !follow[bit_nr].chr)))
clear_bit(new_set,i); internal_clear_bit(new_set,i);
else else
{ {
if (chr == 0 || !follow[bit_nr].chr) if (chr == 0 || !follow[bit_nr].chr)
...@@ -751,13 +751,13 @@ static void free_sets(REP_SETS *sets) ...@@ -751,13 +751,13 @@ static void free_sets(REP_SETS *sets)
return; return;
} }
static void set_bit(REP_SET *set, uint bit) static void internal_set_bit(REP_SET *set, uint bit)
{ {
set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT); set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
return; return;
} }
static void clear_bit(REP_SET *set, uint bit) static void internal_clear_bit(REP_SET *set, uint bit)
{ {
set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT)); set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
return; return;
......
...@@ -102,4 +102,14 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq ...@@ -102,4 +102,14 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq
SET @@session.sql_mode=0; SET @@session.sql_mode=0;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
insert into t1 values ("Alas"); insert into t1 values ("Alas");
--- reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1065204671;
BEGIN;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1065204671;
BEGIN;
drop table t1, t2; drop table t1, t2;
...@@ -95,5 +95,15 @@ select "--- --position --" as ""; ...@@ -95,5 +95,15 @@ select "--- --position --" as "";
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=118 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=118 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
# Bug#7853 (mysqlbinlog does not accept input from stdin)
--disable_query_log
select "--- reading stdin --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec cat $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 | $MYSQL_BINLOG --short-form -
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec cat $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 | $MYSQL_BINLOG --short-form --position=79 -
# clean up # clean up
drop table t1, t2; drop table t1, t2;
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
#include <NdbMain.h> #include <NdbMain.h>
#include <NdbOut.hpp> #include <NdbOut.hpp>
#include <random.h> #include <random.h>
#include <NDBT.hpp>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
int useTableLogging; int useTableLogging;
int useIndexTables;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
...@@ -44,7 +44,6 @@ void usage(const char *prog) ...@@ -44,7 +44,6 @@ void usage(const char *prog)
ndbout_c( ndbout_c(
"Usage: %s [-l]\n" "Usage: %s [-l]\n"
" -l Use logging and checkpointing on tables\n", " -l Use logging and checkpointing on tables\n",
" -i Use index tables\n",
prog); prog);
exit(1); exit(1);
...@@ -57,28 +56,26 @@ NDB_COMMAND(DbCreate, "DbCreate", "DbCreate", "DbCreate", 16384) ...@@ -57,28 +56,26 @@ NDB_COMMAND(DbCreate, "DbCreate", "DbCreate", "DbCreate", 16384)
int i; int i;
UserHandle *uh; UserHandle *uh;
useTableLogging = useIndexTables = 0; useTableLogging = 0;
NDB_INIT(argv[0]); NDB_INIT(argv[0]);
for(i = 1; i<argc; i++){ for(i = 1; i<argc; i++){
if(strcmp(argv[i], "-l") == 0){ if(strcmp(argv[i], "-l") == 0){
useTableLogging = 1; useTableLogging = 1;
} else if(strcmp(argv[i], "-i") == 0){
useIndexTables = 1;
} else { } else {
usage(argv[0]); usage(argv[0]);
return 0; return 0;
} }
} }
ndbout_c("Using %s tables and %s key storage", ndbout_c("Using %s tables",
useTableLogging ? "logging" : "temporary", useTableLogging ? "logging" : "temporary");
useIndexTables ? "index" : "normal");
myRandom48Init(0x3e6f); myRandom48Init(0x3e6f);
uh = userDbConnect(1, "TEST_DB"); uh = userDbConnect(1, "TEST_DB");
dbPopulate(uh); dbPopulate(uh);
userDbDisconnect(uh); userDbDisconnect(uh);
return(0);
return NDBT_ProgramExit(NDBT_OK);
} }
...@@ -134,7 +134,6 @@ userDbCommit(UserHandle *uh){ ...@@ -134,7 +134,6 @@ userDbCommit(UserHandle *uh){
extern "C" { extern "C" {
#endif #endif
extern int useTableLogging; extern int useTableLogging;
extern int useIndexTables;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
...@@ -377,7 +376,7 @@ create_table_subscriber(Ndb * pNdb){ ...@@ -377,7 +376,7 @@ create_table_subscriber(Ndb * pNdb){
String, String,
MMBased, MMBased,
NotNullAttribute, NotNullAttribute,
(useIndexTables ? IndexStorageAttribute : NormalStorageAttribute), NormalStorageAttribute,
0, 0,
1, 1,
16); 16);
......
...@@ -210,26 +210,26 @@ args: ...@@ -210,26 +210,26 @@ args:
max-time: 180 max-time: 180
cmd: DbAsyncGenerator cmd: DbAsyncGenerator
args: -t 60 -p 1 args: -time 60 -p 1
type: bench type: bench
max-time: 180 max-time: 180
cmd: DbAsyncGenerator cmd: DbAsyncGenerator
args: -t 60 -p 25 args: -time 60 -p 25
type: bench type: bench
max-time: 180 max-time: 180
cmd: DbAsyncGenerator cmd: DbAsyncGenerator
args: -t 60 -p 100 args: -time 60 -p 100
type: bench type: bench
max-time: 180 max-time: 180
cmd: DbAsyncGenerator cmd: DbAsyncGenerator
args: -t 60 -p 200 args: -time 60 -p 200
type: bench type: bench
max-time: 180 max-time: 180
cmd: DbAsyncGenerator cmd: DbAsyncGenerator
args: -t 60 -p 1 -proc 25 args: -time 60 -p 1 -proc 25
type: bench type: bench
...@@ -4525,7 +4525,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item, TABLE *table) ...@@ -4525,7 +4525,7 @@ bool Item_type_holder::join_types(THD *thd, Item *item, TABLE *table)
bool use_new_field= 0, use_expression_type= 0; bool use_new_field= 0, use_expression_type= 0;
Item_result new_result_type= type_convertor[item_type][item->result_type()]; Item_result new_result_type= type_convertor[item_type][item->result_type()];
Field *field= get_holder_example_field(thd, item, table); Field *field= get_holder_example_field(thd, item, table);
bool item_is_a_field= field; bool item_is_a_field= (field != NULL);
/* /*
Check if both items point to fields: in this case we Check if both items point to fields: in this case we
can adjust column types of result table in the union smartly. can adjust column types of result table in the union smartly.
......
...@@ -1325,7 +1325,7 @@ bool MYSQL_LOG::write(Log_event* event_info) ...@@ -1325,7 +1325,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
binlog_[wild_]{do|ignore}_table?" (WL#1049)" binlog_[wild_]{do|ignore}_table?" (WL#1049)"
*/ */
if ((thd && !(thd->options & OPTION_BIN_LOG)) || if ((thd && !(thd->options & OPTION_BIN_LOG)) ||
(local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db))) (!db_ok(local_db, binlog_do_db, binlog_ignore_db)))
{ {
VOID(pthread_mutex_unlock(&LOCK_log)); VOID(pthread_mutex_unlock(&LOCK_log));
DBUG_PRINT("error",("!db_ok('%s')", local_db)); DBUG_PRINT("error",("!db_ok('%s')", local_db));
......
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