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
333fbf62
Commit
333fbf62
authored
Mar 16, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
parents
bf79f362
36c35836
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
+17
-14
heap/hp_create.c
heap/hp_create.c
+1
-2
include/heap.h
include/heap.h
+2
-0
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+3
-3
sql/ha_heap.cc
sql/ha_heap.cc
+11
-9
No files found.
heap/hp_create.c
View file @
333fbf62
...
...
@@ -137,8 +137,6 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
keyinfo
->
write_key
=
hp_write_key
;
keyinfo
->
hash_buckets
=
0
;
}
if
((
keyinfo
->
flag
&
HA_AUTO_KEY
)
&&
create_info
->
with_auto_increment
)
share
->
auto_key
=
i
+
1
;
}
share
->
min_records
=
min_records
;
share
->
max_records
=
max_records
;
...
...
@@ -149,6 +147,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
share
->
keys
=
keys
;
share
->
max_key_length
=
max_length
;
share
->
changed
=
0
;
share
->
auto_key
=
create_info
->
auto_key
;
share
->
auto_key_type
=
create_info
->
auto_key_type
;
share
->
auto_increment
=
create_info
->
auto_increment
;
/* Must be allocated separately for rename to work */
...
...
include/heap.h
View file @
333fbf62
...
...
@@ -181,8 +181,10 @@ typedef struct st_heap_info
LIST
open_list
;
}
HP_INFO
;
typedef
struct
st_heap_create_info
{
uint
auto_key
;
/* keynr [1 - maxkey] for auto key */
uint
auto_key_type
;
ulong
max_table_size
;
ulonglong
auto_increment
;
...
...
mysql-test/mysql-test-run.sh
View file @
333fbf62
...
...
@@ -426,10 +426,10 @@ while test $# -gt 0; do
TMP
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--valgrind-options=;;"
`
VALGRIND
=
"
$VALGRIND
$TMP
"
;;
--skip-ndbcluster
)
--skip-ndbcluster
|
--skip-ndb
)
USE_NDBCLUSTER
=
""
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
$1
"
EXTRA_SLAVE_MYSQLD_OPT
=
"
$EXTRA_SLAVE_MYSQLD_OPT
$1
"
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
--skip-ndbcluster
"
EXTRA_SLAVE_MYSQLD_OPT
=
"
$EXTRA_SLAVE_MYSQLD_OPT
--skip-ndbcluster
"
;;
--skip-
*
)
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
$1
"
...
...
sql/ha_heap.cc
View file @
333fbf62
...
...
@@ -446,7 +446,6 @@ int ha_heap::create(const char *name, TABLE *table_arg,
HA_KEYSEG
*
seg
;
char
buff
[
FN_REFLEN
];
int
error
;
bool
found_real_auto_increment
=
0
;
for
(
key
=
parts
=
0
;
key
<
table_arg
->
keys
;
key
++
)
parts
+=
table_arg
->
key_info
[
key
].
key_parts
;
...
...
@@ -507,20 +506,23 @@ int ha_heap::create(const char *name, TABLE *table_arg,
seg
->
null_bit
=
0
;
seg
->
null_pos
=
0
;
}
// We have to store field->key_type() as seg->type can differ from it
if
(
field
->
flags
&
AUTO_INCREMENT_FLAG
)
if
(
field
->
flags
&
AUTO_INCREMENT_FLAG
&&
table_arg
->
found_next_number_field
&&
key
==
table_arg
->
next_number_index
)
{
/*
Store key number and type for found auto_increment key
We have to store type as seg->type can differ from it
*/
auto_key
=
key
+
1
;
auto_key_type
=
field
->
key_type
();
}
}
}
if
(
table_arg
->
found_next_number_field
)
{
keydef
[
table_arg
->
next_number_index
].
flag
|=
HA_AUTO_KEY
;
found_real_auto_increment
=
table_arg
->
next_number_key_offset
==
0
;
}
mem_per_row
+=
MY_ALIGN
(
table_arg
->
reclength
+
1
,
sizeof
(
char
*
));
HP_CREATE_INFO
hp_create_info
;
hp_create_info
.
auto_key
=
auto_key
;
hp_create_info
.
auto_key_type
=
auto_key_type
;
hp_create_info
.
with_auto_increment
=
found_real_auto_increment
;
hp_create_info
.
auto_increment
=
(
create_info
->
auto_increment_value
?
create_info
->
auto_increment_value
-
1
:
0
);
hp_create_info
.
max_table_size
=
current_thd
->
variables
.
max_heap_table_size
;
...
...
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