Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f8a1a341
Commit
f8a1a341
authored
19 years ago
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/mysql-4.1
parents
ca8fcc00
8191a28b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
50 deletions
+104
-50
Build-tools/Do-compile
Build-tools/Do-compile
+14
-14
libmysql/libmysql.def
libmysql/libmysql.def
+1
-0
libmysqld/libmysqld.def
libmysqld/libmysqld.def
+1
-0
mysql-test/t/analyse.test
mysql-test/t/analyse.test
+5
-0
ndb/src/mgmsrv/ConfigInfo.cpp
ndb/src/mgmsrv/ConfigInfo.cpp
+26
-3
ndb/test/src/CpcClient.cpp
ndb/test/src/CpcClient.cpp
+20
-22
sql/sql_analyse.cc
sql/sql_analyse.cc
+7
-8
sql/sql_parse.cc
sql/sql_parse.cc
+2
-2
sql/sql_prepare.cc
sql/sql_prepare.cc
+4
-1
tests/client_test.c
tests/client_test.c
+24
-0
No files found.
Build-tools/Do-compile
View file @
f8a1a341
...
...
@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options
=
$opt_perl_options
=
$opt_config_options
=
$opt_make_options
=
$opt_suffix
=
"";
$opt_tmp
=
$opt_version_suffix
=
"";
$opt_bundled_zlib
=
$opt_help
=
$opt_delete
=
$opt_debug
=
$opt_stage
=
$opt_no_test
=
$opt_no_perl
=
$opt_one_error
=
$opt_with_low_memory
=
$opt_fast_benchmark
=
$opt_static_client
=
$opt_static_server
=
$opt_static_perl
=
$opt_sur
=
$opt_with_small_disk
=
$opt_local_perl
=
$opt_tcpip
=
$opt_build_thread
=
$opt_use_old_distribution
=
$opt_enable_shared
=
$opt_no_crash_me
=
$opt_no_strip
=
$opt_with_archive
=
$opt_with_cluster
=
$opt_with_csv
=
$opt_with_example
=
$opt_with_debug
=
$opt_no_benchmark
=
$opt_no_mysqltest
=
$opt_without_embedded
=
$opt_readline
=
0
;
$opt_
embedded_test
=
$opt
_ps_test
=
$opt_innodb
=
$opt_bdb
=
$opt_raid
=
$opt_libwrap
=
$opt_clearlogs
=
0
;
$opt_
skip_embedded_test
=
$opt_skip
_ps_test
=
$opt_innodb
=
$opt_bdb
=
$opt_raid
=
$opt_libwrap
=
$opt_clearlogs
=
0
;
GetOptions
(
"
bdb
",
...
...
@@ -25,7 +25,6 @@ GetOptions(
"
delete
",
"
distribution=s
",
"
enable-shared
",
"
embedded-test
",
"
fast-benchmark
",
"
help|Information
",
"
innodb
",
...
...
@@ -41,9 +40,10 @@ GetOptions(
"
one-error
",
"
perl-files=s
",
"
perl-options=s
",
"
ps-test
",
"
raid
",
"
readline
",
"
skip-embedded-test
",
"
skip-ps-test
",
"
stage=i
",
"
static-client
",
"
static-perl
",
...
...
@@ -278,7 +278,7 @@ if ($opt_stage <= 1)
$opt_config_options
.=
"
--with-libedit
";
}
$opt_config_options
.=
"
--with-embedded-server
"
unless
(
$opt_without_embedded
);
$opt_
embedded_test
=
0
if
(
$opt_without_embedded
);
$opt_
skip_embedded_test
=
1
if
(
$opt_without_embedded
);
$opt_config_options
.=
"
--with-archive-storage-engine
"
if
(
$opt_with_archive
);
$opt_config_options
.=
"
--with-ndbcluster
"
if
(
$opt_with_cluster
);
$opt_config_options
.=
"
--with-csv-storage-engine
"
if
(
$opt_with_csv
);
...
...
@@ -391,14 +391,14 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
safe_cd
("
${test_dir}
/mysql-test
");
check_system
("
./mysql-test-run
$flags
--tmpdir=
$bench_tmpdir
--master_port=
$mysql_tcp_port
--slave_port=
$slave_port
--ndbcluster_port=
$ndbcluster_port
--manager-port=
$manager_port
--no-manager --sleep=10
",
"
tests were successful
");
if
(
$opt
_ps_test
)
unless
(
$opt_skip
_ps_test
)
{
log_timestamp
();
info
("
Running test suite using prepared statements
");
check_system
("
./mysql-test-run
$flags
--ps-protocol --tmpdir=
$bench_tmpdir
--master_port=
$mysql_tcp_port
--slave_port=
$slave_port
--ndbcluster_port=
$ndbcluster_port
--manager-port=
$manager_port
--no-manager --sleep=10
",
"
tests were successful
");
}
if
(
$opt
_embedded_test
)
unless
(
$opt_skip
_embedded_test
)
{
log_timestamp
();
info
("
Running embedded server test suite
");
...
...
@@ -551,9 +551,6 @@ Delete the distribution file.
--distribution=<distribution_file>
Name of the MySQL source distribution file.
--embedded-test
Run the test suite against the embedded server
--enable-shared
Compile with shared libraries
...
...
@@ -602,15 +599,18 @@ Compile and install the given perl modules.
--perl-options=<options>
Build Perl modules with the additional options
--ps-test
Run an additional test run, using prepared statements
--raid
Compile with RAID support
--readline
Compile against readline library instead of libedit
--skip-embedded-test
Skip running the test suite against the embedded server
--skip-ps-test
Skip running the additional test run that uses the prepared statement protocol
--stage=[1-6]
Start script from some specific point.
...
...
This diff is collapsed.
Click to expand it.
libmysql/libmysql.def
View file @
f8a1a341
...
...
@@ -146,3 +146,4 @@ EXPORTS
mysql_rpl_query_type
mysql_slave_query
mysql_embedded
get_defaults_files
This diff is collapsed.
Click to expand it.
libmysqld/libmysqld.def
View file @
f8a1a341
...
...
@@ -157,3 +157,4 @@ EXPORTS
mysql_stmt_attr_get
mysql_stmt_attr_set
mysql_stmt_field_count
get_defaults_files
This diff is collapsed.
Click to expand it.
mysql-test/t/analyse.test
View file @
f8a1a341
...
...
@@ -38,6 +38,11 @@ select * from t2;
insert
into
t2
select
*
from
t1
procedure
analyse
();
select
*
from
t2
;
drop
table
t1
,
t2
;
#
# Bug#2813 - analyse does not quote string values in enums from string
#
create
table
t1
(
v
varchar
(
128
));
insert
into
t1
values
(
'abc'
),(
'abc\'def\\hij\"klm\0opq'
),(
'\''
),(
'\"'
),(
'\\'
),(
'a\0'
),(
'b\''
),(
'c\"'
),(
'd\\'
),(
'\'b'
),(
'\"c'
),(
'\\d'
),(
'a\0\0\0b'
),(
'a\'\'\'\'b'
),(
'a\"\"\"\"b'
),(
'a\\\\\\\\b'
),(
'\'\0\\\"'
),(
'\'\''
),(
'\"\"'
),(
'\\\\'
),(
'The\ZEnd'
);
select
*
from
t1
procedure
analyse
();
...
...
This diff is collapsed.
Click to expand it.
ndb/src/mgmsrv/ConfigInfo.cpp
View file @
f8a1a341
...
...
@@ -98,6 +98,7 @@ static bool fixDepricated(InitConfigFileParser::Context & ctx, const char *);
static
bool
saveInConfigValues
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
);
static
bool
fixFileSystemPath
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
static
bool
fixBackupDataDir
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
static
bool
fixShmUniqueId
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
const
ConfigInfo
::
SectionRule
ConfigInfo
::
m_SectionRules
[]
=
{
...
...
@@ -111,6 +112,8 @@ ConfigInfo::m_SectionRules[] = {
{
"REP"
,
transformNode
,
0
},
{
"EXTERNAL REP"
,
transformExtNode
,
0
},
{
MGM_TOKEN
,
fixShmUniqueId
,
0
},
{
"TCP"
,
checkConnectionSupport
,
0
},
{
"SHM"
,
checkConnectionSupport
,
0
},
{
"SCI"
,
checkConnectionSupport
,
0
},
...
...
@@ -3155,19 +3158,39 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
DBUG_RETURN
(
true
);
}
static
bool
fixShmUniqueId
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
)
{
DBUG_ENTER
(
"fixShmUniqueId"
);
Uint32
nodes
=
0
;
ctx
.
m_userProperties
.
get
(
ctx
.
fname
,
&
nodes
);
if
(
nodes
==
1
)
// first management server
{
Uint32
portno
=
atoi
(
NDB_PORT
);
ctx
.
m_currentSection
->
get
(
"PortNumber"
,
&
portno
);
ctx
.
m_userProperties
.
put
(
"ShmUniqueId"
,
portno
);
}
DBUG_RETURN
(
true
);
}
static
bool
fixShmKey
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
)
{
DBUG_ENTER
(
"fixShmKey"
);
Uint32
id1
=
0
,
id2
=
0
,
key
=
0
;
require
(
ctx
.
m_currentSection
->
get
(
"NodeId1"
,
&
id1
));
require
(
ctx
.
m_currentSection
->
get
(
"NodeId2"
,
&
id2
));
if
(
ctx
.
m_currentSection
->
get
(
"ShmKey"
,
&
key
))
return
true
;
{
DBUG_RETURN
(
true
);
}
key
=
(
id1
>
id2
?
id1
<<
16
|
id2
:
id2
<<
16
|
id1
);
require
(
ctx
.
m_userProperties
.
get
(
"ShmUniqueId"
,
&
key
));
key
=
key
<<
16
|
(
id1
>
id2
?
id1
<<
8
|
id2
:
id2
<<
8
|
id1
);
ctx
.
m_currentSection
->
put
(
"ShmKey"
,
key
);
return
true
;
DBUG_PRINT
(
"info"
,(
"Added ShmKey=0x%x"
,
key
));
DBUG_RETURN
(
true
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
ndb/test/src/CpcClient.cpp
View file @
f8a1a341
...
...
@@ -30,7 +30,7 @@
0, 0, \
0, \
(desc), \
(v
oid *)(v
alue) }
(value) }
#define CPC_ARG(name, type, opt, desc) \
{ (name), \
...
...
@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){
int
SimpleCpcClient
::
list_processes
(
Vector
<
Process
>
&
procs
,
Properties
&
reply
)
{
enum
Proclist
{
Proclist_Start
,
Proclist_End
,
Proclist_Entry
};
int
start
,
end
,
entry
;
const
ParserRow_t
list_reply
[]
=
{
CPC_CMD
(
"start processes"
,
Proclist_Start
,
""
),
CPC_CMD
(
"end processes"
,
Proclist_End
,
""
),
CPC_CMD
(
"start processes"
,
&
start
,
""
),
CPC_CMD
(
"end processes"
,
&
end
,
""
),
CPC_CMD
(
"process"
,
Proclist_E
ntry
,
""
),
CPC_CMD
(
"process"
,
&
e
ntry
,
""
),
CPC_ARG
(
"id"
,
Int
,
Mandatory
,
"Id of process."
),
CPC_ARG
(
"name"
,
String
,
Mandatory
,
"Name of process"
),
CPC_ARG
(
"group"
,
String
,
Mandatory
,
"Group of process"
),
...
...
@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
bool
done
=
false
;
while
(
!
done
)
{
const
Properties
*
proc
;
enum
Proclist
p
;
cpc_recv
(
list_reply
,
&
proc
,
(
void
**
)
&
p
);
void
*
p
;
cpc_recv
(
list_reply
,
&
proc
,
&
p
);
switch
(
p
)
{
case
Proclist_Start
:
if
(
p
==
&
start
)
{
/* do nothing */
break
;
case
Proclist_End
:
}
else
if
(
p
==
&
end
)
{
done
=
true
;
break
;
case
Proclist_Entry
:
}
else
if
(
p
==
&
entry
)
{
if
(
proc
!=
NULL
){
Process
p
;
convert
(
*
proc
,
p
);
procs
.
push_back
(
p
);
}
break
;
default:
/* ignore */
break
;
}
else
{
ndbout_c
(
"internal error: %d"
,
__LINE__
);
return
-
1
;
}
}
return
0
;
...
...
This diff is collapsed.
Click to expand it.
sql/sql_analyse.cc
View file @
f8a1a341
...
...
@@ -1029,20 +1029,19 @@ uint check_ulonglong(const char *str, uint length)
}
/* check_ulonlong */
/*
FUNCTION: append_escaped()
Quote special characters in a string.
SYNOPSIS
append_escaped(to_str, from_str)
to_str (in) A pointer to a String.
from_str (to) A pointer to an allocated string
DESCRIPTION
append_escaped() takes a String type variable, where it appends
escaped the second argument. Only characters that require escaping
will be escaped.
ARGUMENTS
A pointer to a String variable, where results will be appended
A pointer to a String variable, which is appended to the result
String, escaping those characters that require it.
RETURN VALUES
0 Success
1 Out of memory
...
...
This diff is collapsed.
Click to expand it.
sql/sql_parse.cc
View file @
f8a1a341
...
...
@@ -64,7 +64,7 @@ const char *command_name[]={
"Drop DB"
,
"Refresh"
,
"Shutdown"
,
"Statistics"
,
"Processlist"
,
"Connect"
,
"Kill"
,
"Debug"
,
"Ping"
,
"Time"
,
"Delayed insert"
,
"Change user"
,
"Binlog Dump"
,
"Table Dump"
,
"Connect Out"
,
"Register Slave"
,
"Prepare"
,
"
Prepare
Execute"
,
"Long Data"
,
"Close stmt"
,
"Prepare"
,
"Execute"
,
"Long Data"
,
"Close stmt"
,
"Reset stmt"
,
"Set option"
,
"Error"
// Last command number
};
...
...
@@ -1547,7 +1547,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
packet
,
(
uint
)
(
pend
-
packet
),
thd
->
charset
());
table_list
.
alias
=
table_list
.
real_name
=
conv_name
.
str
;
packet
=
pend
+
1
;
// command not cachable => no gap for data base nam
e
thd
->
query_length
=
strlen
(
packet
);
// for simplicity: don't optimiz
e
if
(
!
(
thd
->
query
=
fields
=
thd
->
memdup
(
packet
,
thd
->
query_length
+
1
)))
break
;
mysql_log
.
write
(
thd
,
command
,
"%s %s"
,
table_list
.
real_name
,
fields
);
...
...
This diff is collapsed.
Click to expand it.
sql/sql_prepare.cc
View file @
f8a1a341
...
...
@@ -1592,7 +1592,7 @@ int mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
DBUG_RETURN
(
1
);
}
mysql_log
.
write
(
thd
,
COM_PREPARE
,
"
%s"
,
packet
);
mysql_log
.
write
(
thd
,
COM_PREPARE
,
"
[%lu] %s"
,
stmt
->
id
,
packet
);
thd
->
current_arena
=
stmt
;
mysql_init_query
(
thd
,
(
uchar
*
)
thd
->
query
,
thd
->
query_length
);
...
...
@@ -1792,6 +1792,9 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
if
(
stmt
->
param_count
&&
stmt
->
set_params_data
(
stmt
,
&
expanded_query
))
goto
set_params_data_err
;
#endif
mysql_log
.
write
(
thd
,
COM_EXECUTE
,
"[%lu] %s"
,
stmt
->
id
,
expanded_query
.
length
()
?
expanded_query
.
c_ptr
()
:
stmt
->
query
);
thd
->
protocol
=
&
thd
->
protocol_prep
;
// Switch to binary protocol
execute_stmt
(
thd
,
stmt
,
&
expanded_query
,
TRUE
);
thd
->
protocol
=
&
thd
->
protocol_simple
;
// Use normal protocol
...
...
This diff is collapsed.
Click to expand it.
tests/client_test.c
View file @
f8a1a341
...
...
@@ -11503,6 +11503,29 @@ static void test_rewind(void)
rc
=
mysql_stmt_close
(
stmt
);
}
/* Bug#6761 - mysql_list_fields doesn't work */
static
void
test_bug6761
(
void
)
{
const
char
*
stmt_text
;
MYSQL_RES
*
res
;
int
rc
;
myheader
(
"test_bug6761"
);
stmt_text
=
"CREATE TABLE t1 (a int, b char(255), c decimal)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
res
=
mysql_list_fields
(
mysql
,
"t1"
,
"%"
);
DIE_UNLESS
(
res
&&
mysql_num_fields
(
res
)
==
3
);
mysql_free_result
(
res
);
stmt_text
=
"DROP TABLE t1"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -11709,6 +11732,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug4172"
,
test_bug4172
},
{
"test_conversion"
,
test_conversion
},
{
"test_rewind"
,
test_rewind
},
{
"test_bug6761"
,
test_bug6761
},
{
0
,
0
}
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment