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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
683a8893
Commit
683a8893
authored
Jun 11, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysqltest.c: don't hardcode variables to be taken from environment.
use MYSQL_TCP_PORT instead of 3306 in tests
parent
78fa465b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
client/mysqltest.c
client/mysqltest.c
+9
-10
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+1
-0
mysql-test/t/rpl000015.test
mysql-test/t/rpl000015.test
+1
-1
No files found.
client/mysqltest.c
View file @
683a8893
...
@@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"",
...
@@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"",
DYNAMIC_STRING
ds_res
;
DYNAMIC_STRING
ds_res
;
static
void
die
(
const
char
*
fmt
,
...);
static
void
die
(
const
char
*
fmt
,
...);
static
void
init_var_hash
();
static
void
init_var_hash
();
static
VAR
*
var_from_env
(
const
char
*
,
const
char
*
);
static
byte
*
get_var_key
(
const
byte
*
rec
,
uint
*
len
,
static
byte
*
get_var_key
(
const
byte
*
rec
,
uint
*
len
,
my_bool
__attribute__
((
unused
))
t
);
my_bool
__attribute__
((
unused
))
t
);
static
VAR
*
var_init
(
VAR
*
v
,
const
char
*
name
,
int
name_len
,
const
char
*
val
,
static
VAR
*
var_init
(
VAR
*
v
,
const
char
*
name
,
int
name_len
,
const
char
*
val
,
...
@@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
...
@@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
if
(
!
(
v
=
(
VAR
*
)
hash_search
(
&
var_hash
,
save_var_name
,
if
(
!
(
v
=
(
VAR
*
)
hash_search
(
&
var_hash
,
save_var_name
,
var_name
-
save_var_name
)))
var_name
-
save_var_name
)))
{
{
if
(
ignore_not_existing
)
char
c
=*
var_name
,
*
s
=
(
char
*
)
var_name
;;
DBUG_RETURN
(
0
);
*
s
=
0
;
if
(
end
)
v
=
var_from_env
(
save_var_name
,
""
);
*
(
char
*
)
end
=
0
;
*
s
=
c
;
die
(
"Variable '%s' used uninitialized"
,
save_var_name
);
}
}
--
var_name
;
/* Point at last character */
--
var_name
;
/* Point at last character */
}
}
...
@@ -2580,7 +2580,7 @@ static void var_free(void *v)
...
@@ -2580,7 +2580,7 @@ static void var_free(void *v)
}
}
static
void
var_from_env
(
const
char
*
name
,
const
char
*
def_val
)
static
VAR
*
var_from_env
(
const
char
*
name
,
const
char
*
def_val
)
{
{
const
char
*
tmp
;
const
char
*
tmp
;
VAR
*
v
;
VAR
*
v
;
...
@@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val)
...
@@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val)
v
=
var_init
(
0
,
name
,
0
,
tmp
,
0
);
v
=
var_init
(
0
,
name
,
0
,
tmp
,
0
);
my_hash_insert
(
&
var_hash
,
(
byte
*
)
v
);
my_hash_insert
(
&
var_hash
,
(
byte
*
)
v
);
return
v
;
}
}
...
@@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql)
...
@@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql)
if
(
hash_init
(
&
var_hash
,
charset_info
,
if
(
hash_init
(
&
var_hash
,
charset_info
,
1024
,
0
,
0
,
get_var_key
,
var_free
,
MYF
(
0
)))
1024
,
0
,
0
,
get_var_key
,
var_free
,
MYF
(
0
)))
die
(
"Variable hash initialization failed"
);
die
(
"Variable hash initialization failed"
);
var_from_env
(
"MASTER_MYPORT"
,
"9306"
);
if
(
opt_big_test
)
var_from_env
(
"SLAVE_MYPORT"
,
"9307"
);
my_hash_insert
(
&
var_hash
,
(
byte
*
)
var_init
(
0
,
"BIG_TEST"
,
0
,
"1"
,
0
));
var_from_env
(
"MYSQL_TEST_DIR"
,
"/tmp"
);
var_from_env
(
"BIG_TEST"
,
opt_big_test
?
"1"
:
"0"
);
v
=
var_init
(
0
,
"MAX_TABLES"
,
0
,
(
sizeof
(
ulong
)
==
4
)
?
"31"
:
"62"
,
0
);
v
=
var_init
(
0
,
"MAX_TABLES"
,
0
,
(
sizeof
(
ulong
)
==
4
)
?
"31"
:
"62"
,
0
);
my_hash_insert
(
&
var_hash
,
(
byte
*
)
v
);
my_hash_insert
(
&
var_hash
,
(
byte
*
)
v
);
v
=
var_init
(
0
,
"SERVER_VERSION"
,
0
,
mysql_get_server_info
(
mysql
),
0
);
v
=
var_init
(
0
,
"SERVER_VERSION"
,
0
,
mysql_get_server_info
(
mysql
),
0
);
...
...
mysql-test/mysql-test-run.sh
View file @
683a8893
...
@@ -16,6 +16,7 @@ USE_MANAGER=0
...
@@ -16,6 +16,7 @@ USE_MANAGER=0
MY_TZ
=
GMT-3
MY_TZ
=
GMT-3
TZ
=
$MY_TZ
;
export
TZ
# for UNIX_TIMESTAMP tests to work
TZ
=
$MY_TZ
;
export
TZ
# for UNIX_TIMESTAMP tests to work
LOCAL_SOCKET
=
@MYSQL_UNIX_ADDR@
LOCAL_SOCKET
=
@MYSQL_UNIX_ADDR@
MYSQL_TCP_PORT
=
@MYSQL_TCP_PORT@
;
export
MYSQL_TCP_PORT
# For query_cache test
# For query_cache test
case
`
uname
`
in
case
`
uname
`
in
...
...
mysql-test/t/rpl000015.test
View file @
683a8893
...
@@ -12,7 +12,7 @@ show slave status;
...
@@ -12,7 +12,7 @@ show slave status;
change
master
to
master_host
=
'127.0.0.1'
;
change
master
to
master_host
=
'127.0.0.1'
;
# The following needs to be cleaned up when change master is fixed
# The following needs to be cleaned up when change master is fixed
--
replace_result
$MASTER_MYPORT
MASTER_PORT
3306
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
$MYSQL_TCP_PORT
MASTER_PORT
--
replace_column
1
# 33 #
--
replace_column
1
# 33 #
show
slave
status
;
show
slave
status
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
...
...
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