Commit fb9d4dca authored by unknown's avatar unknown

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

into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
parents 07df51aa 83fa3560
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--
This is a dummy changelog file. Don't use it yet.
It merges upward without conflict.
-->
<appendix id="news-4-0-x">
<title>
Changes in release 4.0.x
</title>
<para>
This is a dummy changelog file. Don't use it yet.
</para>
</appendix>
...@@ -4,18 +4,18 @@ CREATE TABLE db ( ...@@ -4,18 +4,18 @@ CREATE TABLE db (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db,User), PRIMARY KEY Host (Host,Db,User),
KEY User (User) KEY User (User)
) engine=MyISAM ) engine=MyISAM
...@@ -30,18 +30,18 @@ INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y', ...@@ -30,18 +30,18 @@ INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y',
CREATE TABLE host ( CREATE TABLE host (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
PRIMARY KEY Host (Host,Db) PRIMARY KEY Host (Host,Db)
) engine=MyISAM ) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin CHARACTER SET utf8 COLLATE utf8_bin
...@@ -52,28 +52,28 @@ CREATE TABLE user ( ...@@ -52,28 +52,28 @@ CREATE TABLE user (
Host char(60) binary DEFAULT '' NOT NULL, Host char(60) binary DEFAULT '' NOT NULL,
User char(16) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL,
Password char(41) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL,
Select_priv enum('N','Y') DEFAULT 'N' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Update_priv enum('N','Y') DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Process_priv enum('N','Y') DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
File_priv enum('N','Y') DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
References_priv enum('N','Y') DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Index_priv enum('N','Y') DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Show_db_priv enum('N','Y') DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Super_priv enum('N','Y') DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Execute_priv enum('N','Y') DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Repl_slave_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
Repl_client_priv enum('N','Y') DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
ssl_type enum('','ANY','X509', 'SPECIFIED') DEFAULT '' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
ssl_cipher BLOB NOT NULL, ssl_cipher BLOB NOT NULL,
x509_issuer BLOB NOT NULL, x509_issuer BLOB NOT NULL,
x509_subject BLOB NOT NULL, x509_subject BLOB NOT NULL,
...@@ -97,7 +97,7 @@ CREATE TABLE func ( ...@@ -97,7 +97,7 @@ CREATE TABLE func (
name char(64) binary DEFAULT '' NOT NULL, name char(64) binary DEFAULT '' NOT NULL,
ret tinyint(1) DEFAULT '0' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL,
dl char(128) DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL,
type enum ('function','aggregate') NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (name) PRIMARY KEY (name)
) engine=MyISAM ) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin CHARACTER SET utf8 COLLATE utf8_bin
...@@ -111,8 +111,8 @@ CREATE TABLE tables_priv ( ...@@ -111,8 +111,8 @@ CREATE TABLE tables_priv (
Table_name char(64) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL,
Grantor char(77) DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL,
Timestamp timestamp(14), Timestamp timestamp(14),
Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') DEFAULT '' NOT NULL, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name),KEY Grantor (Grantor) PRIMARY KEY (Host,Db,User,Table_name),KEY Grantor (Grantor)
) engine=MyISAM ) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin CHARACTER SET utf8 COLLATE utf8_bin
...@@ -126,7 +126,7 @@ CREATE TABLE columns_priv ( ...@@ -126,7 +126,7 @@ CREATE TABLE columns_priv (
Table_name char(64) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL,
Column_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL,
Timestamp timestamp(14), Timestamp timestamp(14),
Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name,Column_name) PRIMARY KEY (Host,Db,User,Table_name,Column_name)
) engine=MyISAM ) engine=MyISAM
CHARACTER SET utf8 COLLATE utf8_bin CHARACTER SET utf8 COLLATE utf8_bin
......
...@@ -748,3 +748,18 @@ ySQL ...@@ -748,3 +748,18 @@ ySQL
SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column; SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column;
my_column my_column
4 4
CREATE TABLE t1 (id int PRIMARY KEY, str char(255) NOT NULL);
CREATE TABLE t2 (id int NOT NULL UNIQUE);
INSERT INTO t2 VALUES (1),(2);
INSERT INTO t1 VALUES (1, aes_encrypt('foo', 'bar'));
INSERT INTO t1 VALUES (2, 'not valid');
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
ORDER BY t1.id;
id aes_decrypt(str, 'bar')
1 foo
2 NULL
DROP TABLE t1, t2;
...@@ -485,3 +485,19 @@ DROP TABLE t1; ...@@ -485,3 +485,19 @@ DROP TABLE t1;
# #
SELECT CHAR(NULL,121,83,81,'76') as my_column; SELECT CHAR(NULL,121,83,81,'76') as my_column;
SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column; SELECT CHAR_LENGTH(CHAR(NULL,121,83,81,'76')) as my_column;
#
# Test case for bug #8669: null aes_decrypt result in order by query
#
CREATE TABLE t1 (id int PRIMARY KEY, str char(255) NOT NULL);
CREATE TABLE t2 (id int NOT NULL UNIQUE);
INSERT INTO t2 VALUES (1),(2);
INSERT INTO t1 VALUES (1, aes_encrypt('foo', 'bar'));
INSERT INTO t1 VALUES (2, 'not valid');
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id;
SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id
ORDER BY t1.id;
DROP TABLE t1, t2;
...@@ -17,8 +17,9 @@ my %opt = ( ...@@ -17,8 +17,9 @@ my %opt = (
); );
GetOptions(\%opt, GetOptions(\%opt,
'v+', # verbose 'verbose|v+',# verbose
'd+', # debug 'help+', # write usage info
'debug|d+', # debug
's=s', # what to sort by (t, at, l, al, r, ar etc) 's=s', # what to sort by (t, at, l, al, r, ar etc)
'r!', # reverse the sort order (largest last instead of first) 'r!', # reverse the sort order (largest last instead of first)
't=i', # just show the top n queries 't=i', # just show the top n queries
...@@ -28,8 +29,9 @@ GetOptions(\%opt, ...@@ -28,8 +29,9 @@ GetOptions(\%opt,
'h=s', # hostname of db server for *-slow.log filename (can be wildcard) 'h=s', # hostname of db server for *-slow.log filename (can be wildcard)
'i=s', # name of server instance (if using mysql.server startup script) 'i=s', # name of server instance (if using mysql.server startup script)
'l!', # don't subtract lock time from total time 'l!', # don't subtract lock time from total time
) or die "Bad option"; ) or usage("bad option");
$opt{'help'} and usage();
unless (@ARGV) { unless (@ARGV) {
my $defaults = `my_print_defaults mysqld`; my $defaults = `my_print_defaults mysqld`;
...@@ -141,3 +143,38 @@ foreach (@sorted) { ...@@ -141,3 +143,38 @@ foreach (@sorted) {
printf "Count: %d Time=%.2fs (%ds) Lock=%.2fs (%ds) Rows=%.1f (%d), $user\@$host\n%s\n\n", printf "Count: %d Time=%.2fs (%ds) Lock=%.2fs (%ds) Rows=%.1f (%d), $user\@$host\n%s\n\n",
$c, $at,$t, $al,$l, $ar,$r, $_; $c, $at,$t, $al,$l, $ar,$r, $_;
} }
sub usage {
my $str= shift;
my $text= <<HERE;
Usage: mysqldumpslow [ OPTS... ] [ LOGS... ]
Parse and summarize the MySQL slow query log. Options are
--verbose verbose
--debug debug
--help write this text to standard output
-v verbose
-d debug
-s ORDER what to sort by (t, at, l, al, r, ar etc), 'at' is default
-r reverse the sort order (largest last instead of first)
-t NUM just show the top n queries
-a don't abstract all numbers to N and strings to 'S'
-n NUM abstract numbers with at least n digits within names
-g PATTERN grep: only consider stmts that include this string
-h HOSTNAME hostname of db server for *-slow.log filename (can be wildcard),
default is '*', i.e. match all
-i NAME name of server instance (if using mysql.server startup script)
-l don't subtract lock time from total time
HERE
if ($str) {
print STDERR "ERROR: $str\n\n";
print STDERR $text;
exit 1;
} else {
print $text;
exit 0;
}
}
...@@ -416,9 +416,9 @@ void ha_ndbcluster::invalidateDictionaryCache() ...@@ -416,9 +416,9 @@ void ha_ndbcluster::invalidateDictionaryCache()
NDBDICT *dict= get_ndb()->getDictionary(); NDBDICT *dict= get_ndb()->getDictionary();
DBUG_PRINT("info", ("invalidating %s", m_tabname)); DBUG_PRINT("info", ("invalidating %s", m_tabname));
dict->invalidateTable(m_tabname); dict->invalidateTable(m_tabname);
table->version=0L; /* Free when thread is ready */ table->s->version=0L; /* Free when thread is ready */
/* Invalidate indexes */ /* Invalidate indexes */
for (uint i= 0; i < table->keys; i++) for (uint i= 0; i < table->s->keys; i++)
{ {
NDBINDEX *index = (NDBINDEX *) m_index[i].index; NDBINDEX *index = (NDBINDEX *) m_index[i].index;
NDBINDEX *unique_index = (NDBINDEX *) m_index[i].unique_index; NDBINDEX *unique_index = (NDBINDEX *) m_index[i].unique_index;
......
...@@ -4368,33 +4368,19 @@ longlong Item_func_row_count::val_int() ...@@ -4368,33 +4368,19 @@ longlong Item_func_row_count::val_int()
Item_func_sp::Item_func_sp(sp_name *name) Item_func_sp::Item_func_sp(sp_name *name)
:Item_func(), m_name(name), m_sp(NULL) :Item_func(), m_name(name), m_sp(NULL)
{ {
char *empty_name= (char *) "";
maybe_null= 1; maybe_null= 1;
m_name->init_qname(current_thd); m_name->init_qname(current_thd);
bzero(&dummy_table, sizeof(dummy_table)); dummy_table= (TABLE *)sql_alloc(sizeof(TABLE));
dummy_table.share.table_cache_key = empty_name; bzero(dummy_table, sizeof(TABLE));
dummy_table.share.table_name = empty_name;
dummy_table.table.alias = empty_name;
dummy_table.share.table_name = empty_name;
dummy_table.table.maybe_null = maybe_null;
dummy_table.table.in_use= current_thd;
dummy_table.table.s = &dummy_table.share;
} }
Item_func_sp::Item_func_sp(sp_name *name, List<Item> &list) Item_func_sp::Item_func_sp(sp_name *name, List<Item> &list)
:Item_func(list), m_name(name), m_sp(NULL) :Item_func(list), m_name(name), m_sp(NULL)
{ {
char *empty_name= (char *) "";
maybe_null= 1; maybe_null= 1;
m_name->init_qname(current_thd); m_name->init_qname(current_thd);
bzero(&dummy_table, sizeof(dummy_table)); dummy_table= (TABLE *)sql_alloc(sizeof(TABLE));
dummy_table.share.table_cache_key = empty_name; bzero(dummy_table, sizeof(TABLE));
dummy_table.share.table_name = empty_name;
dummy_table.table.alias = empty_name;
dummy_table.share.table_name = empty_name;
dummy_table.table.maybe_null = maybe_null;
dummy_table.table.in_use= current_thd;
dummy_table.table.s = &dummy_table.share;
} }
const char * const char *
...@@ -4426,7 +4412,21 @@ Item_func_sp::sp_result_field(void) const ...@@ -4426,7 +4412,21 @@ Item_func_sp::sp_result_field(void) const
THD *thd= current_thd; THD *thd= current_thd;
DBUG_ENTER("Item_func_sp::sp_result_field"); DBUG_ENTER("Item_func_sp::sp_result_field");
if (m_sp) if (m_sp)
field= m_sp->make_field(max_length, name, &dummy_table.table); {
if (dummy_table->s == NULL)
{
char *empty_name= (char *) "";
TABLE_SHARE *share;
dummy_table->s= share= &dummy_table->share_not_to_be_used;
dummy_table->alias = empty_name;
dummy_table->maybe_null = maybe_null;
dummy_table->in_use= current_thd;
share->table_cache_key = empty_name;
share->table_name = empty_name;
share->table_name = empty_name;
}
field= m_sp->make_field(max_length, name, dummy_table);
}
DBUG_RETURN(field); DBUG_RETURN(field);
} }
......
...@@ -1252,10 +1252,7 @@ class Item_func_sp :public Item_func ...@@ -1252,10 +1252,7 @@ class Item_func_sp :public Item_func
private: private:
sp_name *m_name; sp_name *m_name;
mutable sp_head *m_sp; mutable sp_head *m_sp;
mutable struct { TABLE *dummy_table;
TABLE table;
TABLE_SHARE share;
} dummy_table;
int execute(Item **itp); int execute(Item **itp);
Field *sp_result_field(void) const; Field *sp_result_field(void) const;
......
...@@ -225,6 +225,7 @@ String *Item_func_aes_decrypt::val_str(String *str) ...@@ -225,6 +225,7 @@ String *Item_func_aes_decrypt::val_str(String *str)
void Item_func_aes_decrypt::fix_length_and_dec() void Item_func_aes_decrypt::fix_length_and_dec()
{ {
max_length=args[0]->max_length; max_length=args[0]->max_length;
maybe_null= 1;
} }
......
...@@ -3148,7 +3148,7 @@ we force server id to 2, but this MySQL server will not act as a slave."); ...@@ -3148,7 +3148,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
create_shutdown_thread(); create_shutdown_thread();
create_maintenance_thread(); create_maintenance_thread();
sql_print_information(ER(ER_READY),my_progname,server_version, sql_print_information(ER(ER_STARTUP),my_progname,server_version,
((unix_sock == INVALID_SOCKET) ? (char*) "" ((unix_sock == INVALID_SOCKET) ? (char*) ""
: mysqld_unix_port), : mysqld_unix_port),
mysqld_port, mysqld_port,
......
...@@ -1824,7 +1824,7 @@ ER_READY ...@@ -1824,7 +1824,7 @@ ER_READY
cze "%s: p-Bipraven na spojen" cze "%s: p-Bipraven na spojen"
dan "%s: klar til tilslutninger" dan "%s: klar til tilslutninger"
nla "%s: klaar voor verbindingen" nla "%s: klaar voor verbindingen"
eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s" eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d"
jps "%s: ", jps "%s: ",
est "%s: ootab hendusi" est "%s: ootab hendusi"
fre "%s: Prt pour des connections" fre "%s: Prt pour des connections"
...@@ -5328,3 +5328,5 @@ ER_DATA_TOO_LONG 22001 ...@@ -5328,3 +5328,5 @@ ER_DATA_TOO_LONG 22001
eng "Data too long for column '%s' at row %ld" eng "Data too long for column '%s' at row %ld"
ER_SP_BAD_SQLSTATE 42000 ER_SP_BAD_SQLSTATE 42000
eng "Bad SQLSTATE: '%s'" eng "Bad SQLSTATE: '%s'"
ER_STARTUP
eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s"
...@@ -1782,7 +1782,7 @@ void TMP_TABLE_PARAM::init() ...@@ -1782,7 +1782,7 @@ void TMP_TABLE_PARAM::init()
void thd_increment_bytes_sent(ulong length) void thd_increment_bytes_sent(ulong length)
{ {
THD *thd=current_thd; THD *thd=current_thd;
if (likely(thd)) if (likely(thd != 0))
{ /* current_thd==0 when close_connection() calls net_send_error() */ { /* current_thd==0 when close_connection() calls net_send_error() */
thd->status_var.bytes_sent+= length; thd->status_var.bytes_sent+= length;
} }
......
...@@ -860,7 +860,7 @@ typedef struct st_lex ...@@ -860,7 +860,7 @@ typedef struct st_lex
inline bool requires_prelocking() inline bool requires_prelocking()
{ {
return query_tables_own_last; return test(query_tables_own_last);
} }
inline void mark_as_requiring_prelocking(TABLE_LIST **tables_own_last) inline void mark_as_requiring_prelocking(TABLE_LIST **tables_own_last)
{ {
......
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