mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1
into three.local.lan:/home/matthias/Arbeit/mysql-4.1/src
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
||||
$(openssl_includes)
|
||||
LIBS = @CLIENT_LIBS@
|
||||
DEPLIB= ../libmysql/libmysqlclient.la \
|
||||
@ndb_mgmclient_libs@
|
||||
DEPLIB= @ndb_mgmclient_libs@ \
|
||||
../libmysql/libmysqlclient.la
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
|
||||
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
||||
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
|
||||
|
||||
@@ -254,7 +254,7 @@ static struct my_option my_long_options[] =
|
||||
"any action on logs will happen at the exact moment of the dump."
|
||||
"Option automatically turns --lock-tables off.",
|
||||
(gptr*) &opt_master_data, (gptr*) &opt_master_data, 0,
|
||||
GET_UINT, REQUIRED_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
GET_UINT, OPT_ARG, 0, 0, MYSQL_OPT_MASTER_DATA_COMMENTED_SQL, 0, 0, 0},
|
||||
{"max_allowed_packet", OPT_MAX_ALLOWED_PACKET, "",
|
||||
(gptr*) &opt_max_allowed_packet, (gptr*) &opt_max_allowed_packet, 0,
|
||||
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
|
||||
@@ -548,6 +548,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case '?':
|
||||
usage();
|
||||
exit(0);
|
||||
case (int) OPT_MASTER_DATA:
|
||||
if (!argument) /* work like in old versions */
|
||||
opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL;
|
||||
break;
|
||||
case (int) OPT_OPTIMIZE:
|
||||
extended_insert= opt_drop= opt_lock= quick= create_options=
|
||||
opt_disable_keys= lock_tables= opt_set_charset= 1;
|
||||
@@ -1680,7 +1684,7 @@ static void dumpTable(uint numFields, char *table)
|
||||
else if (opt_hex_blob && is_blob)
|
||||
{
|
||||
/* sakaik got the idea to to provide blob's in hex notation. */
|
||||
unsigned char *ptr= row[i], *end= ptr+ lengths[i];
|
||||
char *ptr= row[i], *end= ptr+ lengths[i];
|
||||
fputs("0x", md_result_file);
|
||||
for (; ptr < end ; ptr++)
|
||||
fprintf(md_result_file, "%02X", *ptr);
|
||||
@@ -2046,8 +2050,18 @@ static int do_show_master_status(MYSQL *mysql_con)
|
||||
|
||||
static int do_flush_tables_read_lock(MYSQL *mysql_con)
|
||||
{
|
||||
/*
|
||||
We do first a FLUSH TABLES. If a long update is running, the FLUSH TABLES
|
||||
will wait but will not stall the whole mysqld, and when the long update is
|
||||
done the FLUSH TABLES WITH READ LOCK will start and succeed quickly. So,
|
||||
FLUSH TABLES is to lower the probability of a stage where both mysqldump
|
||||
and most client connections are stalled. Of course, if a second long
|
||||
update starts between the two FLUSHes, we have that bad stall.
|
||||
*/
|
||||
return
|
||||
mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES WITH READ LOCK");
|
||||
( mysql_query_with_error_report(mysql_con, 0, "FLUSH TABLES") ||
|
||||
mysql_query_with_error_report(mysql_con, 0,
|
||||
"FLUSH TABLES WITH READ LOCK") );
|
||||
}
|
||||
|
||||
|
||||
@@ -2232,7 +2246,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if (opt_master_data && do_show_master_status(sock))
|
||||
goto err;
|
||||
if (opt_single_transaction && do_unlock_tables(sock)) // unlock but no commit!
|
||||
if (opt_single_transaction && do_unlock_tables(sock)) /* unlock but no commit! */
|
||||
goto err;
|
||||
|
||||
if (opt_alldbs)
|
||||
|
||||
@@ -134,3 +134,10 @@ select * from t1 where firstname='john' and firstname like binary 'John';
|
||||
firstname lastname
|
||||
John Doe
|
||||
drop table t1;
|
||||
create table t1 (a binary);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` binary(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
||||
@@ -80,3 +80,10 @@ select * from t1 where firstname='john' and firstname = binary 'john';
|
||||
select * from t1 where firstname='John' and firstname like binary 'john';
|
||||
select * from t1 where firstname='john' and firstname like binary 'John';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #6552 CHAR column w/o length is legal, BINARY w/o length is not
|
||||
#
|
||||
create table t1 (a binary);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -238,7 +238,8 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
|
||||
|
||||
char buf[255];
|
||||
ndb_mgm_configuration_iterator * it;
|
||||
it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf, CFG_SECTION_NODE);
|
||||
it = ndb_mgm_create_configuration_iterator((struct ndb_mgm_configuration *)conf,
|
||||
CFG_SECTION_NODE);
|
||||
|
||||
if(it == 0){
|
||||
BaseString::snprintf(buf, 255, "Unable to create config iterator");
|
||||
@@ -284,8 +285,14 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
|
||||
}
|
||||
|
||||
if(_type != m_node_type){
|
||||
BaseString::snprintf(buf, 255, "Supplied node type(%d) and config node type(%d) "
|
||||
" don't match", m_node_type, _type);
|
||||
const char *type_s, *alias_s, *type_s2, *alias_s2;
|
||||
alias_s= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)m_node_type,
|
||||
&type_s);
|
||||
alias_s2= ndb_mgm_get_node_type_alias_string((enum ndb_mgm_node_type)_type,
|
||||
&type_s2);
|
||||
BaseString::snprintf(buf, 255, "This node type %s(%s) and config "
|
||||
"node type %s(%s) don't match for nodeid %d",
|
||||
alias_s, type_s, alias_s2, type_s2, nodeid);
|
||||
setError(CR_ERROR, buf);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ int main(int argc, char** argv)
|
||||
* Read configuration files *
|
||||
****************************/
|
||||
LocalConfig local_config;
|
||||
if(!local_config.init(0,glob.local_config_filename)){
|
||||
if(!local_config.init(opt_connect_str,glob.local_config_filename)){
|
||||
local_config.printError();
|
||||
goto error_end;
|
||||
}
|
||||
|
||||
@@ -1402,6 +1402,9 @@ type:
|
||||
| BINARY '(' NUM ')' { Lex->length=$3.str;
|
||||
Lex->charset=&my_charset_bin;
|
||||
$$=FIELD_TYPE_STRING; }
|
||||
| BINARY { Lex->length= (char*) "1";
|
||||
Lex->charset=&my_charset_bin;
|
||||
$$=FIELD_TYPE_STRING; }
|
||||
| varchar '(' NUM ')' opt_binary { Lex->length=$3.str;
|
||||
$$=FIELD_TYPE_VAR_STRING; }
|
||||
| nvarchar '(' NUM ')' { Lex->length=$3.str;
|
||||
|
||||
Reference in New Issue
Block a user