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
c8597d1f
Commit
c8597d1f
authored
Nov 25, 2009
by
sunny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/5.1: This is an interim fix, fix tests and make read float/double arg const.
parent
c6412767
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
20 deletions
+18
-20
include/mach0data.h
include/mach0data.h
+4
-4
include/mach0data.ic
include/mach0data.ic
+4
-4
mysql-test/innodb-autoinc.result
mysql-test/innodb-autoinc.result
+3
-6
mysql-test/innodb-autoinc.test
mysql-test/innodb-autoinc.test
+3
-4
row/row0sel.c
row/row0sel.c
+4
-2
No files found.
include/mach0data.h
View file @
c8597d1f
...
...
@@ -266,8 +266,8 @@ UNIV_INLINE
double
mach_double_read
(
/*=============*/
/* out: double read */
byte
*
b
);
/* in: pointer to memory from where to read */
/* out: double read */
const
byte
*
b
);
/* in: pointer to memory from where to read */
/*************************************************************
Writes a double. It is stored in a little-endian format. */
UNIV_INLINE
...
...
@@ -282,8 +282,8 @@ UNIV_INLINE
float
mach_float_read
(
/*============*/
/* out: float read */
byte
*
b
);
/* in: pointer to memory from where to read */
/* out: float read */
const
byte
*
b
);
/* in: pointer to memory from where to read */
/*************************************************************
Writes a float. It is stored in a little-endian format. */
UNIV_INLINE
...
...
include/mach0data.ic
View file @
c8597d1f
...
...
@@ -504,8 +504,8 @@ UNIV_INLINE
double
mach_double_read(
/*=============*/
/* out: double read */
byte* b) /* in: pointer to memory from where to read */
/* out: double read */
const
byte* b) /* in: pointer to memory from where to read */
{
double d;
ulint i;
...
...
@@ -553,8 +553,8 @@ UNIV_INLINE
float
mach_float_read(
/*============*/
/* out: float read */
byte* b) /* in: pointer to memory from where to read */
/* out: float read */
const
byte* b) /* in: pointer to memory from where to read */
{
float d;
ulint i;
...
...
mysql-test/innodb-autoinc.result
View file @
c8597d1f
...
...
@@ -1131,9 +1131,7 @@ Warnings:
Note 1051 Unknown table 'T1'
CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
INSERT INTO T1(C1) VALUES ('innodb');
Warnings:
Warning 1265 Data truncated for column 'C1' at row 1
INSERT INTO T1(C2) VALUES ('innodb');
SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
...
...
@@ -1144,9 +1142,7 @@ T1 CREATE TABLE `T1` (
DROP TABLE T1;
CREATE TABLE T1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
INSERT INTO T1(C1) VALUES ('innodb');
Warnings:
Warning 1265 Data truncated for column 'C1' at row 1
INSERT INTO T1(C2) VALUES ('innodb');
SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
...
...
@@ -1154,3 +1150,4 @@ T1 CREATE TABLE `T1` (
`C2` char(10) DEFAULT NULL,
PRIMARY KEY (`C1`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
DROP TABLE T1;
mysql-test/innodb-autoinc.test
View file @
c8597d1f
...
...
@@ -629,14 +629,13 @@ CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT
INTO
T1
(
C1
,
C2
)
VALUES
(
1
,
'innodb'
),
(
3
,
'innodb'
);
# Restart the server
--
source
include
/
restart_mysqld
.
inc
INSERT
INTO
T1
(
C
1
)
VALUES
(
'innodb'
);
INSERT
INTO
T1
(
C
2
)
VALUES
(
'innodb'
);
SHOW
CREATE
TABLE
T1
;
DROP
TABLE
T1
;
CREATE
TABLE
T1
(
C1
FLOAT
AUTO_INCREMENT
KEY
,
C2
CHAR
(
10
))
ENGINE
=
InnoDB
;
INSERT
INTO
T1
(
C1
,
C2
)
VALUES
(
1
,
'innodb'
),
(
3
,
'innodb'
);
# Restart the server
--
source
include
/
restart_mysqld
.
inc
INSERT
INTO
T1
(
C
1
)
VALUES
(
'innodb'
);
INSERT
INTO
T1
(
C
2
)
VALUES
(
'innodb'
);
SHOW
CREATE
TABLE
T1
;
DROP
TABLE
T1
;
row/row0sel.c
View file @
c8597d1f
...
...
@@ -4536,18 +4536,20 @@ row_search_autoinc_read_column(
data
=
rec_get_nth_field
((
rec_t
*
)
rec
,
offsets
,
col_no
,
&
len
);
ut_a
(
len
!=
UNIV_SQL_NULL
);
ut_a
(
len
<=
sizeof
value
);
switch
(
mtype
)
{
case
DATA_INT
:
ut_a
(
len
<=
sizeof
value
);
value
=
mach_read_int_type
(
data
,
len
,
unsigned_type
);
break
;
case
DATA_FLOAT
:
ut_a
(
len
==
sizeof
(
float
));
value
=
mach_float_read
(
data
);
break
;
case
DATA_DOUBLE
:
ut_a
(
len
==
sizeof
(
double
));
value
=
mach_double_read
(
data
);
break
;
...
...
@@ -4642,7 +4644,7 @@ row_search_max_autoinc(
*
value
=
row_search_autoinc_read_column
(
index
,
rec
,
i
,
dfield
->
col
->
mtype
,
unsigned_type
);
dfield
->
col
->
mtype
,
unsigned_type
);
}
}
...
...
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