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
7f21a7a6
Commit
7f21a7a6
authored
Apr 09, 2001
by
monty@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed INSERT DELAYED with Innobase
Fix for shutdown on NT Fixed bug when using wrong dates from blob field.
parent
3d19a5d4
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
157 additions
and
99 deletions
+157
-99
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-1
Docs/manual.texi
Docs/manual.texi
+27
-5
innobase/ib_config.h
innobase/ib_config.h
+3
-0
innobase/ib_config.h.in
innobase/ib_config.h.in
+3
-0
mysql-test/r/df_crash.result
mysql-test/r/df_crash.result
+0
-6
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+4
-0
mysql-test/r/innobase.result
mysql-test/r/innobase.result
+2
-0
mysql-test/t/df_crash.test
mysql-test/t/df_crash.test
+0
-10
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+9
-0
mysql-test/t/innobase.test
mysql-test/t/innobase.test
+37
-25
scripts/mysql_convert_table_format.sh
scripts/mysql_convert_table_format.sh
+20
-2
sql/ha_innobase.cc
sql/ha_innobase.cc
+15
-6
sql/mysqld.cc
sql/mysqld.cc
+1
-1
sql/sql_insert.cc
sql/sql_insert.cc
+8
-1
sql/sql_udf.cc
sql/sql_udf.cc
+24
-5
sql/time.cc
sql/time.cc
+3
-7
strings/ctype-tis620.c
strings/ctype-tis620.c
+0
-5
support-files/mysql-max.spec.sh
support-files/mysql-max.spec.sh
+0
-25
No files found.
BitKeeper/etc/logging_ok
View file @
7f21a7a6
jani@janikt.pp.saunalahti
.fi
monty@donna.mysql
.fi
Docs/manual.texi
View file @
7f21a7a6
...
...
@@ -14029,12 +14029,13 @@ adopt a consistent convention, such as always creating databases and
tables using lowercase names.
One way to avoid this problem is to start @code{mysqld} with @code{-O
lower_case_table_names=1}.
lower_case_table_names=1}. By default this option is 1 on windows and 0 on
Unix.
I
n this case @strong{MySQL} will on Windows/NT convert all table names
t
o lower case on storage and lookup. Note that you need to first
c
onvert your old table names to lower case before starting @code{mysqld}
with this option
.
I
f @code{lower_case_table_names} is 1 @strong{MySQL} will convert all
t
able names to lower case on storage and lookup. Note that if you
c
hange this option, you need to first convert your old table names to
lower case before starting @code{mysqld}
.
@cindex variables, user
@cindex user variables
...
...
@@ -42640,6 +42641,10 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Added @code{SQL_CALC_FOUND_ROWS} and @code{FOUND_ROWS()}. This make it
possible to know how many rows a query would have returned if one hadn't
used @code{LIMIT}.
@item
Changed output format of @code{SHOW OPEN TABLES}.
@item
Allow @code{SELECT expression LIMIT ...}.
...
...
@@ -42738,6 +42743,13 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.37
@itemize @bullet
@item
Disabled @code{INSERT DELAYED} for tables that supports transactions.
@item
Fixed bug when using date functions on @code{TEXT}/@code{BLOB} column
with wrong date format.
@item
UDF's now also works on windows. (Patch by Ralph Mason)
@item
Fixed bug in @code{ALTER TABLE} and @code{LOAD DATA INFILE} that disabled
key-sorting. These command should now be faster in most cases.
@item
...
...
@@ -47974,6 +47986,16 @@ Change @code{INSERT ... SELECT} to use concurrent inserts.
Return the original field types() when doing @code{SELECT MIN(column)
... GROUP BY}.
@item
Multiple result sets.
@item
Change the protocol to allow binary transfer of values. To do this
efficiently, we need to add an API to allow binding of variables.
@item
Add @code{PREPARE} of statements and sending of parameters to @code{mysqld}.
@item
Make it possible to specify @code{long_query_time} with a granularity
in microseconds.
@item
Add range checking to @code{MERGE} tables.
@item
Port of @strong{MySQL} to BeOS.
innobase/ib_config.h
View file @
7f21a7a6
...
...
@@ -20,3 +20,6 @@
/* Version number of package */
#define VERSION "0.90"
/* No inlining because gcc broken on HP-UX */
/* #undef UNIV_MUST_NOT_INLINE */
innobase/ib_config.h.in
View file @
7f21a7a6
...
...
@@ -19,3 +19,6 @@
/* Version number of package */
#undef VERSION
/* No inlining because gcc broken on HP-UX */
#undef UNIV_MUST_NOT_INLINE
mysql-test/r/df_crash.result
deleted
100644 → 0
View file @
3d19a5d4
month(updated)
10
NULL
year(updated)
1999
NULL
mysql-test/r/func_time.result
View file @
7f21a7a6
...
...
@@ -192,3 +192,7 @@ January
monthname(date)
NULL
January
month(updated)
NULL
year(updated)
NULL
mysql-test/r/innobase.result
View file @
7f21a7a6
...
...
@@ -445,5 +445,7 @@ i j
1 2
MIN(B) MAX(b)
1 1
a
1
table type possible_keys key key_len ref rows Extra
t1 range PRIMARY PRIMARY 4 NULL 1 where used
mysql-test/t/df_crash.test
deleted
100644 → 0
View file @
3d19a5d4
drop
table
if
exists
db_crash
;
CREATE
TABLE
df_crash
(
updated
text
)
TYPE
=
MyISAM
;
INSERT
INTO
df_crash
VALUES
(
'1999-10-5'
);
insert
into
df_crash
values
(
''
);
select
month
(
updated
)
from
df_crash
;
select
year
(
updated
)
from
df_crash
;
drop
table
df_crash
;
mysql-test/t/func_time.test
View file @
7f21a7a6
...
...
@@ -119,3 +119,12 @@ insert into t2 values (2, "2000-01-01");
select
monthname
(
date
)
from
t1
inner
join
t2
on
t1
.
id
=
t2
.
id
;
select
monthname
(
date
)
from
t1
inner
join
t2
on
t1
.
id
=
t2
.
id
order
by
t1
.
id
;
drop
table
t1
,
t2
;
#
# Test bug with month() and year() on text fields with wrong information
CREATE
TABLE
t1
(
updated
text
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
''
);
SELECT
month
(
updated
)
from
t1
;
SELECT
year
(
updated
)
from
t1
;
drop
table
t1
;
mysql-test/t/innobase.test
View file @
7f21a7a6
...
...
@@ -5,7 +5,7 @@
#
drop
table
if
exists
t1
,
t2
;
create
table
t1
(
id
int
unsigned
not
null
auto_increment
,
code
tinyint
unsigned
not
null
,
name
char
(
20
)
not
null
,
primary
key
(
id
),
key
(
code
),
unique
(
name
))
type
=
inno
base
;
create
table
t1
(
id
int
unsigned
not
null
auto_increment
,
code
tinyint
unsigned
not
null
,
name
char
(
20
)
not
null
,
primary
key
(
id
),
key
(
code
),
unique
(
name
))
type
=
inno
db
;
insert
into
t1
(
code
,
name
)
values
(
1
,
'Tim'
),
(
1
,
'Monty'
),
(
2
,
'David'
),
(
2
,
'Erik'
),
(
3
,
'Sasha'
),
(
3
,
'Jeremy'
),
(
4
,
'Matt'
);
select
id
,
code
,
name
from
t1
order
by
id
;
...
...
@@ -28,7 +28,7 @@ CREATE TABLE t1 (
PRIMARY
KEY
(
id
),
KEY
parent_id
(
parent_id
),
KEY
level
(
level
)
)
type
=
inno
base
;
)
type
=
inno
db
;
INSERT
INTO
t1
VALUES
(
1
,
0
,
0
),(
3
,
1
,
1
),(
4
,
1
,
1
),(
8
,
2
,
2
),(
9
,
2
,
2
),(
17
,
3
,
2
),(
22
,
4
,
2
),(
24
,
4
,
2
),(
28
,
5
,
2
),(
29
,
5
,
2
),(
30
,
5
,
2
),(
31
,
6
,
2
),(
32
,
6
,
2
),(
33
,
6
,
2
),(
203
,
7
,
2
),(
202
,
7
,
2
),(
20
,
3
,
2
),(
157
,
0
,
0
),(
193
,
5
,
2
),(
40
,
7
,
2
),(
2
,
1
,
1
),(
15
,
2
,
2
),(
6
,
1
,
1
),(
34
,
6
,
2
),(
35
,
6
,
2
),(
16
,
3
,
2
),(
7
,
1
,
1
),(
36
,
7
,
2
),(
18
,
3
,
2
),(
26
,
5
,
2
),(
27
,
5
,
2
),(
183
,
4
,
2
),(
38
,
7
,
2
),(
25
,
5
,
2
),(
37
,
7
,
2
),(
21
,
4
,
2
),(
19
,
3
,
2
),(
5
,
1
,
1
),(
179
,
5
,
2
);
update
t1
set
parent_id
=
parent_id
+
100
;
select
*
from
t1
where
parent_id
=
102
;
...
...
@@ -57,7 +57,7 @@ CREATE TABLE t1 (
gesuchnr
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
benutzer_id
int
(
11
)
DEFAULT
'0'
NOT
NULL
,
PRIMARY
KEY
(
gesuchnr
,
benutzer_id
)
)
type
=
inno
base
;
)
type
=
inno
db
;
replace
into
t1
(
gesuchnr
,
benutzer_id
)
values
(
2
,
1
);
replace
into
t1
(
gesuchnr
,
benutzer_id
)
values
(
1
,
1
);
...
...
@@ -69,7 +69,7 @@ drop table t1;
# test delete using hidden_primary_key
#
create
table
t1
(
a
int
)
type
=
inno
base
;
create
table
t1
(
a
int
)
type
=
inno
db
;
insert
into
t1
values
(
1
),
(
2
);
optimize
table
t1
;
delete
from
t1
where
a
=
1
;
...
...
@@ -77,7 +77,7 @@ select * from t1;
check
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
,
b
varchar
(
20
))
type
=
inno
base
;
create
table
t1
(
a
int
,
b
varchar
(
20
))
type
=
inno
db
;
insert
into
t1
values
(
1
,
""
),
(
2
,
"testing"
);
delete
from
t1
where
a
=
1
;
select
*
from
t1
;
...
...
@@ -90,7 +90,7 @@ drop table t1;
# Test of reading on secondary key with may be null
create
table
t1
(
a
int
,
b
varchar
(
20
),
key
(
a
))
type
=
inno
base
;
create
table
t1
(
a
int
,
b
varchar
(
20
),
key
(
a
))
type
=
inno
db
;
insert
into
t1
values
(
1
,
""
),
(
2
,
"testing"
);
select
*
from
t1
where
a
=
1
;
drop
table
t1
;
...
...
@@ -99,7 +99,7 @@ drop table t1;
# Test rollback
#
create
table
t1
(
n
int
not
null
primary
key
)
type
=
inno
base
;
create
table
t1
(
n
int
not
null
primary
key
)
type
=
inno
db
;
set
autocommit
=
0
;
insert
into
t1
values
(
4
);
rollback
;
...
...
@@ -126,7 +126,7 @@ drop table t1;
# Testing transactions
#
create
table
t1
(
id
int
NOT
NULL
PRIMARY
KEY
,
nom
varchar
(
64
))
type
=
inno
base
;
create
table
t1
(
id
int
NOT
NULL
PRIMARY
KEY
,
nom
varchar
(
64
))
type
=
inno
db
;
begin
;
insert
into
t1
values
(
1
,
'hamdouni'
);
select
id
as
afterbegin_id
,
nom
as
afterbegin_nom
from
t1
;
...
...
@@ -144,7 +144,7 @@ drop table t1;
# Simple not autocommit test
#
CREATE
TABLE
t1
(
id
char
(
8
)
not
null
primary
key
,
val
int
not
null
)
type
=
inno
base
;
CREATE
TABLE
t1
(
id
char
(
8
)
not
null
primary
key
,
val
int
not
null
)
type
=
inno
db
;
insert
into
t1
values
(
'pippo'
,
12
);
--
error
1062
insert
into
t1
values
(
'pippo'
,
12
);
# Gives error
...
...
@@ -167,12 +167,12 @@ set autocommit=1;
# The following simple tests failed at some point
#
CREATE
TABLE
t1
(
ID
INTEGER
NOT
NULL
PRIMARY
KEY
,
NAME
VARCHAR
(
64
))
TYPE
=
inno
base
;
CREATE
TABLE
t1
(
ID
INTEGER
NOT
NULL
PRIMARY
KEY
,
NAME
VARCHAR
(
64
))
TYPE
=
inno
db
;
INSERT
INTO
t1
VALUES
(
1
,
'Jochen'
);
select
*
from
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
_userid
VARCHAR
(
60
)
NOT
NULL
PRIMARY
KEY
)
TYPE
=
inno
base
;
CREATE
TABLE
t1
(
_userid
VARCHAR
(
60
)
NOT
NULL
PRIMARY
KEY
)
TYPE
=
inno
db
;
set
autocommit
=
0
;
INSERT
INTO
t1
SET
_userid
=
'marc@anyware.co.uk'
;
COMMIT
;
...
...
@@ -191,7 +191,7 @@ CREATE TABLE t1 (
ref_email
varchar
(
100
)
DEFAULT
''
NOT
NULL
,
detail
varchar
(
200
),
PRIMARY
KEY
(
user_id
,
ref_email
)
)
type
=
inno
base
;
)
type
=
inno
db
;
INSERT
INTO
t1
VALUES
(
10292
,
'sanjeev'
,
'29153373'
,
'sansh777@hotmail.com'
,
'xxx'
),(
10292
,
'shirish'
,
'2333604'
,
'shirish@yahoo.com'
,
'ddsds'
),(
10292
,
'sonali'
,
'323232'
,
'sonali@bolly.com'
,
'filmstar'
);
select
*
from
t1
where
user_id
=
10292
;
...
...
@@ -212,11 +212,11 @@ show index from t1;
drop
table
t1
;
#
# Test of ALTER TABLE and inno
base
tables
# Test of ALTER TABLE and inno
db
tables
#
create
table
t1
(
col1
int
not
null
,
col2
char
(
4
)
not
null
,
primary
key
(
col1
));
alter
table
t1
type
=
inno
base
;
alter
table
t1
type
=
inno
db
;
insert
into
t1
values
(
'1'
,
'1'
),(
'5'
,
'2'
),(
'2'
,
'3'
),(
'3'
,
'4'
),(
'4'
,
'4'
);
select
*
from
t1
;
update
t1
set
col2
=
'7'
where
col1
=
'4'
;
...
...
@@ -228,10 +228,10 @@ select * from t1;
drop
table
t1
;
#
# INSERT INTO inno
base
tables
# INSERT INTO inno
db
tables
#
create
table
t1
(
a
int
not
null
,
b
int
,
primary
key
(
a
))
type
=
inno
base
;
create
table
t1
(
a
int
not
null
,
b
int
,
primary
key
(
a
))
type
=
inno
db
;
create
table
t2
(
a
int
not
null
,
b
int
,
primary
key
(
a
))
type
=
myisam
;
insert
into
t1
VALUES
(
1
,
3
)
,
(
2
,
3
),
(
3
,
3
);
select
*
from
t1
;
...
...
@@ -255,7 +255,7 @@ CREATE TABLE t1 (
passwd
varchar
(
32
)
binary
DEFAULT
''
NOT
NULL
,
PRIMARY
KEY
(
id
),
UNIQUE
ggid
(
ggid
)
)
TYPE
=
inno
base
;
)
TYPE
=
inno
db
;
insert
into
t1
(
ggid
,
passwd
)
values
(
'test1'
,
'xxx'
);
insert
into
t1
(
ggid
,
passwd
)
values
(
'test2'
,
'yyy'
);
...
...
@@ -293,7 +293,7 @@ CREATE TABLE t1 (
approved
datetime
,
dummy_primary_key
int
(
11
)
NOT
NULL
auto_increment
,
PRIMARY
KEY
(
dummy_primary_key
)
)
TYPE
=
inno
base
;
)
TYPE
=
inno
db
;
INSERT
INTO
t1
VALUES
(
'user_0'
,
'somepassword'
,
'N'
,
0
,
0
,
0
,
'2000-09-07'
,
'23:06:59'
,
'2000-09-07 23:06:59'
,
1
);
INSERT
INTO
t1
VALUES
(
'user_1'
,
'somepassword'
,
'Y'
,
1
,
1
,
1
,
'2000-09-07'
,
'23:06:59'
,
'2000-09-07 23:06:59'
,
2
);
INSERT
INTO
t1
VALUES
(
'user_2'
,
'somepassword'
,
'N'
,
2
,
2
,
1.4142135623731
,
'2000-09-07'
,
'23:06:59'
,
'2000-09-07 23:06:59'
,
3
);
...
...
@@ -313,7 +313,7 @@ CREATE TABLE t1 (
KEY
(
id
),
KEY
parent_id
(
parent_id
),
KEY
level
(
level
)
)
type
=
inno
base
;
)
type
=
inno
db
;
INSERT
INTO
t1
VALUES
(
1
,
0
,
0
),(
3
,
1
,
1
),(
4
,
1
,
1
),(
8
,
2
,
2
),(
9
,
2
,
2
),(
17
,
3
,
2
),(
22
,
4
,
2
),(
24
,
4
,
2
),(
28
,
5
,
2
),(
29
,
5
,
2
),(
30
,
5
,
2
),(
31
,
6
,
2
),(
32
,
6
,
2
),(
33
,
6
,
2
),(
203
,
7
,
2
),(
202
,
7
,
2
),(
20
,
3
,
2
),(
157
,
0
,
0
),(
193
,
5
,
2
),(
40
,
7
,
2
),(
2
,
1
,
1
),(
15
,
2
,
2
),(
6
,
1
,
1
),(
34
,
6
,
2
),(
35
,
6
,
2
),(
16
,
3
,
2
),(
7
,
1
,
1
),(
36
,
7
,
2
),(
18
,
3
,
2
),(
26
,
5
,
2
),(
27
,
5
,
2
),(
183
,
4
,
2
),(
38
,
7
,
2
),(
25
,
5
,
2
),(
37
,
7
,
2
),(
21
,
4
,
2
),(
19
,
3
,
2
),(
5
,
1
,
1
);
INSERT
INTO
t1
values
(
179
,
5
,
2
);
update
t1
set
parent_id
=
parent_id
+
100
;
...
...
@@ -346,7 +346,7 @@ CREATE TABLE t1 (
sca_sch_desc
varchar
(
16
),
PRIMARY
KEY
(
sca_code
,
cat_code
,
lan_code
),
INDEX
sca_pic
(
sca_pic
)
)
type
=
inno
base
;
)
type
=
inno
db
;
INSERT
INTO
t1
(
sca_code
,
cat_code
,
sca_desc
,
lan_code
,
sca_pic
,
sca_sdesc
,
sca_sch_desc
)
VALUES
(
'PD'
,
'J'
,
'PENDANT'
,
'EN'
,
NULL
,
NULL
,
'PENDANT'
),(
'RI'
,
'J'
,
'RING'
,
'EN'
,
NULL
,
NULL
,
'RING'
),(
'QQ'
,
'N'
,
'RING'
,
'EN'
,
'not null'
,
NULL
,
'RING'
);
select
count
(
*
)
from
t1
where
sca_code
=
'PD'
;
...
...
@@ -368,7 +368,7 @@ drop table t1;
# Test of opening table twice and timestamps
#
set
@
a
:=
now
();
CREATE
TABLE
t1
(
a
int
not
null
,
b
timestamp
not
null
,
primary
key
(
a
))
type
=
inno
base
;
CREATE
TABLE
t1
(
a
int
not
null
,
b
timestamp
not
null
,
primary
key
(
a
))
type
=
inno
db
;
insert
into
t1
(
a
)
values
(
1
),(
2
),(
3
);
select
t1
.
a
from
t1
natural
join
t1
as
t2
where
t1
.
b
>=
@
a
order
by
t1
.
a
;
update
t1
set
a
=
5
where
a
=
1
;
...
...
@@ -378,7 +378,7 @@ drop table t1;
#
# Test with variable length primary key
#
create
table
t1
(
a
varchar
(
100
)
not
null
,
primary
key
(
a
),
b
int
not
null
)
type
=
inno
base
;
create
table
t1
(
a
varchar
(
100
)
not
null
,
primary
key
(
a
),
b
int
not
null
)
type
=
inno
db
;
insert
into
t1
values
(
"hello"
,
1
),(
"world"
,
2
);
select
*
from
t1
order
by
b
desc
;
optimize
table
t1
;
...
...
@@ -388,7 +388,7 @@ drop table t1;
#
# Test of create index with NULL columns
#
create
table
t1
(
i
int
,
j
int
)
TYPE
=
inno
base
;
create
table
t1
(
i
int
,
j
int
)
TYPE
=
inno
db
;
insert
into
t1
values
(
1
,
2
);
select
*
from
t1
where
i
=
1
and
j
=
2
;
create
index
ax1
on
t1
(
i
,
j
);
...
...
@@ -403,17 +403,29 @@ CREATE TABLE t1 (
a
int3
unsigned
NOT
NULL
,
b
int1
unsigned
NOT
NULL
,
UNIQUE
(
a
,
b
)
)
TYPE
=
inno
base
;
)
TYPE
=
inno
db
;
INSERT
INTO
t1
VALUES
(
1
,
1
);
SELECT
MIN
(
B
),
MAX
(
b
)
FROM
t1
WHERE
t1
.
a
=
1
;
drop
table
t1
;
#
# Test INSERT DELAYED
#
CREATE
TABLE
t1
(
a
int
unsigned
NOT
NULL
)
type
=
innodb
;
--
error
1031
INSERT
DELAYED
INTO
t1
VALUES
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Crash when using many tables (Test case by Jeremy D Zawodny)
#
create
table
t1
(
a
int
primary
key
,
b
int
,
c
int
,
d
int
,
e
int
,
f
int
,
g
int
,
h
int
,
i
int
,
j
int
,
k
int
,
l
int
,
m
int
,
n
int
,
o
int
,
p
int
,
q
int
,
r
int
,
s
int
,
t
int
,
u
int
,
v
int
,
w
int
,
x
int
,
y
int
,
z
int
,
a1
int
,
a2
int
,
a3
int
,
a4
int
,
a5
int
,
a6
int
,
a7
int
,
a8
int
,
a9
int
,
b1
int
,
b2
int
,
b3
int
,
b4
int
,
b5
int
,
b6
int
)
type
=
Innobase
;
create
table
t1
(
a
int
primary
key
,
b
int
,
c
int
,
d
int
,
e
int
,
f
int
,
g
int
,
h
int
,
i
int
,
j
int
,
k
int
,
l
int
,
m
int
,
n
int
,
o
int
,
p
int
,
q
int
,
r
int
,
s
int
,
t
int
,
u
int
,
v
int
,
w
int
,
x
int
,
y
int
,
z
int
,
a1
int
,
a2
int
,
a3
int
,
a4
int
,
a5
int
,
a6
int
,
a7
int
,
a8
int
,
a9
int
,
b1
int
,
b2
int
,
b3
int
,
b4
int
,
b5
int
,
b6
int
)
type
=
innodb
;
insert
into
t1
values
(
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
);
explain
select
*
from
t1
where
a
>
0
and
a
<
50
;
drop
table
t1
;
scripts/mysql_convert_table_format.sh
View file @
7f21a7a6
...
...
@@ -8,10 +8,12 @@ use Getopt::Long;
$opt_help
=
$opt_version
=
$opt_verbose
=
$opt_force
=
0
;
$opt_user
=
$opt_database
=
$opt_password
=
undef
;
$opt_host
=
"localhost"
;
$opt_socket
=
""
;
$opt_type
=
"MYISAM"
;
$opt_port
=
0
;
$exit_status
=
0
;
GetOptions
(
"force"
,
"help"
,
"host=s"
,
"password=s"
,
"user=s"
,
"type=s"
,
"verbose"
,
"version"
)
||
GetOptions
(
"force"
,
"help"
,
"host=s"
,
"password=s"
,
"user=s"
,
"type=s"
,
"verbose"
,
"version"
,
"socket=s"
,
"port=i"
)
||
usage
(
0
)
;
usage
(
$opt_version
)
if
(
$#ARGV
< 0
||
$opt_help
||
$opt_version
)
;
$opt_database
=
shift
(
@ARGV
)
;
...
...
@@ -22,7 +24,17 @@ if (uc($opt_type) eq "HEAP")
exit
(
1
)
;
}
$dbh
=
DBI->connect
(
"DBI:mysql:
$opt_database
:
$opt_host
"
,
$connect_opt
=
""
;
if
(
$opt_port
)
{
$connect_opt
.
=
";port=
$opt_port
"
;
}
if
(
length
(
$opt_socket
))
{
$connect_opt
.
=
";mysql_socket=
$opt_socket
"
;
}
$dbh
=
DBI->connect
(
"DBI:mysql:
$opt_database
:
${
opt_host
}
$connect_opt
"
,
$opt_user
,
$opt_password
,
{
PrintError
=>
0
})
...
...
@@ -96,6 +108,12 @@ Conversion of a MySQL tables to other table types.
--password='password'
Password for the current user.
--port=port
TCP/IP port to connect to if host is not "localhost".
--socket='/path/to/socket'
Socket to connect with.
--type='table-type'
Converts tables to the given table type (Default:
$opt_type
)
MySQL 3.23 supports at least the BDB, ISAM and MYISAM types.
...
...
sql/ha_innobase.cc
View file @
7f21a7a6
...
...
@@ -35,6 +35,9 @@ Innobase */
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
/* The following must be declared here so that we can handle SAFE_MUTEX */
pthread_mutex_t
innobase_mutex
;
#include "ha_innobase.h"
/* Store MySQL definition of 'byte': in Linux it is char while Innobase
...
...
@@ -42,6 +45,9 @@ uses unsigned char */
typedef
byte
mysql_byte
;
#define INSIDE_HA_INNOBASE_CC
#ifdef SAFE_MUTEX
#undef pthread_mutex_t
#endif
/* Include necessary Innobase headers */
extern
"C"
{
...
...
@@ -91,8 +97,6 @@ ulong innobase_active_counter = 0;
char
*
innobase_home
=
NULL
;
pthread_mutex_t
innobase_mutex
;
static
HASH
innobase_open_tables
;
static
mysql_byte
*
innobase_get_key
(
INNOBASE_SHARE
*
share
,
uint
*
length
,
...
...
@@ -2601,14 +2605,19 @@ ha_innobase::update_table_comment(
{
uint
length
=
strlen
(
comment
);
char
*
str
=
my_malloc
(
length
+
100
,
MYF
(
0
));
char
*
str
=
my_malloc
(
length
+
100
,
MYF
(
0
))
,
*
pos
;
if
(
!
str
)
return
(
char
*
)
comment
;
sprintf
(
str
,
"%s; Innobase free: %lu kB"
,
comment
,
(
ulong
)
innobase_get_free_space
());
pos
=
str
;
if
(
length
)
{
pos
=
strmov
(
str
,
comment
);
*
pos
++=
';'
;
*
pos
++=
' '
;
}
sprintf
(
pos
,
"Innobase free: %lu kB"
,
(
ulong
)
innobase_get_free_space
());
return
(
str
);
}
...
...
sql/mysqld.cc
View file @
7f21a7a6
...
...
@@ -437,7 +437,7 @@ static void close_connections(void)
#ifdef __NT__
if
(
hPipe
!=
INVALID_HANDLE_VALUE
)
{
HANDLE
hTempPipe
=
hPipe
;
HANDLE
hTempPipe
=
&
hPipe
;
DBUG_PRINT
(
"quit"
,
(
"Closing named pipes"
)
);
hPipe
=
INVALID_HANDLE_VALUE
;
CancelIo
(
hTempPipe
);
...
...
sql/sql_insert.cc
View file @
7f21a7a6
...
...
@@ -225,7 +225,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List<Item> &fields,
break
;
}
}
if
(
lock_type
==
TL_WRITE_DELAYED
&&
!
table
->
file
->
has_transactions
()
)
if
(
lock_type
==
TL_WRITE_DELAYED
)
{
error
=
write_delayed
(
thd
,
table
,
duplic
,
query
,
thd
->
query_length
,
log_on
);
query
=
0
;
...
...
@@ -888,6 +888,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
my_pthread_setspecific_ptr
(
THR_THD
,
thd
)
||
my_pthread_setspecific_ptr
(
THR_NET
,
&
thd
->
net
))
{
thd
->
fatal_error
=
1
;
strmov
(
thd
->
net
.
last_error
,
ER
(
thd
->
net
.
last_errno
=
ER_OUT_OF_RESOURCES
));
goto
end
;
}
...
...
@@ -906,6 +907,12 @@ static pthread_handler_decl(handle_delayed_insert,arg)
thd
->
fatal_error
=
1
;
// Abort waiting inserts
goto
end
;
}
if
(
di
->
table
->
file
->
has_transactions
())
{
thd
->
fatal_error
=
1
;
my_error
(
ER_ILLEGAL_HA
,
MYF
(
0
),
di
->
table_list
->
real_name
);
goto
end
;
}
di
->
table
->
copy_blobs
=
1
;
/* One can now use this */
...
...
sql/sql_udf.cc
View file @
7f21a7a6
...
...
@@ -35,10 +35,28 @@
#endif
#include "mysql_priv.h"
#ifdef HAVE_DLOPEN
extern
"C"
{
#if defined(__WIN__)
void
*
dlsym
(
void
*
lib
,
const
char
*
name
)
{
return
GetProcAddress
((
HMODULE
)
lib
,
name
);
}
void
*
dlopen
(
const
char
*
libname
,
int
unused
)
{
return
LoadLibraryEx
(
libname
,
NULL
,
0
);
}
void
dlclose
(
void
*
lib
)
{
FreeLibrary
((
HMODULE
)
lib
);
}
#else
#include <dlfcn.h>
#endif
#include <stdarg.h>
#include <hash.h>
}
...
...
@@ -62,6 +80,7 @@ static udf_func *add_udf(char *name, Item_result ret, char *dl,
static
void
del_udf
(
udf_func
*
udf
);
static
void
*
find_udf_dl
(
const
char
*
dl
);
static
void
init_syms
(
udf_func
*
tmp
)
{
char
nm
[
MAX_FIELD_NAME
+
16
],
*
end
;
...
...
@@ -232,7 +251,7 @@ static void del_udf(udf_func *udf)
uint
name_length
=
udf
->
name_length
;
udf
->
name
=
(
char
*
)
"*"
;
udf
->
name_length
=
1
;
hash_update
(
&
udf_hash
,(
byte
*
)
udf
,
name
,
name_length
);
hash_update
(
&
udf_hash
,(
byte
*
)
udf
,
(
byte
*
)
name
,
name_length
);
}
DBUG_VOID_RETURN
;
}
...
...
@@ -262,7 +281,7 @@ udf_func *find_udf(const char *name,uint length,bool mark_used)
/* TODO: This should be changed to reader locks someday! */
pthread_mutex_lock
(
&
THR_LOCK_udf
);
udf
=
(
udf_func
*
)
hash_search
(
&
udf_hash
,
name
,
udf
=
(
udf_func
*
)
hash_search
(
&
udf_hash
,
(
byte
*
)
name
,
length
?
length
:
(
uint
)
strlen
(
name
));
if
(
mark_used
)
udf
->
usage_count
++
;
...
...
@@ -304,7 +323,7 @@ static udf_func *add_udf(char *name, Item_result ret, char *dl,
tmp
->
returns
=
ret
;
tmp
->
type
=
type
;
tmp
->
usage_count
=
1
;
if
(
hash_insert
(
&
udf_hash
,(
char
*
)
tmp
))
if
(
hash_insert
(
&
udf_hash
,(
byte
*
)
tmp
))
return
0
;
using_udf_functions
=
1
;
return
tmp
;
...
...
@@ -344,7 +363,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
}
pthread_mutex_lock
(
&
THR_LOCK_udf
);
if
(
hash_search
(
&
udf_hash
,
udf
->
name
,
udf
->
name_length
))
if
(
hash_search
(
&
udf_hash
,
(
byte
*
)
udf
->
name
,
udf
->
name_length
))
{
net_printf
(
&
thd
->
net
,
ER_UDF_EXISTS
,
udf
->
name
);
goto
err
;
...
...
@@ -430,7 +449,7 @@ int mysql_drop_function(THD *thd,const char *udf_name)
DBUG_RETURN
(
1
);
}
pthread_mutex_lock
(
&
THR_LOCK_udf
);
if
(
!
(
udf
=
(
udf_func
*
)
hash_search
(
&
udf_hash
,
udf_name
,
(
uint
)
strlen
(
udf_name
))))
if
(
!
(
udf
=
(
udf_func
*
)
hash_search
(
&
udf_hash
,
(
byte
*
)
udf_name
,
(
uint
)
strlen
(
udf_name
))))
{
net_printf
(
&
thd
->
net
,
ER_FUNCTION_NOT_DEFINED
,
udf_name
);
goto
err
;
...
...
sql/time.cc
View file @
7f21a7a6
...
...
@@ -428,15 +428,11 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
uint
field_length
,
year_length
,
digits
,
i
,
number_of_fields
,
date
[
7
];
bool
date_used
=
0
;
const
char
*
pos
;
const
char
*
end
=
str
+
length
;
DBUG_ENTER
(
"str_to_TIME"
);
DBUG_PRINT
(
"enter"
,(
"str: %.*s"
,
length
,
str
));
if
(
!
str
)
DBUG_RETURN
(
TIMESTAMP_NONE
);
const
char
*
end
=
str
+
length
;
for
(;
!
isdigit
(
*
str
)
&&
str
!=
end
;
str
++
)
;
// Skip garbage
for
(;
str
!=
end
&&
!
isdigit
(
*
str
)
;
str
++
)
;
// Skipp garbage
if
(
str
==
end
)
DBUG_RETURN
(
TIMESTAMP_NONE
);
/*
...
...
@@ -562,7 +558,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
uint
state
;
l_time
->
neg
=
0
;
for
(;
!
isdigit
(
*
str
)
&&
*
str
!=
'-'
&&
str
!=
end
;
str
++
)
for
(;
str
!=
end
&&
!
isdigit
(
*
str
)
&&
*
str
!=
'-'
;
str
++
)
length
--
;
if
(
str
!=
end
&&
*
str
==
'-'
)
{
...
...
strings/ctype-tis620.c
View file @
7f21a7a6
...
...
@@ -598,7 +598,6 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
const
char
*
end
=
ptr
+
ptr_length
;
char
*
min_org
=
min_str
;
char
*
min_end
=
min_str
+
res_length
;
char
*
tmp
;
for
(;
ptr
!=
end
&&
min_str
!=
min_end
;
ptr
++
)
{
...
...
@@ -628,10 +627,6 @@ my_bool my_like_range_tis620(const char *ptr, uint ptr_length, pchar escape,
}
*
min_length
=
*
max_length
=
(
uint
)
(
min_str
-
min_org
);
/* Temporary fix for handling wild_one at end of string (key compression) */
// for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';)
// *--tmp=' ';
while
(
min_str
!=
min_end
)
*
min_str
++
=
*
max_str
++
=
' '
;
// Because if key compression
return
0
;
...
...
support-files/mysql-max.spec.sh
View file @
7f21a7a6
...
...
@@ -257,31 +257,6 @@ fi
%attr
(
755, root, root
)
/usr/share/mysql/
%files client
%attr
(
755, root, root
)
/usr/bin/msql2mysql
%attr
(
755, root, root
)
/usr/bin/mysql
%attr
(
755, root, root
)
/usr/bin/mysqlaccess
%attr
(
755, root, root
)
/usr/bin/mysqladmin
%attr
(
755, root, root
)
/usr/bin/mysql_find_rows
%attr
(
755, root, root
)
/usr/bin/mysqldump
%attr
(
755, root, root
)
/usr/bin/mysqlimport
%attr
(
755, root, root
)
/usr/bin/mysqlshow
%attr
(
755, root, root
)
/usr/bin/mysqlbinlog
%attr
(
644, root, man
)
%doc /usr/man/man1/mysql.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/isamchk.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/isamlog.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysql_zap.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqlaccess.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqladmin.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqld.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqld_multi.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqldump.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/mysqlshow.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/perror.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/replace.1
*
%attr
(
644, root, man
)
%doc /usr/man/man1/safe_mysqld.1
*
%changelog
*
2000-04-01 Monty
...
...
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