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
c973f61a
Commit
c973f61a
authored
Jun 11, 2001
by
monty@tik.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/my/mysql into tik.mysql.fi:/home/my/mysql
parents
c65da53a
1f409baf
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
596 additions
and
65 deletions
+596
-65
.bzrignore
.bzrignore
+1
-0
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+2
-1
Docs/manual.texi
Docs/manual.texi
+544
-50
isam/_dynrec.c
isam/_dynrec.c
+1
-1
myisam/mi_dynrec.c
myisam/mi_dynrec.c
+4
-5
myisam/mi_packrec.c
myisam/mi_packrec.c
+1
-1
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+5
-0
mysql-test/r/variables.result
mysql-test/r/variables.result
+3
-1
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+11
-0
mysql-test/t/variables.test
mysql-test/t/variables.test
+3
-1
mysys/my_pread.c
mysys/my_pread.c
+3
-3
sql-bench/Makefile.am
sql-bench/Makefile.am
+1
-1
sql/item_func.cc
sql/item_func.cc
+1
-1
sql/share/swedish/errmsg.OLD
sql/share/swedish/errmsg.OLD
+3
-0
sql/sql_base.cc
sql/sql_base.cc
+3
-0
sql/sql_insert.cc
sql/sql_insert.cc
+1
-0
sql/sql_table.cc
sql/sql_table.cc
+9
-0
No files found.
.bzrignore
View file @
c973f61a
...
@@ -284,3 +284,4 @@ support-files/mysql.spec
...
@@ -284,3 +284,4 @@ support-files/mysql.spec
tags
tags
tmp/*
tmp/*
sql-bench/gif/*
sql-bench/gif/*
sql-bench/graph-compare-results
BitKeeper/etc/logging_ok
View file @
c973f61a
heikki@donna.mysql.fi
heikki@donna.mysql.fi
jani@janikt.pp.saunalahti.fi
jani@janikt.pp.saunalahti.fi
paul@teton.kitebird.com
monty@tik.mysql.fi
mwagner@evoq.mwagner.org
mwagner@evoq.mwagner.org
paul@teton.kitebird.com
Docs/manual.texi
View file @
c973f61a
This diff is collapsed.
Click to expand it.
isam/_dynrec.c
View file @
c973f61a
...
@@ -954,7 +954,7 @@ static int _nisam_cmp_buffer(File file, const byte *buff, ulong filepos, uint le
...
@@ -954,7 +954,7 @@ static int _nisam_cmp_buffer(File file, const byte *buff, ulong filepos, uint le
{
{
if
(
my_read
(
file
,
temp_buff
,
next_length
,
MYF
(
MY_NABP
)))
if
(
my_read
(
file
,
temp_buff
,
next_length
,
MYF
(
MY_NABP
)))
goto
err
;
goto
err
;
if
(
memcmp
((
byte
*
)
buff
,
temp_buff
,
IO_SIZE
))
if
(
memcmp
((
byte
*
)
buff
,
temp_buff
,
next_length
))
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
buff
+=
next_length
;
buff
+=
next_length
;
length
-=
next_length
;
length
-=
next_length
;
...
...
myisam/mi_dynrec.c
View file @
c973f61a
...
@@ -1221,20 +1221,19 @@ static int _mi_cmp_buffer(File file, const byte *buff, my_off_t filepos,
...
@@ -1221,20 +1221,19 @@ static int _mi_cmp_buffer(File file, const byte *buff, my_off_t filepos,
char
temp_buff
[
IO_SIZE
*
2
];
char
temp_buff
[
IO_SIZE
*
2
];
DBUG_ENTER
(
"_mi_cmp_buffer"
);
DBUG_ENTER
(
"_mi_cmp_buffer"
);
VOID
(
my_seek
(
file
,
filepos
,
MY_SEEK_SET
,
MYF
(
0
)));
next_length
=
IO_SIZE
*
2
-
(
uint
)
(
filepos
&
(
IO_SIZE
-
1
));
next_length
=
IO_SIZE
*
2
-
(
uint
)
(
filepos
&
(
IO_SIZE
-
1
));
while
(
length
>
IO_SIZE
*
2
)
while
(
length
>
IO_SIZE
*
2
)
{
{
if
(
my_read
(
file
,
temp_buff
,
next_length
,
MYF
(
MY_NABP
)))
if
(
my_pread
(
file
,
temp_buff
,
next_length
,
filepos
,
MYF
(
MY_NABP
))
||
memcmp
((
byte
*
)
buff
,
temp_buff
,
next_length
))
goto
err
;
goto
err
;
if
(
memcmp
((
byte
*
)
buff
,
temp_buff
,
IO_SIZE
))
filepos
+=
next_length
;
DBUG_RETURN
(
1
);
buff
+=
next_length
;
buff
+=
next_length
;
length
-=
next_length
;
length
-=
next_length
;
next_length
=
IO_SIZE
*
2
;
next_length
=
IO_SIZE
*
2
;
}
}
if
(
my_
read
(
file
,
temp_buff
,
length
,
MYF
(
MY_NABP
)))
if
(
my_
pread
(
file
,
temp_buff
,
length
,
filepos
,
MYF
(
MY_NABP
)))
goto
err
;
goto
err
;
DBUG_RETURN
(
memcmp
((
byte
*
)
buff
,
temp_buff
,
length
));
DBUG_RETURN
(
memcmp
((
byte
*
)
buff
,
temp_buff
,
length
));
err:
err:
...
...
myisam/mi_packrec.c
View file @
c973f61a
...
@@ -1010,7 +1010,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BLOCK_INFO *info, File file,
...
@@ -1010,7 +1010,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BLOCK_INFO *info, File file,
{
{
ref_length
=
myisam
->
s
->
pack
.
ref_length
;
ref_length
=
myisam
->
s
->
pack
.
ref_length
;
/*
/*
We can't use my_pread() here because mi_r
a
d_pack_record assumes
We can't use my_pread() here because mi_r
ead_rn
d_pack_record assumes
position is ok
position is ok
*/
*/
VOID
(
my_seek
(
file
,
filepos
,
MY_SEEK_SET
,
MYF
(
0
)));
VOID
(
my_seek
(
file
,
filepos
,
MY_SEEK_SET
,
MYF
(
0
)));
...
...
mysql-test/r/alter_table.result
View file @
c973f61a
...
@@ -27,3 +27,8 @@ n
...
@@ -27,3 +27,8 @@ n
12
12
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 optimize status OK
test.t1 optimize status OK
i
1
2
3
4
mysql-test/r/variables.result
View file @
c973f61a
@test @`select` @TEST @not_used
@test @`select` @TEST @not_used
1 2 3 NULL
1 2 3 NULL
@test_int @test_double @test_string @test_string2 @select
@test_int @test_double @test_string @test_string2 @select
10
0.0
0 abcdeghi abcdefghij NULL
10
1e-1
0 abcdeghi abcdefghij NULL
@test_int @test_double @test_string @test_string2
@test_int @test_double @test_string @test_string2
hello hello hello hello
hello hello hello hello
@test_int @test_double @test_string @test_string2
@test_int @test_double @test_string @test_string2
...
@@ -10,3 +10,5 @@ hellohello hellohello hellohello hellohello
...
@@ -10,3 +10,5 @@ hellohello hellohello hellohello hellohello
NULL NULL NULL NULL
NULL NULL NULL NULL
@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3
@t1:=(@t2:=1)+@t3:=4 @t1 @t2 @t3
5 5 1 4
5 5 1 4
@t5
1.23456
mysql-test/t/alter_table.test
View file @
c973f61a
...
@@ -71,3 +71,14 @@ ALTER TABLE t1 ADD Column new_col int not null;
...
@@ -71,3 +71,14 @@ ALTER TABLE t1 ADD Column new_col int not null;
UNLOCK
TABLES
;
UNLOCK
TABLES
;
OPTIMIZE
TABLE
t1
;
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Drop and add an auto_increment column
#
create
table
t1
(
i
int
unsigned
not
null
auto_increment
primary
key
);
insert
into
t1
values
(
null
),(
null
),(
null
),(
null
);
alter
table
t1
drop
i
,
add
i
int
unsigned
not
null
auto_increment
,
drop
primary
key
,
add
primary
key
(
i
);
select
*
from
t1
;
drop
table
t1
;
mysql-test/t/variables.test
View file @
c973f61a
#
#
# test variables
# test variables
#
#
set
@
`test`
=
1
,
@
TEST
=
3
,
@
select
=
2
;
set
@
`test`
=
1
,
@
TEST
=
3
,
@
select
=
2
,
@
t5
=
1.23456
;
select
@
test
,
@
`select`
,
@
TEST
,
@
not_used
;
select
@
test
,
@
`select`
,
@
TEST
,
@
not_used
;
set
@
test_int
=
10
,
@
test_double
=
1
e
-
10
,
@
test_string
=
"abcdeghi"
,
@
test_string2
=
"abcdefghij"
,
@
select
=
NULL
;
set
@
test_int
=
10
,
@
test_double
=
1
e
-
10
,
@
test_string
=
"abcdeghi"
,
@
test_string2
=
"abcdefghij"
,
@
select
=
NULL
;
select
@
test_int
,
@
test_double
,
@
test_string
,
@
test_string2
,
@
select
;
select
@
test_int
,
@
test_double
,
@
test_string
,
@
test_string2
,
@
select
;
...
@@ -12,3 +12,5 @@ select @test_int,@test_double,@test_string,@test_string2;
...
@@ -12,3 +12,5 @@ select @test_int,@test_double,@test_string,@test_string2;
set
@
test_int
=
null
,
@
test_double
=
null
,
@
test_string
=
null
,
@
test_string2
=
null
;
set
@
test_int
=
null
,
@
test_double
=
null
,
@
test_string
=
null
,
@
test_string2
=
null
;
select
@
test_int
,
@
test_double
,
@
test_string
,
@
test_string2
;
select
@
test_int
,
@
test_double
,
@
test_string
,
@
test_string2
;
select
@
t1
:=
(
@
t2
:=
1
)
+@
t3
:=
4
,
@
t1
,
@
t2
,
@
t3
;
select
@
t1
:=
(
@
t2
:=
1
)
+@
t3
:=
4
,
@
t1
,
@
t2
,
@
t3
;
select
@
t5
;
mysys/my_pread.c
View file @
c973f61a
...
@@ -66,11 +66,11 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
...
@@ -66,11 +66,11 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
my_filename
(
Filedes
),
my_errno
);
my_filename
(
Filedes
),
my_errno
);
}
}
if
((
int
)
readbytes
==
-
1
||
(
MyFlags
&
(
MY_FNABP
|
MY_NABP
)))
if
((
int
)
readbytes
==
-
1
||
(
MyFlags
&
(
MY_FNABP
|
MY_NABP
)))
DBUG_RETURN
(
MY_FILE_ERROR
);
/* Return with error */
DBUG_RETURN
(
MY_FILE_ERROR
);
/* Return with error */
}
}
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
DBUG_RETURN
(
0
);
/* Ok vid l{sning
*/
DBUG_RETURN
(
0
);
/* Read went ok; Return 0
*/
DBUG_RETURN
(
readbytes
);
/* purecov: inspected */
DBUG_RETURN
(
readbytes
);
/* purecov: inspected */
}
}
}
/* my_pread */
}
/* my_pread */
...
...
sql-bench/Makefile.am
View file @
c973f61a
...
@@ -23,7 +23,7 @@ bench_SCRIPTS = test-ATIS test-connect test-create test-insert \
...
@@ -23,7 +23,7 @@ bench_SCRIPTS = test-ATIS test-connect test-create test-insert \
test-big-tables test-select test-wisconsin
\
test-big-tables test-select test-wisconsin
\
test-alter-table graph-compare-results
\
test-alter-table graph-compare-results
\
bench-init.pl compare-results run-all-tests
\
bench-init.pl compare-results run-all-tests
\
server-cfg crash-me copy-db
\
server-cfg crash-me copy-db
CLEANFILES
=
$(bench_SCRIPTS)
CLEANFILES
=
$(bench_SCRIPTS)
EXTRA_SCRIPTS
=
test-ATIS.sh test-connect.sh test-create.sh
\
EXTRA_SCRIPTS
=
test-ATIS.sh test-connect.sh test-create.sh
\
test-insert.sh test-big-tables.sh test-select.sh
\
test-insert.sh test-big-tables.sh test-select.sh
\
...
...
sql/item_func.cc
View file @
c973f61a
...
@@ -1758,7 +1758,7 @@ Item_func_get_user_var::val_str(String *str)
...
@@ -1758,7 +1758,7 @@ Item_func_get_user_var::val_str(String *str)
return
NULL
;
return
NULL
;
switch
(
entry
->
type
)
{
switch
(
entry
->
type
)
{
case
REAL_RESULT
:
case
REAL_RESULT
:
str
->
set
(
*
(
double
*
)
entry
->
value
);
str
->
set
(
*
(
double
*
)
entry
->
value
,
decimals
);
break
;
break
;
case
INT_RESULT
:
case
INT_RESULT
:
str
->
set
(
*
(
longlong
*
)
entry
->
value
);
str
->
set
(
*
(
longlong
*
)
entry
->
value
);
...
...
sql/share/swedish/errmsg.OLD
View file @
c973f61a
...
@@ -206,3 +206,6 @@
...
@@ -206,3 +206,6 @@
"Kunde inte starta en tråd för replikering",
"Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
"Du kan endast använda konstant-uttryck med SET",
"Du kan endast använda konstant-uttryck med SET",
"Lock wait timeout exceeded",
"The total number of locks exceeds the lock table size",
"Update locks cannot be acquired during a READ UNCOMMITTED transaction",
sql/sql_base.cc
View file @
c973f61a
...
@@ -389,6 +389,9 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
...
@@ -389,6 +389,9 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
thd
->
in_lock_tables
=
1
;
thd
->
in_lock_tables
=
1
;
result
=
reopen_tables
(
thd
,
1
,
1
);
result
=
reopen_tables
(
thd
,
1
,
1
);
thd
->
in_lock_tables
=
0
;
thd
->
in_lock_tables
=
0
;
/* Set version for table */
for
(
TABLE
*
table
=
thd
->
open_tables
;
table
;
table
=
table
->
next
)
table
->
version
=
refresh_version
;
}
}
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
if
(
if_wait_for_refresh
)
if
(
if_wait_for_refresh
)
...
...
sql/sql_insert.cc
View file @
c973f61a
...
@@ -1362,6 +1362,7 @@ select_create::prepare(List<Item> &values)
...
@@ -1362,6 +1362,7 @@ select_create::prepare(List<Item> &values)
if
(
info
.
handle_duplicates
==
DUP_IGNORE
||
if
(
info
.
handle_duplicates
==
DUP_IGNORE
||
info
.
handle_duplicates
==
DUP_REPLACE
)
info
.
handle_duplicates
==
DUP_REPLACE
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
table
->
file
->
deactivate_non_unique_index
((
ha_rows
)
0
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
...
sql/sql_table.cc
View file @
c973f61a
...
@@ -1233,7 +1233,16 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
...
@@ -1233,7 +1233,16 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
{
if
(
drop
->
type
==
Alter_drop
::
COLUMN
&&
if
(
drop
->
type
==
Alter_drop
::
COLUMN
&&
!
my_strcasecmp
(
field
->
field_name
,
drop
->
name
))
!
my_strcasecmp
(
field
->
field_name
,
drop
->
name
))
{
/* Reset auto_increment value if it was dropped */
if
(
MTYP_TYPENR
(
field
->
unireg_check
)
==
Field
::
NEXT_NUMBER
&&
!
(
create_info
->
used_fields
&
HA_CREATE_USED_AUTO
))
{
create_info
->
auto_increment_value
=
0
;
create_info
->
used_fields
|=
HA_CREATE_USED_AUTO
;
}
break
;
break
;
}
}
}
if
(
drop
)
if
(
drop
)
{
{
...
...
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