Commit c1287769 authored by ramil@mysql.com's avatar ramil@mysql.com

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

into  mysql.com:/usr/home/ram/work/5.0.b15108
parents f6a61875 76bdccd0
...@@ -259,7 +259,7 @@ static COMMANDS commands[] = { ...@@ -259,7 +259,7 @@ static COMMANDS commands[] = {
{ "quit", 'q', com_quit, 0, "Quit mysql." }, { "quit", 'q', com_quit, 0, "Quit mysql." },
{ "rehash", '#', com_rehash, 0, "Rebuild completion hash." }, { "rehash", '#', com_rehash, 0, "Rebuild completion hash." },
{ "source", '.', com_source, 1, { "source", '.', com_source, 1,
"Execute a SQL script file. Takes a file name as an argument."}, "Execute an SQL script file. Takes a file name as an argument."},
{ "status", 's', com_status, 0, "Get status information from the server."}, { "status", 's', com_status, 0, "Get status information from the server."},
#ifdef USE_POPEN #ifdef USE_POPEN
{ "system", '!', com_shell, 1, "Execute a system shell command."}, { "system", '!', com_shell, 1, "Execute a system shell command."},
......
...@@ -170,7 +170,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -170,7 +170,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo,
goto err; goto err;
} }
if ((error=d_search(info,keyinfo, if ((error=d_search(info,keyinfo,
(keyinfo->flag & HA_FULLTEXT ? SEARCH_FIND (keyinfo->flag & HA_FULLTEXT ? SEARCH_FIND | SEARCH_UPDATE
: SEARCH_SAME), : SEARCH_SAME),
key,key_length,old_root,root_buff)) >0) key,key_length,old_root,root_buff)) >0)
{ {
......
...@@ -215,3 +215,24 @@ select count(*) from t1 where match a against ('aaazzz' in boolean mode); ...@@ -215,3 +215,24 @@ select count(*) from t1 where match a against ('aaazzz' in boolean mode);
count(*) count(*)
262 262
drop table t1; drop table t1;
set names utf8;
create table t1(a text,fulltext(a)) collate=utf8_swedish_ci;
insert into t1 values('test test '),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test');
delete from t1 limit 1;
drop table t1;
set names latin1;
...@@ -179,7 +179,37 @@ update t1 set a='aaaxxx' where a = 'aaayyy'; ...@@ -179,7 +179,37 @@ update t1 set a='aaaxxx' where a = 'aaayyy';
select count(*) from t1 where match a against ('aaaxxx' in boolean mode); select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
select count(*) from t1 where match a against ('aaayyy' in boolean mode); select count(*) from t1 where match a against ('aaayyy' in boolean mode);
select count(*) from t1 where match a against ('aaazzz' in boolean mode); select count(*) from t1 where match a against ('aaazzz' in boolean mode);
drop table t1;
#
# BUG#11336
#
# for uca collation isalnum and strnncollsp don't agree on whether
# 0xC2A0 is a space (strnncollsp is right, isalnum is wrong).
#
# they still don't, the bug was fixed by avoiding strnncollsp
#
set names utf8;
create table t1(a text,fulltext(a)) collate=utf8_swedish_ci;
insert into t1 values('test test '),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test');
delete from t1 limit 1;
drop table t1; drop table t1;
set names latin1;
# End of 4.1 tests # End of 4.1 tests
...@@ -53,7 +53,7 @@ struct utimbuf { ...@@ -53,7 +53,7 @@ struct utimbuf {
int my_copy(const char *from, const char *to, myf MyFlags) int my_copy(const char *from, const char *to, myf MyFlags)
{ {
uint Count; uint Count;
my_bool new_file_stat; /* 1 if we could stat "to" */ my_bool new_file_stat= 0; /* 1 if we could stat "to" */
int create_flag; int create_flag;
File from_file,to_file; File from_file,to_file;
char buff[IO_SIZE]; char buff[IO_SIZE];
...@@ -62,7 +62,6 @@ int my_copy(const char *from, const char *to, myf MyFlags) ...@@ -62,7 +62,6 @@ int my_copy(const char *from, const char *to, myf MyFlags)
DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags)); DBUG_PRINT("my",("from %s to %s MyFlags %d", from, to, MyFlags));
from_file=to_file= -1; from_file=to_file= -1;
LINT_INIT(new_file_stat);
DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */ DBUG_ASSERT(!(MyFlags & (MY_FNABP | MY_NABP))); /* for my_read/my_write */
if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */ if (MyFlags & MY_HOLD_ORIGINAL_MODES) /* Copy stat if possible */
new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0))); new_file_stat= test(my_stat((char*) to, &new_stat_buff, MYF(0)));
......
...@@ -445,6 +445,7 @@ Dbtup::commitRecord(Signal* signal, ...@@ -445,6 +445,7 @@ Dbtup::commitRecord(Signal* signal,
befOpPtr.p->changeMask.bitOR(attributeMask); befOpPtr.p->changeMask.bitOR(attributeMask);
befOpPtr.p->gci = regOperPtr->gci; befOpPtr.p->gci = regOperPtr->gci;
befOpPtr.p->optype = opType;
operPtr.p = befOpPtr.p; operPtr.p = befOpPtr.p;
checkDetachedTriggers(signal, checkDetachedTriggers(signal,
befOpPtr.p, befOpPtr.p,
...@@ -483,6 +484,7 @@ Dbtup::commitRecord(Signal* signal, ...@@ -483,6 +484,7 @@ Dbtup::commitRecord(Signal* signal,
befOpPtr.p->pageIndex = befOpPtr.p->pageIndexC; befOpPtr.p->pageIndex = befOpPtr.p->pageIndexC;
befOpPtr.p->gci = regOperPtr->gci; befOpPtr.p->gci = regOperPtr->gci;
befOpPtr.p->optype = opType;
operPtr.p = befOpPtr.p; operPtr.p = befOpPtr.p;
checkDetachedTriggers(signal, checkDetachedTriggers(signal,
befOpPtr.p, befOpPtr.p,
......
...@@ -250,10 +250,10 @@ NdbEventOperationImpl::execute() ...@@ -250,10 +250,10 @@ NdbEventOperationImpl::execute()
int hasSubscriber; int hasSubscriber;
int r= m_bufferHandle->prepareAddSubscribeEvent(this, int r= m_bufferHandle->prepareAddSubscribeEvent(this,
hasSubscriber /*return value*/); hasSubscriber /*return value*/);
m_error.code= 4709;
if (r < 0) if (r < 0)
{ {
m_error.code= 4709;
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
......
...@@ -35,7 +35,8 @@ testPartitioning \ ...@@ -35,7 +35,8 @@ testPartitioning \
testBitfield \ testBitfield \
DbCreate DbAsyncGenerator \ DbCreate DbAsyncGenerator \
test_event_multi_table \ test_event_multi_table \
testSRBank testSRBank \
test_event_merge
#flexTimedAsynch #flexTimedAsynch
#testBlobs #testBlobs
...@@ -80,6 +81,7 @@ DbCreate_SOURCES = bench/mainPopulate.cpp bench/dbPopulate.cpp bench/userInterfa ...@@ -80,6 +81,7 @@ DbCreate_SOURCES = bench/mainPopulate.cpp bench/dbPopulate.cpp bench/userInterfa
DbAsyncGenerator_SOURCES = bench/mainAsyncGenerator.cpp bench/asyncGenerator.cpp bench/ndb_async2.cpp bench/dbGenerator.h bench/macros.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp DbAsyncGenerator_SOURCES = bench/mainAsyncGenerator.cpp bench/asyncGenerator.cpp bench/ndb_async2.cpp bench/dbGenerator.h bench/macros.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp
test_event_multi_table_SOURCES = test_event_multi_table.cpp test_event_multi_table_SOURCES = test_event_multi_table.cpp
testSRBank_SOURCES = testSRBank.cpp testSRBank_SOURCES = testSRBank.cpp
test_event_merge_SOURCES = test_event_merge.cpp
INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel INCLUDES_LOC = -I$(top_srcdir)/ndb/include/kernel
...@@ -160,3 +162,4 @@ testScan.dsp: Makefile \ ...@@ -160,3 +162,4 @@ testScan.dsp: Makefile \
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES) @$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(testScan_SOURCES) @$(top_srcdir)/ndb/config/win-sources $@ $(testScan_SOURCES)
@$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD) @$(top_srcdir)/ndb/config/win-libraries $@ LINK $(LDADD)
This diff is collapsed.
#!/usr/bin/perl -w
use strict;
if(@ARGV < 1)
{
print STDERR "Usage:\n";
print STDERR "\tndb_error_reporter config.ini [username] [--fs]\n\n";
print STDERR "\tusername is a user that you can use to ssh into\n";
print STDERR "\t all of your nodes with.\n\n";
print STDERR "\t--fs means include the filesystems in the report\n";
print STDERR "\t WARNING: This may require a lot of disk space.\n";
print STDERR "\t Only use this option when asked to.\n\n";
exit(1);
}
my $config_file= $ARGV[0];
my $config_get_fs= 0;
my $config_username= '';
if(defined($ARGV[1]))
{
$config_get_fs= 1 if $ARGV[1] eq '--fs';
$config_username= $ARGV[1].'@' if $ARGV[1] ne '--fs';
$config_get_fs= (defined $ARGV[2] && $ARGV[2] eq '--fs')?1:$config_get_fs;
}
if(!stat($config_file))
{
print STDERR "Cannot open configuration file.\n\n";
exit(1);
}
my @nodes= split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndbd`;
push @nodes, split ' ',`ndb_config --config-file=$ARGV[0] --nodes --query=id --type=ndb_mgmd`;
sub config {
my $nodeid= shift;
my $query= shift;
my $res= `ndb_config --config-file=$ARGV[0] --id=$nodeid --query=$query`;
chomp $res;
$res;
}
my @t= localtime();
my $reportdir= sprintf('ndb_error_report_%u%02u%02u%02u%02u%02u',
($t[5]+1900),($t[4]+1),$t[3],$t[2],$t[1],$t[0]);
if(stat($reportdir) || stat($reportdir.'tar.bz2'))
{
print STDERR "It looks like another ndb_error_report process is running.\n";
print STDERR "If that is not the case, remove the ndb_error_report directory";
print STDERR " and run ndb_error_report again.\n\n";
exit(1);
}
mkdir($reportdir);
foreach my $node (@nodes)
{
print "\n\n Copying data from node $node".
(($config_get_fs)?" with filesystem":"").
"\n\n";
my $recurse= ($config_get_fs)?'-r ':'';
system 'scp '.$recurse.$config_username.config($node,'host').
':'.config($node,'datadir')."/ndb_".$node."* ".
"$reportdir/\n";
}
print "\n\n Copying configuration file...\n\n\t$config_file\n\n";
system "cp $config_file $reportdir/";
my $r = system 'bzip2 2>&1 > /dev/null < /dev/null';
my $outfile;
if($r==0)
{
$outfile= "$reportdir.tar.bz2";
system "tar c $reportdir|bzip2 > $outfile";
}
else
{
$outfile= "$reportdir.tar.gz";
system "tar c $reportdir|gzip > $outfile";
}
system "rm -rf $reportdir";
print "\n\nPlease attach $outfile to your error report\n\n";
...@@ -4637,7 +4637,7 @@ Disable with --skip-bdb (will save memory).", ...@@ -4637,7 +4637,7 @@ Disable with --skip-bdb (will save memory).",
{"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0, {"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE, {"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
"Don't use client side character set value sent during handshake.", "Don't ignore client side character set value sent during handshake.",
(gptr*) &opt_character_set_client_handshake, (gptr*) &opt_character_set_client_handshake,
(gptr*) &opt_character_set_client_handshake, (gptr*) &opt_character_set_client_handshake,
0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
......
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