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
39b73c0f
Commit
39b73c0f
authored
Mar 23, 2001
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
parents
41e7f821
bd6e7063
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
23 deletions
+56
-23
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-1
client/mysqltest.c
client/mysqltest.c
+28
-14
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+8
-2
mysql-test/t/flush.test
mysql-test/t/flush.test
+19
-6
No files found.
BitKeeper/etc/logging_ok
View file @
39b73c0f
mwagner@evoq.mwagner.org
sasha@mysql.sashanet.com
client/mysqltest.c
View file @
39b73c0f
...
...
@@ -139,7 +139,7 @@ struct connection* cur_con, *next_con, *cons_end;
/* this should really be called command */
struct
st_query
{
char
*
query
,
*
first_argument
;
char
*
query
,
*
query_buf
,
*
first_argument
;
int
first_word_len
;
my_bool
abort_on_error
,
require_file
;
uint
expected_errno
[
MAX_EXPECTED_ERRORS
];
...
...
@@ -243,9 +243,14 @@ static void free_used_memory()
for
(
i
=
0
;
i
<
q_lines
.
elements
;
i
++
)
{
struct
st_query
**
q
=
dynamic_element
(
&
q_lines
,
i
,
struct
st_query
**
);
my_free
((
gptr
)
(
*
q
)
->
query
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
gptr
)
(
*
q
)
->
query
_buf
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
gptr
)
(
*
q
),
MYF
(
0
));
}
for
(
i
=
0
;
i
<
10
;
i
++
)
{
if
(
var_reg
[
i
].
alloced_len
)
my_free
(
var_reg
[
i
].
str_val
,
MYF
(
MY_WME
));
}
delete_dynamic
(
&
q_lines
);
dynstr_free
(
&
ds_res
);
my_free
(
pass
,
MYF
(
MY_ALLOW_ZERO_PTR
));
...
...
@@ -1165,7 +1170,7 @@ int read_query(struct st_query** q_ptr)
q
->
abort_on_error
=
global_expected_errno
[
0
]
==
0
;
bzero
((
gptr
)
global_expected_errno
,
sizeof
(
global_expected_errno
));
q
->
type
=
Q_UNKNOWN
;
q
->
query
=
0
;
q
->
query
_buf
=
q
->
query
=
0
;
if
(
read_line
(
read_query_buf
,
sizeof
(
read_query_buf
)))
return
1
;
...
...
@@ -1207,7 +1212,7 @@ int read_query(struct st_query** q_ptr)
}
}
while
(
*
p
&&
isspace
(
*
p
))
p
++
;
if
(
!
(
q
->
query
=
my_strdup
(
p
,
MYF
(
MY_WME
))))
if
(
!
(
q
->
query
_buf
=
q
->
query
=
my_strdup
(
p
,
MYF
(
MY_WME
))))
die
(
NullS
);
/* Calculate first word and first argument */
...
...
@@ -1391,7 +1396,10 @@ void reject_dump(const char* record_file, char* buf, int size)
str_to_file
(
fn_format
(
reject_file
,
record_file
,
""
,
".reject"
,
2
),
buf
,
size
);
}
/* flags control the phased/stages of query execution to be performed
* if QUERY_SEND bit is on, the query will be sent. If QUERY_REAP is on
* the result will be read - for regular query, both bits must be on
*/
int
run_query
(
MYSQL
*
mysql
,
struct
st_query
*
q
,
int
flags
)
{
MYSQL_RES
*
res
=
0
;
...
...
@@ -1564,7 +1572,7 @@ int main(int argc, char** argv)
{
int
error
=
0
;
struct
st_query
*
q
;
my_bool
require_file
=
0
,
q_send_flag
=
0
;
my_bool
require_file
=
0
;
char
save_file
[
FN_REFLEN
];
MY_INIT
(
argv
[
0
]);
...
...
@@ -1626,14 +1634,11 @@ int main(int argc, char** argv)
case
Q_QUERY
:
case
Q_REAP
:
{
int
flags
=
QUERY_REAP
;
if
(
q
->
type
==
Q_QUERY
)
int
flags
=
QUERY_REAP
;
/* we read the result always regardless
* of the mode for both full query and
* read-result only ( reap) */
if
(
q
->
type
==
Q_QUERY
)
/* for a full query, enable the send stage */
flags
|=
QUERY_SEND
;
if
(
q_send_flag
)
{
flags
=
QUERY_SEND
;
q_send_flag
=
0
;
}
if
(
save_file
[
0
])
{
strmov
(
q
->
record_file
,
save_file
);
...
...
@@ -1644,7 +1649,16 @@ int main(int argc, char** argv)
break
;
}
case
Q_SEND
:
q_send_flag
=
1
;
if
(
q
->
query
==
q
->
query_buf
)
/* fix up query pointer if this is
* first iteration for this line
*/
q
->
query
+=
q
->
first_word_len
;
error
|=
run_query
(
&
cur_con
->
mysql
,
q
,
QUERY_SEND
);
/* run query can execute a query partially, depending on the flags
* QUERY_SEND flag without QUERY_REAP tells it to just send the
* query and read the result some time later when reap instruction
* is given on this connection
*/
break
;
case
Q_RESULT
:
get_file_name
(
save_file
,
q
);
...
...
mysql-test/mysql-test-run.sh
View file @
39b73c0f
...
...
@@ -139,9 +139,15 @@ while test $# -gt 0; do
fi
DO_DDD
=
1
;;
--skip-
*
)
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
$1
"
EXTRA_SLAVE_MYSQLD_OPT
=
"
$EXTRA_SLAVE_MYSQLD_OPT
$1
"
;;
--debug
)
EXTRA_MASTER_MYSQLD_OPT
=
--debug
=
d:t:O,
$MYSQL_TMP_DIR
/master.trace
EXTRA_SLAVE_MYSQLD_OPT
=
--debug
=
d:t:O,
$MYSQL_TMP_DIR
/slave.trace
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
\
--debug=d:t:O,
$MYSQL_TMP_DIR
/master.trace"
EXTRA_SLAVE_MYSQLD_OPT
=
"
$EXTRA_SLAVE_MYSQLD_OPT
\
--debug=d:t:O,
$MYSQL_TMP_DIR
/slave.trace"
EXTRA_MYSQL_TEST_OPT
=
"
$EXTRA_MYSQL_TEST_OPT
--debug"
;;
--
)
shift
;
break
;;
...
...
mysql-test/t/flush.test
View file @
39b73c0f
...
...
@@ -2,11 +2,24 @@ connect (con1,localhost,root,,test,0,mysql-master.sock);
connect
(
con2
,
localhost
,
root
,,
test
,
0
,
mysql
-
master
.
sock
);
connection
con1
;
drop
table
if
exists
t1
;
create
temporary
table
t1
(
n
int
);
connection
con2
;
#send flush tables;
create
temporary
table
t1
(
n
int
not
null
primary
key
);
drop
table
if
exists
t2
;
create
table
t2
(
n
int
);
insert
into
t2
values
(
3
);
let
$
1
=
100
;
while
(
$
1
)
{
connection
con1
;
send
replace
into
t1
select
n
from
t2
;
connection
con2
;
send
flush
tables
;
connection
con1
;
reap
;
connection
con2
;
reap
;
dec
$
1
;
}
connection
con1
;
insert
into
t1
values
(
3
);
select
*
from
t1
;
connection
con2
;
#reap;
drop
table
t2
;
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