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
7d653b2c
Commit
7d653b2c
authored
Aug 28, 2003
by
monty@narttu.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
parents
fc2fe364
a2a1e972
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
81 deletions
+36
-81
client/mysqltest.c
client/mysqltest.c
+0
-59
sql/log_event.cc
sql/log_event.cc
+6
-5
sql/mysql_priv.h
sql/mysql_priv.h
+4
-0
sql/sql_class.cc
sql/sql_class.cc
+23
-0
sql/sql_class.h
sql/sql_class.h
+3
-17
No files found.
client/mysqltest.c
View file @
7d653b2c
...
...
@@ -491,15 +491,6 @@ void init_parser()
memset
(
&
var_reg
,
0
,
sizeof
(
var_reg
));
}
int
hex_val
(
int
c
)
{
if
(
isdigit
(
c
))
return
c
-
'0'
;
else
if
((
c
=
tolower
(
c
))
>=
'a'
&&
c
<=
'f'
)
return
c
-
'a'
+
10
;
else
return
-
1
;
}
int
dyn_string_cmp
(
DYNAMIC_STRING
*
ds
,
const
char
*
fname
)
{
...
...
@@ -1550,56 +1541,6 @@ int do_while(struct st_query* q)
}
int
safe_copy_unescape
(
char
*
dest
,
char
*
src
,
int
size
)
{
register
char
*
p_dest
=
dest
,
*
p_src
=
src
;
register
int
c
,
val
;
enum
{
ST_NORMAL
,
ST_ESCAPED
,
ST_HEX2
}
state
=
ST_NORMAL
;
size
--
;
/* just to make life easier */
for
(;
p_dest
-
size
<
dest
&&
p_src
-
size
<
src
&&
(
c
=
*
p_src
)
!=
'\n'
&&
c
;
++
p_src
)
{
switch
(
state
)
{
case
ST_NORMAL
:
if
(
c
==
'\\'
)
state
=
ST_ESCAPED
;
else
*
p_dest
++
=
c
;
break
;
case
ST_ESCAPED
:
if
((
val
=
hex_val
(
c
))
>
0
)
{
*
p_dest
=
val
;
state
=
ST_HEX2
;
}
else
{
state
=
ST_NORMAL
;
*
p_dest
++
=
c
;
}
break
;
case
ST_HEX2
:
if
((
val
=
hex_val
(
c
))
>
0
)
{
*
p_dest
=
(
*
p_dest
<<
4
)
+
val
;
p_dest
++
;
}
else
*
p_dest
++
=
c
;
state
=
ST_NORMAL
;
break
;
}
}
*
p_dest
=
0
;
return
(
p_dest
-
dest
);
}
int
read_line
(
char
*
buf
,
int
size
)
{
int
c
;
...
...
sql/log_event.cc
View file @
7d653b2c
...
...
@@ -2092,11 +2092,12 @@ int Start_log_event::exec_event(struct st_relay_log_info* rli)
*/
break
;
case
BINLOG_FORMAT_323_GEQ_57
:
/* Can distinguish, based on the value of 'created' */
if
(
!
created
)
break
;
/* otherwise this was generated at master startup*/
close_temporary_tables
(
thd
);
/*
Can distinguish, based on the value of 'created',
which was generated at master startup.
*/
if
(
created
)
close_temporary_tables
(
thd
);
break
;
default
:
/* this case is impossible */
...
...
sql/mysql_priv.h
View file @
7d653b2c
...
...
@@ -846,18 +846,22 @@ inline bool add_item_to_list(Item *item)
{
return
current_lex
->
select
->
item_list
.
push_back
(
item
);
}
inline
bool
add_value_to_list
(
Item
*
value
)
{
return
current_lex
->
value_list
.
push_back
(
value
);
}
inline
bool
add_order_to_list
(
Item
*
item
,
bool
asc
)
{
return
add_to_list
(
current_lex
->
select
->
order_list
,
item
,
asc
);
}
inline
bool
add_group_to_list
(
Item
*
item
,
bool
asc
)
{
return
add_to_list
(
current_lex
->
select
->
group_list
,
item
,
asc
);
}
inline
void
mark_as_null_row
(
TABLE
*
table
)
{
table
->
null_row
=
1
;
...
...
sql/sql_class.cc
View file @
7d653b2c
...
...
@@ -430,6 +430,29 @@ void THD::close_active_vio()
}
#endif
/*****************************************************************************
Table Ident
****************************************************************************/
Table_ident
::
Table_ident
(
LEX_STRING
db_arg
,
LEX_STRING
table_arg
,
bool
force
)
:
table
(
table_arg
)
{
if
(
!
force
&&
(
current_thd
->
client_capabilities
&
CLIENT_NO_SCHEMA
))
db
.
str
=
0
;
else
db
=
db_arg
;
if
(
db
.
str
)
table_case_convert
(
db
.
str
,
db
.
length
);
table_case_convert
(
table
.
str
,
table
.
length
);
}
Table_ident
::
Table_ident
(
LEX_STRING
table_arg
)
:
table
(
table_arg
)
{
db
.
str
=
0
;
table_case_convert
(
table
.
str
,
table
.
length
);
}
/*****************************************************************************
** Functions to provide a interface to select results
*****************************************************************************/
...
...
sql/sql_class.h
View file @
7d653b2c
...
...
@@ -33,7 +33,7 @@ enum enum_duplicates { DUP_ERROR, DUP_REPLACE, DUP_IGNORE };
enum
enum_log_type
{
LOG_CLOSED
,
LOG_TO_BE_OPENED
,
LOG_NORMAL
,
LOG_NEW
,
LOG_BIN
};
enum
enum_delay_key_write
{
DELAY_KEY_WRITE_NONE
,
DELAY_KEY_WRITE_ON
,
DELAY_KEY_WRITE_ALL
};
extern
inline
void
table_case_convert
(
char
*
name
,
uint
length
);
/* log info errors */
#define LOG_INFO_EOF -1
#define LOG_INFO_IO -2
...
...
@@ -762,22 +762,8 @@ class Table_ident :public Sql_alloc {
public:
LEX_STRING
db
;
LEX_STRING
table
;
inline
Table_ident
(
LEX_STRING
db_arg
,
LEX_STRING
table_arg
,
bool
force
)
:
table
(
table_arg
)
{
if
(
!
force
&&
(
current_thd
->
client_capabilities
&
CLIENT_NO_SCHEMA
))
db
.
str
=
0
;
else
db
=
db_arg
;
if
(
db
.
str
)
table_case_convert
(
db
.
str
,
db
.
length
);
table_case_convert
(
table
.
str
,
table
.
length
);
}
inline
Table_ident
(
LEX_STRING
table_arg
)
:
table
(
table_arg
)
{
db
.
str
=
0
;
table_case_convert
(
table
.
str
,
table
.
length
);
}
Table_ident
(
LEX_STRING
db_arg
,
LEX_STRING
table_arg
,
bool
force
);
Table_ident
(
LEX_STRING
table_arg
);
inline
void
change_db
(
char
*
db_name
)
{
db
.
str
=
db_name
;
db
.
length
=
(
uint
)
strlen
(
db_name
);
}
};
...
...
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