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
1ff9e7fd
Commit
1ff9e7fd
authored
Dec 12, 2002
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Plain Diff
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-row-4.1
parents
d0f14e0d
f666bfcc
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
108 deletions
+169
-108
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
client/mysql.cc
client/mysql.cc
+63
-10
sql/share/german/errmsg.txt
sql/share/german/errmsg.txt
+105
-98
No files found.
BitKeeper/etc/logging_ok
View file @
1ff9e7fd
...
@@ -96,4 +96,5 @@ wax@mysql.com
...
@@ -96,4 +96,5 @@ wax@mysql.com
worm@altair.is.lan
worm@altair.is.lan
zak@balfor.local
zak@balfor.local
zak@linux.local
zak@linux.local
zak@mysql.com
zgreant@mysql.com
zgreant@mysql.com
client/mysql.cc
View file @
1ff9e7fd
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
#include <signal.h>
#include <signal.h>
#include <violite.h>
#include <violite.h>
const
char
*
VER
=
"13.
0
"
;
const
char
*
VER
=
"13.
1
"
;
/* Don't try to make a nice table if the data is too big */
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
#define MAX_COLUMN_LENGTH 1024
...
@@ -195,6 +195,7 @@ static void end_pager();
...
@@ -195,6 +195,7 @@ static void end_pager();
static
int
init_tee
(
char
*
);
static
int
init_tee
(
char
*
);
static
void
end_tee
();
static
void
end_tee
();
static
const
char
*
construct_prompt
();
static
const
char
*
construct_prompt
();
static
char
*
get_arg
(
char
*
line
);
static
void
init_username
();
static
void
init_username
();
static
void
add_int_to_prompt
(
int
toadd
);
static
void
add_int_to_prompt
(
int
toadd
);
...
@@ -2313,18 +2314,14 @@ com_use(String *buffer __attribute__((unused)), char *line)
...
@@ -2313,18 +2314,14 @@ com_use(String *buffer __attribute__((unused)), char *line)
char
*
tmp
;
char
*
tmp
;
char
buff
[
256
];
char
buff
[
256
];
while
(
my_isspace
(
system_charset_info
,
*
line
))
strmov
(
buff
,
line
);
line
++
;
tmp
=
get_arg
(
buff
);
strnmov
(
buff
,
line
,
sizeof
(
buff
)
-
1
);
// Don't destroy history
if
(
!
tmp
||
!*
tmp
)
if
(
buff
[
0
]
==
'\\'
)
// Short command
buff
[
1
]
=
' '
;
tmp
=
(
char
*
)
strtok
(
buff
,
"
\t
;"
);
// Skip connect command
if
(
!
tmp
||
!
(
tmp
=
(
char
*
)
strtok
(
NullS
,
"
\t
;"
)))
{
{
put_info
(
"USE must be followed by a database name"
,
INFO_ERROR
);
put_info
(
"USE must be followed by a database name"
,
INFO_ERROR
);
return
0
;
return
0
;
}
}
if
(
!
current_db
||
cmp_database
(
current_db
,
tmp
))
if
(
!
current_db
||
cmp_database
(
current_db
,
tmp
))
{
{
if
(
one_database
)
if
(
one_database
)
skip_updates
=
1
;
skip_updates
=
1
;
...
@@ -2360,6 +2357,62 @@ com_use(String *buffer __attribute__((unused)), char *line)
...
@@ -2360,6 +2357,62 @@ com_use(String *buffer __attribute__((unused)), char *line)
}
}
enum
quote_type
{
NO_QUOTE
,
SQUOTE
,
DQUOTE
,
BTICK
};
char
*
get_arg
(
char
*
line
)
{
char
*
ptr
;
my_bool
quoted
=
0
,
valid_arg
=
0
;
uint
count
=
0
;
enum
quote_type
qtype
=
NO_QUOTE
;
ptr
=
line
;
/* skip leading white spaces */
while
(
my_isspace
(
system_charset_info
,
*
ptr
))
ptr
++
;
if
(
*
ptr
==
'\\'
)
// short command was used
ptr
+=
2
;
while
(
!
my_isspace
(
system_charset_info
,
*
ptr
))
// skip command
ptr
++
;
while
(
my_isspace
(
system_charset_info
,
*
ptr
))
ptr
++
;
if
((
*
ptr
==
'\''
&&
(
qtype
=
SQUOTE
))
||
(
*
ptr
==
'\"'
&&
(
qtype
=
DQUOTE
))
||
(
*
ptr
==
'`'
&&
(
qtype
=
BTICK
)))
{
quoted
=
1
;
ptr
++
;
}
for
(;
ptr
&&
*
ptr
;
ptr
++
,
count
++
)
{
if
(
*
ptr
==
'\\'
)
// escaped character
{
// jump over the backslash
char
*
tmp_ptr
,
tmp_buff
[
256
];
tmp_ptr
=
strmov
(
tmp_buff
,
(
ptr
-
count
));
tmp_ptr
-=
(
strlen
(
tmp_buff
)
-
count
);
strmov
(
tmp_ptr
,
(
ptr
+
1
));
strmov
(
line
,
tmp_buff
);
ptr
=
line
;
ptr
+=
count
;
}
else
if
(
!
quoted
&&
*
ptr
==
' '
)
*
(
ptr
+
1
)
=
0
;
else
if
((
*
ptr
==
'\''
&&
qtype
==
SQUOTE
)
||
(
*
ptr
==
'\"'
&&
qtype
==
DQUOTE
)
||
(
*
ptr
==
'`'
&&
qtype
==
BTICK
))
{
*
ptr
=
0
;
break
;
}
}
for
(
ptr
-=
count
;
ptr
&&
*
ptr
;
ptr
++
)
if
(
!
my_isspace
(
system_charset_info
,
*
ptr
))
valid_arg
=
1
;
return
valid_arg
?
ptr
-
count
:
'\0'
;
}
static
int
static
int
sql_real_connect
(
char
*
host
,
char
*
database
,
char
*
user
,
char
*
password
,
sql_real_connect
(
char
*
host
,
char
*
database
,
char
*
user
,
char
*
password
,
uint
silent
)
uint
silent
)
...
...
sql/share/german/errmsg.txt
View file @
1ff9e7fd
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