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
2f7555b3
Commit
2f7555b3
authored
Jul 10, 2006
by
andrey@lmy004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing whitespace.
After merge fixes.
parent
2319aac0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
61 deletions
+22
-61
sql/event_data_objects.cc
sql/event_data_objects.cc
+10
-52
sql/event_db_repository.cc
sql/event_db_repository.cc
+12
-9
No files found.
sql/event_data_objects.cc
View file @
2f7555b3
...
...
@@ -87,21 +87,16 @@ void
Event_parse_data
::
init_name
(
THD
*
thd
,
sp_name
*
spn
)
{
DBUG_ENTER
(
"Event_parse_data::init_name"
);
/* During parsing, we must use thd->mem_root */
MEM_ROOT
*
root
=
thd
->
mem_root
;
/* We have to copy strings to get them into the right memroot */
dbname
.
length
=
spn
->
m_db
.
length
;
dbname
.
str
=
strmake_root
(
root
,
spn
->
m_db
.
str
,
spn
->
m_db
.
length
);
dbname
.
str
=
thd
->
strmake
(
spn
->
m_db
.
str
,
spn
->
m_db
.
length
);
name
.
length
=
spn
->
m_name
.
length
;
name
.
str
=
strmake_root
(
root
,
spn
->
m_name
.
str
,
spn
->
m_name
.
length
);
name
.
str
=
thd
->
strmake
(
spn
->
m_name
.
str
,
spn
->
m_name
.
length
);
if
(
spn
->
m_qname
.
length
==
0
)
spn
->
init_qname
(
thd
);
DBUG_PRINT
(
"dbname"
,
(
"len=%d db=%s"
,
dbname
.
length
,
dbname
.
str
));
DBUG_PRINT
(
"name"
,
(
"len=%d name=%s"
,
name
.
length
,
name
.
str
));
DBUG_VOID_RETURN
;
}
...
...
@@ -819,25 +814,6 @@ Event_job_data::load_from_row(TABLE *table)
ET_FIELD_BODY
,
&
body
,
ET_FIELD_DEFINER
,
&
definer
,
ET_FIELD_COUNT
);
/*
if ((dbname.str= get_field(&mem_root, table->field[ET_FIELD_DB])) == NullS)
goto error;
dbname.length= strlen(dbname.str);
if ((name.str= get_field(&mem_root, table->field[ET_FIELD_NAME])) == NullS)
goto error;
name.length= strlen(name.str);
if ((body.str= get_field(&mem_root, table->field[ET_FIELD_BODY])) == NullS)
goto error;
body.length= strlen(body.str);
if ((definer.str= get_field(&mem_root,
table->field[ET_FIELD_DEFINER])) == NullS)
goto error;
definer.length= strlen(definer.str);
*/
ptr
=
strchr
(
definer
.
str
,
'@'
);
if
(
!
ptr
)
...
...
@@ -891,20 +867,7 @@ Event_queue_element::load_from_row(TABLE *table)
load_string_fields
(
table
->
field
,
ET_FIELD_DB
,
&
dbname
,
ET_FIELD_NAME
,
&
name
,
ET_FIELD_DEFINER
,
&
definer
,
ET_FIELD_COUNT
);
/*
if ((dbname.str= get_field(&mem_root, table->field[ET_FIELD_DB])) == NullS)
goto error;
dbname.length= strlen(dbname.str);
if ((name.str= get_field(&mem_root, table->field[ET_FIELD_NAME])) == NullS)
goto error;
name.length= strlen(name.str);
if ((definer.str= get_field(&mem_root,
table->field[ET_FIELD_DEFINER])) == NullS)
goto error;
definer.length= strlen(definer.str);
*/
starts_null
=
table
->
field
[
ET_FIELD_STARTS
]
->
is_null
();
res1
=
table
->
field
[
ET_FIELD_STARTS
]
->
get_date
(
&
starts
,
TIME_NO_ZERO_DATE
);
...
...
@@ -990,12 +953,7 @@ Event_timed::load_from_row(TABLE *table)
goto
error
;
load_string_fields
(
table
->
field
,
ET_FIELD_BODY
,
&
body
,
ET_FIELD_COUNT
);
/*
if ((body.str= get_field(&mem_root, table->field[ET_FIELD_BODY])) == NullS)
goto error;
body.length= strlen(body.str);
*/
ptr
=
strchr
(
definer
.
str
,
'@'
);
if
(
!
ptr
)
...
...
sql/event_db_repository.cc
View file @
2f7555b3
...
...
@@ -524,8 +524,10 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
int
ret
=
0
;
CHARSET_INFO
*
scs
=
system_charset_info
;
TABLE
*
table
;
char
olddb
[
128
];
char
old_db_buf
[
NAME_LEN
+
1
];
LEX_STRING
old_db
=
{
old_db_buf
,
sizeof
(
old_db_buf
)
};
bool
dbchanged
=
FALSE
;
DBUG_ENTER
(
"Event_db_repository::create_event"
);
*
rows_affected
=
0
;
...
...
@@ -557,8 +559,8 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
}
DBUG_PRINT
(
"info"
,
(
"non-existant, go forward"
));
if
((
ret
=
sp_use_new_db
(
thd
,
parse_data
->
dbname
.
str
,
olddb
,
sizeof
(
olddb
),
0
,
&
dbchanged
)))
if
((
ret
=
sp_use_new_db
(
thd
,
parse_data
->
dbname
,
&
old_db
,
0
,
&
dbchanged
)))
{
my_error
(
ER_BAD_DB_ERROR
,
MYF
(
0
));
goto
err
;
...
...
@@ -618,14 +620,14 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
*
rows_affected
=
1
;
ok:
if
(
dbchanged
)
(
void
)
mysql_change_db
(
thd
,
old
db
,
1
);
(
void
)
mysql_change_db
(
thd
,
old
_db
.
str
,
1
);
if
(
table
)
close_thread_tables
(
thd
);
DBUG_RETURN
(
EVEX_OK
);
err:
if
(
dbchanged
)
(
void
)
mysql_change_db
(
thd
,
old
db
,
1
);
(
void
)
mysql_change_db
(
thd
,
old
_db
.
str
,
1
);
if
(
table
)
close_thread_tables
(
thd
);
DBUG_RETURN
(
EVEX_GENERAL_ERROR
);
...
...
@@ -655,7 +657,7 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data,
sp_name
*
new_name
)
{
CHARSET_INFO
*
scs
=
system_charset_info
;
TABLE
*
table
;
TABLE
*
table
=
NULL
;
int
ret
=
EVEX_OPEN_TABLE_FAILED
;
DBUG_ENTER
(
"Event_db_repository::update_event"
);
...
...
@@ -765,7 +767,7 @@ int
Event_db_repository
::
drop_event
(
THD
*
thd
,
LEX_STRING
db
,
LEX_STRING
name
,
bool
drop_if_exists
,
uint
*
rows_affected
)
{
TABLE
*
table
;
TABLE
*
table
=
NULL
;
Open_tables_state
backup
;
int
ret
;
...
...
@@ -804,6 +806,7 @@ Event_db_repository::drop_event(THD *thd, LEX_STRING db, LEX_STRING name,
}
done:
if
(
table
)
close_thread_tables
(
thd
);
thd
->
restore_backup_open_tables_state
(
&
backup
);
DBUG_RETURN
(
ret
);
...
...
@@ -965,7 +968,7 @@ int
Event_db_repository
::
find_event
(
THD
*
thd
,
LEX_STRING
dbname
,
LEX_STRING
name
,
Event_basic
*
et
)
{
TABLE
*
table
;
TABLE
*
table
=
NULL
;
int
ret
;
DBUG_ENTER
(
"Event_db_repository::find_event"
);
DBUG_PRINT
(
"enter"
,
(
"name: %*s"
,
name
.
length
,
name
.
str
));
...
...
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