Fixed wrong option in mysql_install_db
Added delayed_user for delayed_threads Don't use record cache when doing deletes
This commit is contained in:
parent
2104405904
commit
267c8760cb
@ -6618,6 +6618,7 @@ To install the @strong{MySQL} @code{DBD} module with ActiveState Perl on
|
|||||||
Windows, you should do the following:
|
Windows, you should do the following:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
|
@item Get activestate perl from @uref{http://www.activestate.com/Products/ActivePerl/index.html} and install it.
|
||||||
@item Open a DOS shell.
|
@item Open a DOS shell.
|
||||||
@item If required, set the HTTP_proxy variable. For example, you might try:
|
@item If required, set the HTTP_proxy variable. For example, you might try:
|
||||||
@code{set HTTP_proxy=my.proxy.com:3128}
|
@code{set HTTP_proxy=my.proxy.com:3128}
|
||||||
@ -33693,7 +33694,7 @@ If you find out something is wrong, please only send the relevant rows
|
|||||||
send the whole MyODBC or ODBC log file!
|
send the whole MyODBC or ODBC log file!
|
||||||
|
|
||||||
If you are unable to find out what's wrong, the last option is to
|
If you are unable to find out what's wrong, the last option is to
|
||||||
make an archive (tar or zip) that contains a MyODBC log file, the ODBC
|
make an archive (tar or zip) that contains a MyODBC trace file, the ODBC
|
||||||
log file, and a README file that explains the problem. You can send this
|
log file, and a README file that explains the problem. You can send this
|
||||||
to @uref{ftp://support.mysql.com/pub/mysql/secret}. Only we at MySQL AB
|
to @uref{ftp://support.mysql.com/pub/mysql/secret}. Only we at MySQL AB
|
||||||
will have access to the files you upload, and we will be very discrete
|
will have access to the files you upload, and we will be very discrete
|
||||||
|
@ -11,6 +11,7 @@ insert delayed into t1 set a = 4;
|
|||||||
insert delayed into t1 set a = 5, tmsp = 19711006010203;
|
insert delayed into t1 set a = 5, tmsp = 19711006010203;
|
||||||
insert delayed into t1 (a, tmsp) values (6, 19711006010203);
|
insert delayed into t1 (a, tmsp) values (6, 19711006010203);
|
||||||
insert delayed into t1 (a, tmsp) values (7, NULL);
|
insert delayed into t1 (a, tmsp) values (7, NULL);
|
||||||
|
--sleep 1
|
||||||
insert into t1 set a = 8,tmsp=19711006010203;
|
insert into t1 set a = 8,tmsp=19711006010203;
|
||||||
select * from t1 where tmsp=0;
|
select * from t1 where tmsp=0;
|
||||||
select * from t1 where tmsp=19711006010203;
|
select * from t1 where tmsp=19711006010203;
|
||||||
@ -27,5 +28,6 @@ insert delayed into t1 values (null,"c");
|
|||||||
insert delayed into t1 values (3,"d"),(null,"e");
|
insert delayed into t1 values (3,"d"),(null,"e");
|
||||||
--error 1136
|
--error 1136
|
||||||
insert delayed into t1 values (3,"this will give an","error");
|
insert delayed into t1 values (3,"this will give an","error");
|
||||||
|
--sleep 2
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -282,7 +282,7 @@ fi
|
|||||||
|
|
||||||
echo "Installing all prepared tables"
|
echo "Installing all prepared tables"
|
||||||
if eval "$execdir/mysqld $defaults --bootstrap --skip-grant-tables \
|
if eval "$execdir/mysqld $defaults --bootstrap --skip-grant-tables \
|
||||||
--basedir=$basedir --datadir=$ldata --skip-innobase --skip-gemeni --skip-bdb $args" << END_OF_DATA
|
--basedir=$basedir --datadir=$ldata --skip-innobase --skip-gemini --skip-bdb $args" << END_OF_DATA
|
||||||
use mysql;
|
use mysql;
|
||||||
$c_d
|
$c_d
|
||||||
$i_d
|
$i_d
|
||||||
|
@ -47,6 +47,7 @@ require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n";
|
|||||||
|
|
||||||
$opt_server="mysql"; $opt_host="localhost"; $opt_database="test";
|
$opt_server="mysql"; $opt_host="localhost"; $opt_database="test";
|
||||||
$opt_dir="limits";
|
$opt_dir="limits";
|
||||||
|
$opt_user=$opt_password="";
|
||||||
$opt_debug=$opt_help=$opt_Information=$opt_restart=$opt_force=$opt_quick=0;
|
$opt_debug=$opt_help=$opt_Information=$opt_restart=$opt_force=$opt_quick=0;
|
||||||
$opt_log_all_queries=$opt_fix_limit_file=$opt_batch_mode=0;
|
$opt_log_all_queries=$opt_fix_limit_file=$opt_batch_mode=0;
|
||||||
$opt_db_start_cmd=""; # the db server start command
|
$opt_db_start_cmd=""; # the db server start command
|
||||||
|
@ -477,7 +477,7 @@ extern uint32 server_id;
|
|||||||
extern char mysql_data_home[2],server_version[SERVER_VERSION_LENGTH],
|
extern char mysql_data_home[2],server_version[SERVER_VERSION_LENGTH],
|
||||||
max_sort_char, mysql_real_data_home[];
|
max_sort_char, mysql_real_data_home[];
|
||||||
extern my_string mysql_unix_port,mysql_tmpdir;
|
extern my_string mysql_unix_port,mysql_tmpdir;
|
||||||
extern const char *first_keyword, *localhost;
|
extern const char *first_keyword, *localhost, *delayed_user;
|
||||||
extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables,
|
extern ulong refresh_version,flush_version, thread_id,query_id,opened_tables,
|
||||||
created_tmp_tables, created_tmp_disk_tables,
|
created_tmp_tables, created_tmp_disk_tables,
|
||||||
aborted_threads,aborted_connects,
|
aborted_threads,aborted_connects,
|
||||||
|
@ -243,6 +243,7 @@ volatile ulong cached_thread_count=0;
|
|||||||
my_string master_user = (char*) "test", master_password = 0, master_host=0,
|
my_string master_user = (char*) "test", master_password = 0, master_host=0,
|
||||||
master_info_file = (char*) "master.info";
|
master_info_file = (char*) "master.info";
|
||||||
const char *localhost=LOCAL_HOST;
|
const char *localhost=LOCAL_HOST;
|
||||||
|
const char *delayed_user="DELAYED";
|
||||||
uint master_port = MYSQL_PORT, master_connect_retry = 60;
|
uint master_port = MYSQL_PORT, master_connect_retry = 60;
|
||||||
|
|
||||||
ulong max_tmp_tables,max_heap_table_size;
|
ulong max_tmp_tables,max_heap_table_size;
|
||||||
@ -2364,7 +2365,7 @@ pthread_handler_decl(handle_connections_namedpipes,arg)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* host name is unknown */
|
/* host name is unknown */
|
||||||
thd->host = my_strdup("localhost",MYF(0)); /* Host is unknown */
|
thd->host = my_strdup(localhost,MYF(0)); /* Host is unknown */
|
||||||
create_new_thread(thd);
|
create_new_thread(thd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,8 @@ THD::~THD()
|
|||||||
|
|
||||||
if (host != localhost) // If not pointer to constant
|
if (host != localhost) // If not pointer to constant
|
||||||
safeFree(host);
|
safeFree(host);
|
||||||
safeFree(user);
|
if (user != delayed_user)
|
||||||
|
safeFree(user);
|
||||||
safeFree(db);
|
safeFree(db);
|
||||||
safeFree(ip);
|
safeFree(ip);
|
||||||
free_root(&mem_root,MYF(0));
|
free_root(&mem_root,MYF(0));
|
||||||
|
@ -192,7 +192,7 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
|
|||||||
(void) table->file->extra(HA_EXTRA_NO_READCHECK);
|
(void) table->file->extra(HA_EXTRA_NO_READCHECK);
|
||||||
if (options & OPTION_QUICK)
|
if (options & OPTION_QUICK)
|
||||||
(void) table->file->extra(HA_EXTRA_QUICK);
|
(void) table->file->extra(HA_EXTRA_QUICK);
|
||||||
init_read_record(&info,thd,table,select,1,1);
|
init_read_record(&info,thd,table,select,0,1);
|
||||||
ulong deleted=0L;
|
ulong deleted=0L;
|
||||||
thd->proc_info="updating";
|
thd->proc_info="updating";
|
||||||
while (!(error=info.read_record(&info)) && !thd->killed)
|
while (!(error=info.read_record(&info)) && !thd->killed)
|
||||||
|
@ -489,7 +489,8 @@ public:
|
|||||||
table(0),tables_in_use(0),stacked_inserts(0), status(0), dead(0),
|
table(0),tables_in_use(0),stacked_inserts(0), status(0), dead(0),
|
||||||
group_count(0)
|
group_count(0)
|
||||||
{
|
{
|
||||||
thd.user=0; thd.host=(char*) localhost;
|
thd.user=thd.priv_user=(char*) delayed_user;
|
||||||
|
thd.host=(char*) localhost;
|
||||||
thd.current_tablenr=0;
|
thd.current_tablenr=0;
|
||||||
thd.version=refresh_version;
|
thd.version=refresh_version;
|
||||||
thd.command=COM_DELAYED_INSERT;
|
thd.command=COM_DELAYED_INSERT;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# This is a test with uses 3 processes to insert, delete and select
|
# This is a test with uses 4 processes to insert, delete , check and select
|
||||||
#
|
#
|
||||||
|
|
||||||
$opt_loop_count=100000; # Change this to make test harder/easier
|
$opt_loop_count=200000; # Change this to make test harder/easier
|
||||||
|
|
||||||
##################### Standard benchmark inits ##############################
|
##################### Standard benchmark inits ##############################
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ GetOptions("host=s","db=s","loop-count=i","skip-create","skip-in","skip-delete",
|
|||||||
"verbose","fast-insert","lock-tables","debug","fast","force") || die "Aborted";
|
"verbose","fast-insert","lock-tables","debug","fast","force") || die "Aborted";
|
||||||
$opt_verbose=$opt_debug=$opt_lock_tables=$opt_fast_insert=$opt_fast=$opt_skip_in=$opt_force=undef; # Ignore warnings from these
|
$opt_verbose=$opt_debug=$opt_lock_tables=$opt_fast_insert=$opt_fast=$opt_skip_in=$opt_force=undef; # Ignore warnings from these
|
||||||
|
|
||||||
print "Testing 3 multiple connections to a server with 1 insert, 1 delete\n";
|
print "Testing 4 multiple connections to a server with 1 insert, 1 delete\n";
|
||||||
print "and 1 select connections.\n";
|
print "1 select and one repair/check connection.\n";
|
||||||
|
|
||||||
$firsttable = "bench_f1";
|
$firsttable = "bench_f1";
|
||||||
|
|
||||||
@ -51,6 +51,7 @@ $|= 1; # Autoflush
|
|||||||
test_insert() if (($pid=fork()) == 0); $work{$pid}="insert";
|
test_insert() if (($pid=fork()) == 0); $work{$pid}="insert";
|
||||||
test_delete() if (($pid=fork()) == 0); $work{$pid}="delete";
|
test_delete() if (($pid=fork()) == 0); $work{$pid}="delete";
|
||||||
test_select() if (($pid=fork()) == 0); $work{$pid}="select1";
|
test_select() if (($pid=fork()) == 0); $work{$pid}="select1";
|
||||||
|
repair_and_check() if (($pid=fork()) == 0); $work{$pid}="repair/check";
|
||||||
|
|
||||||
$errors=0;
|
$errors=0;
|
||||||
while (($pid=wait()) != -1)
|
while (($pid=wait()) != -1)
|
||||||
@ -148,3 +149,40 @@ sub test_select
|
|||||||
print "Test_select: ok\n";
|
print "Test_select: ok\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub repair_and_check
|
||||||
|
{
|
||||||
|
my ($dbh,$row,$found1,$last_found1,$i,$type, $table);
|
||||||
|
$found1=0; $last_found1= -1;
|
||||||
|
|
||||||
|
$dbh = DBI->connect("DBI:mysql:$opt_db:$opt_host",
|
||||||
|
$opt_user, $opt_password,
|
||||||
|
{ PrintError => 0}) || die $DBI::errstr;
|
||||||
|
|
||||||
|
for ($i=0; $found1 != $last_found1 ; $i++)
|
||||||
|
{
|
||||||
|
$type=($i & 2) ? "repair" : "check";
|
||||||
|
$table=$firsttable;
|
||||||
|
$last_found1=$found1;
|
||||||
|
$sth=$dbh->prepare("$type table $table") || die "Got error on prepare: $dbh->errstr\n";
|
||||||
|
$sth->execute || die $dbh->errstr;
|
||||||
|
|
||||||
|
while (($row=$sth->fetchrow_arrayref))
|
||||||
|
{
|
||||||
|
if ($row->[3] ne "OK")
|
||||||
|
{
|
||||||
|
print "Got error " . $row->[3] . " when doing $type on $table\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sth=$dbh->prepare("select count(*) from $table") || die "Got error on prepare: $dbh->errstr\n";
|
||||||
|
$sth->execute || die $dbh->errstr;
|
||||||
|
@row = $sth->fetchrow_array();
|
||||||
|
$found1= $row[0];
|
||||||
|
$sth->finish;
|
||||||
|
sleep(3);
|
||||||
|
}
|
||||||
|
$dbh->disconnect; $dbh=0;
|
||||||
|
print "check/repair: Did $i repair/checks\n";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user