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
e9dbf09d
Commit
e9dbf09d
authored
Mar 30, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
37e5d20d
fb87f5b5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
34 deletions
+31
-34
include/violite.h
include/violite.h
+2
-2
mysql-test/r/ctype_cp1251.result
mysql-test/r/ctype_cp1251.result
+2
-2
mysql-test/t/ctype_cp1251-master.opt
mysql-test/t/ctype_cp1251-master.opt
+0
-2
mysql-test/t/ctype_cp1251.test
mysql-test/t/ctype_cp1251.test
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+5
-6
sql/sql_select.cc
sql/sql_select.cc
+15
-15
strings/my_strtoll10-x86.s
strings/my_strtoll10-x86.s
+1
-1
vio/test-ssl.c
vio/test-ssl.c
+2
-2
vio/test-sslclient.c
vio/test-sslclient.c
+2
-2
No files found.
include/violite.h
View file @
e9dbf09d
...
...
@@ -144,8 +144,8 @@ int vio_close_shared_memory(Vio * vio);
#if !defined(DONT_MAP_VIO)
#define vio_delete(vio) (vio)->viodelete(vio)
#define vio_errno(vio) (vio)->vioerrno(vio)
#define vio_read(vio, buf, size)
(vio)->read
(vio,buf,size)
#define vio_write(vio, buf, size)
(vio)->write
(vio, buf, size)
#define vio_read(vio, buf, size)
((vio)->read)
(vio,buf,size)
#define vio_write(vio, buf, size)
((vio)->write)
(vio, buf, size)
#define vio_blocking(vio, set_blocking_mode, old_mode)\
(vio)->vioblocking(vio, set_blocking_mode, old_mode)
#define vio_is_blocking(vio) (vio)->is_blocking(vio)
...
...
mysql-test/r/ctype_cp1251.result
View file @
e9dbf09d
drop table if exists t1;
SET NAMES cp1251;
create table t1 (a varchar(10) not null);
create table t1 (a varchar(10) not null)
character set cp1251
;
insert into t1 values ("a"),("ab"),("abc");
select * from t1;
a
...
...
@@ -23,7 +23,7 @@ a
b
c
drop table t1;
create table t1 (a char(15) binary, b binary(15));
create table t1 (a char(15) binary, b binary(15))
character set cp1251
;
insert into t1 values ('aaa','bbb'),('AAA','BBB');
select upper(a),upper(b) from t1;
upper(a) upper(b)
...
...
mysql-test/t/ctype_cp1251-master.opt
deleted
100644 → 0
View file @
37e5d20d
--default-character-set=cp1251 --new
mysql-test/t/ctype_cp1251.test
View file @
e9dbf09d
...
...
@@ -10,7 +10,7 @@ SET NAMES cp1251;
# Test problem with LEFT() (Bug #514)
#
create
table
t1
(
a
varchar
(
10
)
not
null
);
create
table
t1
(
a
varchar
(
10
)
not
null
)
character
set
cp1251
;
insert
into
t1
values
(
"a"
),(
"ab"
),(
"abc"
);
select
*
from
t1
;
select
a
,
left
(
a
,
1
)
as
b
from
t1
;
...
...
@@ -21,7 +21,7 @@ drop table t1;
#
# Test of binary and upper/lower
#
create
table
t1
(
a
char
(
15
)
binary
,
b
binary
(
15
));
create
table
t1
(
a
char
(
15
)
binary
,
b
binary
(
15
))
character
set
cp1251
;
insert
into
t1
values
(
'aaa'
,
'bbb'
),(
'AAA'
,
'BBB'
);
select
upper
(
a
),
upper
(
b
)
from
t1
;
select
lower
(
a
),
lower
(
b
)
from
t1
;
...
...
sql/sql_parse.cc
View file @
e9dbf09d
...
...
@@ -4579,6 +4579,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong
db_access
;
bool
db_is_pattern
=
test
(
want_access
&
GRANT_ACL
);
#endif
ulong
dummy
;
DBUG_ENTER
(
"check_access"
);
...
...
@@ -4610,9 +4611,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
*/
db_access
=
thd
->
db_access
;
if
(
!
(
thd
->
master_access
&
SELECT_ACL
)
&&
(
db
&&
(
!
thd
->
db
||
strcmp
(
db
,
thd
->
db
))))
db_access
=
acl_get
(
thd
->
host
,
thd
->
ip
,
thd
->
priv_user
,
db
,
test
(
want_access
&
GRANT_ACL
));
(
db
&&
(
!
thd
->
db
||
db_is_pattern
||
strcmp
(
db
,
thd
->
db
))))
db_access
=
acl_get
(
thd
->
host
,
thd
->
ip
,
thd
->
priv_user
,
db
,
db_is_pattern
);
*
save_priv
=
thd
->
master_access
|
db_access
;
DBUG_RETURN
(
FALSE
);
}
...
...
@@ -4633,9 +4633,8 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
if
(
db
==
any_db
)
DBUG_RETURN
(
FALSE
);
// Allow select on anything
if
(
db
&&
(
!
thd
->
db
||
strcmp
(
db
,
thd
->
db
)))
db_access
=
acl_get
(
thd
->
host
,
thd
->
ip
,
thd
->
priv_user
,
db
,
test
(
want_access
&
GRANT_ACL
));
if
(
db
&&
(
!
thd
->
db
||
db_is_pattern
||
strcmp
(
db
,
thd
->
db
)))
db_access
=
acl_get
(
thd
->
host
,
thd
->
ip
,
thd
->
priv_user
,
db
,
db_is_pattern
);
else
db_access
=
thd
->
db_access
;
DBUG_PRINT
(
"info"
,(
"db_access: %lu"
,
db_access
));
...
...
sql/sql_select.cc
View file @
e9dbf09d
...
...
@@ -7591,14 +7591,13 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item)
create_tmp_field_from_field()
thd Thread handler
org_field field from which new field will be created
item Item to create a field for
name New field name
table Temporary table
modify_item 1 if item->result_field should point to new item.
This is relevent for how fill_record() is going to
work:
If modify_item is 1 then fill_record() will update
item !=NULL if item->result_field should point to new field.
This is relevant for how fill_record() is going to work:
If item != NULL then fill_record() will update
the record in the original table.
If
modify_item is 0
then fill_record() will update
If
item == NULL
then fill_record() will update
the temporary table
convert_blob_length If >0 create a varstring(convert_blob_length) field
instead of blob.
...
...
@@ -7609,9 +7608,8 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item)
*/
Field
*
create_tmp_field_from_field
(
THD
*
thd
,
Field
*
org_field
,
Item
*
item
,
TABLE
*
table
,
bool
modify_item
,
uint
convert_blob_length
)
const
char
*
name
,
TABLE
*
table
,
Item_field
*
item
,
uint
convert_blob_length
)
{
Field
*
new_field
;
...
...
@@ -7624,10 +7622,10 @@ Field* create_tmp_field_from_field(THD *thd, Field* org_field,
new_field
=
org_field
->
new_field
(
thd
->
mem_root
,
table
);
if
(
new_field
)
{
if
(
modify_
item
)
((
Item_field
*
)
item
)
->
result_field
=
new_field
;
if
(
item
)
item
->
result_field
=
new_field
;
else
new_field
->
field_name
=
item
->
name
;
new_field
->
field_name
=
name
;
if
(
org_field
->
maybe_null
())
new_field
->
flags
&=
~
NOT_NULL_FLAG
;
// Because of outer join
if
(
org_field
->
type
()
==
MYSQL_TYPE_VAR_STRING
||
...
...
@@ -7782,8 +7780,10 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case
Item
:
:
DEFAULT_VALUE_ITEM
:
{
Item_field
*
field
=
(
Item_field
*
)
item
;
return
create_tmp_field_from_field
(
thd
,
(
*
from_field
=
field
->
field
),
item
,
table
,
modify_item
,
convert_blob_length
);
return
create_tmp_field_from_field
(
thd
,
(
*
from_field
=
field
->
field
),
item
->
name
,
table
,
modify_item
?
(
Item_field
*
)
item
:
NULL
,
convert_blob_length
);
}
case
Item
:
:
FUNC_ITEM
:
case
Item
:
:
COND_ITEM
:
...
...
@@ -7805,7 +7805,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
{
Field
*
example
=
((
Item_type_holder
*
)
item
)
->
example
();
if
(
example
)
return
create_tmp_field_from_field
(
thd
,
example
,
item
,
table
,
0
,
return
create_tmp_field_from_field
(
thd
,
example
,
item
->
name
,
table
,
NULL
,
convert_blob_length
);
return
create_tmp_field_from_item
(
thd
,
item
,
table
,
copy_func
,
0
,
convert_blob_length
);
...
...
strings/my_strtoll10-x86.s
View file @
e9dbf09d
...
...
@@ -394,7 +394,7 @@ my_strtoll10:
popl
%
ebp
ret
my_strtoll10_end
:
.
my_strtoll10_end
:
.
size
my_strtoll10
,
.
my_strtoll10_end
-
my_strtoll10
.
comm
res
,
240
,
32
.
comm
end_ptr
,
120
,
32
...
...
vio/test-ssl.c
View file @
e9dbf09d
...
...
@@ -115,7 +115,7 @@ main(int argc, char** argv)
{
/* child, therefore, client */
char
xbuf
[
100
];
int
r
=
client_vio
->
read
(
client_vio
,
xbuf
,
sizeof
(
xbuf
));
int
r
=
vio_
read
(
client_vio
,
xbuf
,
sizeof
(
xbuf
));
if
(
r
<=
0
)
{
my_free
((
gptr
)
ssl_acceptor
,
MYF
(
0
));
my_free
((
gptr
)
ssl_connector
,
MYF
(
0
));
...
...
@@ -130,7 +130,7 @@ main(int argc, char** argv)
else
{
const
char
*
s
=
"Huhuhuh"
;
int
r
=
server_vio
->
write
(
server_vio
,(
gptr
)
s
,
strlen
(
s
));
int
r
=
vio_
write
(
server_vio
,(
gptr
)
s
,
strlen
(
s
));
if
(
r
<=
0
)
{
my_free
((
gptr
)
ssl_acceptor
,
MYF
(
0
));
my_free
((
gptr
)
ssl_connector
,
MYF
(
0
));
...
...
vio/test-sslclient.c
View file @
e9dbf09d
...
...
@@ -77,13 +77,13 @@ main( int argc __attribute__((unused)),
sa
.
sin_port
=
htons
(
1111
);
/* Server Port number */
err
=
connect
(
client_vio
->
sd
,
(
struct
sockaddr
*
)
&
sa
,
sizeof
(
sa
));
sizeof
(
sa
));
/* ----------------------------------------------- */
/* Now we have TCP conncetion. Start SSL negotiation. */
read
(
client_vio
->
sd
,
xbuf
,
sizeof
(
xbuf
));
sslconnect
(
ssl_connector
,
client_vio
,
60L
);
err
=
client_vio
->
read
(
client_vio
,
xbuf
,
sizeof
(
xbuf
));
err
=
vio_
read
(
client_vio
,
xbuf
,
sizeof
(
xbuf
));
if
(
err
<=
0
)
{
my_free
((
gptr
)
ssl_connector
,
MYF
(
0
));
fatal_error
(
"client:SSL_read"
);
...
...
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