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
a1c63bcc
Commit
a1c63bcc
authored
Oct 07, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/space/my/mysql-4.1
into mysql.com:/space/my/mysql-4.1-build
parents
137e8f57
5cee9edc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
39 deletions
+56
-39
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+2
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+2
-0
sql/ha_innodb.cc
sql/ha_innodb.cc
+49
-39
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+3
-0
No files found.
mysql-test/r/ndb_alter_table.result
View file @
a1c63bcc
...
@@ -116,7 +116,9 @@ select * from t1 order by a;
...
@@ -116,7 +116,9 @@ select * from t1 order by a;
a b
a b
0 1
0 1
17 18
17 18
SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
alter table t1 modify column a int not null auto_increment;
alter table t1 modify column a int not null auto_increment;
SET SQL_MODE='';
select * from t1 order by a;
select * from t1 order by a;
a b
a b
0 1
0 1
...
...
mysql-test/t/ndb_alter_table.test
View file @
a1c63bcc
...
@@ -95,7 +95,9 @@ CREATE TABLE t1 (
...
@@ -95,7 +95,9 @@ CREATE TABLE t1 (
INSERT
INTO
t1
VALUES
(
0
,
1
),(
17
,
18
);
INSERT
INTO
t1
VALUES
(
0
,
1
),(
17
,
18
);
select
*
from
t1
order
by
a
;
select
*
from
t1
order
by
a
;
SET
SQL_MODE
=
NO_AUTO_VALUE_ON_ZERO
;
alter
table
t1
modify
column
a
int
not
null
auto_increment
;
alter
table
t1
modify
column
a
int
not
null
auto_increment
;
SET
SQL_MODE
=
''
;
select
*
from
t1
order
by
a
;
select
*
from
t1
order
by
a
;
INSERT
INTO
t1
VALUES
(
0
,
19
),(
20
,
21
);
INSERT
INTO
t1
VALUES
(
0
,
19
),(
20
,
21
);
select
*
from
t1
order
by
a
;
select
*
from
t1
order
by
a
;
...
...
sql/ha_innodb.cc
View file @
a1c63bcc
...
@@ -20,10 +20,6 @@ NOTE: You can only use noninlined InnoDB functions in this file, because we
...
@@ -20,10 +20,6 @@ NOTE: You can only use noninlined InnoDB functions in this file, because we
have disables the InnoDB inlining in this file. */
have disables the InnoDB inlining in this file. */
/* TODO list for the InnoDB handler in 4.1:
/* TODO list for the InnoDB handler in 4.1:
- Check if the query_id is now right also in prepared and executed stats
in build_template()
- Add multi-language char set support to CREATE TABLE and the comparison
of strings
- Find out what kind of problems the OS X case-insensitivity causes to
- Find out what kind of problems the OS X case-insensitivity causes to
table and database names; should we 'normalize' the names like we do
table and database names; should we 'normalize' the names like we do
in Windows?
in Windows?
...
@@ -2130,11 +2126,6 @@ build_template(
...
@@ -2130,11 +2126,6 @@ build_template(
templ
=
prebuilt
->
mysql_template
+
n_requested_fields
;
templ
=
prebuilt
->
mysql_template
+
n_requested_fields
;
field
=
table
->
field
[
i
];
field
=
table
->
field
[
i
];
/* TODO: Check if the query_id is now right also in prepared
and executed SQL statements. Previously, MySQL-4.1 failed to
update field->query_id so that the formula
thd->query_id == field->query_id did not work. */
if
(
templ_type
==
ROW_MYSQL_REC_FIELDS
if
(
templ_type
==
ROW_MYSQL_REC_FIELDS
&&
!
(
fetch_all_in_key
&&
!
(
fetch_all_in_key
&&
dict_index_contains_col_or_prefix
(
index
,
i
))
&&
dict_index_contains_col_or_prefix
(
index
,
i
))
...
@@ -4728,17 +4719,35 @@ ha_innobase::start_stmt(
...
@@ -4728,17 +4719,35 @@ ha_innobase::start_stmt(
prebuilt
->
select_lock_type
=
LOCK_X
;
prebuilt
->
select_lock_type
=
LOCK_X
;
}
else
{
}
else
{
if
(
thd
->
lex
->
sql_command
==
SQLCOM_SELECT
if
(
trx
->
isolation_level
!=
TRX_ISO_SERIALIZABLE
&&
thd
->
lex
->
sql_command
==
SQLCOM_SELECT
&&
thd
->
lex
->
lock_option
==
TL_READ
)
{
&&
thd
->
lex
->
lock_option
==
TL_READ
)
{
/* For other than temporary tables, we obtain
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT)
*/
no lock for consistent read (plain SELECT).
*/
prebuilt
->
select_lock_type
=
LOCK_NONE
;
prebuilt
->
select_lock_type
=
LOCK_NONE
;
}
else
{
}
else
{
/* Not a consistent read: use LOCK_X as the
/* Not a consistent read: restore the
select_lock_type value (TODO: how could we know
select_lock_type value. The value of
whether it should be LOCK_S, LOCK_X, or LOCK_NONE?) */
stored_select_lock_type was decided in:
1) ::store_lock(),
2) ::external_lock(), and
3) ::init_table_handle_for_HANDLER(). */
prebuilt
->
select_lock_type
=
prebuilt
->
stored_select_lock_type
;
}
if
(
prebuilt
->
stored_select_lock_type
!=
LOCK_S
&&
prebuilt
->
stored_select_lock_type
!=
LOCK_X
)
{
fprintf
(
stderr
,
"InnoDB: Error: stored_select_lock_type is %lu inside ::start_stmt()!
\n
"
,
prebuilt
->
stored_select_lock_type
);
/* Set the value to LOCK_X: this is just fault
tolerance, we do not know what the correct value
should be! */
prebuilt
->
select_lock_type
=
LOCK_X
;
prebuilt
->
select_lock_type
=
LOCK_X
;
}
}
...
@@ -5258,14 +5267,14 @@ ha_innobase::get_auto_increment()
...
@@ -5258,14 +5267,14 @@ ha_innobase::get_auto_increment()
}
}
/***********************************************************************
/***********************************************************************
This function stores
binlog offset and flushes logs
*/
This function stores
the binlog offset and flushes logs.
*/
void
void
innobase_store_binlog_offset_and_flush_log
(
innobase_store_binlog_offset_and_flush_log
(
/*=============================*/
/*=============================
==========
*/
char
*
binlog_name
,
/* in: binlog name */
char
*
binlog_name
,
/* in: binlog name */
longlong
offset
/* in: binlog offset */
longlong
offset
)
/* in: binlog offset */
)
{
{
mtr_t
mtr
;
mtr_t
mtr
;
assert
(
binlog_name
!=
NULL
);
assert
(
binlog_name
!=
NULL
);
...
@@ -5288,18 +5297,19 @@ innobase_store_binlog_offset_and_flush_log(
...
@@ -5288,18 +5297,19 @@ innobase_store_binlog_offset_and_flush_log(
log_buffer_flush_to_disk
();
log_buffer_flush_to_disk
();
}
}
char
*
ha_innobase
::
get_mysql_bin_log_name
()
char
*
ha_innobase
::
get_mysql_bin_log_name
()
{
{
return
trx_sys_mysql_bin_log_name
;
return
(
trx_sys_mysql_bin_log_name
)
;
}
}
ulonglong
ha_innobase
::
get_mysql_bin_log_pos
()
ulonglong
ha_innobase
::
get_mysql_bin_log_pos
()
{
{
/*
/* trx... is ib_longlong, which is a typedef for a 64-bit integer
trx... is ib_longlong, which is a typedef for a 64-bit integer (__int64 or
(__int64 or longlong) so it's ok to cast it to ulonglong. */
longlong) so it's ok to cast it to ulonglong.
*/
return
(
trx_sys_mysql_bin_log_pos
);
return
trx_sys_mysql_bin_log_pos
;
}
}
extern
"C"
{
extern
"C"
{
...
...
sql/ha_ndbcluster.cc
View file @
a1c63bcc
...
@@ -2170,6 +2170,9 @@ int ha_ndbcluster::index_read(byte *buf,
...
@@ -2170,6 +2170,9 @@ int ha_ndbcluster::index_read(byte *buf,
break
;
break
;
}
}
if
(
m_active_cursor
)
close_scan
();
key_range
start_key
;
key_range
start_key
;
start_key
.
key
=
key
;
start_key
.
key
=
key
;
start_key
.
length
=
key_len
;
start_key
.
length
=
key_len
;
...
...
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