Below is the list of changes that have just been committed into a local
5.0 repository of cps. When cps does a push these changes will
be propagated 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1929 05/06/15 01:06:25 petr@stripped +3 -0
rename: store_to_string -> store_to_protocol_packet
server-tools/instance-manager/protocol.h
1.6 05/06/15 01:06:15 petr@stripped +3 -3
rename: store_to_string -> store_to_protocol_packet
server-tools/instance-manager/protocol.cc
1.9 05/06/15 01:06:15 petr@stripped +23 -16
rename: store_to_string -> store_to_protocol_packet
server-tools/instance-manager/commands.cc
1.25 05/06/15 01:06:14 petr@stripped +31 -29
rename: store_to_string -> store_to_protocol_packet
# 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: petr
# Host: owlet.
# Root: /home/cps/mysql/trees/mysql-5.0
--- 1.24/server-tools/instance-manager/commands.cc 2005-06-14 17:13:34 +04:00
+++ 1.25/server-tools/instance-manager/commands.cc 2005-06-15 01:06:14 +04:00
@@ -40,7 +40,7 @@
DESCRIPTION
Function to add a string to the buffer. It is different from
- store_to_string, which is used in the protocol.cc. The last
+ store_to_protocol_packet, which is used in the protocol.cc. The last
one also stores the length of the string in a special way.
This is required for MySQL client/server protocol support only.
@@ -104,11 +104,12 @@
while ((instance= iterator.next()))
{
position= 0;
- store_to_string(&send_buff, instance->options.instance_name, &position);
+ store_to_protocol_packet(&send_buff, instance->options.instance_name,
+ &position);
if (instance->is_running())
- store_to_string(&send_buff, (char*) "online", &position);
+ store_to_protocol_packet(&send_buff, (char*) "online", &position);
else
- store_to_string(&send_buff, (char*) "offline", &position);
+ store_to_protocol_packet(&send_buff, (char*) "offline", &position);
if (my_net_write(net, send_buff.buffer, (uint) position))
goto err;
}
@@ -199,18 +200,19 @@
{
Instance *instance;
- store_to_string(&send_buff, (char*) instance_name, &position);
+ store_to_protocol_packet(&send_buff, (char*) instance_name, &position);
if (!(instance= instance_map->find(instance_name, strlen(instance_name))))
goto err;
if (instance->is_running())
- store_to_string(&send_buff, (char*) "online", &position);
+ store_to_protocol_packet(&send_buff, (char*) "online", &position);
else
- store_to_string(&send_buff, (char*) "offline", &position);
+ store_to_protocol_packet(&send_buff, (char*) "offline", &position);
if (instance->options.mysqld_version)
- store_to_string(&send_buff, instance->options.mysqld_version,
&position);
+ store_to_protocol_packet(&send_buff, instance->options.mysqld_version,
+ &position);
else
- store_to_string(&send_buff, (char*) "unknown", &position);
+ store_to_protocol_packet(&send_buff, (char*) "unknown", &position);
if (send_buff.is_error() ||
@@ -272,17 +274,17 @@
if (!(instance= instance_map->find(instance_name, strlen(instance_name))))
goto err;
- store_to_string(&send_buff, (char*) "instance_name", &position);
- store_to_string(&send_buff, (char*) instance_name, &position);
+ store_to_protocol_packet(&send_buff, (char*) "instance_name", &position);
+ store_to_protocol_packet(&send_buff, (char*) instance_name, &position);
if (my_net_write(net, send_buff.buffer, (uint) position))
goto err;
if ((instance->options.mysqld_path))
{
position= 0;
- store_to_string(&send_buff, (char*) "mysqld-path", &position);
- store_to_string(&send_buff,
- (char*) instance->options.mysqld_path,
- &position);
+ store_to_protocol_packet(&send_buff, (char*) "mysqld-path", &position);
+ store_to_protocol_packet(&send_buff,
+ (char*) instance->options.mysqld_path,
+ &position);
if (send_buff.is_error() ||
my_net_write(net, send_buff.buffer, (uint) position))
goto err;
@@ -291,8 +293,8 @@
if ((instance->options.nonguarded))
{
position= 0;
- store_to_string(&send_buff, (char*) "nonguarded", &position);
- store_to_string(&send_buff, "", &position);
+ store_to_protocol_packet(&send_buff, (char*) "nonguarded", &position);
+ store_to_protocol_packet(&send_buff, "", &position);
if (send_buff.is_error() ||
my_net_write(net, send_buff.buffer, (uint) position))
goto err;
@@ -310,15 +312,15 @@
if (option_value != NULL)
{
*option_value= 0;
- store_to_string(&send_buff, tmp_option + 2, &position);
- store_to_string(&send_buff, option_value + 1, &position);
+ store_to_protocol_packet(&send_buff, tmp_option + 2, &position);
+ store_to_protocol_packet(&send_buff, option_value + 1, &position);
/* join name and the value into the same option again */
*option_value= '=';
}
else
{
- store_to_string(&send_buff, tmp_option + 2, &position);
- store_to_string(&send_buff, "", &position);
+ store_to_protocol_packet(&send_buff, tmp_option + 2, &position);
+ store_to_protocol_packet(&send_buff, "", &position);
}
if (send_buff.is_error() ||
@@ -481,7 +483,7 @@
char *bf= (char*) malloc(sizeof(char)*buff_size);
if ((read_len= my_read(fd, bf, buff_size, MYF(0))) < 0)
return ER_READ_FILE;
- store_to_string(&send_buff, (char*) bf, &position, read_len);
+ store_to_protocol_packet(&send_buff, (char*) bf, &position, read_len);
close(fd);
}
else
@@ -596,19 +598,19 @@
position= 0;
/* store the type of the log in the send buffer */
- store_to_string(&send_buff, log_files->name, &position);
+ store_to_protocol_packet(&send_buff, log_files->name, &position);
if (stat(log_files->value, &file_stat))
{
- store_to_string(&send_buff, "", &position);
- store_to_string(&send_buff, (char*) "0", &position);
+ store_to_protocol_packet(&send_buff, "", &position);
+ store_to_protocol_packet(&send_buff, (char*) "0", &position);
}
else if (S_ISREG(file_stat.st_mode))
{
- store_to_string(&send_buff,
- (char*) log_files->value,
- &position);
+ store_to_protocol_packet(&send_buff,
+ (char*) log_files->value,
+ &position);
int10_to_str(file_stat.st_size, buff, 10);
- store_to_string(&send_buff, (char*) buff, &position);
+ store_to_protocol_packet(&send_buff, (char*) buff, &position);
}
if (my_net_write(net, send_buff.buffer, (uint) position))
--- 1.8/server-tools/instance-manager/protocol.cc 2005-05-16 01:53:56 +04:00
+++ 1.9/server-tools/instance-manager/protocol.cc 2005-06-15 01:06:15 +04:00
@@ -58,7 +58,7 @@
if (message != NULL)
{
buff.reserve(position, 9 + strlen(message));
- store_to_string(&buff, message, &position);
+ store_to_protocol_packet(&buff, message, &position);
}
return my_net_write(net, buff.buffer, position) || net_flush(net);
@@ -117,8 +117,8 @@
}
-int store_to_string(Buffer *buf, const char *string, uint *position,
- uint string_len)
+int store_to_protocol_packet(Buffer *buf, const char *string, uint *position,
+ uint string_len)
{
uint currpos;
@@ -137,12 +137,12 @@
}
-int store_to_string(Buffer *buf, const char *string, uint *position)
+int store_to_protocol_packet(Buffer *buf, const char *string, uint *position)
{
uint string_len;
string_len= strlen(string);
- return store_to_string(buf, string, position, string_len);
+ return store_to_protocol_packet(buf, string, position, string_len);
}
@@ -176,21 +176,28 @@
position= 0;
field= (NAME_WITH_LENGTH *) tmp->data;
- store_to_string(&send_buff, (char*) "", &position); /* catalog name */
- store_to_string(&send_buff, (char*) "", &position); /* db name */
- store_to_string(&send_buff, (char*) "", &position); /* table name */
- store_to_string(&send_buff, (char*) "", &position); /* table name alias */
- store_to_string(&send_buff, field->name, &position); /* column name */
- store_to_string(&send_buff, field->name, &position); /* column name alias
*/
+ store_to_protocol_packet(&send_buff,
+ (char*) "", &position); /* catalog name */
+ store_to_protocol_packet(&send_buff,
+ (char*) "", &position); /* db name */
+ store_to_protocol_packet(&send_buff,
+ (char*) "", &position); /* table name */
+ store_to_protocol_packet(&send_buff,
+ (char*) "", &position); /* table name alias */
+ store_to_protocol_packet(&send_buff,
+ field->name, &position); /* column name */
+ store_to_protocol_packet(&send_buff,
+ field->name, &position); /* column name alias */
send_buff.reserve(position, 12);
if (send_buff.is_error())
goto err;
send_buff.buffer[position++]= 12;
- int2store(send_buff.buffer + position, 1); /* charsetnr */
- int4store(send_buff.buffer + position + 2, field->length); /* field length */
- send_buff.buffer[position+6]= FIELD_TYPE_STRING; /* type */
- int2store(send_buff.buffer + position + 7, 0); /* flags */
- send_buff.buffer[position + 9]= (char) 0; /* decimals */
+ int2store(send_buff.buffer + position, 1); /* charsetnr */
+ int4store(send_buff.buffer + position + 2,
+ field->length); /* field length */
+ send_buff.buffer[position+6]= FIELD_TYPE_STRING; /* type */
+ int2store(send_buff.buffer + position + 7, 0); /* flags */
+ send_buff.buffer[position + 9]= (char) 0; /* decimals */
send_buff.buffer[position + 10]= 0;
send_buff.buffer[position + 11]= 0;
position+= 12;
--- 1.5/server-tools/instance-manager/protocol.h 2005-05-16 01:53:56 +04:00
+++ 1.6/server-tools/instance-manager/protocol.h 2005-06-15 01:06:15 +04:00
@@ -41,10 +41,10 @@
char *net_store_length(char *pkg, uint length);
-int store_to_string(Buffer *buf, const char *string, uint *position);
+int store_to_protocol_packet(Buffer *buf, const char *string, uint *position);
-int store_to_string(Buffer *buf, const char *string, uint *position,
- uint string_len);
+int store_to_protocol_packet(Buffer *buf, const char *string, uint *position,
+ uint string_len);
int send_eof(struct st_net *net);
| Thread |
|---|
| • bk commit into 5.0 tree (petr:1.1929) | Petr Chardin | 14 Jun |