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
70e053fb
Commit
70e053fb
authored
Dec 13, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem with default & InnoDB tables.
parent
12058c29
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
9 deletions
+29
-9
Docs/manual.texi
Docs/manual.texi
+2
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+2
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+8
-0
sql/table.cc
sql/table.cc
+2
-4
sql/unireg.cc
sql/unireg.cc
+15
-5
No files found.
Docs/manual.texi
View file @
70e053fb
...
@@ -46839,6 +46839,8 @@ not yet 100% confident in this code.
...
@@ -46839,6 +46839,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.47
@appendixsubsec Changes in release 3.23.47
@itemize @bullet
@itemize @bullet
@item
@item
Fix default values for InnoDB tables.
@item
Fixed that @code{GROUP BY expr DESC} works.
Fixed that @code{GROUP BY expr DESC} works.
@item
@item
Fixed bug when using @code{t1 LEFT JOIN t2 ON t2.key=constant}.
Fixed bug when using @code{t1 LEFT JOIN t2 ON t2.key=constant}.
mysql-test/r/innodb.result
View file @
70e053fb
...
@@ -499,3 +499,5 @@ table type possible_keys key key_len ref rows Extra
...
@@ -499,3 +499,5 @@ table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 4 Using index
t1 index NULL b 4 NULL 4 Using index
table type possible_keys key key_len ref rows Extra
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
t1 ALL NULL NULL NULL NULL 4
Field Type Null Key Default Extra
testint int(11) 1
mysql-test/t/innodb.test
View file @
70e053fb
...
@@ -529,3 +529,11 @@ explain select a,b from t1 order by b;
...
@@ -529,3 +529,11 @@ explain select a,b from t1 order by b;
explain
select
a
,
b
from
t1
;
explain
select
a
,
b
from
t1
;
explain
select
a
,
b
,
c
from
t1
;
explain
select
a
,
b
,
c
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Check describe
#
create
table
t1
(
testint
int
not
null
default
1
)
type
=
innodb
;
desc
t1
;
drop
table
t1
;
sql/table.cc
View file @
70e053fb
...
@@ -120,10 +120,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -120,10 +120,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
outparam
->
db_record_offset
=
1
;
outparam
->
db_record_offset
=
1
;
if
(
db_create_options
&
HA_OPTION_LONG_BLOB_PTR
)
if
(
db_create_options
&
HA_OPTION_LONG_BLOB_PTR
)
outparam
->
blob_ptr_size
=
portable_sizeof_char_ptr
;
outparam
->
blob_ptr_size
=
portable_sizeof_char_ptr
;
outparam
->
db_low_byte_first
=
test
(
outparam
->
db_type
==
DB_TYPE_MYISAM
||
/* Set temporaryly a good value for db_low_byte_first */
outparam
->
db_type
==
DB_TYPE_BERKELEY_DB
||
outparam
->
db_low_byte_first
=
test
(
outparam
->
db_type
!=
DB_TYPE_ISAM
);
outparam
->
db_type
==
DB_TYPE_HEAP
);
error
=
4
;
error
=
4
;
outparam
->
max_rows
=
uint4korr
(
head
+
18
);
outparam
->
max_rows
=
uint4korr
(
head
+
18
);
outparam
->
min_rows
=
uint4korr
(
head
+
22
);
outparam
->
min_rows
=
uint4korr
(
head
+
22
);
...
...
sql/unireg.cc
View file @
70e053fb
...
@@ -515,16 +515,23 @@ static bool make_empty_rec(File file,enum db_type table_type,
...
@@ -515,16 +515,23 @@ static bool make_empty_rec(File file,enum db_type table_type,
uchar
*
buff
,
*
null_pos
;
uchar
*
buff
,
*
null_pos
;
TABLE
table
;
TABLE
table
;
create_field
*
field
;
create_field
*
field
;
handler
*
handler
;
DBUG_ENTER
(
"make_empty_rec"
);
DBUG_ENTER
(
"make_empty_rec"
);
/* We need a table to generate columns for default values */
/* We need a table to generate columns for default values */
bzero
((
char
*
)
&
table
,
sizeof
(
table
));
bzero
((
char
*
)
&
table
,
sizeof
(
table
));
table
.
db_low_byte_first
=
test
(
table_type
==
DB_TYPE_MYISAM
||
handler
=
get_new_handler
((
TABLE
*
)
0
,
table_type
);
table_type
==
DB_TYPE_HEAP
);
table
.
blob_ptr_size
=
portable_sizeof_char_ptr
;
if
(
!
(
buff
=
(
uchar
*
)
my_malloc
((
uint
)
reclength
,
MYF
(
MY_WME
|
MY_ZEROFILL
))))
if
(
!
handler
||
!
(
buff
=
(
uchar
*
)
my_malloc
((
uint
)
reclength
,
MYF
(
MY_WME
|
MY_ZEROFILL
))))
{
delete
handler
;
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
table
.
db_low_byte_first
=
handler
->
low_byte_first
();
table
.
blob_ptr_size
=
portable_sizeof_char_ptr
;
firstpos
=
reclength
;
firstpos
=
reclength
;
null_count
=
0
;
null_count
=
0
;
if
(
!
(
table_options
&
HA_OPTION_PACK_RECORD
))
if
(
!
(
table_options
&
HA_OPTION_PACK_RECORD
))
...
@@ -574,8 +581,11 @@ static bool make_empty_rec(File file,enum db_type table_type,
...
@@ -574,8 +581,11 @@ static bool make_empty_rec(File file,enum db_type table_type,
regfield
->
reset
();
regfield
->
reset
();
delete
regfield
;
delete
regfield
;
}
}
bfill
((
byte
*
)
buff
+
null_length
,
firstpos
-
null_length
,
255
);
/* Fill not used startpos */
/* Fill not used startpos */
bfill
((
byte
*
)
buff
+
null_length
,
firstpos
-
null_length
,
255
);
error
=
(
int
)
my_write
(
file
,(
byte
*
)
buff
,(
uint
)
reclength
,
MYF_RW
);
error
=
(
int
)
my_write
(
file
,(
byte
*
)
buff
,(
uint
)
reclength
,
MYF_RW
);
my_free
((
gptr
)
buff
,
MYF
(
MY_FAE
));
my_free
((
gptr
)
buff
,
MYF
(
MY_FAE
));
delete
handler
;
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
/* make_empty_rec */
}
/* make_empty_rec */
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