| 1 |
|
| 2 |
# |
| 3 |
# exists as a session only |
| 4 |
# |
| 5 |
# 2010-01-20 OBN - Added check for variable value matching I_S tables |
| 6 |
# |
| 7 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 8 |
select @@global.last_insert_id; |
| 9 |
select @@session.last_insert_id; |
| 10 |
show global variables like 'last_insert_id'; |
| 11 |
show session variables like 'last_insert_id'; |
| 12 |
select * from information_schema.global_variables where variable_name='last_insert_id'; |
| 13 |
select * from information_schema.session_variables where variable_name='last_insert_id'; |
| 14 |
|
| 15 |
# |
| 16 |
# show that it's writable |
| 17 |
# |
| 18 |
--error ER_LOCAL_VARIABLE |
| 19 |
set global last_insert_id=99; |
| 20 |
set session last_insert_id=42; |
| 21 |
--error ER_INCORRECT_GLOBAL_LOCAL_VAR |
| 22 |
select @@global.last_insert_id; |
| 23 |
select @@session.last_insert_id; |
| 24 |
show global variables like 'last_insert_id'; |
| 25 |
show session variables like 'last_insert_id'; |
| 26 |
select * from information_schema.global_variables where variable_name='last_insert_id'; |
| 27 |
select * from information_schema.session_variables where variable_name='last_insert_id'; |
| 28 |
|
| 29 |
# |
| 30 |
# incorrect types |
| 31 |
# |
| 32 |
--error ER_WRONG_TYPE_FOR_VAR |
| 33 |
set session last_insert_id=1.1; |
| 34 |
--error ER_WRONG_TYPE_FOR_VAR |
| 35 |
set session last_insert_id=1e1; |
| 36 |
--error ER_WRONG_TYPE_FOR_VAR |
| 37 |
set session last_insert_id="foo"; |
| 38 |
|