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
1b1b36ab
Commit
1b1b36ab
authored
Jul 19, 2012
by
Axel Schwenke
Browse files
Options
Browse Files
Download
Plain Diff
merged with maria/5.5
parents
72a5542f
79c4b4e4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
14 deletions
+81
-14
mysql-test/r/view.result
mysql-test/r/view.result
+13
-0
mysql-test/t/view.test
mysql-test/t/view.test
+13
-0
sql/handler.h
sql/handler.h
+1
-1
sql/table.cc
sql/table.cc
+8
-1
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+22
-0
storage/maria/ha_maria.h
storage/maria/ha_maria.h
+1
-6
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+22
-0
storage/myisam/ha_myisam.h
storage/myisam/ha_myisam.h
+1
-6
No files found.
mysql-test/r/view.result
View file @
1b1b36ab
...
@@ -4674,6 +4674,19 @@ INSERT INTO t2 VALUES (1);
...
@@ -4674,6 +4674,19 @@ INSERT INTO t2 VALUES (1);
DROP TRIGGER tr;
DROP TRIGGER tr;
DROP VIEW v1;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
DROP TABLE t1,t2,t3;
#
# LP bug#1007622 Server crashes in handler::increment_statistics on
# inserting into a view over a view
#
CREATE TABLE t1 (a INT);
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.* FROM t1 AS a1, t1 AS a2;
CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1;
INSERT INTO v2 (a) VALUES (1) ;
select * from t1;
a
1
drop view v2,v1;
drop table t1;
# -----------------------------------------------------------------
# -----------------------------------------------------------------
# -- End of 5.3 tests.
# -- End of 5.3 tests.
# -----------------------------------------------------------------
# -----------------------------------------------------------------
...
...
mysql-test/t/view.test
View file @
1b1b36ab
...
@@ -4613,6 +4613,19 @@ DROP TRIGGER tr;
...
@@ -4613,6 +4613,19 @@ DROP TRIGGER tr;
DROP
VIEW
v1
;
DROP
VIEW
v1
;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
# LP bug#1007622 Server crashes in handler::increment_statistics on
--
echo
# inserting into a view over a view
--
echo
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
ALGORITHM
=
MERGE
VIEW
v1
AS
SELECT
a1
.*
FROM
t1
AS
a1
,
t1
AS
a2
;
CREATE
ALGORITHM
=
MERGE
VIEW
v2
AS
SELECT
*
FROM
v1
;
INSERT
INTO
v2
(
a
)
VALUES
(
1
)
;
select
*
from
t1
;
drop
view
v2
,
v1
;
drop
table
t1
;
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.3 tests.
--
echo
# -- End of 5.3 tests.
--
echo
# -----------------------------------------------------------------
--
echo
# -----------------------------------------------------------------
...
...
sql/handler.h
View file @
1b1b36ab
...
@@ -1690,7 +1690,7 @@ class handler_add_index : public Sql_alloc
...
@@ -1690,7 +1690,7 @@ class handler_add_index : public Sql_alloc
};
};
class
Query_cache
;
class
Query_cache
;
class
Query_cache_block_table
;
struct
Query_cache_block_table
;
/**
/**
The handler class is the interface for dynamically loadable
The handler class is the interface for dynamically loadable
storage engines. Do not add ifdefs and take care when adding or
storage engines. Do not add ifdefs and take care when adding or
...
...
sql/table.cc
View file @
1b1b36ab
...
@@ -4544,7 +4544,14 @@ bool TABLE_LIST::check_single_table(TABLE_LIST **table_arg,
...
@@ -4544,7 +4544,14 @@ bool TABLE_LIST::check_single_table(TABLE_LIST **table_arg,
tbl
;
tbl
;
tbl
=
tbl
->
next_local
)
tbl
=
tbl
->
next_local
)
{
{
if
(
tbl
->
table
)
/*
Merged view has also temporary table attached (in 5.2 if it has table
then it was real table), so we have filter such temporary tables out
by checking that it is not merged view
*/
if
(
tbl
->
table
&&
!
(
tbl
->
is_view
()
&&
tbl
->
is_merged_derived
()))
{
{
if
(
tbl
->
table
->
map
&
map
)
if
(
tbl
->
table
->
map
&
map
)
{
{
...
...
storage/maria/ha_maria.cc
View file @
1b1b36ab
...
@@ -1008,6 +1008,28 @@ const char *ha_maria::index_type(uint key_number)
...
@@ -1008,6 +1008,28 @@ const char *ha_maria::index_type(uint key_number)
}
}
ulong
ha_maria
::
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
{
ulong
flags
;
if
(
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_FULLTEXT
)
flags
=
0
;
else
if
((
table_share
->
key_info
[
inx
].
flags
&
HA_SPATIAL
||
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_RTREE
))
{
/* All GIS scans are non-ROR scans. We also disable IndexConditionPushdown */
flags
=
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_KEY_SCAN_NOT_ROR
;
}
else
{
flags
=
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_DO_INDEX_COND_PUSHDOWN
;
}
return
flags
;
}
double
ha_maria
::
scan_time
()
double
ha_maria
::
scan_time
()
{
{
if
(
file
->
s
->
data_file_type
==
BLOCK_RECORD
)
if
(
file
->
s
->
data_file_type
==
BLOCK_RECORD
)
...
...
storage/maria/ha_maria.h
View file @
1b1b36ab
...
@@ -65,12 +65,7 @@ class ha_maria :public handler
...
@@ -65,12 +65,7 @@ class ha_maria :public handler
const
char
**
bas_ext
()
const
;
const
char
**
bas_ext
()
const
;
ulonglong
table_flags
()
const
ulonglong
table_flags
()
const
{
return
int_table_flags
;
}
{
return
int_table_flags
;
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
;
{
return
((
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_FULLTEXT
)
?
0
:
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_DO_INDEX_COND_PUSHDOWN
);
}
uint
max_supported_keys
()
const
uint
max_supported_keys
()
const
{
return
MARIA_MAX_KEY
;
}
{
return
MARIA_MAX_KEY
;
}
uint
max_supported_key_length
()
const
;
uint
max_supported_key_length
()
const
;
...
...
storage/myisam/ha_myisam.cc
View file @
1b1b36ab
...
@@ -689,6 +689,28 @@ const char *ha_myisam::index_type(uint key_number)
...
@@ -689,6 +689,28 @@ const char *ha_myisam::index_type(uint key_number)
}
}
ulong
ha_myisam
::
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
{
ulong
flags
;
if
(
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_FULLTEXT
)
flags
=
0
;
else
if
((
table_share
->
key_info
[
inx
].
flags
&
HA_SPATIAL
||
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_RTREE
))
{
/* All GIS scans are non-ROR scans. We also disable IndexConditionPushdown */
flags
=
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_KEY_SCAN_NOT_ROR
;
}
else
{
flags
=
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_DO_INDEX_COND_PUSHDOWN
;
}
return
flags
;
}
/* Name is here without an extension */
/* Name is here without an extension */
int
ha_myisam
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
int
ha_myisam
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
{
{
...
...
storage/myisam/ha_myisam.h
View file @
1b1b36ab
...
@@ -64,12 +64,7 @@ class ha_myisam: public handler
...
@@ -64,12 +64,7 @@ class ha_myisam: public handler
int
index_end
();
int
index_end
();
int
rnd_end
();
int
rnd_end
();
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
;
{
return
((
table_share
->
key_info
[
inx
].
algorithm
==
HA_KEY_ALG_FULLTEXT
)
?
0
:
HA_READ_NEXT
|
HA_READ_PREV
|
HA_READ_RANGE
|
HA_READ_ORDER
|
HA_KEYREAD_ONLY
|
HA_DO_INDEX_COND_PUSHDOWN
);
}
uint
max_supported_keys
()
const
{
return
MI_MAX_KEY
;
}
uint
max_supported_keys
()
const
{
return
MI_MAX_KEY
;
}
uint
max_supported_key_parts
()
const
{
return
HA_MAX_KEY_SEG
;
}
uint
max_supported_key_parts
()
const
{
return
HA_MAX_KEY_SEG
;
}
uint
max_supported_key_length
()
const
{
return
HA_MAX_KEY_LENGTH
;
}
uint
max_supported_key_length
()
const
{
return
HA_MAX_KEY_LENGTH
;
}
...
...
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