Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2001-08-20 11:20:47-06:00, sasha@stripped
fixes in mysqltest and mysqlbinlog
trying to understand why --bootstrap option does not create tables
on disk, hope the problem will be fixed when I pull, if not will
debug, but need to commit in order to pull
client/mysqltest.c
1.50 01/08/20 11:20:46 sasha@stripped +24 -17
added safe_connect() and chaned all calls to mysql_real_connect() to
safe_connect()
mysql-test/install_test_db.sh
1.17 01/08/20 11:20:46 sasha@stripped +6 -2
more diagnostic
sql/log_event.cc
1.52 01/08/20 11:20:46 sasha@stripped +1 -0
fixed compile error in mysqlbinlog
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sasha
# Host: mysql.sashanet.com
# Root: /home/sasha/src/bk/mysql-4.0
--- 1.16/mysql-test/install_test_db.sh Sat Aug 11 17:28:40 2001
+++ 1.17/mysql-test/install_test_db.sh Mon Aug 20 11:20:46 2001
@@ -190,8 +190,11 @@
c_c="$c_c comment='Column privileges';"
fi
-if $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
- --basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb --skip-gemini $EXTRA_ARG << END_OF_DATA
+mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
+ --basedir=$basedir --datadir=$ldata --skip-innodb --skip-bdb --skip-gemini $EXTRA_ARG"
+echo "running $mysqld_boot"
+
+if $mysqld_boot << END_OF_DATA
use mysql;
$c_d
$i_d
@@ -211,5 +214,6 @@
then
exit 0
else
+ echo "Error executing mysqld --boostrap"
exit 1
fi
--- 1.51/sql/log_event.cc Sat Aug 18 20:22:19 2001
+++ 1.52/sql/log_event.cc Mon Aug 20 11:20:46 2001
@@ -30,6 +30,7 @@
fputc('\'', file);
while (str < end)
{
+ char c;
switch ((c=*str++)) {
case '\n': fprintf(file, "\\n"); break;
case '\r': fprintf(file, "\\r"); break;
--- 1.49/client/mysqltest.c Mon Aug 13 08:59:39 2001
+++ 1.50/client/mysqltest.c Mon Aug 20 11:20:46 2001
@@ -1096,6 +1096,25 @@
DBUG_RETURN(str);
}
+int safe_connect(MYSQL* con, const char* host, const char* user,
+ const char* pass,
+ const char* db, int port, const char* sock)
+{
+ int con_error = 1;
+ int i;
+ for (i = 0; i < MAX_CON_TRIES; ++i)
+ {
+ if(mysql_real_connect(con, host,user, pass,
+ db, port, sock, 0))
+ {
+ con_error = 0;
+ break;
+ }
+ sleep(CON_RETRY_SLEEP);
+ }
+ return con_error;
+}
+
int do_connect(struct st_query* q)
{
@@ -1104,7 +1123,7 @@
char* p=q->first_argument;
char buff[FN_REFLEN];
int con_port;
- int i, con_error;
+ int con_error;
DBUG_ENTER("do_connect");
DBUG_PRINT("enter",("connect: %s",p));
@@ -1137,20 +1156,9 @@
con_sock=fn_format(buff, con_sock, TMPDIR, "",0);
if (!con_db[0])
con_db=db;
- con_error = 1;
- for (i = 0; i < MAX_CON_TRIES; ++i)
- {
- if(mysql_real_connect(&next_con->mysql, con_host,
+ if((con_error = safe_connect(&next_con->mysql, con_host,
con_user, con_pass,
- con_db, con_port, con_sock, 0))
- {
- con_error = 0;
- break;
- }
- sleep(CON_RETRY_SLEEP);
- }
-
- if(con_error)
+ con_db, con_port, con_sock)))
die("Could not open connection '%s': %s", con_name,
mysql_error(&next_con->mysql));
@@ -1950,9 +1958,8 @@
if (!cur_con->name)
die("Out of memory");
- if (!mysql_real_connect(&cur_con->mysql, host,
- user, pass, db, port, unix_sock,
- 0))
+ if (safe_connect(&cur_con->mysql, host,
+ user, pass, db, port, unix_sock))
die("Failed in mysql_real_connect(): %s", mysql_error(&cur_con->mysql));
while (!read_query(&q))
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 20 Aug |