mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge
BitKeeper/etc/logging_ok: auto-union myisam/mi_check.c: Auto merged mysql-test/r/create.result: Auto merged mysql-test/r/innodb_handler.result: Auto merged mysql-test/r/ps_7ndb.result: Auto merged mysql-test/t/create.test: Auto merged sql/set_var.cc: Auto merged mysql-test/r/sql_mode.result: SCCS merged mysql-test/t/sql_mode.test: SCCS merged sql/sql_acl.cc: SCCS merged sql/sql_handler.cc: SCCS merged sql/sql_table.cc: SCCS merged
This commit is contained in:
32
mysql-test/r/analyze.result
Normal file
32
mysql-test/r/analyze.result
Normal file
@ -0,0 +1,32 @@
|
||||
create table t1 (a bigint);
|
||||
lock tables t1 write;
|
||||
insert into t1 values(0);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
unlock tables;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
create table t1 (a bigint);
|
||||
insert into t1 values(0);
|
||||
lock tables t1 write;
|
||||
delete from t1;
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
unlock tables;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
create table t1 (a bigint);
|
||||
insert into t1 values(0);
|
||||
analyze table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
@ -596,3 +596,9 @@ ERROR 42000: Incorrect database name 'xyz'
|
||||
create table t1(t1.name int);
|
||||
create table t2(test.t2.name int);
|
||||
drop table t1,t2;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
drop database mysqltest;
|
||||
create table test.t1 like x;
|
||||
ERROR 42000: Incorrect database name 'NULL'
|
||||
drop table if exists test.t1;
|
||||
|
@ -132,6 +132,22 @@ a b
|
||||
handler t2 read last;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
||||
handler t2 close;
|
||||
handler t1 open;
|
||||
handler t1 read a next;
|
||||
a b
|
||||
14 aaa
|
||||
handler t1 read a next;
|
||||
a b
|
||||
15 bbb
|
||||
handler t1 close;
|
||||
handler t1 open;
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
22 iii
|
||||
handler t1 read a prev;
|
||||
a b
|
||||
21 hhh
|
||||
handler t1 close;
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
a b
|
||||
|
@ -138,6 +138,8 @@ t1 CREATE TABLE `t1` (
|
||||
`min_num` decimal(7,6) default '0.000001'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1 ;
|
||||
set @@SQL_MODE=NULL;
|
||||
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='';
|
||||
show local variables like 'SQL_MODE';
|
||||
Variable_name Value
|
||||
|
39
mysql-test/t/analyze.test
Normal file
39
mysql-test/t/analyze.test
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Bug #10901 Analyze Table on new table destroys table
|
||||
# This is minimal test case to get error
|
||||
# The problem was that analyze table wrote the shared state to the file and this
|
||||
# didn't include the inserts while locked. A check was needed to ensure that
|
||||
# state information was not updated when executing analyze table for a locked table.
|
||||
# The analyze table had to be within locks and check table had to be after unlocking
|
||||
# since then it brings the wrong state from disk rather than from the currently
|
||||
# correct internal state. The insert is needed since it changes the file state,
|
||||
# number of records.
|
||||
# The fix is to synchronise the state of the shared state and the current state before
|
||||
# calling mi_state_info_write
|
||||
#
|
||||
create table t1 (a bigint);
|
||||
lock tables t1 write;
|
||||
insert into t1 values(0);
|
||||
analyze table t1;
|
||||
unlock tables;
|
||||
check table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bigint);
|
||||
insert into t1 values(0);
|
||||
lock tables t1 write;
|
||||
delete from t1;
|
||||
analyze table t1;
|
||||
unlock tables;
|
||||
check table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a bigint);
|
||||
insert into t1 values(0);
|
||||
analyze table t1;
|
||||
check table t1;
|
||||
|
||||
drop table t1;
|
||||
|
@ -503,3 +503,14 @@ create table t1(t1.name int);
|
||||
create table t2(test.t2.name int);
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug#11028: Crash on create table like
|
||||
#
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
drop database mysqltest;
|
||||
--error 1102
|
||||
create table test.t1 like x;
|
||||
--disable_warnings
|
||||
drop table if exists test.t1;
|
||||
--enable_warnings
|
||||
|
@ -69,6 +69,16 @@ handler t2 read next;
|
||||
handler t2 read last;
|
||||
handler t2 close;
|
||||
|
||||
handler t1 open;
|
||||
handler t1 read a next; # this used to crash as a bug#5373
|
||||
handler t1 read a next;
|
||||
handler t1 close;
|
||||
|
||||
handler t1 open;
|
||||
handler t1 read a prev; # this used to crash as a bug#5373
|
||||
handler t1 read a prev;
|
||||
handler t1 close;
|
||||
|
||||
handler t1 open as t2;
|
||||
handler t2 read first;
|
||||
alter table t1 engine=innodb;
|
||||
|
@ -80,6 +80,11 @@ create table t1 ( min_num dec(6,6) default .000001);
|
||||
show create table t1;
|
||||
drop table t1 ;
|
||||
|
||||
#
|
||||
# Bug #10732: Set SQL_MODE to NULL gives garbled error message
|
||||
#
|
||||
--error 1231
|
||||
set @@SQL_MODE=NULL;
|
||||
|
||||
#
|
||||
# test for
|
||||
|
Reference in New Issue
Block a user