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
a7dfd887
Commit
a7dfd887
authored
Nov 08, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
parents
2c9ae971
d39da3ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
11 deletions
+96
-11
mysql-test/r/csv.result
mysql-test/r/csv.result
+47
-0
mysql-test/t/csv.test
mysql-test/t/csv.test
+37
-0
sql/examples/ha_tina.cc
sql/examples/ha_tina.cc
+11
-11
support-files/mysql.spec.sh
support-files/mysql.spec.sh
+1
-0
No files found.
mysql-test/r/csv.result
View file @
a7dfd887
...
@@ -4929,3 +4929,50 @@ Warnings:
...
@@ -4929,3 +4929,50 @@ Warnings:
Note 1051 Unknown table 't2'
Note 1051 Unknown table 't2'
Note 1051 Unknown table 't3'
Note 1051 Unknown table 't3'
Note 1051 Unknown table 't4'
Note 1051 Unknown table 't4'
DROP TABLE IF EXISTS bug13894;
CREATE TABLE bug13894 ( val integer ) ENGINE = CSV;
INSERT INTO bug13894 VALUES (5);
INSERT INTO bug13894 VALUES (10);
INSERT INTO bug13894 VALUES (11);
INSERT INTO bug13894 VALUES (10);
SELECT * FROM bug13894;
val
5
10
11
10
UPDATE bug13894 SET val=6 WHERE val=10;
SELECT * FROM bug13894;
val
5
11
6
6
DROP TABLE bug13894;
DROP TABLE IF EXISTS bug14672;
CREATE TABLE bug14672 (c1 integer) engine = CSV;
INSERT INTO bug14672 VALUES (1), (2), (3);
SELECT * FROM bug14672;
c1
1
2
3
DELETE FROM bug14672 WHERE c1 = 2;
SELECT * FROM bug14672;
c1
1
3
INSERT INTO bug14672 VALUES (4);
SELECT * FROM bug14672;
c1
1
3
4
INSERT INTO bug14672 VALUES (5);
SELECT * FROM bug14672;
c1
1
3
4
5
DROP TABLE bug14672;
mysql-test/t/csv.test
View file @
a7dfd887
...
@@ -1314,4 +1314,41 @@ select period from t1;
...
@@ -1314,4 +1314,41 @@ select period from t1;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
#
# Bug #13894 Server crashes on update of CSV table
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
bug13894
;
--
enable_warnings
CREATE
TABLE
bug13894
(
val
integer
)
ENGINE
=
CSV
;
INSERT
INTO
bug13894
VALUES
(
5
);
INSERT
INTO
bug13894
VALUES
(
10
);
INSERT
INTO
bug13894
VALUES
(
11
);
INSERT
INTO
bug13894
VALUES
(
10
);
SELECT
*
FROM
bug13894
;
UPDATE
bug13894
SET
val
=
6
WHERE
val
=
10
;
SELECT
*
FROM
bug13894
;
DROP
TABLE
bug13894
;
#
# Bug #14672 Bug in deletion
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
bug14672
;
--
enable_warnings
CREATE
TABLE
bug14672
(
c1
integer
)
engine
=
CSV
;
INSERT
INTO
bug14672
VALUES
(
1
),
(
2
),
(
3
);
SELECT
*
FROM
bug14672
;
DELETE
FROM
bug14672
WHERE
c1
=
2
;
SELECT
*
FROM
bug14672
;
INSERT
INTO
bug14672
VALUES
(
4
);
SELECT
*
FROM
bug14672
;
INSERT
INTO
bug14672
VALUES
(
5
);
SELECT
*
FROM
bug14672
;
DROP
TABLE
bug14672
;
# End of 4.1 tests
# End of 4.1 tests
sql/examples/ha_tina.cc
View file @
a7dfd887
...
@@ -82,12 +82,16 @@ handlerton tina_hton= {
...
@@ -82,12 +82,16 @@ handlerton tina_hton= {
** TINA tables
** TINA tables
*****************************************************************************/
*****************************************************************************/
/*
/*
Used for sorting
chains
.
Used for sorting
chains with qsort()
.
*/
*/
int
sort_set
(
tina_set
*
a
,
tina_set
*
b
)
int
sort_set
(
tina_set
*
a
,
tina_set
*
b
)
{
{
return
(
a
->
begin
>
b
->
begin
?
1
:
(
a
->
begin
<
b
->
begin
?
-
1
:
0
)
);
/*
We assume that intervals do not intersect. So, it is enought to compare
any two points. Here we take start of intervals for comparison.
*/
return
(
a
->
begin
>
b
->
begin
?
-
1
:
(
a
->
begin
<
b
->
begin
?
1
:
0
)
);
}
}
static
byte
*
tina_get_key
(
TINA_SHARE
*
share
,
uint
*
length
,
static
byte
*
tina_get_key
(
TINA_SHARE
*
share
,
uint
*
length
,
...
@@ -186,7 +190,8 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
...
@@ -186,7 +190,8 @@ static TINA_SHARE *get_share(const char *table_name, TABLE *table)
thr_lock_init
(
&
share
->
lock
);
thr_lock_init
(
&
share
->
lock
);
pthread_mutex_init
(
&
share
->
mutex
,
MY_MUTEX_INIT_FAST
);
pthread_mutex_init
(
&
share
->
mutex
,
MY_MUTEX_INIT_FAST
);
if
((
share
->
data_file
=
my_open
(
data_file_name
,
O_RDWR
,
MYF
(
0
)))
==
-
1
)
if
((
share
->
data_file
=
my_open
(
data_file_name
,
O_RDWR
|
O_APPEND
,
MYF
(
0
)))
==
-
1
)
goto
error2
;
goto
error2
;
/* We only use share->data_file for writing, so we scan to the end to append */
/* We only use share->data_file for writing, so we scan to the end to append */
...
@@ -797,13 +802,8 @@ int ha_tina::rnd_end()
...
@@ -797,13 +802,8 @@ int ha_tina::rnd_end()
qsort
(
chain
,
(
size_t
)(
chain_ptr
-
chain
),
sizeof
(
tina_set
),
(
qsort_cmp
)
sort_set
);
qsort
(
chain
,
(
size_t
)(
chain_ptr
-
chain
),
sizeof
(
tina_set
),
(
qsort_cmp
)
sort_set
);
for
(
ptr
=
chain
;
ptr
<
chain_ptr
;
ptr
++
)
for
(
ptr
=
chain
;
ptr
<
chain_ptr
;
ptr
++
)
{
{
/* We peek a head to see if this is the last chain */
memmove
(
share
->
mapped_file
+
ptr
->
begin
,
share
->
mapped_file
+
ptr
->
end
,
if
(
ptr
+
1
==
chain_ptr
)
length
-
(
size_t
)
ptr
->
end
);
memmove
(
share
->
mapped_file
+
ptr
->
begin
,
share
->
mapped_file
+
ptr
->
end
,
length
-
(
size_t
)
ptr
->
end
);
else
memmove
((
caddr_t
)
share
->
mapped_file
+
ptr
->
begin
,
(
caddr_t
)
share
->
mapped_file
+
ptr
->
end
,
(
size_t
)((
ptr
++
)
->
begin
-
ptr
->
end
));
length
=
length
-
(
size_t
)(
ptr
->
end
-
ptr
->
begin
);
length
=
length
-
(
size_t
)(
ptr
->
end
-
ptr
->
begin
);
}
}
...
...
support-files/mysql.spec.sh
View file @
a7dfd887
...
@@ -259,6 +259,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
...
@@ -259,6 +259,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--includedir=%{_includedir}
\
--includedir=%{_includedir}
\
--mandir=%{_mandir}
\
--mandir=%{_mandir}
\
--enable-thread-safe-client
\
--enable-thread-safe-client
\
--with-zlib-dir=bundled
\
--with-readline ;
\
--with-readline ;
\
# Add this for more debugging support
# Add this for more debugging support
# --with-debug
# --with-debug
...
...
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