1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

merge with 5.3

sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
This commit is contained in:
Sergei Golubchik
2011-10-19 21:45:18 +02:00
1705 changed files with 166414 additions and 39720 deletions

View File

@ -1,37 +1,43 @@
SET @session_start_value = @@session.timestamp;
'#--------------------FN_DYNVARS_001_01------------------------#'
SET @@timestamp = DEFAULT;
SELECT @@timestamp = UNIX_TIMESTAMP();
@@timestamp = UNIX_TIMESTAMP()
1
SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
floor(@@timestamp) = UNIX_TIMESTAMP() @@timestamp = UNIX_TIMESTAMP(NOW(6))
1 1
'#---------------------FN_DYNVARS_001_02-------------------------#'
SET @@global.timestamp = "1000";
ERROR HY000: Variable 'timestamp' is a SESSION variable and can't be used with SET GLOBAL
'#--------------------FN_DYNVARS_001_03------------------------#'
SET @@timestamp = 0;
SELECT @@timestamp = UNIX_TIMESTAMP();
@@timestamp = UNIX_TIMESTAMP()
1
SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
floor(@@timestamp) = UNIX_TIMESTAMP() @@timestamp = UNIX_TIMESTAMP(NOW(6))
1 1
'Setting 0 resets timestamp to session default timestamp'
SET @@timestamp = -1000000000;
Warnings:
Warning 1292 Truncated incorrect timestamp value: '-1000000000'
SELECT @@timestamp = UNIX_TIMESTAMP();
@@timestamp = UNIX_TIMESTAMP()
1
SELECT floor(@@timestamp) = UNIX_TIMESTAMP(), @@timestamp = UNIX_TIMESTAMP(NOW(6));
floor(@@timestamp) = UNIX_TIMESTAMP() @@timestamp = UNIX_TIMESTAMP(NOW(6))
1 1
SET @temp_ts = @@timestamp - @@timestamp;
SELECT @temp_ts;
@temp_ts
0
SET @@timestamp = 1.1;
SELECT @@timestamp;
@@timestamp
1.100000
SET @@timestamp = 9999999999999999999999;
Warnings:
Warning 1292 Truncated incorrect timestamp value: '1e22'
SELECT @@timestamp;
@@timestamp
2147483647.000000
'#--------------------FN_DYNVARS_001_04-------------------------#'
SET @@timestamp = "100";
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = " ";
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = 1.1;
ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = 9999999999999999999999;
ERROR 42000: Incorrect argument type to variable 'timestamp'
'#----------------------FN_DYNVARS_001_06------------------------#'
'#---------------------FN_DYNVARS_001_08-------------------------#'
SET @@timestamp = OFF;
@ -41,7 +47,7 @@ ERROR 42000: Incorrect argument type to variable 'timestamp'
SET @@timestamp = TRUE;
SELECT @@timestamp;
@@timestamp
1
1.000000
SET @@timestamp = FALSE;
'#---------------------FN_DYNVARS_001_10----------------------#'
SET @@timestamp = 123456;
@ -56,7 +62,7 @@ SELECT @@timestamp = @@local.timestamp and @@timestamp = @@session.timestamp;
SET timestamp = 1;
SELECT @@timestamp;
@@timestamp
1
1.000000
SELECT local.timestamp;
ERROR 42S02: Unknown table 'local' in field list
SELECT session.timestamp;