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
13fdfea0
Commit
13fdfea0
authored
Jun 23, 2006
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-kt
into mysql.com:/usr/home/bar/mysql-5.0-kt.b20392
parents
8de02df8
75351dc0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
mysql-test/r/variables.result
mysql-test/r/variables.result
+22
-0
mysql-test/t/variables.test
mysql-test/t/variables.test
+16
-0
sql/set_var.cc
sql/set_var.cc
+1
-1
No files found.
mysql-test/r/variables.result
View file @
13fdfea0
...
...
@@ -421,6 +421,28 @@ set tmp_table_size=100;
set tx_isolation="READ-COMMITTED";
set wait_timeout=100;
set log_warnings=1;
select @@session.insert_id;
@@session.insert_id
1
set @save_insert_id=@@session.insert_id;
set session insert_id=20;
select @@session.insert_id;
@@session.insert_id
20
set session last_insert_id=100;
select @@session.insert_id;
@@session.insert_id
20
select @@session.last_insert_id;
@@session.last_insert_id
100
select @@session.insert_id;
@@session.insert_id
20
set @@session.insert_id=@save_insert_id;
select @@session.insert_id;
@@session.insert_id
1
create table t1 (a int not null auto_increment, primary key(a));
create table t2 (a int not null auto_increment, primary key(a));
insert into t1 values(null),(null),(null);
...
...
mysql-test/t/variables.test
View file @
13fdfea0
...
...
@@ -301,6 +301,22 @@ set tx_isolation="READ-COMMITTED";
set
wait_timeout
=
100
;
set
log_warnings
=
1
;
#
# Bugs: #20392: INSERT_ID session variable has weird value
#
select
@@
session
.
insert_id
;
set
@
save_insert_id
=@@
session
.
insert_id
;
set
session
insert_id
=
20
;
select
@@
session
.
insert_id
;
set
session
last_insert_id
=
100
;
select
@@
session
.
insert_id
;
select
@@
session
.
last_insert_id
;
select
@@
session
.
insert_id
;
set
@@
session
.
insert_id
=@
save_insert_id
;
select
@@
session
.
insert_id
;
#
# key buffer
#
...
...
sql/set_var.cc
View file @
13fdfea0
...
...
@@ -2578,7 +2578,7 @@ bool sys_var_insert_id::update(THD *thd, set_var *var)
byte
*
sys_var_insert_id
::
value_ptr
(
THD
*
thd
,
enum_var_type
type
,
LEX_STRING
*
base
)
{
return
(
byte
*
)
&
thd
->
curren
t_insert_id
;
return
(
byte
*
)
&
thd
->
nex
t_insert_id
;
}
...
...
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