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
3388a763
Commit
3388a763
authored
Mar 04, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge reggie@linux:/home/reggie/work/mysql-5.1
into big_geek.:C:/Work/mysql/mysql-5.1-bug17720
parents
85d59f4c
5f705921
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
client/mysqltest.c
client/mysqltest.c
+1
-0
sql/ha_partition.cc
sql/ha_partition.cc
+40
-1
sql/ha_partition.h
sql/ha_partition.h
+1
-0
No files found.
client/mysqltest.c
View file @
3388a763
...
@@ -3736,6 +3736,7 @@ static void fix_win_paths(const char* val, int len)
...
@@ -3736,6 +3736,7 @@ static void fix_win_paths(const char* val, int len)
{
{
const
char
**
pattern
=
dynamic_element
(
&
patterns
,
i
,
const
char
**
);
const
char
**
pattern
=
dynamic_element
(
&
patterns
,
i
,
const
char
**
);
DBUG_PRINT
(
"info"
,
(
"pattern: %s"
,
*
pattern
));
DBUG_PRINT
(
"info"
,
(
"pattern: %s"
,
*
pattern
));
if
(
strlen
(
*
pattern
)
==
0
)
continue
;
/* Search for the path in string */
/* Search for the path in string */
while
((
p
=
strstr
(
val
,
*
pattern
)))
while
((
p
=
strstr
(
val
,
*
pattern
)))
{
{
...
...
sql/ha_partition.cc
View file @
3388a763
...
@@ -218,6 +218,7 @@ void ha_partition::init_handler_variables()
...
@@ -218,6 +218,7 @@ void ha_partition::init_handler_variables()
m_engine_array
=
NULL
;
m_engine_array
=
NULL
;
m_file
=
NULL
;
m_file
=
NULL
;
m_reorged_file
=
NULL
;
m_reorged_file
=
NULL
;
m_new_file
=
NULL
;
m_reorged_parts
=
0
;
m_reorged_parts
=
0
;
m_added_file
=
NULL
;
m_added_file
=
NULL
;
m_tot_parts
=
0
;
m_tot_parts
=
0
;
...
@@ -4680,11 +4681,13 @@ int ha_partition::extra(enum ha_extra_function operation)
...
@@ -4680,11 +4681,13 @@ int ha_partition::extra(enum ha_extra_function operation)
}
}
/* Category 3), used by MyISAM handlers */
/* Category 3), used by MyISAM handlers */
case
HA_EXTRA_PREPARE_FOR_DELETE
:
DBUG_RETURN
(
prepare_for_delete
());
break
;
case
HA_EXTRA_NORMAL
:
case
HA_EXTRA_NORMAL
:
case
HA_EXTRA_QUICK
:
case
HA_EXTRA_QUICK
:
case
HA_EXTRA_NO_READCHECK
:
case
HA_EXTRA_NO_READCHECK
:
case
HA_EXTRA_PREPARE_FOR_UPDATE
:
case
HA_EXTRA_PREPARE_FOR_UPDATE
:
case
HA_EXTRA_PREPARE_FOR_DELETE
:
case
HA_EXTRA_FORCE_REOPEN
:
case
HA_EXTRA_FORCE_REOPEN
:
case
HA_EXTRA_FLUSH_CACHE
:
case
HA_EXTRA_FLUSH_CACHE
:
{
{
...
@@ -4793,6 +4796,41 @@ void ha_partition::prepare_extra_cache(uint cachesize)
...
@@ -4793,6 +4796,41 @@ void ha_partition::prepare_extra_cache(uint cachesize)
}
}
/*
Prepares our new and reorged handlers for rename or delete
SYNOPSIS
prepare_for_delete()
RETURN VALUE
>0 Error code
0 Success
*/
int
ha_partition
::
prepare_for_delete
()
{
int
result
=
0
,
tmp
;
handler
**
file
;
DBUG_ENTER
(
"ha_partition::prepare_for_delete()"
);
if
(
m_new_file
!=
NULL
)
{
for
(
file
=
m_new_file
;
*
file
;
file
++
)
if
((
tmp
=
(
*
file
)
->
extra
(
HA_EXTRA_PREPARE_FOR_DELETE
)))
result
=
tmp
;
for
(
file
=
m_reorged_file
;
*
file
;
file
++
)
if
((
tmp
=
(
*
file
)
->
extra
(
HA_EXTRA_PREPARE_FOR_DELETE
)))
result
=
tmp
;
}
else
{
for
(
file
=
m_file
;
*
file
;
file
++
)
if
((
tmp
=
(
*
file
)
->
extra
(
HA_EXTRA_PREPARE_FOR_DELETE
)))
result
=
tmp
;
}
DBUG_RETURN
(
result
);
}
/*
/*
Call extra on all partitions
Call extra on all partitions
...
@@ -4810,6 +4848,7 @@ int ha_partition::loop_extra(enum ha_extra_function operation)
...
@@ -4810,6 +4848,7 @@ int ha_partition::loop_extra(enum ha_extra_function operation)
int
result
=
0
,
tmp
;
int
result
=
0
,
tmp
;
handler
**
file
;
handler
**
file
;
DBUG_ENTER
(
"ha_partition::loop_extra()"
);
DBUG_ENTER
(
"ha_partition::loop_extra()"
);
/*
/*
TODO, 5.2: this is where you could possibly add optimisations to add the bitmap
TODO, 5.2: this is where you could possibly add optimisations to add the bitmap
_if_ a SELECT.
_if_ a SELECT.
...
...
sql/ha_partition.h
View file @
3388a763
...
@@ -197,6 +197,7 @@ public:
...
@@ -197,6 +197,7 @@ public:
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
private:
private:
int
prepare_for_delete
();
int
copy_partitions
(
ulonglong
*
copied
,
ulonglong
*
deleted
);
int
copy_partitions
(
ulonglong
*
copied
,
ulonglong
*
deleted
);
void
cleanup_new_partition
(
uint
part_count
);
void
cleanup_new_partition
(
uint
part_count
);
int
prepare_new_partition
(
TABLE
*
table
,
HA_CREATE_INFO
*
create_info
,
int
prepare_new_partition
(
TABLE
*
table
,
HA_CREATE_INFO
*
create_info
,
...
...
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