| bk commit into 5.0 tree (elliot:1.2048) BUG#13900 |
|
 |
Index ‹ mysql
|
- Previous
- 2
- bk commit - mysqldoc@docsrva tree (mhillyer:1.3650)ChangeSet
1.3650 05/09/29 17:51:40 mhillyer@doomhammer. +1 -0
Still trying to get post-commit to work on Windows.
BitKeeper/triggers/post-commit
1.12 05/09/29 17:51:39 mhillyer@doomhammer. +3 -3
Still trying to get post-commit to work on Windows.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mhillyer
# Host: doomhammer.
# Root: C:/Documents and Settings/Mike Hillyer/Desktop/mysqldoc
--- 1.11/BitKeeper/triggers/post-commit 2005-09-29 16:48:20 -06:00
+++ 1.12/BitKeeper/triggers/post-commit 2005-09-29 17:51:39 -06:00
@@ -52,7 +52,7 @@
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT > temp.mail
- blat temp.mail -server mailsend.mysql.com -u $BK_USER -pw $BK_PASSWORD -to $TO -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
+ blat temp.mail -server shawmail.cg.shawcable.net -to $TO -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
rm temp.mail
fi
@@ -85,7 +85,7 @@
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT > temp.mail
- blat temp.mail -server mailsend.mysql.com -u $BK_USER -pw $BK_PASSWORD -to $INTERNALS -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
+ blat temp.mail -server shawmail.cg.shawcable.net -to $INTERNALS -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
rm temp.mail
fi
@@ -111,7 +111,7 @@
bk changes -v -r+
bk cset -r+ -d
) | head -n $LIMIT > temp.mail
- blat temp.mail -server mailsend.mysql.com -u $BK_USER -pw $BK_PASSWORD -to $DOCS -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
+ blat temp.mail -server shawmail.cg.shawcable.net -to $DOCS -s "bk commit - mysqldoc@docsrva tree ($CHANGESET)" -a1 "List-ID: <bk.mysqldoc>" -f $FROM
rm temp.mail
fi
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 3
- Coverity Scan and MySQLWhy doesn't MySQL participate in the Coverity Scan project? This would
provide static-analysis for free. PostgreSQL and SQLite participate.
http://scan.coverity.com/faq.html
--
Mark Callaghan
email***@***.com
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 3
- bk commit - mysqldoc@docsrva tree (paul:1.3324)Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.3324 05/08/18 18:41:36 email***@***.com +3 -0
Sync.
refman/triggers.xml
1.18 05/08/18 18:41:34 email***@***.com +7 -12
Sync.
refman-5.1/triggers.xml
1.7 05/08/18 18:41:34 email***@***.com +14 -15
Sync.
refman-5.0/triggers.xml
1.6 05/08/18 18:41:34 email***@***.com +7 -12
Sync.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: frost.snake.net
# Root: /Volumes/frost2/MySQL/bk/mysqldoc
--- 1.6/refman-5.1/triggers.xml 2005-08-18 07:00:16 -05:00
+++ 1.7/refman-5.1/triggers.xml 2005-08-18 18:41:34 -05:00
@@ -247,8 +247,10 @@
<literal>SUPER</literal> privilege. It was added in MySQL 5.0.2.
</para>
-<remark role="todo">Should need CREATE TRIGGER privilege, but there is no such
- thing yet.</remark>
+ <remark role="todo">
+ Should need CREATE TRIGGER privilege, but there is no such thing
+ yet.
+ </remark>
</section>
@@ -256,7 +258,9 @@
<title id="title-drop-trigger">&title-drop-trigger;</title>
-<remark>There is no IF EXISTS clause, apparently.</remark>
+ <remark>
+ There is no IF EXISTS clause, apparently.
+ </remark>
<programlisting>
DROP TRIGGER [<replaceable>schema_name</replaceable>.]<replaceable>trigger_name</replaceable>
@@ -454,18 +458,6 @@
<listitem>
<para>
- The trigger cannot refer directly to tables by name, including
- the table with which the trigger is associated. You can,
- however, use the keywords <literal>OLD</literal> and
- <literal>NEW</literal>. <literal>OLD</literal> refers to an
- existing row to be deleted or a row to be updated before the
- update occurs. <literal>NEW</literal> refers to a new row to
- be inserted or an updated row after the update occurs.
- </para>
- </listitem>
-
- <listitem>
- <para>
The trigger cannot invoke stored procedures using the
<literal>CALL</literal> statement. (This means, for example,
that you cannot get around the prohibition on referring to
@@ -479,6 +471,13 @@
The trigger cannot use statements that begin or end a
transaction such as <literal>START TRANSACTION</literal>,
<literal>COMMIT</literal>, or <literal>ROLLBACK</literal>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Before MySQL 5.0.10, triggers may not contain direct
+ references to tables by name.
</para>
</listitem>
--- 1.17/refman/triggers.xml 2005-08-15 21:15:41 -05:00
+++ 1.18/refman/triggers.xml 2005-08-18 18:41:34 -05:00
@@ -454,18 +454,6 @@
<listitem>
<para>
- The trigger cannot refer directly to tables by name, including
- the table with which the trigger is associated. You can,
- however, use the keywords <literal>OLD</literal> and
- <literal>NEW</literal>. <literal>OLD</literal> refers to an
- existing row to be deleted or a row to be updated before the
- update occurs. <literal>NEW</literal> refers to a new row to
- be inserted or an updated row after the update occurs.
- </para>
- </listitem>
-
- <listitem>
- <para>
The trigger cannot invoke stored procedures using the
<literal>CALL</literal> statement. (This means, for example,
that you cannot get around the prohibition on referring to
@@ -479,6 +467,13 @@
The trigger cannot use statements that begin or end a
transaction such as <literal>START TRANSACTION</literal>,
<literal>COMMIT</literal>, or <literal>ROLLBACK</literal>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Before MySQL 5.0.10, triggers may not contain direct
+ references to tables by name.
</para>
</listitem>
--- 1.5/refman-5.0/triggers.xml 2005-08-15 21:15:31 -05:00
+++ 1.6/refman-5.0/triggers.xml 2005-08-18 18:41:34 -05:00
@@ -454,18 +454,6 @@
<listitem>
<para>
- The trigger cannot refer directly to tables by name, including
- the table with which the trigger is associated. You can,
- however, use the keywords <literal>OLD</literal> and
- <literal>NEW</literal>. <literal>OLD</literal> refers to an
- existing row to be deleted or a row to be updated before the
- update occurs. <literal>NEW</literal> refers to a new row to
- be inserted or an updated row after the update occurs.
- </para>
- </listitem>
-
- <listitem>
- <para>
The trigger cannot invoke stored procedures using the
<literal>CALL</literal> statement. (This means, for example,
that you cannot get around the prohibition on referring to
@@ -479,6 +467,13 @@
The trigger cannot use statements that begin or end a
transaction such as <literal>START TRANSACTION</literal>,
<literal>COMMIT</literal>, or <literal>ROLLBACK</literal>.
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ Before MySQL 5.0.10, triggers may not contain direct
+ references to tables by name.
</para>
</listitem>
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 3
- a Linux -csh script to refresh test with productionHello all.
Does anyone out there (in mysql world) have a Linux -csh script to
refresh test with production data.
My developers would like their test database to be refreshed nightly
with production data. The production and test mysql servers do not run
in the same box. They run on different boxes. Therefore there is some
ftp or scp required
Thanks
********************************************
This message is intended only for the use of the Addressee and
may contain information that is PRIVILEGED and CONFIDENTIAL.
If you are not the intended recipient, you are hereby notified
that any dissemination of this communication is strictly prohibited.
If you have received this communication in error, please erase
all copies of the message and its attachments and notify us
immediately.
Thank you.
********************************************
- 3
- Why this query works?I have the MS Access application and MySQL database with ODBC.
This is my query:
TRANSFORM Sum(1) AS Wyr1
SELECT [0 asortyment].[Do faktury], [0 magazyn].kod
FROM [0 magazyn] LEFT JOIN [0 asortyment] ON [0 magazyn].kod = [0
asortyment].kod
WHERE ((([0 magazyn].gdzie) In (SELECT tsf.do FROM tsf WHERE
(((tsf.antyz)="tak")))))
GROUP BY [0 asortyment].[Do faktury], [0 magazyn].kod
ORDER BY [0 asortyment].[Do faktury], [0 magazyn].kod, [0
magazyn].gdzie
PIVOT [0 magazyn].gdzie;
and I don't know why the query works properly using Mysql database
with TRANSFORM .. PIVOT (I can't find TRANSFORM...PIVOT at the MySQL
manual).
any idea?
- 6
- SELECT, GROUP BY & HAVING problem!This is my TABLE
ID_1 ID_2 DAY MONTH
-----------------------------------------------
1 1 MON JAN
2 1 MON JAN
3 2 TUE FEB
4 2 TUE MAR
This is my SELECT STATEMENT
SELECT ID_2, DAY, COUNT(*) AS COUNT FROM `TABLE` GROUP BY `ID_2`,
`DAY` HAVING COUNT > 1
This RETURNS
ID_2 DAY COUNT
----------------------------------
1 MON 2
2 TUE 2
However, what I want to do is only return when there are multiple rows
(more than one) with ID_2 and DAY that match but where the MONTH is
different i.e. RETURN
ID_2 DAY COUNT
-----------------------------------
2 TUE 2
Any ideas?
Thanks in advance
- 7
- using a constant fieldHi Planet!
I have created a table (see test script below)
I have an Id field that will contains numerical values.
For reason behond my control This field has to have a
constant hard coded letter V in front of it.
V4789
V0023
ect...
Is there a way know to man kind to do this and
avoid storing 100 000 letter V for nothing...
And maybe keep a INT type rather than it becoming
VARCHAR or CHAR.
thanks for your help.
CREATE DATABASE JK_PROD;
USE JK_PROD;
CREATE TABLE VOUCHERS (
Id INT(8),
Marketing_Code VARCHAR(15),
Date_Created DATETIME,
Date_Used DATETIME,
Account_Nb VARCHAR(10) NOT NULL,
PRIMARY KEY(Id)
);
CREATE UNIQUE INDEX IDX_VOUCHERS ON VOUCHERS (Id);
INSERT INTO VOUCHERS VALUES
('','mrk code 1','2004-01-01','2004-01-02','AC01');
INSERT INTO VOUCHERS VALUES
('','mrk code 2','2004-01-01','2004-01-02','AC02');
INSERT INTO VOUCHERS VALUES
('','mrk code 3','2004-01-01','2004-01-02','AC03');
- 7
- bk commit into 4.1 tree (serg:1.2274)Below is the list of changes that have just been committed into a local
4.1 repository of serg. When serg does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2274 05/05/18 10:57:07 email***@***.com +2 -0
test fixes
mysql-test/t/range.test
1.27 05/05/18 10:57:00 email***@***.com +0 -2
range.test does not requires innodb
mysql-test/mysql-test-run.sh
1.251 05/05/18 10:56:59 email***@***.com +1 -1
always use --no-defaults
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: serg
# Host: serg.mylan
# Root: /usr/home/serg/Abk/mysql-4.1
--- 1.250/mysql-test/mysql-test-run.sh Sun May 15 06:51:07 2005
+++ 1.251/mysql-test/mysql-test-run.sh Wed May 18 10:56:59 2005
@@ -691,7 +691,7 @@
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
-MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
+MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
export NDB_TOOLS_DIR
--- 1.26/mysql-test/t/range.test Tue May 10 00:43:16 2005
+++ 1.27/mysql-test/t/range.test Wed May 18 10:57:00 2005
@@ -1,5 +1,3 @@
--- source include/have_innodb.inc
-
#
# Problem with range optimizer
#
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 8
- how to prevent inputting quotation mark (')?Hi,
I made a form where visitors can introduce data.
I use this:
strsql="INSERT INTO mytable (field1,field2 ...) values('" & lol & "',#" &
dat & ...)"
My problem is that when someone introduces a quotation mark, i get a error
and the insert fails (e.g. nam'e).
How can i prevent that? Controling each entered character seems me to be a
very big work ...
- 10
- MySQL++ Stored Procedure, Command out of syncI'm trying to use MySQL++ with stored procedures on MySQL 5.0.45-
community, but cannot get it to work properly.
My stored procedure is:
drop procedure if exists getTypes;
delimiter //
create procedure getTypes(IN _ID int(11), IN _password VARCHAR(50),
OUT return_code int)
BEGIN
set return_code := 1; -- for now we will pretend that authentication
was successful
if return_code = 1 then
select TypeID, TypeName from Type;
end if;
END
//
delimiter ;
This works fine when called from the MySQL commandline tool.
My C++ code is not working, giving a command out of sync error. I am
not sure what I'm doing incorrectly:
// Connect to server
const char* db = "dbname", *server = "servername", *user =
"username",
*pass = "password";
mysqlpp::Connection conn(false);
conn.set_option(new mysqlpp::MultiResultsOption(true));
conn.connect(db, server, user, pass);
// Call stored procedure, get sole row set
mysqlpp::Query query = conn.query();
query << "call getTypes('0', 'password', @ret)";
mysqlpp::StoreQueryResult res = query.store();
// Not necessary since there is only one result set,
// but I'm trying everything to make this work
while(query.more_results())
res = query.store_next();
// Get return value placed into @ret
mysqlpp::Query query2 = conn.query("select @ret");
mysqlpp::StoreQueryResult res2;
// This is where the error occurs
if(0 == (res2 = query2.store()))
cout << "err: " << query2.error() << endl;
The error is prints here is:
err: Commands out of sync; you can't run this command now
- 13
- Bigger is Always MUCH Better! - qZLcP<body text="#FFCC00"><center>
<table cellPadding=5 width=500 bgColor=#000033 border=0>
<tbody>
<tr>
<td> <p align=center><b><font face=VERDANA color=white size=4>Are you happy
with the size of your penis?</font></b><br><a
href="http://www.herbal-medical.biz/projectx/vprx.html"><font
face=VERDANA color=white size=2><b>Click here to gain 1 - 3 inches,
GUARANTEED!</b></font></a></p></td></tr></tbody></table>
<table cellPadding=5 width=500 bgColor=#000033 border=0>
<tbody>
<tr>
<td>
<p align=center><font face=VERDANA color=#FF0000 size=4>Is
she?</font><font face=VERDANA color=#4a4a4a size=4><br>
<font face=VERDANA color=black size=2><br></font></font><font
face=VERDANA color=#FF9900 size=2>Give her what she really wants!<font
face=VERDANA color=#4a4a4a size=4><br></font></font><font face=VERDANA
color=#4a4a4a size=4><a
href="http://www.herbal-medical.biz/projectx/vprx.html"><font color="#FFFFFF">A longer,
thicker penis!</font><br>
</a><font face=VERDANA color=black
size=2><br></font></font><b><font face=VERDANA color=#FFCC00 size=3>She
won't complain about your size and she'll never stray from your
bed.</font></b></p>
<p align=center><b><font face=Verdana color=#FF9900 size=3>You'll be
more man than she can handle, and<br>she might even invite her girl
friends over to see it !!</font></b></p>
<p align=center><b><font face=Verdana color=#FF9900 size=3>Our penis
enhancement formula is all natural and<br>comes with a money back
guarantee!</font></b></p>
<p align=center><b><font face=Verdana color=#FF9900 size=3>We
GUARANTEE you will see real results<br>or we will refund your money
back!</font></b></p>
<p align=center><b><font face=VERDANA color=black size=3><a
href="http://www.herbal-medical.biz/projectx/vprx.html"><font color="#FFFFFF">Start
Adding Inches Today!</font><br>
<br></a></font><font face=Verdana
color=#FF9900 size=2>Our penis enhancement is a completely
confidential process<br>and all orders are shipped discreetly and
promptly.</font></b><font face=Verdana color=#808080
size=4><br></font><font face=VERDANA color=#4a4a4a size=4><br><a
href="http://www.herbal-medical.biz/projectx/vprx.html"><font
face=VERDANA color=red size=4>Visit Our Web Site Here To Get
Started!</font></a><br>
<br><font face=VERDANA color=black
size=3><b>And Remember it's confidential and it
works!</b></font></font></p></td></tr></tbody></table></center>
<p><br>
<p align="center"><a href="http://www.herbal-medical.biz/optout.html">re|v|0\/E me pIz</a></p>
- 13
- Fw: ERROR MYSQL------=_NextPart_000_005A_01C3569E.E508B340
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have one Problem :=20
first came the error "ODBC Driver 3.51 not found". Then I installed the =
driver and now only this error msg came:
Not Found
driver information of the ODBC driver...
PLEASE HELP ME=20
THANK YOU
My email is : email***@***.com
------=_NextPart_000_005A_01C3569E.E508B340--
- 13
- Compilation, Linking error for MySQL++ tutorialsDear all,
am new to MySQL++ and also Linux
I now have a problem of g++~ing resetdb.cpp provide in the
/usr/local/mysql++1.7.30/examples/
I have seen various post about it, and try it all, but still
can't get it done.
Here's what I've done
---------------------------------------------------
In file ld.so.conf
/usr/lib/mysql
/usr/local/lib
/usr/local/mysql++-1.7.30/lib
/usr/lib
AND ran "ldconfig"
---------------------------------------------------
in /usr/local/mysql++1.7.30/examples/
I've ran "./make"
---------------------------------------------------
I've tried "g++ resetdb.cpp -lmysqlpp" infinite times, this is
what it returns
-------------------------------------------------------
OUTPUT
[root@localhost examples-gcc]# g++ resetdb.cpp -lmysqlpp
/tmp/ccQjmiyQ.o(.text+0x144): In function `main':
: undefined reference to `connect_to_db(int, char**,
mysqlpp::Connection&, char const*)'
/tmp/ccQjmiyQ.o(.text+0x17c): In function `main':
: undefined reference to `kpcSampleDatabase'
/tmp/ccQjmiyQ.o(.text+0x1e6): In function `main':
: undefined reference to `kpcSampleDatabase'
/tmp/ccQjmiyQ.o(.text+0x30a): In function `main':
: undefined reference to `kpcSampleDatabase'
collect2: ld returned 1 exit status
---------------------------------------------------------
I have saw a post before having the similar problem, that user
re-make mysql++ and it worked,
Well, I sort of did that too, but after "./configure
--with-mysql=/usr/local/mysql-max-4.1.10-pc-linux-gnu-i686",
"make", "make install", but the problem still exist!!!
Please advise!!!
Willy Kwong @HK
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsub=email***@***.com
- 15
- How to call a stored procedure from a stored function with parameter?Hello,
I have the following stored procedure
PROCEDURE `IsProductInForeignDatabase`(IN stock INTEGER(11), OUT MyResult
VARCHAR(1000), IN Behaviour VARCHAR(20))
The procedure above returns the "MyResult" out parameter.
I have a stored function as well thas has the body:
Begin
Declare MyResult VARCHAR(1000);
set MyResult = '';
call `IsProductInForeignDatabase`(1, MyResult,'question');
RETURN 50;
END;
In the code above the "return 50" is only a test: if I use the "call"
statement in the body then the function will return nothing at all, on the
contrary when I don't use the "call" statement, then it returns 50.
The problem should be with the "MyResult" variable, but I don't know what to
do.
I tried with "@" sign, with no difference.
It is interesting that if I call the procedure within an Sql window it works
perfectly like this:
CALL `IsProductInForeignDatabase`(1, @w,'question');
SELECT @w;
If it worked the end of the function would be "return MyResult".
Thank you in advance
Zsolt Csillag
www.egyediszoftverek.hu
www.starsoft.hu
- 16
- bk commit into 4.1 tree (konstantin:1.2076)Below is the list of changes that have just been committed into a local
4.1 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2076 05/03/04 12:39:03 email***@***.com +1 -0
Fix compilation failure in mi_create.c
myisam/mi_create.c
1.40 05/03/04 12:38:55 email***@***.com +1 -1
Fix typo.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: konstantin
# Host: dragonfly.local
# Root: /home/kostja/work/mysql-4.1-root
--- 1.39/myisam/mi_create.c 2005-03-04 01:07:13 +03:00
+++ 1.40/myisam/mi_create.c 2005-03-04 12:38:55 +03:00
@@ -562,7 +562,7 @@
if (share.base.raid_type)
{
(void) fn_format(filename,name,"",MI_NAME_DEXT,2+4);
- if ((dfile=my_raid_create(filename, 0, create_mode
+ if ((dfile=my_raid_create(filename, 0, create_mode,
share.base.raid_type,
share.base.raid_chunks,
share.base.raid_chunksize,
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
| Author |
Message |
Elliot Murphy

|
Posted: 2005-10-18 2:12:00 |
Top |
mysql, bk commit into 5.0 tree (elliot:1.2048) BUG#13900
Below is the list of changes that have just been committed into a local
5.0 repository of emurphy. When emurphy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2048 05/10/17 14:11:37 email***@***.com +3 -0
BUG#13900 DATETIME data changes after inserting a new row in a InnoDB table
Applying patch from Marko.
All tests pass in pentium-debug-max build on Linux.
innobase/row/row0upd.c
1.40 05/10/17 14:11:31 email***@***.com +12 -0
BUG#13900 DATETIME data changes after inserting a new row in a InnoDB table
Applying patch from Marko.
innobase/include/rem0rec.ic
1.26 05/10/17 14:11:31 email***@***.com +16 -0
BUG#13900 DATETIME data changes after inserting a new row in a InnoDB table
Applying patch from Marko.
innobase/include/rem0rec.h
1.18 05/10/17 14:11:31 email***@***.com +9 -0
BUG#13900 DATETIME data changes after inserting a new row in a InnoDB table
Applying patch from Marko.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: elliot
# Host: xan.(none)
# Root: /home/emurphy/src/bk-clean/mysql-5.0
--- 1.17/innobase/include/rem0rec.h 2005-06-22 05:02:22 -04:00
+++ 1.18/innobase/include/rem0rec.h 2005-10-17 14:11:31 -04:00
@@ -312,6 +312,15 @@
const ulint* offsets,/* in: array returned by rec_get_offsets() */
ulint n); /* in: nth field */
/**********************************************************
+Returns nonzero if the SQL NULL bit is set in nth field of rec. */
+UNIV_INLINE
+ulint
+rec_offs_nth_sql_null(
+/*==================*/
+ /* out: nonzero if SQL NULL */
+ const ulint* offsets,/* in: array returned by rec_get_offsets() */
+ ulint n); /* in: nth field */
+/**********************************************************
Gets the physical size of a field. */
UNIV_INLINE
ulint
--- 1.25/innobase/include/rem0rec.ic 2005-06-22 05:02:22 -04:00
+++ 1.26/innobase/include/rem0rec.ic 2005-10-17 14:11:31 -04:00
@@ -955,6 +955,22 @@
}
/**********************************************************
+Returns nonzero if the SQL NULL bit is set in nth field of rec. */
+UNIV_INLINE
+ulint
+rec_offs_nth_sql_null(
+/*==================*/
+ /* out: nonzero if SQL NULL */
+ const ulint* offsets,/* in: array returned by rec_get_offsets() */
+ ulint n) /* in: nth field */
+{
+ ut_ad(rec_offs_validate(NULL, NULL, offsets));
+ ut_ad(n < rec_offs_n_fields(offsets));
+ return(UNIV_UNLIKELY(rec_offs_base(offsets)[1 + n]
+ & REC_OFFS_SQL_NULL));
+}
+
+/**********************************************************
Gets the physical size of a field. */
UNIV_INLINE
ulint
--- 1.39/innobase/row/row0upd.c 2005-08-12 04:29:57 -04:00
+++ 1.40/innobase/row/row0upd.c 2005-10-17 14:11:31 -04:00
@@ -395,6 +395,18 @@
old_len = rec_offs_nth_size(offsets, upd_field->field_no);
+ if (rec_offs_comp(offsets)
+ && rec_offs_nth_sql_null(offsets, upd_field->field_no)) {
+ /* Note that in the compact table format, for a
+ variable length field, an SQL NULL will use zero
+ bytes in the offset array at the start of the physical
+ record, but a zero-length value (empty string) will
+ use one byte! Thus, we cannot use update-in-place
+ if we update an SQL NULL varchar to an empty string! */
+
+ old_len = UNIV_SQL_NULL;
+ }
+
if (old_len != new_len) {
return(TRUE);
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
|
| |
|
| |
 |
| |
 |
Index ‹ mysql |
- Next
- 1
- Can't create interrupt-thread (error 13, errno: 13)While trying to install the 5.0.18 RPM on FC3 (Fedora Core 3) I got this
error:
(SOLUTION BELOW)
warning: MySQL-server-5.0.18-0.glibc23.i386.rpm: V3 DSA signature: NOKEY,
key ID 5072e1f5
Preparing... ###########################################
[100%]
1:MySQL-server ###########################################
[100%]
060125 12:21:03 [ERROR] Can't create interrupt-thread (error 13, errno: 13)
Installation of system tables failed!
Examine the logs in /var/lib/mysql for more information.
You can also try to start the mysqld daemon with:
/usr/sbin/mysqld --skip-grant &
You can use the command line tool
/usr/bin/mysql to connect to the mysql
database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/lib/mysql that may be helpful.
The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running
mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/bin/mysqlbug script!
Starting MySQL...................................[FAILED]
---------------------------------------------------------------------------------------
Solution:
SELinux was blocking... something. To disable I used this:
/usr/sbin/setenforce 0
Then I re-ran the RPM install and it worked fine, to enable SELinux I used
/usr/sbin/setenforce 1
Hopefully this will help the next person with this problem.
-Cory
- 2
- Preserving case on Win32 table namesHi All
Found that when I executed my DDL script on a Win32 installation of MySQL
(v4.0.18) it converted all of my table names to lowercase.
The problem was that after I had filled the newly created DB with content,
backed it up and then restored it into my ISP's unix version of MySQL my web
app couldn't use any of the tables because I was querying them in UCase and
all of the tables were in LCase.
Thinking this was a fault with the MySQL Admin prog, I reported it as a bug,
but then after their support found that it was my Win32 installation that
was causing the LCase issue they wouldn't go into depth on the best method
to make my Win32 installation leave the case alone.
All I have from them is that I should specify the
lower_case_table_names='xx' command, but I don't if I should:
a) Put this command somewhere in my 'my.ini' file. If so, where?
b) What parameter should I specify for 'xx' to ensure that the above will
work OK. A couple of horror stories on the
http://dev.mysql.com/doc/mysql/en/name-case-sensitivity.html page stated
that if you get this wrong you could corrupt various areas of your DB.
Your help would be very much appreciated.
Rgds
Robbie
- 3
- Need a top mysql expert offshore preferably in IndiaWe need a top MYSQL expert in India. This requirement is for a US
client. We can pay a very good rate. The candidate must have advanced
tuning and clustering experience with mysql.
Do email me your resume, what experience you have with mysql and also
your asking rate/salary. This assignment can last 6 months or more.
- 4
- ZEROFILLHi,
What is the practical use of ZEROFILL in your case?
regards,
Khaz
- 5
- bk commit into 4.0 tree (monty:1.2106)Below is the list of changes that have just been committed into a local
4.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2106 05/05/14 17:08:43 email***@***.com +1 -0
Fixed compiler failure
sql/unireg.cc
1.21 05/05/14 17:08:40 email***@***.com +1 -0
Fixed compiler failure
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: hasky.mysql.fi
# Root: /my/mysql-4.0
--- 1.20/sql/unireg.cc 2005-05-13 11:11:48 +03:00
+++ 1.21/sql/unireg.cc 2005-05-14 17:08:40 +03:00
@@ -27,6 +27,7 @@
#define USES_TYPES
#include "mysql_priv.h"
#include <m_ctype.h>
+#include <assert.h>
#define FCOMP 11 /* Byte per packat f{lt */
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 6
- Gouvernment funds available
Press Release
07/06/2008
The American Grants and Loans Book is
now available. This publication contains more
than 1500 financial programs, subsidies,
scholarships, grants and loans offered by the
US federal government.
It also includes over 700 financing programs
available by foundations and associations across
the United States.
Businesses, students, individuals, municipalities,
government departments, institutions, foundations
and associations will find a wealth of information
that will help them with their new ventures or
existing projects.
What you get:
-Description of Grant available
-Url to government website
-Full mailing address
-Phone and fax number
The Canadian Subsidy Directory is also available
for Canada.
CD version: $69.95
Printed version: $149.95
To order please call: 819-322-7533
If you do not wish to receive communication from us
in the future please write "agl" in the subject line
to: email***@***.com
**ADVERTISEMENT**
Canada Books
833 Boise de la Riviere
Prevost, Qc
Canada
J0R 1T0
- 7
- hidden tables?Hi,
I have moved an application and its database from one MySQL instance
to another. The application works fine, however, when I try to run
"show tables" I only see one of the 6 tables in the database. I can
still select, insert, etc. on the "hidden" tables from both the
application and commans line mysql.
Any ideas?
Thanks,
John
- 8
- bk commit into 5.0 tree (joreland:1.1832) BUG#9892Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1832 05/04/18 12:46:35 email***@***.com +1 -0
bug#9892 - ndb index activation
4.1->5.0 merge fix
ndb/test/ndbapi/testIndex.cpp
1.16 05/04/18 12:46:31 email***@***.com +1 -1
bug#9892 - ndb index activation
4.1->5.0 merge fix
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: joreland
# Host: eel.hemma.oreland.se.ndb.mysql.com
# Root: /home/jonas/src/mysql-5.0
--- 1.15/ndb/test/ndbapi/testIndex.cpp Mon Apr 18 12:45:15 2005
+++ 1.16/ndb/test/ndbapi/testIndex.cpp Mon Apr 18 12:46:31 2005
@@ -1323,7 +1323,7 @@
"Test that indexes are correctly maintained during node fail and node restart"){
TC_PROPERTY("OrderedIndex", 1);
TC_PROPERTY("LoggedIndexes", (unsigned)0);
- TC_PROPERTY("PauseThreads", 2);
+ TC_PROPERTY("PauseThreads", 1);
INITIALIZER(runClearTable);
INITIALIZER(createRandomIndex);
INITIALIZER(createPkIndex);
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 9
- Best way to Relational Model a "Score"Right guys, I have a score that can be just ONE of several types
eg.
the score can be a time eg. 01:56.78 (does MYSQL 5.0 now show the
fractional part?)
or a count eg. 56, 31 etc
or a count and a subcategory (just a bit of text) eg. (56, "Variety"),
(31, "No Weapon")
A score can belong to just one category.
A score has one and just one player.
What is the best way to model the score? Ideally I want to be able to
join score, player and category so I can get a flat list of scores for
a player and the category, regardless of how the score is "typed".
My bodge solution is to have a score table thus:
score:
score id
category id
player id
type
time char(8) - type of 'time' in 5.0.16 does not show the fractional part :-/
count
subcategory
Thus for the scores where there is just a time, then type=1 and count
and subcategory are NULL. Where the score is a count and subcategory,
then type=2 and time is NULL.
I want to aim for 3NF and this seems ugly solution, there must be an
elegant way to do this?
Thanks,
Imran Chaudhry
--
http://www.atomdatabase.com
MySQL Database Management & Design Services
- 10
- bk commit into 5.0 tree (ramil:1.1873)Below is the list of changes that have just been committed into a local
5.0 repository of ram. When ram does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1873 05/05/19 18:56:01 email***@***.com +1 -0
a fix (#10742: Can't compile "sql_lex.cc" on AIX 5.2).
sql/gen_lex_hash.cc
1.66 05/05/19 18:55:54 email***@***.com +2 -2
a fix (#10742: Can't compile "sql_lex.cc" on AIX 5.2).
typo fixed.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: ramil
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/mysql-5.0-build
--- 1.65/sql/gen_lex_hash.cc 2005-05-18 21:00:14 +05:00
+++ 1.66/sql/gen_lex_hash.cc 2005-05-19 18:55:54 +05:00
@@ -459,8 +459,8 @@
generate_find_structs();
print_find_structs();
- printf("\static unsigned int sql_functions_max_len=%d;\n",max_len);
- printf("\static unsigned int symbols_max_len=%d;\n\n",max_len2);
+ printf("\nstatic unsigned int sql_functions_max_len=%d;\n", max_len);
+ printf("\nstatic unsigned int symbols_max_len=%d;\n\n", max_len2);
printf("\
static inline SYMBOL *get_hash_symbol(const char *s,\n\
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 11
- make this tablewhat is the mysql statement that will look at two tables and take the info i
need in to the other
my tables look like this
Item (Id int(10) NOT NULL auto_increment, genre, title, price, quantity,
descrb, image, length, numdvd, rating, primary key is Id)
actor ( Id int(10) NOT NULL auto_increment, people_id, character, primary
key is
Id)
director (Id int(10) NOT NULL auto_increment, people_id, primary key is Id)
these represent my items from the text file. I have it to know that $title
means the title in my text file.
$price, $image, $title, $director, $rating, $num_dvds, $length, $genre,
$$aref[0] (actor), $$aref[1] (character), $stock.
in the actor_item table: the actor matches up with what movies he is in
actor_id item_id
1 1
1 2 this shows same actor but different
movie
I want actor_item to look like this (actor_id, item_id)
so how do i populate the actor_item table?
- 12
- bk commit into 5.0 tree (acurtis:1.1856) BUG#9775Below is the list of changes that have just been committed into a local
5.0 repository of acurtis. When acurtis does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1856 05/04/20 18:08:42 email***@***.com +5 -0
Bug#9775 - Stored procedures: crash if create function that returns enum or set
Fix bug and implement return type casting.
sql/sp_head.cc
1.128 05/04/20 18:08:28 email***@***.com +6 -2
Bug#9775
missing initialiation for type_lengths in sp_head::create_typelib()
sql/item_func.h
1.106 05/04/20 18:08:27 email***@***.com +17 -41
Bug#9775
results for Item_func_sp pass through a Field of the return type.
new method Item_func_sp::execute(Field **)
sql/item_func.cc
1.181 05/04/20 18:08:27 email***@***.com +48 -14
Bug#9775
new method Item_func_sp::execute(Field **)
some optimizations.
mysql-test/t/sp.test
1.111 05/04/20 18:08:27 email***@***.com +22 -1
Bug#9775
Test for bug + feature
Fix previous tests
mysql-test/r/sp.result
1.116 05/04/20 18:08:26 email***@***.com +24 -3
Bug#9775
Test for bug + feature
Fix previous tests
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: acurtis
# Host: ltantony.xiphis.org
# Root: /.amd_mnt/bk.anubis/host/work-acurtis/bug9102
--- 1.180/sql/item_func.cc 2005-03-28 10:15:07 +01:00
+++ 1.181/sql/item_func.cc 2005-04-20 18:08:27 +01:00
@@ -4461,7 +4461,7 @@
Item_func_sp::Item_func_sp(sp_name *name)
- :Item_func(), m_name(name), m_sp(NULL)
+ :Item_func(), m_name(name), m_sp(NULL), result_field(NULL)
{
maybe_null= 1;
m_name->init_qname(current_thd);
@@ -4470,7 +4470,7 @@
Item_func_sp::Item_func_sp(sp_name *name, List<Item> &list)
- :Item_func(list), m_name(name), m_sp(NULL)
+ :Item_func(list), m_name(name), m_sp(NULL), result_field(NULL)
{
maybe_null= 1;
m_name->init_qname(current_thd);
@@ -4527,6 +4527,29 @@
int
+Item_func_sp::execute(Field **flp)
+{
+ Item *it;
+ Field *f;
+ if (execute(&it))
+ {
+ null_value= 1;
+ return 1;
+ }
+ if (!(f= *flp))
+ {
+ *flp= f= sp_result_field();
+ f->move_field((f->pack_length() > sizeof(result_buf)) ?
+ sql_alloc(f->pack_length()) : result_buf);
+ f->null_ptr= (uchar *)&null_value;
+ f->null_bit= 1;
+ }
+ it->save_in_field(f, 1);
+ return f->is_null();
+}
+
+
+int
Item_func_sp::execute(Item **itp)
{
DBUG_ENTER("Item_func_sp::execute");
@@ -4601,6 +4624,8 @@
Field *field= 0;
DBUG_ENTER("Item_func_sp::field_type");
+ if (result_field)
+ DBUG_RETURN(result_field->type());
if (! m_sp)
m_sp= sp_find_function(current_thd, m_name, TRUE); // cache only
if ((field= sp_result_field()))
@@ -4621,6 +4646,8 @@
DBUG_ENTER("Item_func_sp::result_type");
DBUG_PRINT("info", ("m_sp = %p", m_sp));
+ if (result_field)
+ DBUG_RETURN(result_field->result_type());
if (! m_sp)
m_sp= sp_find_function(current_thd, m_name, TRUE); // cache only
if ((field= sp_result_field()))
@@ -4636,8 +4663,16 @@
void
Item_func_sp::fix_length_and_dec()
{
+ Field *field= result_field;
DBUG_ENTER("Item_func_sp::fix_length_and_dec");
+ if (result_field)
+ {
+ decimals= result_field->decimals();
+ max_length= result_field->representation_length();
+ DBUG_VOID_RETURN;
+ }
+
if (! m_sp)
m_sp= sp_find_function(current_thd, m_name, TRUE); // cache only
if (! m_sp)
@@ -4646,29 +4681,28 @@
}
else
{
- switch (result_type()) {
+ if (!field)
+ field= sp_result_field();
+
+ decimals= field->decimals();
+ max_length= field->representation_length();
+
+ switch (field->result_type()) {
case STRING_RESULT:
maybe_null= 1;
- max_length= MAX_BLOB_WIDTH;
- break;
case REAL_RESULT:
- decimals= NOT_FIXED_DEC;
- max_length= float_length(decimals);
- break;
case INT_RESULT:
- decimals= 0;
- max_length= 21;
- break;
case DECIMAL_RESULT:
- // TODO: where to find real precision and scale?
- decimals= min(DECIMAL_MAX_LENGTH / 2, NOT_FIXED_DEC - 1);
- max_length= DECIMAL_MAX_LENGTH;
+ break;
case ROW_RESULT:
default:
// This case should never be chosen
DBUG_ASSERT(0);
break;
}
+
+ if (field != result_field)
+ delete field;
}
DBUG_VOID_RETURN;
}
--- 1.105/sql/item_func.h 2005-04-19 10:50:59 +01:00
+++ 1.106/sql/item_func.h 2005-04-20 18:08:27 +01:00
@@ -1283,8 +1283,11 @@
sp_name *m_name;
mutable sp_head *m_sp;
TABLE *dummy_table;
+ Field *result_field;
+ char result_buf[64];
int execute(Item **itp);
+ int execute(Field **flp);
Field *sp_result_field(void) const;
public:
@@ -1296,6 +1299,12 @@
virtual ~Item_func_sp()
{}
+ void cleanup()
+ {
+ Item_func::cleanup();
+ result_field= NULL;
+ }
+
const char *func_name() const;
enum enum_field_types field_type() const;
@@ -1308,63 +1317,30 @@
longlong val_int()
{
- Item *it;
- longlong l;
-
- if (execute(&it))
- {
- null_value= 1;
+ if (execute(&result_field))
return 0LL;
- }
- l= it->val_int();
- null_value= it->null_value;
- return l;
+ return result_field->val_int();
}
double val_real()
{
- Item *it;
- double d;
-
- if (execute(&it))
- {
- null_value= 1;
+ if (execute(&result_field))
return 0.0;
- }
- d= it->val_real();
- null_value= it->null_value;
- return d;
+ return result_field->val_real();
}
my_decimal *val_decimal(my_decimal *dec_buf)
{
- Item *it;
- my_decimal *result;
-
- if (execute(&it))
- {
- null_value= 1;
+ if (execute(&result_field))
return NULL;
- }
- result= it->val_decimal(dec_buf);
- null_value= it->null_value;
- return result;
+ return result_field->val_decimal(dec_buf);
}
-
String *val_str(String *str)
{
- Item *it;
- String *s;
-
- if (execute(&it))
- {
- null_value= 1;
+ if (execute(&result_field))
return NULL;
- }
- s= it->val_str(str);
- null_value= it->null_value;
- return s;
+ return result_field->val_str(str);
}
void fix_length_and_dec();
--- 1.115/mysql-test/r/sp.result 2005-04-19 10:50:58 +01:00
+++ 1.116/mysql-test/r/sp.result 2005-04-20 18:08:26 +01:00
@@ -2960,14 +2960,35 @@
drop function bug9902|
drop function if exists bug9102|
create function bug9102() returns blob return 'a'|
-select bug9102();
-drop function bug9102|
+select bug9102()|
bug9102()
a
-drop procedure if exists bug7648|
+drop function bug9102|
+drop function if exists bug7648|
create function bug7648() returns bit(8) return 'a'|
select bug7648()|
bug7648()
a
drop function bug7648|
+drop function if exists bug9775|
+create function bug9775(v1 char(1)) returns enum('a','b') return v1|
+select bug9775('a'),bug9775('b'),bug9775('c')|
+bug9775('a') bug9775('b') bug9775('c')
+a b
+drop function bug9775|
+create function bug9775(v1 int) returns enum('a','b') return v1|
+select bug9775(1),bug9775(2),bug9775(3)|
+bug9775(1) bug9775(2) bug9775(3)
+a b
+drop function bug9775|
+create function bug9775(v1 char(1)) returns set('a','b') return v1|
+select bug9775('a'),bug9775('b'),bug9775('a,b'),bug9775('c')|
+bug9775('a') bug9775('b') bug9775('a,b') bug9775('c')
+a b a,b
+drop function bug9775|
+create function bug9775(v1 int) returns set('a','b') return v1|
+select bug9775(1),bug9775(2),bug9775(3),bug9775(4)|
+bug9775(1) bug9775(2) bug9775(3) bug9775(4)
+a b a,b
+drop function bug9775|
drop table t1,t2;
--- 1.110/mysql-test/t/sp.test 2005-04-19 10:50:59 +01:00
+++ 1.111/mysql-test/t/sp.test 2005-04-20 18:08:27 +01:00
@@ -3643,11 +3643,32 @@
# BUG#7648: Stored procedure crash when invoking a function that returns a bit
#
--disable_warnings
-drop procedure if exists bug7648|
+drop function if exists bug7648|
--enable_warnings
create function bug7648() returns bit(8) return 'a'|
select bug7648()|
drop function bug7648|
+
+
+#
+# BUG#9775: crash if create function that returns enum or set
+#
+--disable_warnings
+drop function if exists bug9775|
+--enable_warnings
+create function bug9775(v1 char(1)) returns enum('a','b') return v1|
+select bug9775('a'),bug9775('b'),bug9775('c')|
+drop function bug9775|
+create function bug9775(v1 int) returns enum('a','b') return v1|
+select bug9775(1),bug9775(2),bug9775(3)|
+drop function bug9775|
+
+create function bug9775(v1 char(1)) returns set('a','b') return v1|
+select bug9775('a'),bug9775('b'),bug9775('a,b'),bug9775('c')|
+drop function bug9775|
+create function bug9775(v1 int) returns set('a','b') return v1|
+select bug9775(1),bug9775(2),bug9775(3),bug9775(4)|
+drop function bug9775|
#
--- 1.127/sql/sp_head.cc 2005-04-19 09:09:11 +01:00
+++ 1.128/sql/sp_head.cc 2005-04-20 18:08:28 +01:00
@@ -378,8 +378,9 @@
result->count= src->elements;
result->name= "";
if (!(result->type_names=(const char **)
- alloc_root(mem_root,sizeof(char *)*(result->count+1))))
+ alloc_root(mem_root,(sizeof(char *)+sizeof(int))*(result->count+1))))
return 0;
+ result->type_lengths= (unsigned int *)(result->type_names + result->count+1);
List_iterator<String> it(*src);
String conv, *tmp;
uint32 dummy;
@@ -397,8 +398,10 @@
result->type_names[i]= buf;
result->type_lengths[i]= conv.length();
}
- else
+ else {
result->type_names[i]= strdup_root(mem_root, tmp->c_ptr());
+ result->type_lengths[i]= tmp->length();
+ }
// Strip trailing spaces.
uint lengthsp= cs->cset->lengthsp(cs, result->type_names[i],
@@ -407,6 +410,7 @@
((uchar *)result->type_names[i])[lengthsp]= '\0';
}
result->type_names[result->count]= 0;
+ result->type_lengths[result->count]= 0;
}
return result;
}
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=email***@***.com
- 13
- Some slow-query-log entries don't make senseHi All,
I'm trying to use the slow-query-log (with
--log-queries-not-using-indexes enabled) to determine if any queries
need optimization, and have a few questions about some entries I'm
seeing.
First question: given a table defined as:
CREATE TABLE `oa_location` (
`rowid` int(11) NOT NULL auto_increment,
`pLocation` varchar(7) NOT NULL default '',
`cLocation` varchar(7) NOT NULL default '',
[...]
PRIMARY KEY (`rowid`),
KEY `oaloc001` (`pLocation`),
KEY `oaloc002` (`cLocation`),
KEY `oaloc003` (`locType`)
) ENGINE=MyISAM AUTO_INCREMENT=448 DEFAULT CHARSET=latin1
Why would this query appear in the slow-query-log:
# Query_time: 0 Lock_time: 0 Rows_sent: 6 Rows_examined: 6
select pLocation from oa_location order by pLocation;
This query apparently took no time, and it used an indexed field.
Second question: given a table defined as:
CREATE TABLE `oa_paycode` (
`payCode` smallint(4) unsigned zerofill NOT NULL default '0000',
`shortDesc` varchar(9) default NULL,
`longDesc` varchar(30) default NULL,
`visible` enum('Y','N') default 'Y',
PRIMARY KEY (`payCode`),
UNIQUE KEY `paycd001` (`payCode`),
KEY `paycd002` (`visible`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
why would this query show up in the slow-query-log:
# Query_time: 0 Lock_time: 0 Rows_sent: 177 Rows_examined: 177
select * from oa_paycode;
Again, the query apparently took no time, and it presumably didn't need
an index (or used the primary key) since all records were requested.
Any explanations or advice would be greatly appreciated.
-Dave H.
- 14
- Help! The dreaded Access denied errorI am at the end of my rope. I've tried reading all of the FAQs. I've
scoured the docs. I've tried to complete purge my system of MySQL and
reinstall.
Still no luck.
Once I've installed it, I can't do _anything_ , including
'flush-privileges' without getting
Access denied for user: ODBC@localhost (Using password: YES)
I've tried using 'root' instead. Still no luck. I'm running on W2K. How
the h*ll do I get this to work?!
Gary
--
Gary Kephart
mailto:email***@***.com
http://www.pobox.com/~gary_kephart
"Never attribute to malice that which is adequately explained by
stupidity." -- Hanlon's Razor.
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=email***@***.com
- 15
- Count of NULL and NOT NULLSHow would I write a query to count the number of instances where a the
PREP field is NULL and when it is not null. I know how to do it
seperately, can I get the numbers in the same query. I want something
like this
Project #PREP_NOTNULL #PREP_NULL
Thanks,
Jim
|
|
|