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
019ff4c5
Commit
019ff4c5
authored
Jan 13, 2005
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge.
parents
10650999
30c4d10e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
mysql-test/t/analyse.test
mysql-test/t/analyse.test
+5
-0
sql/sql_analyse.cc
sql/sql_analyse.cc
+7
-8
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
sql/sql_prepare.cc
sql/sql_prepare.cc
+5
-1
No files found.
mysql-test/t/analyse.test
View file @
019ff4c5
...
@@ -38,6 +38,11 @@ select * from t2;
...
@@ -38,6 +38,11 @@ select * from t2;
insert
into
t2
select
*
from
t1
procedure
analyse
();
insert
into
t2
select
*
from
t1
procedure
analyse
();
select
*
from
t2
;
select
*
from
t2
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Bug#2813 - analyse does not quote string values in enums from string
#
create
table
t1
(
v
varchar
(
128
));
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'
);
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
();
select
*
from
t1
procedure
analyse
();
...
...
sql/sql_analyse.cc
View file @
019ff4c5
...
@@ -1029,20 +1029,19 @@ uint check_ulonglong(const char *str, uint length)
...
@@ -1029,20 +1029,19 @@ uint check_ulonglong(const char *str, uint length)
}
/* check_ulonlong */
}
/* 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
DESCRIPTION
append_escaped() takes a String type variable, where it appends
append_escaped() takes a String type variable, where it appends
escaped the second argument. Only characters that require escaping
escaped the second argument. Only characters that require escaping
will be escaped.
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
RETURN VALUES
0 Success
0 Success
1 Out of memory
1 Out of memory
...
...
sql/sql_parse.cc
View file @
019ff4c5
...
@@ -77,7 +77,7 @@ const char *command_name[]={
...
@@ -77,7 +77,7 @@ const char *command_name[]={
"Drop DB"
,
"Refresh"
,
"Shutdown"
,
"Statistics"
,
"Processlist"
,
"Drop DB"
,
"Refresh"
,
"Shutdown"
,
"Statistics"
,
"Processlist"
,
"Connect"
,
"Kill"
,
"Debug"
,
"Ping"
,
"Time"
,
"Delayed insert"
,
"Change user"
,
"Connect"
,
"Kill"
,
"Debug"
,
"Ping"
,
"Time"
,
"Delayed insert"
,
"Change user"
,
"Binlog Dump"
,
"Table Dump"
,
"Connect Out"
,
"Register Slave"
,
"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"
,
"Fetch"
,
"Reset stmt"
,
"Set option"
,
"Fetch"
,
"Error"
// Last command number
"Error"
// Last command number
};
};
...
...
sql/sql_prepare.cc
View file @
019ff4c5
...
@@ -1740,7 +1740,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
...
@@ -1740,7 +1740,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
mysql_log
.
write
(
thd
,
COM_PREPARE
,
"
%s"
,
packet
);
mysql_log
.
write
(
thd
,
COM_PREPARE
,
"
[%lu] %s"
,
stmt
->
id
,
packet
);
thd
->
current_arena
=
stmt
;
thd
->
current_arena
=
stmt
;
mysql_init_query
(
thd
,
(
uchar
*
)
thd
->
query
,
thd
->
query_length
);
mysql_init_query
(
thd
,
(
uchar
*
)
thd
->
query
,
thd
->
query_length
);
...
@@ -1990,6 +1990,10 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
...
@@ -1990,6 +1990,10 @@ void mysql_stmt_execute(THD *thd, char *packet, uint packet_length)
goto
err
;
goto
err
;
}
}
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
thd
->
protocol
=
&
thd
->
protocol_prep
;
// Switch to binary protocol
if
(
!
(
specialflag
&
SPECIAL_NO_PRIOR
))
if
(
!
(
specialflag
&
SPECIAL_NO_PRIOR
))
my_pthread_setprio
(
pthread_self
(),
QUERY_PRIOR
);
my_pthread_setprio
(
pthread_self
(),
QUERY_PRIOR
);
...
...
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