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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
443b394f
Commit
443b394f
authored
Sep 22, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b11553
parents
855c1646
fe61a613
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
280 additions
and
4 deletions
+280
-4
mysql-test/r/loaddata.result
mysql-test/r/loaddata.result
+10
-0
mysql-test/r/ndb_alter_table.result
mysql-test/r/ndb_alter_table.result
+116
-0
mysql-test/t/loaddata.test
mysql-test/t/loaddata.test
+27
-0
mysql-test/t/ndb_alter_table.test
mysql-test/t/ndb_alter_table.test
+119
-0
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+4
-4
sql/sql_load.cc
sql/sql_load.cc
+4
-0
No files found.
mysql-test/r/loaddata.result
View file @
443b394f
...
...
@@ -66,3 +66,13 @@ a b
3 row 3
0
drop table t1;
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
create table t1(id integer not null auto_increment primary key);
insert into t1 values(0);
select * from t1;
id
0
select * from t1;
id
0
SET @@SQL_MODE=@OLD_SQL_MODE;
mysql-test/r/ndb_alter_table.result
View file @
443b394f
...
...
@@ -200,3 +200,119 @@ a
drop table t4;
show tables;
Tables_in_test
create table t1 (
ai bigint auto_increment,
c001 int(11) not null,
c002 int(11) not null,
c003 int(11) not null,
c004 int(11) not null,
c005 int(11) not null,
c006 int(11) not null,
c007 int(11) not null,
c008 int(11) not null,
c009 int(11) not null,
c010 int(11) not null,
c011 int(11) not null,
c012 int(11) not null,
c013 int(11) not null,
c014 int(11) not null,
c015 int(11) not null,
c016 int(11) not null,
c017 int(11) not null,
c018 int(11) not null,
c019 int(11) not null,
c020 int(11) not null,
c021 int(11) not null,
c022 int(11) not null,
c023 int(11) not null,
c024 int(11) not null,
c025 int(11) not null,
c026 int(11) not null,
c027 int(11) not null,
c028 int(11) not null,
c029 int(11) not null,
c030 int(11) not null,
c031 int(11) not null,
c032 int(11) not null,
c033 int(11) not null,
c034 int(11) not null,
c035 int(11) not null,
c036 int(11) not null,
c037 int(11) not null,
c038 int(11) not null,
c039 int(11) not null,
c040 int(11) not null,
c041 int(11) not null,
c042 int(11) not null,
c043 int(11) not null,
c044 int(11) not null,
c045 int(11) not null,
c046 int(11) not null,
c047 int(11) not null,
c048 int(11) not null,
c049 int(11) not null,
c050 int(11) not null,
c051 int(11) not null,
c052 int(11) not null,
c053 int(11) not null,
c054 int(11) not null,
c055 int(11) not null,
c056 int(11) not null,
c057 int(11) not null,
c058 int(11) not null,
c059 int(11) not null,
c060 int(11) not null,
c061 int(11) not null,
c062 int(11) not null,
c063 int(11) not null,
c064 int(11) not null,
c065 int(11) not null,
c066 int(11) not null,
c067 int(11) not null,
c068 int(11) not null,
c069 int(11) not null,
c070 int(11) not null,
c071 int(11) not null,
c072 int(11) not null,
c073 int(11) not null,
c074 int(11) not null,
c075 int(11) not null,
c076 int(11) not null,
c077 int(11) not null,
c078 int(11) not null,
c079 int(11) not null,
c080 int(11) not null,
c081 int(11) not null,
c082 int(11) not null,
c083 int(11) not null,
c084 int(11) not null,
c085 int(11) not null,
c086 int(11) not null,
c087 int(11) not null,
c088 int(11) not null,
c089 int(11) not null,
c090 int(11) not null,
c091 int(11) not null,
c092 int(11) not null,
c093 int(11) not null,
c094 int(11) not null,
c095 int(11) not null,
c096 int(11) not null,
c097 int(11) not null,
c098 int(11) not null,
c099 int(11) not null,
c100 int(11) not null,
c101 int(11) not null,
c102 int(11) not null,
c103 int(11) not null,
c104 int(11) not null,
c105 int(11) not null,
c106 int(11) not null,
c107 int(11) not null,
c108 int(11) not null,
c109 int(11) not null,
primary key (ai),
unique key tx1 (c002, c003, c004, c005)) engine=ndb;
create index tx2
on t1 (c010, c011, c012, c013);
drop table t1;
mysql-test/t/loaddata.test
View file @
443b394f
...
...
@@ -31,4 +31,31 @@ load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated
select
*
from
t1
;
drop
table
t1
;
#
# Bug #12053 LOAD DATA INFILE ignores NO_AUTO_VALUE_ON_ZERO setting
#
SET
@
OLD_SQL_MODE
=@@
SQL_MODE
,
@@
SQL_MODE
=
NO_AUTO_VALUE_ON_ZERO
;
create
table
t1
(
id
integer
not
null
auto_increment
primary
key
);
insert
into
t1
values
(
0
);
disable_query_log
;
eval
SELECT
*
INTO
OUTFILE
'$MYSQL_TEST_DIR/var/tmp/t1'
from
t1
;
delete
from
t1
;
eval
load
data
infile
'$MYSQL_TEST_DIR/var/tmp/t1'
into
table
t1
;
enable_query_log
;
select
*
from
t1
;
--
exec
rm
$MYSQL_TEST_DIR
/
var
/
tmp
/
t1
disable_query_log
;
eval
SELECT
*
INTO
OUTFILE
'$MYSQL_TEST_DIR/var/tmp/t1'
FIELDS
TERMINATED
BY
''
OPTIONALLY
ENCLOSED
BY
''
LINES
TERMINATED
BY
'\r\n'
FROM
t1
;
delete
from
t1
;
eval
load
data
infile
'$MYSQL_TEST_DIR/var/tmp/t1'
into
table
t1
FIELDS
TERMINATED
BY
''
OPTIONALLY
ENCLOSED
BY
''
LINES
TERMINATED
BY
'\r\n'
;
enable_query_log
;
select
*
from
t1
;
--
exec
rm
$MYSQL_TEST_DIR
/
var
/
tmp
/
t1
SET
@@
SQL_MODE
=@
OLD_SQL_MODE
;
# End of 4.1 tests
mysql-test/t/ndb_alter_table.test
View file @
443b394f
...
...
@@ -199,4 +199,123 @@ drop table t4;
show
tables
;
connection
server1
;
create
table
t1
(
ai
bigint
auto_increment
,
c001
int
(
11
)
not
null
,
c002
int
(
11
)
not
null
,
c003
int
(
11
)
not
null
,
c004
int
(
11
)
not
null
,
c005
int
(
11
)
not
null
,
c006
int
(
11
)
not
null
,
c007
int
(
11
)
not
null
,
c008
int
(
11
)
not
null
,
c009
int
(
11
)
not
null
,
c010
int
(
11
)
not
null
,
c011
int
(
11
)
not
null
,
c012
int
(
11
)
not
null
,
c013
int
(
11
)
not
null
,
c014
int
(
11
)
not
null
,
c015
int
(
11
)
not
null
,
c016
int
(
11
)
not
null
,
c017
int
(
11
)
not
null
,
c018
int
(
11
)
not
null
,
c019
int
(
11
)
not
null
,
c020
int
(
11
)
not
null
,
c021
int
(
11
)
not
null
,
c022
int
(
11
)
not
null
,
c023
int
(
11
)
not
null
,
c024
int
(
11
)
not
null
,
c025
int
(
11
)
not
null
,
c026
int
(
11
)
not
null
,
c027
int
(
11
)
not
null
,
c028
int
(
11
)
not
null
,
c029
int
(
11
)
not
null
,
c030
int
(
11
)
not
null
,
c031
int
(
11
)
not
null
,
c032
int
(
11
)
not
null
,
c033
int
(
11
)
not
null
,
c034
int
(
11
)
not
null
,
c035
int
(
11
)
not
null
,
c036
int
(
11
)
not
null
,
c037
int
(
11
)
not
null
,
c038
int
(
11
)
not
null
,
c039
int
(
11
)
not
null
,
c040
int
(
11
)
not
null
,
c041
int
(
11
)
not
null
,
c042
int
(
11
)
not
null
,
c043
int
(
11
)
not
null
,
c044
int
(
11
)
not
null
,
c045
int
(
11
)
not
null
,
c046
int
(
11
)
not
null
,
c047
int
(
11
)
not
null
,
c048
int
(
11
)
not
null
,
c049
int
(
11
)
not
null
,
c050
int
(
11
)
not
null
,
c051
int
(
11
)
not
null
,
c052
int
(
11
)
not
null
,
c053
int
(
11
)
not
null
,
c054
int
(
11
)
not
null
,
c055
int
(
11
)
not
null
,
c056
int
(
11
)
not
null
,
c057
int
(
11
)
not
null
,
c058
int
(
11
)
not
null
,
c059
int
(
11
)
not
null
,
c060
int
(
11
)
not
null
,
c061
int
(
11
)
not
null
,
c062
int
(
11
)
not
null
,
c063
int
(
11
)
not
null
,
c064
int
(
11
)
not
null
,
c065
int
(
11
)
not
null
,
c066
int
(
11
)
not
null
,
c067
int
(
11
)
not
null
,
c068
int
(
11
)
not
null
,
c069
int
(
11
)
not
null
,
c070
int
(
11
)
not
null
,
c071
int
(
11
)
not
null
,
c072
int
(
11
)
not
null
,
c073
int
(
11
)
not
null
,
c074
int
(
11
)
not
null
,
c075
int
(
11
)
not
null
,
c076
int
(
11
)
not
null
,
c077
int
(
11
)
not
null
,
c078
int
(
11
)
not
null
,
c079
int
(
11
)
not
null
,
c080
int
(
11
)
not
null
,
c081
int
(
11
)
not
null
,
c082
int
(
11
)
not
null
,
c083
int
(
11
)
not
null
,
c084
int
(
11
)
not
null
,
c085
int
(
11
)
not
null
,
c086
int
(
11
)
not
null
,
c087
int
(
11
)
not
null
,
c088
int
(
11
)
not
null
,
c089
int
(
11
)
not
null
,
c090
int
(
11
)
not
null
,
c091
int
(
11
)
not
null
,
c092
int
(
11
)
not
null
,
c093
int
(
11
)
not
null
,
c094
int
(
11
)
not
null
,
c095
int
(
11
)
not
null
,
c096
int
(
11
)
not
null
,
c097
int
(
11
)
not
null
,
c098
int
(
11
)
not
null
,
c099
int
(
11
)
not
null
,
c100
int
(
11
)
not
null
,
c101
int
(
11
)
not
null
,
c102
int
(
11
)
not
null
,
c103
int
(
11
)
not
null
,
c104
int
(
11
)
not
null
,
c105
int
(
11
)
not
null
,
c106
int
(
11
)
not
null
,
c107
int
(
11
)
not
null
,
c108
int
(
11
)
not
null
,
c109
int
(
11
)
not
null
,
primary
key
(
ai
),
unique
key
tx1
(
c002
,
c003
,
c004
,
c005
))
engine
=
ndb
;
create
index
tx2
on
t1
(
c010
,
c011
,
c012
,
c013
);
drop
table
t1
;
# End of 4.1 tests
ndb/src/kernel/blocks/dbdict/Dbdict.cpp
View file @
443b394f
...
...
@@ -3036,8 +3036,8 @@ Dbdict::alterTable_backup_mutex_locked(Signal* signal,
lreq
->
gci
=
tablePtr
.
p
->
gciTableCreated
;
lreq
->
requestType
=
AlterTabReq
::
AlterTablePrepare
;
sendSignal
(
rg
,
GSN_ALTER_TAB_REQ
,
signal
,
AlterTabReq
::
SignalLength
,
JBB
);
send
Fragmented
Signal
(
rg
,
GSN_ALTER_TAB_REQ
,
signal
,
AlterTabReq
::
SignalLength
,
JBB
);
}
void
Dbdict
::
alterTableRef
(
Signal
*
signal
,
...
...
@@ -3521,8 +3521,8 @@ Dbdict::execALTER_TAB_CONF(Signal * signal){
lreq
->
gci
=
gci
;
lreq
->
requestType
=
AlterTabReq
::
AlterTableCommit
;
sendSignal
(
rg
,
GSN_ALTER_TAB_REQ
,
signal
,
AlterTabReq
::
SignalLength
,
JBB
);
send
Fragmented
Signal
(
rg
,
GSN_ALTER_TAB_REQ
,
signal
,
AlterTabReq
::
SignalLength
,
JBB
);
}
}
else
{
...
...
sql/sql_load.cc
View file @
443b394f
...
...
@@ -429,6 +429,8 @@ read_fixed_length(THD *thd,COPY_INFO &info,TABLE *table,List<Item> &fields,
while
((
sql_field
=
(
Item_field
*
)
it
++
))
{
Field
*
field
=
sql_field
->
field
;
if
(
field
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
TRUE
;
if
(
pos
==
read_info
.
row_end
)
{
thd
->
cuted_fields
++
;
/* Not enough fields */
...
...
@@ -520,6 +522,8 @@ read_sep_field(THD *thd,COPY_INFO &info,TABLE *table,
length
=
(
uint
)
(
read_info
.
row_end
-
pos
);
Field
*
field
=
sql_field
->
field
;
if
(
field
==
table
->
next_number_field
)
table
->
auto_increment_field_not_null
=
TRUE
;
if
(
!
read_info
.
enclosed
&&
(
enclosed_length
&&
length
==
4
&&
!
memcmp
(
pos
,
"NULL"
,
4
))
||
(
length
==
1
&&
read_info
.
found_null
))
...
...
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