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
69f7e35c
Commit
69f7e35c
authored
Aug 29, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
8ebccda1
2c4064db
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
client/mysql.cc
client/mysql.cc
+8
-8
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+4
-0
mysql-test/t/mysql_delimiter.sql
mysql-test/t/mysql_delimiter.sql
+4
-1
mysql-test/t/mysql_delimiter_source.sql
mysql-test/t/mysql_delimiter_source.sql
+8
-0
scripts/mysql_fix_privilege_tables.sql
scripts/mysql_fix_privilege_tables.sql
+1
-1
No files found.
client/mysql.cc
View file @
69f7e35c
...
@@ -203,7 +203,7 @@ static int com_nopager(String *str, char*), com_pager(String *str, char*),
...
@@ -203,7 +203,7 @@ static int com_nopager(String *str, char*), com_pager(String *str, char*),
com_edit
(
String
*
str
,
char
*
),
com_shell
(
String
*
str
,
char
*
);
com_edit
(
String
*
str
,
char
*
),
com_shell
(
String
*
str
,
char
*
);
#endif
#endif
static
int
read_
lines
(
bool
execute_commands
);
static
int
read_
and_execute
(
bool
interactive
);
static
int
sql_connect
(
char
*
host
,
char
*
database
,
char
*
user
,
char
*
password
,
static
int
sql_connect
(
char
*
host
,
char
*
database
,
char
*
user
,
char
*
password
,
uint
silent
);
uint
silent
);
static
int
put_info
(
const
char
*
str
,
INFO_TYPE
info
,
uint
error
=
0
,
static
int
put_info
(
const
char
*
str
,
INFO_TYPE
info
,
uint
error
=
0
,
...
@@ -468,7 +468,7 @@ int main(int argc,char *argv[])
...
@@ -468,7 +468,7 @@ int main(int argc,char *argv[])
"Type 'help [[%]function name[%]]' to get help on usage of function.
\n
"
);
"Type 'help [[%]function name[%]]' to get help on usage of function.
\n
"
);
#endif
#endif
put_info
(
buff
,
INFO_INFO
);
put_info
(
buff
,
INFO_INFO
);
status
.
exit_status
=
read_lines
(
1
);
// read lines and execute them
status
.
exit_status
=
read_and_execute
(
!
status
.
batch
);
if
(
opt_outfile
)
if
(
opt_outfile
)
end_tee
();
end_tee
();
mysql_end
(
0
);
mysql_end
(
0
);
...
@@ -957,7 +957,7 @@ static int get_options(int argc, char **argv)
...
@@ -957,7 +957,7 @@ static int get_options(int argc, char **argv)
return
(
0
);
return
(
0
);
}
}
static
int
read_
lines
(
bool
execute_commands
)
static
int
read_
and_execute
(
bool
interactive
)
{
{
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
char
linebuffer
[
254
];
char
linebuffer
[
254
];
...
@@ -972,7 +972,7 @@ static int read_lines(bool execute_commands)
...
@@ -972,7 +972,7 @@ static int read_lines(bool execute_commands)
for
(;;)
for
(;;)
{
{
if
(
status
.
batch
||
!
execute_commands
)
if
(
!
interactive
)
{
{
line
=
batch_readline
(
status
.
line_buff
);
line
=
batch_readline
(
status
.
line_buff
);
line_number
++
;
line_number
++
;
...
@@ -1050,7 +1050,7 @@ static int read_lines(bool execute_commands)
...
@@ -1050,7 +1050,7 @@ static int read_lines(bool execute_commands)
Check if line is a mysql command line
Check if line is a mysql command line
(We want to allow help, print and clear anywhere at line start
(We want to allow help, print and clear anywhere at line start
*/
*/
if
(
execute_commands
&&
(
named_cmds
||
glob_buffer
.
is_empty
())
if
(
(
named_cmds
||
glob_buffer
.
is_empty
())
&&
!
in_string
&&
(
com
=
find_command
(
line
,
0
)))
&&
!
in_string
&&
(
com
=
find_command
(
line
,
0
)))
{
{
if
((
*
com
->
func
)(
&
glob_buffer
,
line
)
>
0
)
if
((
*
com
->
func
)(
&
glob_buffer
,
line
)
>
0
)
...
@@ -1058,7 +1058,7 @@ static int read_lines(bool execute_commands)
...
@@ -1058,7 +1058,7 @@ static int read_lines(bool execute_commands)
if
(
glob_buffer
.
is_empty
())
// If buffer was emptied
if
(
glob_buffer
.
is_empty
())
// If buffer was emptied
in_string
=
0
;
in_string
=
0
;
#ifdef HAVE_READLINE
#ifdef HAVE_READLINE
if
(
status
.
add_to_history
&&
not_in_history
(
line
))
if
(
interactive
&&
status
.
add_to_history
&&
not_in_history
(
line
))
add_history
(
line
);
add_history
(
line
);
#endif
#endif
continue
;
continue
;
...
@@ -1068,7 +1068,7 @@ static int read_lines(bool execute_commands)
...
@@ -1068,7 +1068,7 @@ static int read_lines(bool execute_commands)
}
}
/* if in batch mode, send last query even if it doesn't end with \g or go */
/* if in batch mode, send last query even if it doesn't end with \g or go */
if
(
(
status
.
batch
||
!
execute_commands
)
&&
!
status
.
exit_status
)
if
(
!
interactive
&&
!
status
.
exit_status
)
{
{
remove_cntrl
(
glob_buffer
);
remove_cntrl
(
glob_buffer
);
if
(
!
glob_buffer
.
is_empty
())
if
(
!
glob_buffer
.
is_empty
())
...
@@ -2783,7 +2783,7 @@ static int com_source(String *buffer, char *line)
...
@@ -2783,7 +2783,7 @@ static int com_source(String *buffer, char *line)
status
.
line_buff
=
line_buff
;
status
.
line_buff
=
line_buff
;
status
.
file_name
=
source_name
;
status
.
file_name
=
source_name
;
glob_buffer
.
length
(
0
);
// Empty command buffer
glob_buffer
.
length
(
0
);
// Empty command buffer
error
=
read_lines
(
0
);
// Read lines from file
error
=
read_and_execute
(
false
);
status
=
old_status
;
// Continue as before
status
=
old_status
;
// Continue as before
my_fclose
(
sql_file
,
MYF
(
0
));
my_fclose
(
sql_file
,
MYF
(
0
));
batch_readline_end
(
line_buff
);
batch_readline_end
(
line_buff
);
...
...
mysql-test/r/mysql.result
View file @
69f7e35c
...
@@ -31,6 +31,10 @@ a
...
@@ -31,6 +31,10 @@ a
Test delimiter delimiter
Test delimiter delimiter
a
a
1
1
Tables_in_test
t1
t2
t3
Test delimiter : from command line
Test delimiter : from command line
a
a
...
...
mysql-test/t/mysql_delimiter.sql
View file @
69f7e35c
...
@@ -45,4 +45,7 @@ delimiter delimiter
...
@@ -45,4 +45,7 @@ delimiter delimiter
select
*
from
t1
delimiter
select
*
from
t1
delimiter
delimiter
;
#
Reset
delimiter
delimiter
;
#
Reset
delimiter
#
#
Bug
#
11523
:
\
d
works
differently
than
delimiter
#
source
t
/
mysql_delimiter_source
.
sql
mysql-test/t/mysql_delimiter_source.sql
0 → 100644
View file @
69f7e35c
delimiter
//
create
table
t2
(
a
int
)
//
delimiter
;
\
d
//
create
table
t3
(
a
int
)
//
\
d
;
show
tables
;
drop
table
t2
,
t3
;
scripts/mysql_fix_privilege_tables.sql
View file @
69f7e35c
...
@@ -509,7 +509,7 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
...
@@ -509,7 +509,7 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
'
TRADITIONAL
',
'
TRADITIONAL
',
'
NO_AUTO_CREATE_USER
',
'
NO_AUTO_CREATE_USER
',
'
HIGH_NOT_PRECEDENCE
'
'
HIGH_NOT_PRECEDENCE
'
) DEFAULT
''
NOT NULL
) DEFAULT
''
NOT NULL
,
DEFAULT CHARACTER SET utf8;
DEFAULT CHARACTER SET utf8;
# Correct the character set and collation
# Correct the character set and collation
...
...
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